remove mo files from all other languages except en_US

This commit is contained in:
soochoi 2006-05-25 16:34:26 +00:00
parent f6913624b2
commit d94014d505
2 changed files with 191 additions and 105 deletions

View File

@ -936,7 +936,7 @@ rpmBuild ()
# create the *.mo files # create the *.mo files
createMOFiles createMOFiles
cleanPOFile
# create the log directory # create the log directory
createLogDirectory createLogDirectory
@ -960,13 +960,13 @@ rpmBuild ()
createPOFile createPOFile
# delete the yast2-CASA directory in the SOURCES directory # delete the yast2-CASA directory in the SOURCES directory
deleteSourcesDirectoryContents # deleteSourcesDirectoryContents
# delete the spec file in the SPECS directory # delete the spec file in the SPECS directory
deleteSpecsDirectoryContents # deleteSpecsDirectoryContents
# delete the rpm in the RPMS directory # delete the rpm in the RPMS directory
deleteRpmsDirectoryContents # deleteRpmsDirectoryContents
# change to the package directory # change to the package directory
echo "" echo ""
@ -1208,52 +1208,86 @@ createPOFile ()
createMOFiles () createMOFiles ()
{ {
# use the CASA.pofiles files from localization to create the CASA.mo files # use the CASA.pofiles files from localization to create the CASA.mo files
cd $START_DIR cd $START_DIR
PO_DIRS="$START_DIR/pofiles/cs PO_DIRS="$START_DIR/pofiles/en_US"
$START_DIR/pofiles/de
$START_DIR/pofiles/en_US
$START_DIR/pofiles/es
$START_DIR/pofiles/fr
$START_DIR/pofiles/hu
$START_DIR/pofiles/it
$START_DIR/pofiles/ja
$START_DIR/pofiles/pl
$START_DIR/pofiles/pt_BR
$START_DIR/pofiles/ru
$START_DIR/pofiles/sk
$START_DIR/pofiles/sv
$START_DIR/pofiles/zh_CN
$START_DIR/pofiles/zh_TW"
echo "" echo ""
echo "************************************************************" echo "************************************************************"
echo "[$SCRIPT_NAME] running createMOFiles()" echo "[$SCRIPT_NAME] running createMOFiles()"
for PO_DIR in $PO_DIRS for PO_DIR in $PO_DIRS
do do
echo "[$SCRIPT_NAME] $PO_DIR" echo "[$SCRIPT_NAME] $PO_DIR"
if [ ! -e $PO_DIR/$PO_FILE ] if [ ! -e $PO_DIR/$PO_FILE ]
then then
echo "" echo ""
echo "[$SCRIPT_NAME] ERROR: $PO_DIR/$PO_FILE is missing." echo "[$SCRIPT_NAME] ERROR: $PO_DIR/$PO_FILE is missing."
echo "" echo ""
exit exit
else else
msgfmt $PO_DIR/$PO_FILE --output-file=$PO_DIR/$MO_FILE msgfmt $PO_DIR/$PO_FILE --output-file=$PO_DIR/$MO_FILE
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "" echo ""
echo "[$SCRIPT_NAME] ERROR: Failed to create $PO_DIR/$MO_FILE" echo "[$SCRIPT_NAME] ERROR: Failed to create $PO_DIR/$MO_FILE"
echo "" echo ""
exit exit
else else
echo "[$SCRIPT_NAME] $PO_DIR/$MO_FILE created successfully" echo "[$SCRIPT_NAME] $PO_DIR/$MO_FILE created successfully"
fi fi
fi fi
done done
} }
#createMOFiles ()
#{
# # use the CASA.pofiles files from localization to create the CASA.mo files
# cd $START_DIR
# PO_DIRS="$START_DIR/pofiles/cs
# $START_DIR/pofiles/de
# $START_DIR/pofiles/en_US
# $START_DIR/pofiles/es
# $START_DIR/pofiles/fr
# $START_DIR/pofiles/hu
# $START_DIR/pofiles/it
# $START_DIR/pofiles/ja
# $START_DIR/pofiles/pl
# $START_DIR/pofiles/pt_BR
# $START_DIR/pofiles/ru
# $START_DIR/pofiles/sk
# $START_DIR/pofiles/sv
# $START_DIR/pofiles/zh_CN
# $START_DIR/pofiles/zh_TW"
#
# echo ""
# echo "************************************************************"
# echo "[$SCRIPT_NAME] running createMOFiles()"
#
# for PO_DIR in $PO_DIRS
# do
# echo "[$SCRIPT_NAME] $PO_DIR"
#
# if [ ! -e $PO_DIR/$PO_FILE ]
# then
# echo ""
# echo "[$SCRIPT_NAME] ERROR: $PO_DIR/$PO_FILE is missing."
# echo ""
# exit
# else
# msgfmt $PO_DIR/$PO_FILE --output-file=$PO_DIR/$MO_FILE
# if [ $? -ne 0 ]; then
# echo ""
# echo "[$SCRIPT_NAME] ERROR: Failed to create $PO_DIR/$MO_FILE"
# echo ""
# exit
# else
# echo "[$SCRIPT_NAME] $PO_DIR/$MO_FILE created successfully"
# fi
# fi
# done
#}
clean () clean ()
{ {
cd $START_DIR cd $START_DIR
@ -1314,20 +1348,56 @@ clean ()
cd $START_DIR cd $START_DIR
} }
#cleanPOFile ()
#{
# # delete the CASA.po file
# cd $START_DIR
#
# if [ -e $START_DIR/$PO_FILE ]
# then
# echo ""
# echo "************************************************************"
# echo "[$SCRIPT_NAME] deleting $PO_FILE"
# rm $START_DIR/$PO_FILE
# fi
#
# cd $START_DIR
#}
cleanPOFile () cleanPOFile ()
{ {
# delete the CASA.po file # delete the CASA.po file
cd $START_DIR cd $START_DIR
if [ -e $START_DIR/$PO_FILE ] echo ""
then echo "************************************************************"
echo "" echo "[$SCRIPT_NAME] deleting the *.po files"
echo "************************************************************" PO_FILE=CASA.po
echo "[$SCRIPT_NAME] deleting $PO_FILE" PO_FILES="$START_DIR/pofiles/cs/$PO_FILE
rm $START_DIR/$PO_FILE $START_DIR/pofiles/de/$PO_FILE
fi $START_DIR/pofiles/es/$PO_FILE
$START_DIR/pofiles/fr/$PO_FILE
$START_DIR/pofiles/hu/$PO_FILE
$START_DIR/pofiles/it/$PO_FILE
$START_DIR/pofiles/ja/$PO_FILE
$START_DIR/pofiles/pl/$PO_FILE
$START_DIR/pofiles/pt_BR/$PO_FILE
$START_DIR/pofiles/ru/$PO_FILE
$START_DIR/pofiles/sk/$PO_FILE
$START_DIR/pofiles/sv/$PO_FILE
$START_DIR/pofiles/zh_CN/$PO_FILE
$START_DIR/pofiles/zh_TW/$PO_FILE"
cd $START_DIR for PO_PATH_AND_FILE in $PO_FILES
do
if [ -e $PO_PATH_AND_FILE ]
then
echo "[$SCRIPT_NAME] deleting $PO_PATH_AND_FILE"
rm $PO_PATH_AND_FILE
fi
done
cd $START_DIR
} }
cleanPOTFile () cleanPOTFile ()
@ -1357,7 +1427,6 @@ cleanMOFiles ()
MO_FILES="$START_DIR/pofiles/cs/$MO_FILE MO_FILES="$START_DIR/pofiles/cs/$MO_FILE
$START_DIR/pofiles/de/$MO_FILE $START_DIR/pofiles/de/$MO_FILE
$START_DIR/pofiles/en_US/$MO_FILE
$START_DIR/pofiles/es/$MO_FILE $START_DIR/pofiles/es/$MO_FILE
$START_DIR/pofiles/fr/$MO_FILE $START_DIR/pofiles/fr/$MO_FILE
$START_DIR/pofiles/hu/$MO_FILE $START_DIR/pofiles/hu/$MO_FILE

View File

@ -1,67 +1,84 @@
# Makefile.am for CASA/pofiles # Makefile.am for CASA/pofiles
csdir = /usr/share/YaST2/locale/cs/LC_MESSAGES #csdir = /usr/share/YaST2/locale/cs/LC_MESSAGES
dedir = /usr/share/YaST2/locale/de/LC_MESSAGES #dedir = /usr/share/YaST2/locale/de/LC_MESSAGES
enUSdir = /usr/share/YaST2/locale/en_US/LC_MESSAGES enUSdir = /usr/share/YaST2/locale/en_US/LC_MESSAGES
esdir = /usr/share/YaST2/locale/es/LC_MESSAGES #esdir = /usr/share/YaST2/locale/es/LC_MESSAGES
frdir = /usr/share/YaST2/locale/fr/LC_MESSAGES #frdir = /usr/share/YaST2/locale/fr/LC_MESSAGES
hudir = /usr/share/YaST2/locale/hu/LC_MESSAGES #hudir = /usr/share/YaST2/locale/hu/LC_MESSAGES
itdir = /usr/share/YaST2/locale/it/LC_MESSAGES #itdir = /usr/share/YaST2/locale/it/LC_MESSAGES
jadir = /usr/share/YaST2/locale/ja/LC_MESSAGES #jadir = /usr/share/YaST2/locale/ja/LC_MESSAGES
pldir = /usr/share/YaST2/locale/pl/LC_MESSAGES #pldir = /usr/share/YaST2/locale/pl/LC_MESSAGES
ptBRdir = /usr/share/YaST2/locale/pt_BR/LC_MESSAGES #ptBRdir = /usr/share/YaST2/locale/pt_BR/LC_MESSAGES
rudir = /usr/share/YaST2/locale/ru/LC_MESSAGES #rudir = /usr/share/YaST2/locale/ru/LC_MESSAGES
skdir = /usr/share/YaST2/locale/sk/LC_MESSAGES #skdir = /usr/share/YaST2/locale/sk/LC_MESSAGES
svdir = /usr/share/YaST2/locale/sv/LC_MESSAGES #svdir = /usr/share/YaST2/locale/sv/LC_MESSAGES
zhCNdir = /usr/share/YaST2/locale/zh_CN/LC_MESSAGES #zhCNdir = /usr/share/YaST2/locale/zh_CN/LC_MESSAGES
zhTWdir = /usr/share/YaST2/locale/zh_TW/LC_MESSAGES #zhTWdir = /usr/share/YaST2/locale/zh_TW/LC_MESSAGES
cs_DATA = \ cs_DIR = cs
cs/CASA.mo de_DIR = de
es_DIR = es
fr_DIR = fr
hu_DIR = hu
it_DIR = it
ja_DIR = ja
pl_DIR = pl
ptBR_DIR = pt_BR
ru_DIR = ru
sk_DIR = sk
sv_DIR = sv
zhCN_DIR = zh_CN
zhTW_DIR = zh_TW
de_DATA = \
de/CASA.mo #cs_DATA = \
# cs
#de_DATA = \
# de/CASA.mo
enUS_DATA = \ enUS_DATA = \
en_US/CASA.mo en_US/CASA.mo
es_DATA = \ #es_DATA = \
es/CASA.mo # es/CASA.mo
fr_DATA = \ #fr_DATA = \
fr/CASA.mo # fr/CASA.mo
hu_DATA = \ #hu_DATA = \
hu/CASA.mo # hu/CASA.mo
it_DATA = \ #it_DATA = \
it/CASA.mo # it/CASA.mo
ja_DATA = \ #ja_DATA = \
ja/CASA.mo # ja/CASA.mo
pl_DATA = \ #pl_DATA = \
pl/CASA.mo # pl/CASA.mo
ptBR_DATA = \ #ptBR_DATA = \
pt_BR/CASA.mo # pt_BR/CASA.mo
ru_DATA = \ #ru_DATA = \
ru/CASA.mo # ru/CASA.mo
sk_DATA = \ #sk_DATA = \
sk/CASA.mo # sk/CASA.mo
sv_DATA = \ #sv_DATA = \
sv/CASA.mo # sv/CASA.mo
zhCN_DATA = \ #zhCN_DATA = \
zh_CN/CASA.mo # zh_CN/CASA.mo
zhTW_DATA = \ #zhTW_DATA = \
zh_TW/CASA.mo # zh_TW/CASA.mo
EXTRA_DIST = $(cs_DATA) $(de_DATA) $(enUS_DATA) $(es_DATA) $(fr_DATA) $(hu_DATA) \ EXTRA_DIST = $(cs_DIR) $(de_DIR) $(enUS_DATA) $(es_DIR) $(fr_DIR) $(hu_DIR) \
$(it_DATA) $(ja_DATA) $(pl_DATA) $(ptBR_DATA) $(ru_DATA) $(sk_DATA) \ $(it_DIR) $(ja_DIR) $(pl_DIR) $(ptBR_DIR) $(ru_DIR) $(sk_DIR) \
$(sv_DATA) $(zhCN_DATA) $(zhTW_DATA) $(sv_DIR) $(zhCN_DIR) $(zhTW_DIR)