cmake: do not compile removed pot files

i18n: forgot generate_pot.sh in previous commit


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4711 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut@gmail.com 2011-06-05 09:18:08 +00:00
parent 8cbe0d9296
commit e9183c87f0
2 changed files with 20 additions and 24 deletions

View File

@ -66,20 +66,20 @@ TER_KEY2=pxLt
TER_KEY3=pxEt TER_KEY3=pxEt
echo "Generate $MAIN_POT" echo "Generate $MAIN_POT"
xgettext --keyword=$MAIN_KEY1 --keyword=$MAIN_KEY2 $GENERAL_OPTION $input_files --output=$MAIN_POT xgettext --keyword=$MAIN_KEY1 --keyword=$MAIN_KEY2 --keyword=$DEV_KEY1 --keyword=$DEV_KEY2 --keyword=$TER_KEY1 --keyword=$TER_KEY2 $GENERAL_OPTION $input_files --output=$MAIN_POT
sed --in-place $MAIN_POT --expression=s/charset=CHARSET/charset=UTF-8/ sed --in-place $MAIN_POT --expression=s/charset=CHARSET/charset=UTF-8/
echo "Generate $DEV_POT" # echo "Generate $DEV_POT"
xgettext --keyword=$DEV_KEY1 --keyword=$DEV_KEY2 $GENERAL_OPTION $input_files --output=$DEV_POT # xgettext --keyword=$DEV_KEY1 --keyword=$DEV_KEY2 $GENERAL_OPTION $input_files --output=$DEV_POT
sed --in-place $DEV_POT --expression=s/charset=CHARSET/charset=UTF-8/ # sed --in-place $DEV_POT --expression=s/charset=CHARSET/charset=UTF-8/
echo "Generate $ICO_POT" echo "Generate $ICO_POT"
xgettext --keyword=$ICO_KEY1 $GENERAL_OPTION $input_files --output=$ICO_POT xgettext --keyword=$ICO_KEY1 --keyword=$TER_KEY3 $GENERAL_OPTION $input_files --output=$ICO_POT
sed --in-place $ICO_POT --expression=s/charset=CHARSET/charset=UTF-8/ sed --in-place $ICO_POT --expression=s/charset=CHARSET/charset=UTF-8/
echo "Generate $TER_POT" # echo "Generate $TER_POT"
xgettext --keyword=$TER_KEY1 --keyword=$TER_KEY2 --keyword=$TER_KEY3 $GENERAL_OPTION $input_files --output=$TER_POT # xgettext --keyword=$TER_KEY1 --keyword=$TER_KEY2 --keyword=$TER_KEY3 $GENERAL_OPTION $input_files --output=$TER_POT
sed --in-place $TER_POT --expression=s/charset=CHARSET/charset=UTF-8/ # sed --in-place $TER_POT --expression=s/charset=CHARSET/charset=UTF-8/
###################################################################### ######################################################################
# Add poedit metadata # Add poedit metadata
@ -94,9 +94,9 @@ sed --in-place $TER_POT --expression=s/charset=CHARSET/charset=UTF-8/
# Normally "...Content-Transfer-Encoding..." is the end of the header. Use it as anchor to place poedit metadata after # Normally "...Content-Transfer-Encoding..." is the end of the header. Use it as anchor to place poedit metadata after
COMMON_META="\"X-Poedit-SourceCharset: utf-8\\\n\"\n\"X-Poedit-Basepath: trunk\\\\\\\\\\\n\"\n\"X-Poedit-SearchPath-0: pcsx2\\\n\"\n\"X-Poedit-SearchPath-1: common\\\n\"" COMMON_META="\"X-Poedit-SourceCharset: utf-8\\\n\"\n\"X-Poedit-Basepath: trunk\\\\\\\\\\\n\"\n\"X-Poedit-SearchPath-0: pcsx2\\\n\"\n\"X-Poedit-SearchPath-1: common\\\n\""
sed --in-place $MAIN_POT --expression=s/'\"Content-Transfer-Encoding: 8bit\\n\"'/"\"Content-Transfer-Encoding: 8bit\\\n\"\n\"X-Poedit-KeywordsList: ${MAIN_KEY1};${MAIN_KEY2}\\\n\"\n${COMMON_META}"/ sed --in-place $MAIN_POT --expression=s/'\"Content-Transfer-Encoding: 8bit\\n\"'/"\"Content-Transfer-Encoding: 8bit\\\n\"\n\"X-Poedit-KeywordsList: ${MAIN_KEY1};${MAIN_KEY2}\\\n\"\n${COMMON_META}"/
sed --in-place $DEV_POT --expression=s/'\"Content-Transfer-Encoding: 8bit\\n\"'/"\"Content-Transfer-Encoding: 8bit\\\n\"\n\"X-Poedit-KeywordsList: ${DEV_KEY1};${DEV_KEY2}\\\n\"\n${COMMON_META}"/
sed --in-place $ICO_POT --expression=s/'\"Content-Transfer-Encoding: 8bit\\n\"'/"\"Content-Transfer-Encoding: 8bit\\\n\"\n\"X-Poedit-KeywordsList: ${ICO_KEY1}\\\n\"\n${COMMON_META}"/ sed --in-place $ICO_POT --expression=s/'\"Content-Transfer-Encoding: 8bit\\n\"'/"\"Content-Transfer-Encoding: 8bit\\\n\"\n\"X-Poedit-KeywordsList: ${ICO_KEY1}\\\n\"\n${COMMON_META}"/
sed --in-place $TER_POT --expression=s/'\"Content-Transfer-Encoding: 8bit\\n\"'/"\"Content-Transfer-Encoding: 8bit\\\n\"\n\"X-Poedit-KeywordsList: ${TER_KEY1};${TER_KEY2};${TER_KEY3}\\\n\"\n${COMMON_META}"/ # sed --in-place $DEV_POT --expression=s/'\"Content-Transfer-Encoding: 8bit\\n\"'/"\"Content-Transfer-Encoding: 8bit\\\n\"\n\"X-Poedit-KeywordsList: ${DEV_KEY1};${DEV_KEY2}\\\n\"\n${COMMON_META}"/
# sed --in-place $TER_POT --expression=s/'\"Content-Transfer-Encoding: 8bit\\n\"'/"\"Content-Transfer-Encoding: 8bit\\\n\"\n\"X-Poedit-KeywordsList: ${TER_KEY1};${TER_KEY2};${TER_KEY3}\\\n\"\n${COMMON_META}"/
###################################################################### ######################################################################
# Automatically align the .po to the new pot file # Automatically align the .po to the new pot file
@ -107,11 +107,11 @@ do
msgmerge --update $po_file $MAIN_POT msgmerge --update $po_file $MAIN_POT
done done
echo "Update pcsx2_Devel.po files" # echo "Update pcsx2_Devel.po files"
for po_file in `find ./locales -iname pcsx2_Devel.po` # for po_file in `find ./locales -iname pcsx2_Devel.po`
do # do
msgmerge --update $po_file $DEV_POT # msgmerge --update $po_file $DEV_POT
done # done
echo "Update pcsx2_Iconized.po files" echo "Update pcsx2_Iconized.po files"
for po_file in `find ./locales -iname pcsx2_Iconized.po` for po_file in `find ./locales -iname pcsx2_Iconized.po`
@ -119,11 +119,11 @@ do
msgmerge --update $po_file $ICO_POT msgmerge --update $po_file $ICO_POT
done done
echo "Update pcsx2_Tertiary.po files" # echo "Update pcsx2_Tertiary.po files"
for po_file in `find ./locales -iname pcsx2_Tertiary.po` # for po_file in `find ./locales -iname pcsx2_Tertiary.po`
do # do
msgmerge --update $po_file $TER_POT # msgmerge --update $po_file $TER_POT
done # done
###################################################################### ######################################################################
# Automatically compile po into mo file # Automatically compile po into mo file

View File

@ -8,15 +8,11 @@ endif(NOT TOP_CMAKE_WAS_SOURCED)
if (GETTEXT_FOUND) if (GETTEXT_FOUND)
include(Translation) include(Translation)
file (GLOB_RECURSE PO_DEV_FILES ${PROJECT_SOURCE_DIR}}/locales pcsx2_Devel.po)
file (GLOB_RECURSE PO_ICO_FILES ${PROJECT_SOURCE_DIR}}/locales pcsx2_Iconized.po) file (GLOB_RECURSE PO_ICO_FILES ${PROJECT_SOURCE_DIR}}/locales pcsx2_Iconized.po)
file (GLOB_RECURSE PO_MAIN_FILES ${PROJECT_SOURCE_DIR}/locales pcsx2_Main.po) file (GLOB_RECURSE PO_MAIN_FILES ${PROJECT_SOURCE_DIR}/locales pcsx2_Main.po)
file (GLOB_RECURSE PO_TER_FILES ${PROJECT_SOURCE_DIR}}/locales pcsx2_Tertiary.po)
# Macro to compile po file and install them # Macro to compile po file and install them
GETTEXT_CREATE_TRANSLATIONS_PCSX2(${PROJECT_SOURCE_DIR}/locales/templates/pcsx2_Devel.pot ALL ${PO_DEV_FILES})
GETTEXT_CREATE_TRANSLATIONS_PCSX2(${PROJECT_SOURCE_DIR}/locales/templates/pcsx2_Iconized.pot ALL ${PO_ICO_FILES}) GETTEXT_CREATE_TRANSLATIONS_PCSX2(${PROJECT_SOURCE_DIR}/locales/templates/pcsx2_Iconized.pot ALL ${PO_ICO_FILES})
GETTEXT_CREATE_TRANSLATIONS_PCSX2(${PROJECT_SOURCE_DIR}/locales/templates/pcsx2_Main.pot ALL ${PO_MAIN_FILES}) GETTEXT_CREATE_TRANSLATIONS_PCSX2(${PROJECT_SOURCE_DIR}/locales/templates/pcsx2_Main.pot ALL ${PO_MAIN_FILES})
GETTEXT_CREATE_TRANSLATIONS_PCSX2(${PROJECT_SOURCE_DIR}/locales/templates/pcsx2_Tertiary.pot ALL ${PO_TER_FILES})
endif (GETTEXT_FOUND) endif (GETTEXT_FOUND)