We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19594
    • 77 Posts
    The following lines are duplicated in the language file "english.inc.php"
    $_lang['search'] = "Search";
    $_lang["show_tree"] = "Show tree";
    $_lang['tmplvars_locked_message'] = "This variable is locked.";

    This little bug causes problem for translators, who control their lang file and delete the duplicates wink Having then a different number of strings, you get always the message (of course in the translated language):
    Configuration warning: incorrect number of entries in language file
    The currently selected language has a different number of entries than the default language. While not necessarily a problem, this may mean the language file needs to be updated.
    I suggest someone also deletes the duplicates in the file "english.inc.php".

    [EDIT] I’ve added task 92 for this issue : http://modxcms.com/bugs/index.php?do=details&id=92
      Nicolas
      • 25663 MODX Staff
      • 12,272 Posts
      And now it’s been committed. Thank you for catching this. smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 19594
        • 77 Posts
        I just requested to re-open this bug (is it the right way to do it?) because there is still this duplicate string in the file

        $_lang['search'] = "Search";
          Nicolas
          • 19594
          • 77 Posts
          Because of the mess of double-quotes (") and single-quotes (’), I didn’t identify all the duplicates yet (still searching).

          I suggest that we impose a "standard" for the string format in lang files. I suggest following format (only single quotes as delimiters, double quotes in the string if needed or desired):
          $_lang['var_name'] = 'String with escaped quotes (\') and "natural" double quotes';


          (I heard somewhere that single quotes are more efficient in PHP).
            Nicolas
            • 19594
            • 77 Posts
            After changing several double quotes to single one, I found these duplicate lines
            $_lang['password'] = "Password";
            $_lang['icon'] = "Icon";
            $_lang['advanced'] = "Advanced";
            
              Nicolas
              • 13577
              • 302 Posts
              Quote from: mina at Oct 28, 2005, 03:41 AM
              ...I heard somewhere that single quotes are more efficient in PHP...
              Probably because single quotes aren’t iterpolated. That makes sense. Still, if it will keep me from having to escape a bunch of single quote marks, I’ll be happy to use doubles on my string! wink
                Standard Disclaimer
                I could be totally wrong.
                • 25663 MODX Staff
                • 12,272 Posts
                I think that the majority of the duplicate lines have been located. The French and Italian language files have now been updated and appear to be working great in the manager (no discrepancies in number of language entries).
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 1876
                  • 835 Posts
                  Hi

                  Is it possible to find the news english.inc.php file?

                  Aour
                    • 25663 MODX Staff
                    • 12,272 Posts
                    LOL... i am literally working on that now!

                    I’ve also added three new lines to the translation:

                    /***************************************************************************/
                    // new in 0.9.1
                    /***************************************************************************/
                    $_lang[’QE_title’] = ’QuickEdit’; // please change only if it violates local trademarks
                    $_lang[’QE_show_links’] = ’Show links’;
                    $_lang[’QE_hide_links’] = ’Hide links’;

                    This will address the QuickEdit translation
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 25663 MODX Staff
                      • 12,272 Posts
                      Done... I’ll upload my changes to teh french forum too...
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me