Closed (fixed)
Project:
Internationalization
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Aug 2008 at 14:20 UTC
Updated:
2 Jan 2014 at 23:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
steve.m commentedI second this. CiviCRM's position is that they chose the function name first:
http://forum.civicrm.org/index.php/topic,4269.0.html
Apparently Localizer renamed their ts() function in response to the same problem:
http://drupal.org/node/239525
Comment #2
mfbHope this will get fixed here, civicrm trunk still has ts() in global scope. You probably want a shorter function name than the attached patch, I'm just trying to get the ball rolling.
Comment #3
nedjoYes, this is worth fixing. Many sites will need both i18n and CiviCRM.
Is i18ncontent indeed the only place in i18n that ts() is called?
If so, apparently the longer name won't be much of a problem.
Comment #4
mrfelton commentedI can confirm that the above patch works for me with beta6 (it doesn't apply cleanly against the latest dev release)
Comment #5
mrfelton commentedIt seems that one (or more) were missed:
Fatal error: Call to undefined function tt() in /home/tom/public_html/concern-6.x/sites/all/modules/i18n/i18nmenu/i18nmenu.module on line 109
Comment #6
mfb@mrfelton: that should be a different issue, as this patch is re: ts() not tt().
Comment #7
mfbre-rolled against latest 6.x-1.x-dev
Comment #8
nedjoComment #9
jose reyero commentedCommitted, thanks
(Also seriously considering to rename all these short functions to use i18n_ namespace, this short names may not have been a good idea...)
Comment #10
ClearXS commentedThanks to Jose for recommending me this page with the solution. Through a google search on the error message I couldn't find this page before, so I'll quote the error message again for others:
Fatal error: Cannot redeclare ts() in .../sites/all/modules/civicrm/CRM/Core/I18n.php on line 320
And for the very latest civicrm module:
Fatal error: Cannot redeclare ts() in .../sites/all/modules/civicrm/CRM/Core/I18n.php on line 321
I'd opened this forumtopic:
http://drupal.org/node/357667
-which is only for the record with the solution/page here.