DIR : /home/kozerus/public_html/go/dgs0/scripts/README.translations

/home/kozerus/public_html/go/dgs0/scripts

To scan PHP files and recover Groups+Pages,
run (need the ADMIN_DATABASE privilege):

# NOTE:
# keep in mind, that translation-text discovery only works correctly,
# if T_('')-call is correct. Only constant quoted strings are valid.
# Using defined constants does not work, because the eval-scope would need
# to know the constant when parse in the script 'scripts/generate_translation_texts.php'.
# Variables within texts are not allowed, because they can't be statically
# used as translation texts!
#
# Examples (valid):   T_('text')  T_('a' . 'b')
# Examples (invalid): T_($var)  T_(" .. $var ")  T_( func() )
# Examples (invalid): T_(DEF_CONST)   // with previous define('DEF_CONST', 'text');
#
# Variables can be used when all possible instances of the variable are declared
# translation texts somewhere in a "registered page" (with TranslateGroup), even
# if the statements are never executed. For example see 'statisticspng.php'.
# Variables can then be used by defining a placeholder-function like:
#
#    $TW_ = 'T_';   echo $TW_($var) . $TW_(func());
#
# Leading and trailing white-spaces are not allowed within a T_('text ').
# Those are trimmed away. You have to use the white-space outside of the
# translation-text, e.g.  T_('text') . ' '.


# NOTE:
# When adding new sub-directories with PHP-files,
# you must add them in the find_php_files()-function in the script
# 'scripts/update_translation_pages.php'
# Afterwards the 'update_translation_pages.php'-script needs to be run
# at least two times to find all new groups and new pages.


# NOTE:
# Each file with translations must set a translation-group with the
# following line (first one taken):
#
#     $TranslateGroups[] = "GroupName";
#
# The statement must begin in the first column. The exact regex for matching
# the line can be checked in the script 'scripts/update_translation_pages.php'.



> scripts/update_translation_pages.php
then, after checking:
> scripts/update_translation_pages.php?do_it=1




To scan PHP files and recover the "T_('')" strings
then update the database with new english texts,
run the following (need the ADMIN_TRANSLATORS privilege):

> scripts/generate_translation_texts.php
then, after checking:
> scripts/generate_translation_texts.php?do_it=1




To create all translation files used by the server,
run (need no privilege):

> scripts/make_all_translationfiles.php



//


koh5_pano



Your browser does not support the HTML5 canvas element.


Drag mouse to navigate.

Navigation





17.Aug.2010, Martin Wengenmayer