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
createMOFiles
cleanPOFile
# create the log directory
createLogDirectory
@ -960,13 +960,13 @@ rpmBuild ()
createPOFile
# delete the yast2-CASA directory in the SOURCES directory
deleteSourcesDirectoryContents
# deleteSourcesDirectoryContents
# delete the spec file in the SPECS directory
deleteSpecsDirectoryContents
# deleteSpecsDirectoryContents
# delete the rpm in the RPMS directory
deleteRpmsDirectoryContents
# deleteRpmsDirectoryContents
# change to the package directory
echo ""
@ -1208,52 +1208,86 @@ createPOFile ()
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()"
# use the CASA.pofiles files from localization to create the CASA.mo files
cd $START_DIR
PO_DIRS="$START_DIR/pofiles/en_US"
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
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
}
#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 ()
{
cd $START_DIR
@ -1314,20 +1348,56 @@ clean ()
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 ()
{
# 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
# delete the CASA.po file
cd $START_DIR
echo ""
echo "************************************************************"
echo "[$SCRIPT_NAME] deleting the *.po files"
PO_FILE=CASA.po
PO_FILES="$START_DIR/pofiles/cs/$PO_FILE
$START_DIR/pofiles/de/$PO_FILE
$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"
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 ()
@ -1357,7 +1427,6 @@ cleanMOFiles ()
MO_FILES="$START_DIR/pofiles/cs/$MO_FILE
$START_DIR/pofiles/de/$MO_FILE
$START_DIR/pofiles/en_US/$MO_FILE
$START_DIR/pofiles/es/$MO_FILE
$START_DIR/pofiles/fr/$MO_FILE
$START_DIR/pofiles/hu/$MO_FILE

View File

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