|
Revision 12696, 1.6 kB
(checked in by mbrevda, 2 years ago)
|
while trying to fix the languagestatus module I ended up refactoring some of the i18n scripts, which in turn rebuilt/updated all the translation files. If I broke anything or otherwise did soemthing stupid, feel free to revert the entire checkin and ill try again
|
- Property svn:executable set to
*
|
| Line | |
|---|
| 1 |
#! /bin/sh |
|---|
| 2 |
# Copyright (c) 2008, 20i0 Mikael Carlsson |
|---|
| 3 |
# This program is free software; you can redistribute it and/or |
|---|
| 4 |
# modify it under the terms of the GNU General Public License |
|---|
| 5 |
# as published by the Free Software Foundation; either version 2 |
|---|
| 6 |
# of the License, or (at your option) any later version. |
|---|
| 7 |
# |
|---|
| 8 |
# This program is distributed in the hope that it will be useful, |
|---|
| 9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 11 |
# GNU General Public License for more details. |
|---|
| 12 |
# |
|---|
| 13 |
# The purpose of this script is to merge all language .po from .pot file |
|---|
| 14 |
# For this script to work you need to so svn co for for branch and for modules and |
|---|
| 15 |
# install this in the same tree so that the script can do all extraction at once. |
|---|
| 16 |
# |
|---|
| 17 |
for i in *; do |
|---|
| 18 |
#dont do anything for these modules |
|---|
| 19 |
[ $i = 'fw_ari' ] || [ $i = 'core' ] || [ $i = 'fw_fop' ] && continue |
|---|
| 20 |
echo "Module $i" |
|---|
| 21 |
for j in $i/i18n/*; do |
|---|
| 22 |
echo "Found language $j" |
|---|
| 23 |
if [ -d ${j}/LC_MESSAGES ]; then |
|---|
| 24 |
echo "Language $j" |
|---|
| 25 |
if [ -f ${j}/LC_MESSAGES/$i.po ]; then |
|---|
| 26 |
echo "Found $i.po for language $j" |
|---|
| 27 |
# Merge the .po file from the .pot file |
|---|
| 28 |
msgmerge -N -U ${j}/LC_MESSAGES/$i.po $i/i18n/$i.pot |
|---|
| 29 |
# Remove the .po~ file |
|---|
| 30 |
rm ${j}/LC_MESSAGES/$i.po~ |
|---|
| 31 |
# And compile the .po to .mo |
|---|
| 32 |
msgfmt -v ${j}/LC_MESSAGES/$i.po -o ${j}/LC_MESSAGES/$i.mo |
|---|
| 33 |
fi |
|---|
| 34 |
fi |
|---|
| 35 |
done |
|---|
| 36 |
done |
|---|