Difference between revisions of "Po generation tool"

(Usage)
 
Line 7: Line 7:
 
* All under feature clauses named `Internationalization'.
 
* All under feature clauses named `Internationalization'.
  
The output is an [http://www.gnu.org/software/gettext/manual/html_node/gettext_9.html#SEC9 .po file] with void translations. The tool is being used for internationalization of EiffelStudio. The output file is the initial [https://origo.ethz.ch/eiffelsoftware/es/trunk/Delivery/studio/lang/po_files/estudio.pot estudio.pot] which is completed by appending other useful entries later. See [[EiffelStudio_Internationalization|EiffelStudio Internationalization]].
+
The output is an [http://www.gnu.org/software/gettext/manual/html_node/gettext_9.html#SEC9 .po file] with void translations. The tool is being used for internationalization of EiffelStudio. The output file is the initial [https://svn.origo.ethz.ch/eiffelstudio/trunk/Delivery/studio/lang/po_files/estudio.pot estudio.pot] which is completed by appending other useful entries later. See [[EiffelStudio_Internationalization|EiffelStudio Internationalization]].
 
<br>
 
<br>
 
<br>
 
<br>

Latest revision as of 21:12, 4 November 2010

Overview

The Po Generation Tool is an auxiliary tool of i18n library used extracting manifest strings from compilable Eiffel classes. The following manifest strings are extracted:

  • Direct arguments of calls of `translation' and `plural_translation' are extracted.
  • All under feature clauses named `Internationalization'.

The output is an .po file with void translations. The tool is being used for internationalization of EiffelStudio. The output file is the initial estudio.pot which is completed by appending other useful entries later. See EiffelStudio Internationalization.

The source code of the tool can be accessed here.

Usage

 Usage:
         po_generation_tool (-f|-D) INPUTFILE [(-f|-D) INPUTFILE] ... [-o OUTPUT]|[-]
 Example:
         po_generation_tool -f class1.e class2.e
         po_generation_tool -D dir1 dir2 -o out.pot
 
 Extract translatable strings from given input Eiffel class files (*.e).
 INPUTFILE ...   input files or directories
 -f              add list of input files
 -D              add list of directories to list for input files search
 -o              write output to specified file
                 If output file is -, output is written to standard output.
                 If output file is not specified, 'po_file.pot' will be generated as default name.
 -h              display this help and exit

Limitations

  • The tool now is not smart enough to identify a call of `translation' or `plural_translation' that is from an identifier of type I18N_LOCALE or others. This means that any call with the same name as `translation' and that takes one manifest string argument or with the same name as `plural_translation' and that takes two manifest string arguments is extracted.
  • Suggestion: Do not use a feature with signature like "translation(a_string: STRING_GENERAL)" or "plural_translation (a_string1: STRING_GENERAL; a_string2: STRING_GENERAL)" in your system, if i18n library and the tool are used.