diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/TranslationsMusl.cmake | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/cmake/TranslationsMusl.cmake b/cmake/TranslationsMusl.cmake index e6569c5..f9d57eb 100644 --- a/cmake/TranslationsMusl.cmake +++ b/cmake/TranslationsMusl.cmake @@ -27,68 +27,6 @@ macro (add_musl_translations_directory NLS_PACKAGE LOCPATH) endforeach (PO_INPUT ${PO_FILES}) endmacro (add_musl_translations_directory) -# Apply the right default template. -macro (create_po_file LANGUAGE_NEEDED) - set (FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LANGUAGE_NEEDED}.po) - if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LANGUAGE_NEEDED}.po) - file (APPEND ${FILE} "msgid \"\"\n") - file (APPEND ${FILE} "msgstr \"\"\n") - file (APPEND ${FILE} "\"MIME-Version: 1.0\\n\"\n") - file (APPEND ${FILE} "\"Content-Type: text/plain; charset=UTF-8\\n\"\n") - - if ("${LANGUAGE_NEEDED}" STREQUAL "ja" - OR "${LANGUAGE_NEEDED}" STREQUAL "vi" - OR "${LANGUAGE_NEEDED}" STREQUAL "ko") - file (APPEND ${FILE} "\"Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\\n\"\n") - elseif ("${LANGUAGE_NEEDED}" STREQUAL "en" - OR "${LANGUAGE_NEEDED}" STREQUAL "de" - OR "${LANGUAGE_NEEDED}" STREQUAL "nl" - OR "${LANGUAGE_NEEDED}" STREQUAL "sv" - OR "${LANGUAGE_NEEDED}" STREQUAL "nb" - OR "${LANGUAGE_NEEDED}" STREQUAL "nn" - OR "${LANGUAGE_NEEDED}" STREQUAL "nb" - OR "${LANGUAGE_NEEDED}" STREQUAL "no" - OR "${LANGUAGE_NEEDED}" STREQUAL "fo" - OR "${LANGUAGE_NEEDED}" STREQUAL "es" - OR "${LANGUAGE_NEEDED}" STREQUAL "pt" - OR "${LANGUAGE_NEEDED}" STREQUAL "it" - OR "${LANGUAGE_NEEDED}" STREQUAL "bg" - OR "${LANGUAGE_NEEDED}" STREQUAL "he" - OR "${LANGUAGE_NEEDED}" STREQUAL "fi" - OR "${LANGUAGE_NEEDED}" STREQUAL "et" - OR "${LANGUAGE_NEEDED}" STREQUAL "eo" - OR "${LANGUAGE_NEEDED}" STREQUAL "hu" - OR "${LANGUAGE_NEEDED}" STREQUAL "tr" - OR "${LANGUAGE_NEEDED}" STREQUAL "es") - file (APPEND ${FILE} "\"Plural-Forms: nplurals=2; plural=n != 1;\\n\"\n") - elseif ("${LANGUAGE_NEEDED}" STREQUAL "fr" - OR "${LANGUAGE_NEEDED}" STREQUAL "fr_CA" - OR "${LANGUAGE_NEEDED}" STREQUAL "pt_BR") - file (APPEND ${FILE} "\"Plural-Forms: nplurals=2; plural=n>1;\\n\"\n") - elseif ("${LANGUAGE_NEEDED}" STREQUAL "lv") - file (APPEND ${FILE} "\"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2;\\n\"\n") - elseif ("${LANGUAGE_NEEDED}" STREQUAL "ro") - file (APPEND ${FILE} "\"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2;\\n\"\n") - elseif ("${LANGUAGE_NEEDED}" STREQUAL "lt") - file (APPEND ${FILE} "\"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2;\\n\"\n") - elseif ("${LANGUAGE_NEEDED}" STREQUAL "ru" - OR "${LANGUAGE_NEEDED}" STREQUAL "uk" - OR "${LANGUAGE_NEEDED}" STREQUAL "be" - OR "${LANGUAGE_NEEDED}" STREQUAL "sr" - OR "${LANGUAGE_NEEDED}" STREQUAL "hr") - file (APPEND ${FILE} "\"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\\n\"\n") - elseif ("${LANGUAGE_NEEDED}" STREQUAL "cs" - OR "${LANGUAGE_NEEDED}" STREQUAL "sk") - file (APPEND ${FILE} "\"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\\n\"\n") - elseif ("${LANGUAGE_NEEDED}" STREQUAL "pl") - file (APPEND ${FILE} "\"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\\n\"\n") - elseif ("${LANGUAGE_NEEDED}" STREQUAL "sl") - file (APPEND ${FILE} "\"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3;\\n\"\n") - endif () - - endif () -endmacro (create_po_file) - macro (add_musl_translations_catalog NLS_PACKAGE) add_custom_target (musl-pot COMMENT ?Building translation catalog for C library.?) find_program (XGETTEXT_EXECUTABLE xgettext) |