mirror of
https://github.com/QRouland/UTPass.git
synced 2025-06-30 01:02:29 +00:00
Initial Commit
This commit is contained in:
33
po/CMakeLists.txt
Normal file
33
po/CMakeLists.txt
Normal file
@ -0,0 +1,33 @@
|
||||
include(FindGettext)
|
||||
find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
|
||||
|
||||
set(DOMAIN ${FULL_PROJECT_NAME})
|
||||
set(POT_FILE ${DOMAIN}.pot)
|
||||
file(GLOB PO_FILES *.po)
|
||||
|
||||
# Creates the .pot file containing the translations template
|
||||
add_custom_target(${POT_FILE} ALL
|
||||
COMMENT "Generating translation template"
|
||||
COMMAND ${INTLTOOL_EXTRACT} --update --type=gettext/ini
|
||||
--srcdir=${CMAKE_SOURCE_DIR} ${DESKTOP_FILE_NAME}.in
|
||||
|
||||
COMMAND ${GETTEXT_XGETTEXT_EXECUTABLE} -o ${POT_FILE}
|
||||
-D ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-D ${CMAKE_CURRENT_BINARY_DIR}
|
||||
--from-code=UTF-8
|
||||
--c++ --qt --language=javascript --add-comments=TRANSLATORS
|
||||
--keyword=tr --keyword=tr:1,2 --keyword=N_ --keyword=_
|
||||
--package-name='${DOMAIN}'
|
||||
${I18N_SRC_FILES}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${POT_FILE} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# Builds the binary translations catalog for each language
|
||||
# it finds source translations (*.po) for
|
||||
foreach(PO_FILE ${PO_FILES})
|
||||
get_filename_component(LANG ${PO_FILE} NAME_WE)
|
||||
gettext_process_po_files(${LANG} ALL PO_FILES ${PO_FILE})
|
||||
set(INSTALL_DIR ${CMAKE_INSTALL_LOCALEDIR}/share/locale/${LANG}/LC_MESSAGES)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo
|
||||
DESTINATION ${INSTALL_DIR}
|
||||
RENAME ${DOMAIN}.mo)
|
||||
endforeach(PO_FILE)
|
22
po/utpass.qrouland.pot
Normal file
22
po/utpass.qrouland.pot
Normal file
@ -0,0 +1,22 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the utpass.qrouland package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: utpass.qrouland\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-03-13 18:16+0000\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"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../qml/Main.qml:26 UTPass.desktop.in.h:1
|
||||
msgid "UTPass"
|
||||
msgstr ""
|
Reference in New Issue
Block a user