root/alternc-procmail/trunk/dopo.sh
| Revision 1268, 1.0 kB (checked in by anonymous, 4 years ago) | |
|---|---|
| |
| Line | |
|---|---|
| 1 | #!/bin/sh |
| 2 | |
| 3 | # AlternC Language file builder |
| 4 | # $id$ |
| 5 | # |
| 6 | # This script build one "alternc.mo" file per language in /var/alternc/bureau/locales/ |
| 7 | # Each alternc.mo file is build with msgfmt from a alternc.po file. |
| 8 | # Each alternc.po file is build from a serie of .po files located in |
| 9 | # /var/alternc/bureau/locales/<lang>/LC_MESSAGES/*.po |
| 10 | # main.txt is included before all others .po to construct a complete alternc.po file. |
| 11 | |
| 12 | # - Advantages : |
| 13 | # * allow to add or remove standalone modules to an existing AlternC fluently |
| 14 | # * only one textdomain is used in all the sources (no need to change it from module to module) |
| 15 | # - Drawbacks : |
| 16 | # * AlternC now requires gettext package to work properly |
| 17 | # * .mo file must be compiled at each upgrade/install |
| 18 | |
| 19 | function dolangs { |
| 20 | read A |
| 21 | while [ "$A" ] |
| 22 | do |
| 23 | B="$A/LC_MESSAGES" |
| 24 | rm -f "$B/procmail_builder.mo" |
| 25 | msgfmt "$B/procmail_builder.po" -o "$B/procmail_builder.mo" |
| 26 | read A |
| 27 | done |
| 28 | } |
| 29 | |
| 30 | # Apply the function to each language |
| 31 | find locales -type d -maxdepth 1 -mindepth 1 -name "*_*" | dolangs |
| 32 | exit 0 |
Note: See TracBrowser for help on using the browser.
