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

/home/kozerus/public_html/go/dgs/scripts

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

> scripts/update_translation_pages.php

# then, after checking the script output on the web-page:
> scripts/update_translation_pages.php?do_it=1


# To scan PHP files and recover the "T_('')" strings,
# then update the database with new English text data,
# run the following scripts (need the ADMIN_TRANSLATORS privilege):

> scripts/generate_translation_texts.php

# then, after checking the script output on the web-page, run:
> scripts/generate_translation_texts.php?do_it=1


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

> scripts/make_all_translationfiles.php


# NOTE:
# keep in mind, that translation-text discovery only works correctly,
# if the 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!
#
# - There are two exceptions to the above two restrictions:
#
#   1. see method 'get_language_descriptions_translated()' in 'include/translation_functions.php'
#      There a variable is used.  This only works, because the file does not contain
#      a $TranslateGroups-entry (explained below) and is therefore not scanned for
#      translation-texts (otherwise it would be reported as error on creating translations).
#      And additionally this only works, because the English original texts in that method
#      are inserted on an indirect way appearing in the server-generated file
#      'translations/known_languages.php' by the admin-page to manage translation-languages.
#
#   2. 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());
#
# 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');
#
#
# 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'.

//


koh5_pano



Your browser does not support the HTML5 canvas element.


Drag mouse to navigate.

Navigation





17.Aug.2010, Martin Wengenmayer