(file) Return to test.linux.sh CVS log (file) (dir) Up to [OMI] / omi / tests / pal_intlstr_sample

 1 krisbash 1.1 #!/bin/sh
 2              
 3              # translate strings.def into (project-wide) messages.pot
 4              # -E = only preprocessor is run, no complier or linker
 5              
 6              cpp strings.def -E -I ../.. -include output/include/config.h -include pal/intlstr.xgettext.inc | xgettext --language=C - --indent --foreign-user --output=messages.pot
 7              
 8              # artificially translate messages.po into pt_BR.po
 9              rm -rf pt_BR*
10              msginit --input=messages.pot --locale=pt_BR --no-translator
11              sed --in-place pt_BR.po --expression='N;/msgid.*\nmsgstr.*/s/msgid "\([^"]\+\)".*/msgid "\1"\nmsgstr "This is a localized string. \1"/;P;D'
12              
13              # translate pt_BR.po into pt_BR.mo
14              msgfmt --check-format pt_BR.po --output-file=pt_BR.mo --verbose
15              
16              # copy the binary and .mo files into the right relative locations
17              cp ../../output/bin/pal_intlstr_sample .
18              mkdir -p ./pt_BR/LC_MESSAGES
19              cp pt_BR.mo ./pt_BR/LC_MESSAGES/pal_intlstr_sample.exe.mo
20              
21              # run the test
22 krisbash 1.1 export LANGUAGE=
23              export LANG=
24              ./pal_intlstr_sample
25              export LANG=pt_BR
26              ./pal_intlstr_sample
27              
28              

ViewCVS 0.9.2