diff --git a/CMakeModules/Functions.cmake b/CMakeModules/Functions.cmake index 446fd4e695..1c6209815f 100644 --- a/CMakeModules/Functions.cmake +++ b/CMakeModules/Functions.cmake @@ -134,7 +134,7 @@ function( translate_language LANG OUT_FILE) add_custom_command( OUTPUT ${OUT_FILE} COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/${LANG}/kicad.po + ${CMAKE_CURRENT_SOURCE_DIR}/pofiles/${LANG}.po -o ${OUT_FILE} COMMENT "Building translation library for ${LANG}" ) diff --git a/translation/CMakeLists.txt b/translation/CMakeLists.txt index ec24a188c4..946f0c6b24 100644 --- a/translation/CMakeLists.txt +++ b/translation/CMakeLists.txt @@ -7,7 +7,7 @@ else() CACHE PATH "Location of KiCad i18n files." ) endif() -file(STRINGS LINGUAS LANG_ARRAY REGEX "^[^#].*") +file(STRINGS pofiles/LINGUAS LANG_ARRAY REGEX "^[^#].*") # Add the commands to translate each language file foreach( LANG ${LANG_ARRAY} ) diff --git a/translation/LINGUAS b/translation/pofiles/LINGUAS similarity index 100% rename from translation/LINGUAS rename to translation/pofiles/LINGUAS diff --git a/translation/bg/kicad.po b/translation/pofiles/bg.po similarity index 100% rename from translation/bg/kicad.po rename to translation/pofiles/bg.po diff --git a/translation/ca/kicad.po b/translation/pofiles/ca.po similarity index 100% rename from translation/ca/kicad.po rename to translation/pofiles/ca.po diff --git a/translation/cs/kicad.po b/translation/pofiles/cs.po similarity index 100% rename from translation/cs/kicad.po rename to translation/pofiles/cs.po diff --git a/translation/da/kicad.po b/translation/pofiles/da.po similarity index 100% rename from translation/da/kicad.po rename to translation/pofiles/da.po diff --git a/translation/de/kicad.po b/translation/pofiles/de.po similarity index 100% rename from translation/de/kicad.po rename to translation/pofiles/de.po diff --git a/translation/el/kicad.po b/translation/pofiles/el.po similarity index 100% rename from translation/el/kicad.po rename to translation/pofiles/el.po diff --git a/translation/en/kicad.po b/translation/pofiles/en.po similarity index 100% rename from translation/en/kicad.po rename to translation/pofiles/en.po diff --git a/translation/es/kicad.po b/translation/pofiles/es.po similarity index 100% rename from translation/es/kicad.po rename to translation/pofiles/es.po diff --git a/translation/fi/kicad.po b/translation/pofiles/fi.po similarity index 100% rename from translation/fi/kicad.po rename to translation/pofiles/fi.po diff --git a/translation/fr/kicad.po b/translation/pofiles/fr.po similarity index 100% rename from translation/fr/kicad.po rename to translation/pofiles/fr.po diff --git a/translation/hu/kicad.po b/translation/pofiles/hu.po similarity index 100% rename from translation/hu/kicad.po rename to translation/pofiles/hu.po diff --git a/translation/id/kicad.po b/translation/pofiles/id.po similarity index 100% rename from translation/id/kicad.po rename to translation/pofiles/id.po diff --git a/translation/it/kicad.po b/translation/pofiles/it.po similarity index 100% rename from translation/it/kicad.po rename to translation/pofiles/it.po diff --git a/translation/ja/kicad.po b/translation/pofiles/ja.po similarity index 100% rename from translation/ja/kicad.po rename to translation/pofiles/ja.po diff --git a/translation/ko/kicad.po b/translation/pofiles/ko.po similarity index 100% rename from translation/ko/kicad.po rename to translation/pofiles/ko.po diff --git a/translation/lt/kicad.po b/translation/pofiles/lt.po similarity index 100% rename from translation/lt/kicad.po rename to translation/pofiles/lt.po diff --git a/translation/lv/kicad.po b/translation/pofiles/lv.po similarity index 100% rename from translation/lv/kicad.po rename to translation/pofiles/lv.po diff --git a/translation/nl/kicad.po b/translation/pofiles/nl.po similarity index 100% rename from translation/nl/kicad.po rename to translation/pofiles/nl.po diff --git a/translation/no/kicad.po b/translation/pofiles/no.po similarity index 100% rename from translation/no/kicad.po rename to translation/pofiles/no.po diff --git a/translation/pl/kicad.po b/translation/pofiles/pl.po similarity index 100% rename from translation/pl/kicad.po rename to translation/pofiles/pl.po diff --git a/translation/pt/kicad.po b/translation/pofiles/pt.po similarity index 100% rename from translation/pt/kicad.po rename to translation/pofiles/pt.po diff --git a/translation/ru/kicad.po b/translation/pofiles/ru.po similarity index 100% rename from translation/ru/kicad.po rename to translation/pofiles/ru.po diff --git a/translation/sk/kicad.po b/translation/pofiles/sk.po similarity index 100% rename from translation/sk/kicad.po rename to translation/pofiles/sk.po diff --git a/translation/sl/kicad.po b/translation/pofiles/sl.po similarity index 100% rename from translation/sl/kicad.po rename to translation/pofiles/sl.po diff --git a/translation/sv/kicad.po b/translation/pofiles/sv.po similarity index 100% rename from translation/sv/kicad.po rename to translation/pofiles/sv.po diff --git a/translation/tr/kicad.po b/translation/pofiles/tr.po similarity index 100% rename from translation/tr/kicad.po rename to translation/pofiles/tr.po diff --git a/translation/vi/kicad.po b/translation/pofiles/vi.po similarity index 100% rename from translation/vi/kicad.po rename to translation/pofiles/vi.po diff --git a/translation/zh_CN/kicad.po b/translation/pofiles/zh_CN.po similarity index 100% rename from translation/zh_CN/kicad.po rename to translation/pofiles/zh_CN.po diff --git a/translation/zh_TW/kicad.po b/translation/pofiles/zh_TW.po similarity index 100% rename from translation/zh_TW/kicad.po rename to translation/pofiles/zh_TW.po diff --git a/translation/update-po-files.sh b/translation/update-po-files.sh index 29e84d4472..23f5581925 100755 --- a/translation/update-po-files.sh +++ b/translation/update-po-files.sh @@ -65,7 +65,7 @@ find $POTDIRS -name '*.cpp' -or -name '*.h' | sort | xgettext -f- -k_ -k_HKI -kwxPLURAL:1,2 --force-po --from-code utf-8 -o $LOCALDIR/kicad.pot -LINGUAS=`cat $LOCALDIR/LINGUAS|grep -v '^#'|grep -v '^\s*$'` #Read file without comment and empty lines +LINGUAS=`cat $LOCALDIR/pofiles/LINGUAS|grep -v '^#'|grep -v '^\s*$'` #Read file without comment and empty lines #check if present in locale list validate() { echo $LINGUAS | grep -F -q -w "$1"; } @@ -94,11 +94,11 @@ do echo "## $i" if [ "$i" = "en" ] ; then msgmerge --no-location --no-fuzzy-matching --force-po $LOCALDIR/$i/kicad.po $LOCALDIR/kicad.pot -o $LOCALDIR/$i/kicad.po 2> /dev/null - msgen $LOCALDIR/$i/kicad.po -o $LOCALDIR/$i/kicad.po.tmp && mv $LOCALDIR/$i/kicad.po.tmp $LOCALDIR/$i/kicad.po + msgen $LOCALDIR/pofiles/$i.po -o $LOCALDIR/pofiles/$i.po.tmp && mv $LOCALDIR/pofiles/$i.po.tmp $LOCALDIR/pofiles/$i.po else - msgmerge --force-po $LOCALDIR/$i/kicad.po $LOCALDIR/kicad.pot -o $LOCALDIR/$i/kicad.po 2> /dev/null + msgmerge --force-po $LOCALDIR/pofiles/$i.po $LOCALDIR/pofiles/kicad.pot -o $LOCALDIR/pofiles/$i.po 2> /dev/null fi - msgfmt --statistics $LOCALDIR/$i/kicad.po -o $LOCALDIR/messages.mo 2>&1 >>/dev/null | + msgfmt --statistics $LOCALDIR/pofiles/$i.po -o $LOCALDIR/pofiles/messages.mo 2>&1 >>/dev/null | while IFS=",." read A B C D ; do echo $A echo $B @@ -127,7 +127,7 @@ do done echo "$i;${TRANSLATED};${FUZZY};${UNTRANSLATED}">>"${CSVFILE}" done - rm $LOCALDIR/messages.mo + rm $LOCALDIR/pofiles/messages.mo done if [ "$PLOT" = "1" ]; then @@ -136,5 +136,5 @@ if [ "$PLOT" = "1" ]; then fi if [ ! "$KEEP" = "1" ]; then - rm $LOCALDIR/kicad.pot + rm $LOCALDIR/pofiles/kicad.pot fi