Configured the localization system to work with Transifex and Gettext...

Configured the localization system to work with Transifex and Gettext (conversion to TS and then QM only at build time).
parent f0f983b3
[main]
host = https://www.transifex.net
[chakra-project.akabei-core]
file_filter = translations/<lang>.po
source_file = translations/akabeicore.pot
source_lang = en
#!/bin/bash
mkdir translations/translations/
for arg in "de"
do
lupdate lib/* -ts translations/akabeicore_$arg.ts
ts2po translations/akabeicore_$arg.ts -o translations/translations/akabeicore_$arg.po
done
exit
# translation start
FIND_PROGRAM(PO2TS_EXECUTABLE
NAMES po2ts
)
IF(NOT PO2TS_EXECUTABLE)
MESSAGE(FATAL_ERROR "Unable to find the ‘po2ts’ executable, from the Translation Toolkit project.")
ENDIF(NOT PO2TS_EXECUTABLE)
FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
NAMES lrelease
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH
)
# needed to create translation files
IF(NOT QT_LRELEASE_EXECUTABLE)
MESSAGE(FATAL_ERROR "Qt4 lrelease not found. Make sure that it has been built and installed by the Qt4 package.")
ENDIF(NOT QT_LRELEASE_EXECUTABLE)
MACRO(ADD_TRANSLATION_FILES _sources)
MACRO(GENERATE_TS_FILES_FROM_PO_FILES TS_FILES)
FOREACH(CURRENT_FILE ${ARGN})
GET_FILENAME_COMPONENT(PO_FILE ${CURRENT_FILE} ABSOLUTE)
GET_FILENAME_COMPONENT(PO_FILE_NAME ${CURRENT_FILE} NAME_WE)
SET(TS_FILE ${CMAKE_CURRENT_BINARY_DIR}/akabeicore_${PO_FILE_NAME}.ts)
ADD_CUSTOM_COMMAND(
OUTPUT ${TS_FILE}
COMMAND ${PO2TS_EXECUTABLE}
ARGS ${PO_FILE} ${TS_FILE}
DEPENDS ${PO_FILE}
)
SET(${TS_FILES} ${${TS_FILES}} ${TS_FILE})
ENDFOREACH(CURRENT_FILE)
ENDMACRO(GENERATE_TS_FILES_FROM_PO_FILES)
MACRO(GENERATE_QM_FILES_FROM_TS_FILES _sources)
FOREACH(_current_FILE ${ARGN})
GET_FILENAME_COMPONENT(_in ${_current_FILE} ABSOLUTE)
GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME_WE)
SET(_out ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.qm)#
SET(_out ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.qm)
ADD_CUSTOM_COMMAND(
OUTPUT ${_out}
......@@ -26,19 +49,16 @@ MACRO(ADD_TRANSLATION_FILES _sources)
SET(${_sources} ${${_sources}} ${_out})
ENDFOREACH(_current_FILE)
ENDMACRO(ADD_TRANSLATION_FILES)
ENDMACRO(GENERATE_QM_FILES_FROM_TS_FILES)
FILE(GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po)
GENERATE_TS_FILES_FROM_PO_FILES(TS_FILES ${PO_FILES})
GENERATE_QM_FILES_FROM_TS_FILES(QM_FILES ${TS_FILES})
FILE(GLOB TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/akabeicore_*.ts)
ADD_TRANSLATION_FILES(QM_FILES ${TS_FILES})
ADD_CUSTOM_TARGET(translations ALL DEPENDS ${QM_FILES})
# creating a custom target is needed to make the files build
# "ALL" means that it will be run by default
ADD_CUSTOM_TARGET(translations ALL
DEPENDS ${QM_FILES})
INSTALL(CODE "MESSAGE(\"Installing AkabeiCore i18n files...\")")
INSTALL (FILES ${QM_FILES}
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/akabeicore/translations)
# translation end
INSTALL(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/akabeicore/translations)
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: The Chakra Project\n"
"Report-Msgid-Bugs-To: http://chakra-project.org/bugs/\n"
"POT-Creation-Date: 2013-08-25 10:50+0200\n"
"PO-Revision-Date: 2013-08-25 08:52+0000\n"
"Last-Translator: Adrián Chaves Fernández <adriyetichaves@gmail.com>\n"
"Language-Team: Afrikaans (http://www.transifex.com/projects/p/chakra-project/language/af/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: af\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Translate Toolkit 1.10.0\n"
#: Akabei::ChrootedProcess#1
msgid "The scriplet for the following package failed to execute: %1: %2"
msgstr ""
#: Akabei::PlainHookOperation#1
msgid "Running hooks..."
msgstr ""
#: Akabei::PlainHookOperation#2
msgid "There has been an error executing the hook for %1: %2"
msgstr ""
#: Akabei::PolkitReInstallOperation#1
msgctxt "Akabei::PolkitReInstallOperation#1"
msgid "There has been an error with your polkit configuration!"
msgstr ""
#: Akabei::PolkitRemoveOperation#1
msgctxt "Akabei::PolkitRemoveOperation#1"
msgid "There has been an error with your polkit configuration!"
msgstr ""
#: Akabei::PolkitRemoveOperation#2
msgid "Package not found in local database!"
msgstr ""
#: Akabei::PolkitUpgradeOperation#1
msgctxt "Akabei::PolkitUpgradeOperation#1"
msgid "There has been an error with your polkit configuration!"
msgstr ""
#: Backend#1
msgid "An authorization error occurred: %1"
msgstr ""
#: Backend#2
msgid "Could not remove lock file properly!"
msgstr ""
#: QObject#1
msgid "Database dir %1 does not exist"
msgstr ""
#: QObject#2
msgid "Cache dir %1 does not exist"
msgstr ""
#: QObject#3
msgid "Root dir %1 does not exist"
msgstr ""
#: QObject#4
msgid "Error while loading the local database from %1: %2"
msgstr ""
#: QObject#5
msgid "Failed to remove file!"
msgstr ""
#: QObject#6
msgid "Cannot find database file on disk: %1!"
msgstr ""
#: QObject#7
msgid "%1 TiB"
msgstr ""
#: QObject#8
msgid "%1 GiB"
msgstr ""
#: QObject#9
msgid "%1 MiB"
msgstr ""
#: QObject#10
msgid "%1 KiB"
msgstr ""
#: QObject#11
msgid "%1 B"
msgstr ""
#: QObject#12
msgid "0 B"
msgstr ""
#: QObject#13
msgid "MD5: requested file %1 isn't present in archive %2"
msgstr ""
#: QObject#14
msgid "MD5: requested file %1 isn't present in archive %2\n"
msgstr ""
#: QObject#15
msgid "Akabei found an existing config and moved it to %1..."
msgstr ""
#: QObject#16
msgid ""
"Akabei found an existing config, but had a problem to move it to %1. Maybe "
"an old config was still in place. Please fix it yourself!"
msgstr ""
#: QObject#17
msgid "As %1 is the ultimate owner of %2, akabei moved the old file to %3!"
msgstr ""
#: QObject#18
msgid ""
"As %1 is the ultimate owner of %2, akabei tried to move the old file to %3 "
"but failed!Please fix it yourself!"
msgstr ""
#: QObject#19
msgid "Installing new config to %1. Please merge manually!"
msgstr ""
#: QObject#20
msgid "Installing %1..."
msgstr ""
#: QObject#21
msgid "Could not open package file."
msgstr ""
#: QObject#22
msgid "Could not begin database transaction!"
msgstr ""
#: QObject#23
msgid "Could not add package to database!"
msgstr ""
#: QObject#24
msgid "Could not add files to database!"
msgstr ""
#: QObject#25
msgid "Could not add scriptlet to database!"
msgstr ""
#: QObject#26
msgid "Could not commit the transaction!"
msgstr ""
#: QObject#27
msgid "Reinstalling %1..."
msgstr ""
#: QObject#28
msgid "Removing %1 failed: %2"
msgstr ""
#: QObject#29
msgid "Error during access to archive."
msgstr ""
#: QObject#30
msgid "Could not update package in database!"
msgstr ""
#: QObject#31
msgid "Could not update files in database!"
msgstr ""
#: QObject#32
msgid "The package was not installed yet."
msgstr ""
#: QObject#33
msgid "Removing %1 failed!"
msgstr ""
#: QObject#34
msgid "Could not remove package from database!"
msgstr ""
#: QObject#35
msgid "Could not remove files from database!"
msgstr ""
#: QObject#36
msgid "Could not remove scriptlet!"
msgstr ""
#: QObject#37
msgid "Running script for %1..."
msgstr ""
#: QObject#38
msgid "Upgrading %1..."
msgstr ""
#: QObject#39
msgid "Could not update scriptlet in database!"
msgstr ""
#: QObject#40
msgid "Could not remove scriplet from database!"
msgstr ""
#: QObject#41
msgctxt "QObject#41"
msgid "There has been an error with your polkit configuration!"
msgstr ""
#: RunnerWorker#1
msgid "One of the operations is not ready to perform yet!"
msgstr ""
#: RunnerWorker#2
msgid "An internal error occurred during running the transaction"
msgstr ""
#: RunnerWorker#3
msgid "An error occurred, but no further information was given."
msgstr ""
#: ValidatorWorker#1
msgid "An internal error occurred during validation"
msgstr ""
#: ValidatorWorker#2
msgid "The target %1 is being added by %2 and %3"
msgstr ""
#: ValidatorWorker#3
msgid "A dependency of %1 is not resolvable: %2"
msgstr ""
#: ValidatorWorker#4
msgid "%1 already exists in the filesystem"
msgstr ""
#: ValidatorWorker#5
msgid ""
"%1 is about to be installed, but conflicts with %2, which is being installed"
" as well."
msgstr ""
#: ValidatorWorker#6
msgid "%1 is about to be installed, but conflicts with %2, which is installed"
msgstr ""
#: ValidatorWorker#7
msgid "%1 is contained in more than one package"
msgstr ""
#: ValidatorWorker#8
msgid "%1 depends on %2, which is being removed"
msgstr ""
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-08-25 11:24+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Translate Toolkit 1.10.0\n"
#: Akabei::ChrootedProcess#1
msgid "The scriplet for the following package failed to execute: %1: %2"
msgstr ""
#: Akabei::PlainHookOperation#1
msgid "Running hooks..."
msgstr ""
#: Akabei::PlainHookOperation#2
msgid "There has been an error executing the hook for %1: %2"
msgstr ""
#: Akabei::PolkitReInstallOperation#1
msgctxt "Akabei::PolkitReInstallOperation#1"
msgid "There has been an error with your polkit configuration!"
msgstr ""
#: Akabei::PolkitRemoveOperation#1
msgctxt "Akabei::PolkitRemoveOperation#1"
msgid "There has been an error with your polkit configuration!"
msgstr ""
#: Akabei::PolkitRemoveOperation#2
msgid "Package not found in local database!"
msgstr ""
#: Akabei::PolkitUpgradeOperation#1
msgctxt "Akabei::PolkitUpgradeOperation#1"
msgid "There has been an error with your polkit configuration!"
msgstr ""
#: Backend#1
msgid "An authorization error occurred: %1"
msgstr ""
#: Backend#2
msgid "Could not remove lock file properly!"
msgstr ""
#: QObject#1
msgid "Database dir %1 does not exist"
msgstr ""
#: QObject#2
msgid "Cache dir %1 does not exist"
msgstr ""
#: QObject#3
msgid "Root dir %1 does not exist"
msgstr ""
#: QObject#4
msgid "Error while loading the local database from %1: %2"
msgstr ""
#: QObject#5
msgid "Failed to remove file!"
msgstr ""
#: QObject#6
msgid "Cannot find database file on disk: %1!"
msgstr ""
#: QObject#7
msgid "%1 TiB"
msgstr ""
#: QObject#8
msgid "%1 GiB"
msgstr ""
#: QObject#9
msgid "%1 MiB"
msgstr ""
#: QObject#10
msgid "%1 KiB"
msgstr ""
#: QObject#11
msgid "%1 B"
msgstr ""
#: QObject#12
msgid "0 B"
msgstr ""
#: QObject#13
msgid "MD5: requested file %1 isn't present in archive %2"
msgstr ""
#: QObject#14
msgid "MD5: requested file %1 isn't present in archive %2\n"
msgstr ""
#: QObject#15
msgid "Akabei found an existing config and moved it to %1..."
msgstr ""
#: QObject#16
msgid ""
"Akabei found an existing config, but had a problem to move it to %1. Maybe "
"an old config was still in place. Please fix it yourself!"
msgstr ""
#: QObject#17
msgid "As %1 is the ultimate owner of %2, akabei moved the old file to %3!"
msgstr ""
#: QObject#18
msgid ""
"As %1 is the ultimate owner of %2, akabei tried to move the old file to %3 "
"but failed!Please fix it yourself!"
msgstr ""
#: QObject#19
msgid "Installing new config to %1. Please merge manually!"
msgstr ""
#: QObject#20
msgid "Installing %1..."
msgstr ""
#: QObject#21
msgid "Could not open package file."
msgstr ""
#: QObject#22
msgid "Could not begin database transaction!"
msgstr ""
#: QObject#23
msgid "Could not add package to database!"
msgstr ""
#: QObject#24
msgid "Could not add files to database!"
msgstr ""
#: QObject#25
msgid "Could not add scriptlet to database!"
msgstr ""
#: QObject#26
msgid "Could not commit the transaction!"
msgstr ""
#: QObject#27
msgid "Reinstalling %1..."
msgstr ""
#: QObject#28
msgid "Removing %1 failed: %2"
msgstr ""
#: QObject#29
msgid "Error during access to archive."
msgstr ""
#: QObject#30
msgid "Could not update package in database!"
msgstr ""
#: QObject#31
msgid "Could not update files in database!"
msgstr ""
#: QObject#32
msgid "The package was not installed yet."
msgstr ""
#: QObject#33
msgid "Removing %1 failed!"
msgstr ""
#: QObject#34
msgid "Could not remove package from database!"
msgstr ""
#: QObject#35
msgid "Could not remove files from database!"
msgstr ""
#: QObject#36
msgid "Could not remove scriptlet!"
msgstr ""
#: QObject#37
msgid "Running script for %1..."
msgstr ""
#: QObject#38
msgid "Upgrading %1..."
msgstr ""
#: QObject#39
msgid "Could not update scriptlet in database!"
msgstr ""
#: QObject#40
msgid "Could not remove scriplet from database!"
msgstr ""
#: QObject#41
msgctxt "QObject#41"
msgid "There has been an error with your polkit configuration!"
msgstr ""
#: RunnerWorker#1
msgid "One of the operations is not ready to perform yet!"
msgstr ""
#: RunnerWorker#2
msgid "An internal error occurred during running the transaction"
msgstr ""
#: RunnerWorker#3
msgid "An error occurred, but no further information was given."
msgstr ""
#: ValidatorWorker#1
msgid "An internal error occurred during validation"
msgstr ""
#: ValidatorWorker#2
msgid "The target %1 is being added by %2 and %3"
msgstr ""
#: ValidatorWorker#3
msgid "A dependency of %1 is not resolvable: %2"
msgstr ""
#: ValidatorWorker#4
msgid "%1 already exists in the filesystem"
msgstr ""
#: ValidatorWorker#5
msgid ""
"%1 is about to be installed, but conflicts with %2, which is being installed "
"as well."
msgstr ""
#: ValidatorWorker#6
msgid "%1 is about to be installed, but conflicts with %2, which is installed"
msgstr ""
#: ValidatorWorker#7
msgid "%1 is contained in more than one package"
msgstr ""
#: ValidatorWorker#8
msgid "%1 depends on %2, which is being removed"
msgstr ""
#!/bin/bash
for arg in "de"
do
po2ts translations/akabeicore_$arg.po akabeicore_$arg.ts
done
exit
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: The Chakra Project\n"
"Report-Msgid-Bugs-To: http://chakra-project.org/bugs/\n"
"POT-Creation-Date: 2013-08-25 10:50+0200\n"
"PO-Revision-Date: 2013-08-25 08:52+0000\n"
"Last-Translator: Adrián Chaves Fernández <adriyetichaves@gmail.com>\n"
"Language-Team: Arabic (http://www.transifex.com/projects/p/chakra-project/language/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ar\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
"X-Generator: Translate Toolkit 1.10.0\n"
#: Akabei::ChrootedProcess#1
msgid "The scriplet for the following package failed to execute: %1: %2"
msgstr ""
#: Akabei::PlainHookOperation#1
msgid "Running hooks..."
msgstr ""
#: Akabei::PlainHookOperation#2
msgid "There has been an error executing the hook for %1: %2"
msgstr ""
#: Akabei::PolkitReInstallOperation#1
msgctxt "Akabei::PolkitReInstallOperation#1"
msgid "There has been an error with your polkit configuration!"
msgstr ""
#: Akabei::PolkitRemoveOperation#1
msgctxt "Akabei::PolkitRemoveOperation#1"
msgid "There has been an error with your polkit configuration!"
msgstr ""
#: Akabei::PolkitRemoveOperation#2
msgid "Package not found in local database!"
msgstr ""
#: Akabei::PolkitUpgradeOperation#1
msgctxt "Akabei::PolkitUpgradeOperation#1"
msgid "There has been an error with your polkit configuration!"
msgstr ""
#: Backend#1
msgid "An authorization error occurred: %1"
msgstr ""
#: Backend#2
msgid "Could not remove lock file properly!"
msgstr ""
#: QObject#1
msgid "Database dir %1 does not exist"
msgstr ""
#: QObject#2
msgid "Cache dir %1 does not exist"
msgstr ""
#: QObject#3
msgid "Root dir %1 does not exist"
msgstr ""
#: QObject#4
msgid "Error while loading the local database from %1: %2"
msgstr ""
#: QObject#5
msgid "Failed to remove file!"
msgstr ""
#: QObject#6
msgid "Cannot find database file on disk: %1!"
msgstr ""
#: QObject#7
msgid "%1 TiB"
msgstr ""
#: QObject#8
msgid "%1 GiB"
msgstr ""
#: QObject#9
msgid "%1 MiB"
msgstr ""
#: QObject#10
msgid "%1 KiB"
msgstr ""
#: QObject#11
msgid "%1 B"
msgstr ""
#: QObject#12
msgid "0 B"
msgstr ""
#: QObject#13
msgid "MD5: requested file %1 isn't present in archive %2"
msgstr ""
#: QObject#14
msgid "MD5: requested file %1 isn't present in archive %2\n"
msgstr ""
#: QObject#15