#2776 Problem with string in admin.en.php

v4.3.0
closed-fixed
Gerry Kroll
None
1
2010-02-04
2010-02-02
Jens Hyllegaard
No

When I try to use the translation tool, I get errors after translating the following string:

$pgv_lang["using_php_version"] = "You are using PHP version ".PHP_VERSION;

When I try to translate it to Danish, the result comes out looking like this:

$pgv_lang["using_php_version"] = "Du bruger PHP version ";gv_lang["using_php_version"] = "Du bruger PHP version ".PHP_VERSION;

I can remove the error by encapsulating the PHP_VERSION string like this:

$pgv_lang["using_php_version"] = "Du bruger PHP version ".PHP_VERSION."";

So in my case it is solved, But I thought there might be reason to find the problem in either the translation tool or the english file.

Regards

Jens

Discussion

    • priority: 5 --> 1
     
  • Changed priority.

     
  • Gerry Kroll
    Gerry Kroll
    2010-02-02

    Thank you for bringing this to our attention.

    I don't think we'll do anything about this -- the changes required to fix the problem are very complex, and the effort isn't warranted when one considers how infrequently the language translation tool is used.

    Most translators don't bother with this tool; they use various text editors when they need to make extensive changes to the language files.

    We'll probably change the function used to decode language variables so that constants (which is what PHP_VERSION is) are referenced in text the same way any other language or global variable is referenced. Like so:
    $pgv_lang["using_php_version"] = "Du bruger PHP version #PHP_VERSION#";

     
  • Gerry Kroll
    Gerry Kroll
    2010-02-04

    As discussed, the text of the $pgv_lang variable was changed. The reference to the actual PHP version number in the message is now #PGV_ACTUAL_PHP_VERSION# .

    This required a minor change to session.php.

    I see that the admin.da.php file has been updated accordingly.

     
  • Gerry Kroll
    Gerry Kroll
    2010-02-04

    • assigned_to: nobody --> canajun2eh
    • status: open --> pending-fixed
     
    • status: pending-fixed --> open-fixed
     
  • Thank you for your swift action on this.

     
  • Gerry Kroll
    Gerry Kroll
    2010-02-04

    • status: open-fixed --> closed-fixed