From 140d836e9cd54fb67b969fd82ef7ed19ba574d40 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Sat, 26 Apr 2014 15:11:58 +0200 Subject: Imported Upstream version 2.3.1 --- src/engine/SCons/Tool/msgmerge.xml | 107 +++++++++++++++++++++++++++---------- 1 file changed, 80 insertions(+), 27 deletions(-) (limited to 'src/engine/SCons/Tool/msgmerge.xml') diff --git a/src/engine/SCons/Tool/msgmerge.xml b/src/engine/SCons/Tool/msgmerge.xml index 3f8ac1a..11f5d00 100644 --- a/src/engine/SCons/Tool/msgmerge.xml +++ b/src/engine/SCons/Tool/msgmerge.xml @@ -1,33 +1,55 @@ + + + +%scons; + +%builders-mod; + +%functions-mod; + +%tools-mod; + +%variables-mod; +]> + + + + This scons tool is a part of scons &t-link-gettext; toolset. It provides scons interface to msgmerge(1) command, which merges two Uniform style .po files together. + -MSGMERGE -MSGMERGECOM -MSGMERGECOMSTR -MSGMERGEFLAGS -POSUFFIX -POTSUFFIX -POUPDATE_ALIAS +MSGMERGE +MSGMERGECOM +MSGMERGECOMSTR +MSGMERGEFLAGS +POSUFFIX +POTSUFFIX +POUPDATE_ALIAS -POTDOMAIN -LINGUAS_FILE -POAUTOINIT +POTDOMAIN +LINGUAS_FILE +POAUTOINIT + The builder belongs to &t-link-msgmerge; tool. The builder updates PO files with msgmerge(1), or initializes missing PO files as described in documentation of @@ -35,7 +57,9 @@ missing PO files as described in documentation of &cv-link-POAUTOINIT;). Note, that &b-POUpdate; does not add its targets to po-create alias as &b-link-POInit; does. + + Target nodes defined through &b-POUpdate; are not built by default (they're Ignored from '.' node). Instead, they are added automatically to special Alias @@ -43,77 +67,94 @@ they are added automatically to special Alias through the &cv-link-POUPDATE_ALIAS; construction variable. You can easilly update PO files in your project by scons po-update. + + Example 1. Update en.po and pl.po from messages.pot template (see also &cv-link-POTDOMAIN;), assuming that the later one exists or there is rule to build it (see &b-link-POTUpdate;): - + + # ... env.POUpdate(['en','pl']) # messages.pot --> [en.po, pl.po] - + + Example 2. Update en.po and pl.po from foo.pot template: - + + # ... env.POUpdate(['en', 'pl'], ['foo']) # foo.pot --> [en.po, pl.pl] - + + Example 3. Update en.po and pl.po from foo.pot (another version): - + + # ... env.POUpdate(['en', 'pl'], POTDOMAIN='foo') # foo.pot -- > [en.po, pl.pl] - + + Example 4. Update files for languages defined in LINGUAS file. The files are updated from messages.pot template: - + + # ... env.POUpdate(LINGUAS_FILE = 1) # needs 'LINGUAS' file - + + Example 5. Same as above, but update from foo.pot template: - + + # ... env.POUpdate(LINGUAS_FILE = 1, source = ['foo']) - + + Example 6. Update en.po and pl.po plus files for languages defined in LINGUAS file. The files are updated from messages.pot template: - + + # produce 'en.po', 'pl.po' + files defined in 'LINGUAS': env.POUpdate(['en', 'pl' ], LINGUAS_FILE = 1) - + + Example 7. Use &cv-link-POAUTOINIT; to automatically initialize PO file if it doesn't exist: - + + # ... env.POUpdate(LINGUAS_FILE = 1, POAUTOINIT = 1) - + + Example 8. Update PO files for languages defined in LINGUAS file. The files are updated from foo.pot template. All necessary settings are pre-configured via environment. - + + # ... env['POAUTOINIT'] = 1 env['LINGUAS_FILE'] = 1 env['POTDOMAIN'] = 'foo' env.POUpdate() - + @@ -121,38 +162,50 @@ pre-configured via environment. + Common alias for all PO files being defined with &b-link-POUpdate; builder (default: 'po-update'). See &t-link-msgmerge; tool and &b-link-POUpdate; builder. + + Absolute path to msgmerge(1) binary as found by Detect(). See &t-link-msgmerge; tool and &b-link-POUpdate; builder. + + Complete command line to run msgmerge(1) command. See &t-link-msgmerge; tool and &b-link-POUpdate; builder. + + String to be displayed when msgmerge(1) is invoked (default: '', which means ``print &cv-link-MSGMERGECOM;''). See &t-link-msgmerge; tool and &b-link-POUpdate; builder. + + Additional flags to msgmerge(1) command. See &t-link-msgmerge; tool and &b-link-POUpdate; builder. + + + \ No newline at end of file -- cgit v1.2.3