Losing of lang-strings

Found a bug? Tell us!!
Post Reply
LazyBadger
Regular
Posts: 176
Joined: Mon Aug 25, 2008 12:25 pm
Location: Russia
Contact:

Losing of lang-strings

Post by LazyBadger »

Serendipity 1.5.5, base core code. I saw in sources of lang.inc.php

Code: Select all

    if (@include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_'. $serendipity['lang'] .'.inc.php') ) {
        // Only here can we truely say the language is loaded
        define('serendipity_LANG_LOADED', true);
        if (function_exists('serendipity_db_reconnect')) {
            serendipity_db_reconnect();
        }
...
    // Do fallback to english
    if (IS_installed === false || (defined('IS_up2date') && IS_up2date === false)) {
        @include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_en.inc.php');
but, if localisation-file and serendipity_lang_en.inc.php are out of sync in terms of keys, we have undefined strings in interface.
From my POV, serendipity_lang_en.inc.php must be included first, before localisation (which overload duplicated strings but show missing in pure English instead of f.e INSTALL_OFFSET_ON_SERVER_TIME
INSTALL_OFFSET_ON_SERVER_TIME_DESC)
Quis custodiet ipsos custodes?
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Losing of lang-strings

Post by kleinerChemiker »

iirc the language strings are saved as constants. If you try to define a constant a second time, you will get an error.
Post Reply