CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • function ts() name colision fix?
Pages: [1]

Author Topic: function ts() name colision fix?  (Read 2587 times)

jooplaan

  • Guest
function ts() name colision fix?
November 21, 2008, 04:19:32 am
Is the function ts() name colison fixed in the latest version (2.1.2)? I can't seem to find release notes for this release.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: function ts() name colision fix?
November 21, 2008, 04:50:59 am
We weren’t planning to rename the ts() function. We believe this will ultimately be fixed by PHP 5.3’s namespaces; the Localizer module changed their function name, and for the i18n module the patch to change its name is available in this thread.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

jooplaan

  • Guest
Re: function ts() name colision fix?
November 21, 2008, 07:51:04 am
I feel uncomfortable patching another module to make this one work. The i18n is very well supported and nearly Drupal Core, so to speak. You are asking me to patch (ducktape) another module to make civicrm work, and wait until my hosting provider upgrades to a newer version of PHP? In the mean time every time an update for the i18n module comes out I have to remember to patch it again and again? Ok. :)
As I am testing civicrm only, this is fine for now, but it also means I can't use civicrm on a production site until this issue is resolved -not patched-.

Thanks for the update.
 

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: function ts() name colision fix?
November 23, 2008, 03:06:41 pm
Quote from: jooplaan on November 21, 2008, 07:51:04 am
I feel uncomfortable patching another module to make this one work. The i18n is very well supported and nearly Drupal Core, so to speak.

Two very good reasons, and I fully understand your situation and your decision.

Unfortunately, there isn’t much we can do here for now (we’re very open to any suggestions, though!). We (as everybody else…) need a function with a short name to make our code sane, and switching to another could as well mean we simply delay the problem until another such collision happens.

Quote from: jooplaan on November 21, 2008, 07:51:04 am
You are asking me to patch (ducktape) another module to make civicrm work, and wait until my hosting provider upgrades to a newer version of PHP?

You can also patch CiviCRM to use another function instead of ts(), but a quick grep reveals it would mean patching over 5793 lines in over 570 files.

(If you want a state-of-the-art solution, you can use Git or Bazaar to branch either i18n or CiviCRM, patch it, and then merge the upstream every time it releases – which would still be way more sane with the size of the i18n patch versus the size of CiviCRM patch…)

Seriously, though – we’re more than willing to apply any sane solution that would really help solve this problem.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • function ts() name colision fix?

This forum was archived on 2017-11-26.