Add gettext processing to Cmake build instructions

This commit is contained in:
Robin Stuart 2020-11-21 21:52:27 +00:00
parent b765ea1918
commit cc2ff81205
15 changed files with 714 additions and 87 deletions

View File

@ -42,3 +42,15 @@ endif(MSVC)
install(TARGETS zint ${INSTALL_TARGETS_DEFAULT_ARGS} ) install(TARGETS zint ${INSTALL_TARGETS_DEFAULT_ARGS} )
install(FILES zint.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) install(FILES zint.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
# LOCALEDIR must be set up before including po/CMakeLists.txt
if (DEFINED LOCALE_INSTALL_DIR)
set(LOCALEDIR "${LOCALE_INSTALL_DIR}")
else(DEFINED LOCALE_INSTALL_DIR)
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/locale")
endif(DEFINED LOCALE_INSTALL_DIR)
add_definitions(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
add_definitions(-DLOCALE_DIR="${LOCALEDIR}")
add_subdirectory(po)

View File

@ -0,0 +1,285 @@
# Copyright (c) 2012, Jarryd Beck
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# This module creates build rules for updating translation files made
# with gettext
# In your top level CMakeLists.txt, do
# include(GettextTranslate)
# then in any po directory where you want things to be translated, write
# GettextTranslate()
#
# This module also finds the gettext binaries. If these are in a non-standard
# location, you can define the following variables to provide paths to search
# in
# GettextTranslate_BINARIES --- a path in which to look for every program
# GettextTranslate_XGETTEXT --- the xgettext program
# GettextTranslate_MSGINIT --- the msginit program
# GettextTranslate_MSGFILTER --- the msgfilter program
# GettextTranslate_MSGCONV --- the msgconv program
# GettextTranslate_MSGMERGE --- the msgmerge program
# GettextTranslate_MSGFMT --- the msgfmt program
# these are searched first before $PATH, so set this if you have your own
# version that overrides the system version
#
# it reads variables from Makevars, one of the most important being DOMAIN
# it reads the languages to generate from LINGUAS
#
# it adds the following targets
# lib-update-po
# lib-update-gmo
# ${DOMAIN}-pot.update
# generate-${DOMAIN}-${lang}-po
# generate-${DOMAIN}-${lang}-gmo
#
# where ${DOMAIN} is the DOMAIN variable read from Makevars
# and ${lang} is each language mentioned in LINGUAS
#
# if you want lib-update-gmo to be added to the "all" target, then define the
# variable GettextTranslate_ALL before including this file
#
# by default, the gmo files are built in the source directory. If you want
# them to be built in the binary directory, then define the variable
# GettextTranslate_GMO_BINARY
# add the lib-update-po and lib-update-gmo targets, the actual files that need to
# depend on this will be added as we go
if (DEFINED GettextTranslate_ALL)
set(_addToALL "ALL")
endif()
add_custom_target(lib-update-po)
add_custom_target(lib-update-gmo ${_addToALL})
#look for all the programs
#xgettext, msginit, msgfilter, msgconv, msgmerge, msgfmt
function(REQUIRE_BINARY binname varname)
if (${${varname}} STREQUAL "${varname}-NOTFOUND")
message(FATAL_ERROR "Could not find " ${binname})
endif()
endfunction()
find_program(GettextTranslate_XGETTEXT_EXECUTABLE xgettext
HINTS ${GettextTranslate_XGETTEXT} ${GettextTranslate_BINARIES}
)
REQUIRE_BINARY(xgettext GettextTranslate_XGETTEXT_EXECUTABLE)
find_program(GettextTranslate_MSGINIT_EXECUTABLE msginit
HINTS ${GettextTranslate_MSGINIT} ${GettextTranslate_BINARIES}
)
REQUIRE_BINARY(msginit GettextTranslate_MSGINIT_EXECUTABLE)
find_program(GettextTranslate_MSGFILTER_EXECUTABLE msgfilter
HINTS ${GettextTranslate_MSGFILTER} ${GettextTranslate_BINARIES}
)
REQUIRE_BINARY(msgfilter GettextTranslate_MSGFILTER_EXECUTABLE)
find_program(GettextTranslate_MSGCONV_EXECUTABLE msgconv
HINTS ${GettextTranslate_MSGCONV} ${GettextTranslate_BINARIES}
)
REQUIRE_BINARY(msgconv GettextTranslate_MSGCONV_EXECUTABLE)
find_program(GettextTranslate_MSGMERGE_EXECUTABLE msgmerge
HINTS ${GettextTranslate_MSGMERGE} ${GettextTranslate_BINARIES}
)
REQUIRE_BINARY(msgmerge GettextTranslate_MSGMERGE_EXECUTABLE)
find_program(GettextTranslate_MSGFMT_EXECUTABLE msgfmt
HINTS ${GettextTranslate_MSGFMT} ${GettextTranslate_BINARIES}
)
REQUIRE_BINARY(msgfmt GettextTranslate_MSGFMT_EXECUTABLE)
mark_as_advanced(
GettextTranslate_MSGCONV_EXECUTABLE
GettextTranslate_MSGFILTER_EXECUTABLE
GettextTranslate_MSGFMT_EXECUTABLE
GettextTranslate_MSGINIT_EXECUTABLE
GettextTranslate_MSGMERGE_EXECUTABLE
GettextTranslate_XGETTEXT_EXECUTABLE
)
macro(GettextTranslate)
if(GettextTranslate_GMO_BINARY)
set (GMO_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
else()
set (GMO_BUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR})
endif()
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in)
message(FATAL_ERROR "There is no POTFILES.in in
${CMAKE_CURRENT_SOURCE_DIR}")
endif()
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Makevars)
message(FATAL_ERROR "There is no Makevars in ${CMAKE_CURRENT_SOURCE_DIR}")
endif()
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/Makevars makevars
REGEX "^[^=]+=(.*)$"
)
foreach(makevar ${makevars})
string(REGEX REPLACE "^([^= ]+) =[ ]?(.*)$" "\\1" MAKEVAR_KEY ${makevar})
string(REGEX REPLACE "^([^= ]+) =[ ]?(.*)$" "\\2"
MAKEVAR_${MAKEVAR_KEY} ${makevar})
endforeach()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in
${CMAKE_CURRENT_BINARY_DIR}/POTFILES
COPYONLY
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/LINGUAS
${CMAKE_CURRENT_BINARY_DIR}/LINGUAS
COPYONLY
)
#set the directory to not clean
#set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
# PROPERTY CLEAN_NO_CUSTOM true)
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in potfiles
REGEX "^[^#].*"
)
foreach(potfile ${potfiles})
list(APPEND source_translatable
${CMAKE_CURRENT_SOURCE_DIR}/${MAKEVAR_top_builddir}/${potfile})
endforeach()
set(TEMPLATE_FILE ${MAKEVAR_DOMAIN}.pot)
set(TEMPLATE_FILE_ABS ${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_FILE})
string(REGEX MATCHALL "[^ ]+" XGETTEXT_OPTS ${MAKEVAR_XGETTEXT_OPTIONS})
#add_custom_target(${MAKEVAR_DOMAIN}.pot-update DEPENDS
# ${TEMPLATE_FILE_ABS}
#)
add_custom_target(${MAKEVAR_DOMAIN}.pot-update
COMMAND ${GettextTranslate_XGETTEXT_EXECUTABLE} ${XGETTEXT_OPTS}
-o ${TEMPLATE_FILE_ABS}
--default-domain=${MAKEVAR_DOMAIN}
--add-comments=TRANSLATORS:
--copyright-holder=${MAKEVAR_COPYRIGHT_HOLDER}
--msgid-bugs-address="${MAKEVAR_MSGID_BUGS_ADDRESS}"
--directory=${MAKEVAR_top_builddir}
--files-from=${CMAKE_CURRENT_BINARY_DIR}/POTFILES
--package-version=${VERSION}
--package-name=${CMAKE_PROJECT_NAME}
DEPENDS ${source_translatable}
${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
#add_custom_command(OUTPUT ${TEMPLATE_FILE_ABS}
# COMMAND ${GettextTranslate_XGETTEXT_EXECUTABLE} ${XGETTEXT_OPTS}
# -o ${TEMPLATE_FILE_ABS}
# --default-domain=${MAKEVAR_DOMAIN}
# --add-comments=TRANSLATORS:
# --copyright-holder=${MAKEVAR_COPYRIGHT_HOLDER}
# --msgid-bugs-address="${MAKEVAR_MSGID_BUGS_ADDRESS}"
# --directory=${MAKEVAR_top_builddir}
# --files-from=${CMAKE_CURRENT_BINARY_DIR}/POTFILES
# --package-version=${VERSION}
# --package-name=${CMAKE_PROJECT_NAME}
# DEPENDS ${source_translatable}
# ${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
#)
#add_dependencies(lib-update-po ${MAKEVAR_DOMAIN}.pot-update)
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/LINGUAS LINGUAS
REGEX "^[^#].*")
string(REGEX MATCHALL "[^ ]+" languages ${LINGUAS})
foreach(lang ${languages})
set(PO_FILE_NAME "${CMAKE_CURRENT_SOURCE_DIR}/${lang}/${CMAKE_PROJECT_NAME}.po")
set(GMO_FILE_NAME "${GMO_BUILD_DIR}/${lang}/${CMAKE_PROJECT_NAME}.gmo")
set(PO_TARGET "generate-${MAKEVAR_DOMAIN}-${lang}-po")
set(GMO_TARGET "generate-${MAKEVAR_DOMAIN}-${lang}-gmo")
list(APPEND po_files ${PO_TARGET})
list(APPEND gmo_files ${GMO_TARGET})
if(${lang} MATCHES "en@(.*)quot")
add_custom_command(OUTPUT ${lang}.insert-header
COMMAND
sed -e "'/^#/d'" -e 's/HEADER/${lang}.header/g'
${CMAKE_CURRENT_SOURCE_DIR}/insert-header.sin > ${lang}.insert-header
)
#generate the en@quot files
add_custom_target(${PO_TARGET}
COMMAND
${GettextTranslate_MSGINIT_EXECUTABLE} -i ${TEMPLATE_FILE_ABS}
--no-translator -l ${lang}
-o - 2>/dev/null
| sed -f ${CMAKE_CURRENT_BINARY_DIR}/${lang}.insert-header
| ${GettextTranslate_MSGCONV_EXECUTABLE} -t UTF-8
| ${GettextTranslate_MSGFILTER_EXECUTABLE} sed -f
${CMAKE_CURRENT_SOURCE_DIR}/`echo ${lang}
| sed -e 's/.*@//'`.sed 2>/dev/null >
${PO_FILE_NAME}
DEPENDS ${lang}.insert-header ${TEMPLATE_FILE_ABS}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
else()
add_custom_target(${PO_TARGET}
COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE} --lang=${lang}
${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
-o ${PO_FILE_NAME}.new
COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
DEPENDS ${TEMPLATE_FILE_ABS}
)
endif()
add_custom_target(${GMO_TARGET}
COMMAND ${GettextTranslate_MSGFMT_EXECUTABLE} -c --statistics --verbose
-o ${GMO_FILE_NAME} ${PO_FILE_NAME}
DEPENDS ${PO_TARGET}
)
add_dependencies(${PO_TARGET} ${MAKEVAR_DOMAIN}.pot-update)
install(FILES ${GMO_FILE_NAME} DESTINATION
${LOCALEDIR}/${lang}/LC_MESSAGES
RENAME ${MAKEVAR_DOMAIN}.mo
)
endforeach()
add_dependencies(lib-update-po ${po_files})
add_dependencies(lib-update-gmo ${gmo_files})
#string(REGEX MATCH "^[^=]+=(.*)$" parsed_variables ${makevars})
endmacro()

View File

@ -0,0 +1,9 @@
PROJECT(zint_po)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../")
set(GettextTranslate_ALL true)
set(GettextTranslate_GMO_BINARY true)
include(GettextTranslate)
GettextTranslate()

1
backend/po/LINGUAS Normal file
View File

@ -0,0 +1 @@
ru

15
backend/po/Makevars Normal file
View File

@ -0,0 +1,15 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = libzint
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --language=C --sort-output --from-code=UTF-8 --foreign-user --no-wrap
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings
MSGID_BUGS_ADDRESS = rstuart114@gmail.com

1
backend/po/POTFILES.in Normal file
View File

@ -0,0 +1 @@

View File

@ -1,6 +1,6 @@
# SOME DESCRIPTIVE TITLE. # SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package. # This file is distributed under the same license as the libzint package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
#, fuzzy #, fuzzy
@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: libzint 2.9\n" "Project-Id-Version: libzint 2.9\n"
"Report-Msgid-Bugs-To: rstuart114@gmail.com\n" "Report-Msgid-Bugs-To: rstuart114@gmail.com\n"
"POT-Creation-Date: 2020-11-21 16:40+0000\n" "POT-Creation-Date: 2020-11-21 19:34+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -17,3 +17,15 @@ link_directories( "${CMAKE_BINARY_DIR}/backend" )
target_link_libraries(zint_frontend zint) target_link_libraries(zint_frontend zint)
install(TARGETS zint_frontend DESTINATION "${BIN_INSTALL_DIR}" RUNTIME) install(TARGETS zint_frontend DESTINATION "${BIN_INSTALL_DIR}" RUNTIME)
# LOCALEDIR must be set up before including po/CMakeLists.txt
if (DEFINED LOCALE_INSTALL_DIR)
set(LOCALEDIR "${LOCALE_INSTALL_DIR}")
else(DEFINED LOCALE_INSTALL_DIR)
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/locale")
endif(DEFINED LOCALE_INSTALL_DIR)
add_definitions(-DINSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
add_definitions(-DLOCALE_DIR="${LOCALEDIR}")
add_subdirectory(po)

View File

@ -0,0 +1,285 @@
# Copyright (c) 2012, Jarryd Beck
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# This module creates build rules for updating translation files made
# with gettext
# In your top level CMakeLists.txt, do
# include(GettextTranslate)
# then in any po directory where you want things to be translated, write
# GettextTranslate()
#
# This module also finds the gettext binaries. If these are in a non-standard
# location, you can define the following variables to provide paths to search
# in
# GettextTranslate_BINARIES --- a path in which to look for every program
# GettextTranslate_XGETTEXT --- the xgettext program
# GettextTranslate_MSGINIT --- the msginit program
# GettextTranslate_MSGFILTER --- the msgfilter program
# GettextTranslate_MSGCONV --- the msgconv program
# GettextTranslate_MSGMERGE --- the msgmerge program
# GettextTranslate_MSGFMT --- the msgfmt program
# these are searched first before $PATH, so set this if you have your own
# version that overrides the system version
#
# it reads variables from Makevars, one of the most important being DOMAIN
# it reads the languages to generate from LINGUAS
#
# it adds the following targets
# cli-update-po
# cli-update-gmo
# ${DOMAIN}-pot.update
# generate-${DOMAIN}-${lang}-po
# generate-${DOMAIN}-${lang}-gmo
#
# where ${DOMAIN} is the DOMAIN variable read from Makevars
# and ${lang} is each language mentioned in LINGUAS
#
# if you want cli-update-gmo to be added to the "all" target, then define the
# variable GettextTranslate_ALL before including this file
#
# by default, the gmo files are built in the source directory. If you want
# them to be built in the binary directory, then define the variable
# GettextTranslate_GMO_BINARY
# add the cli-update-po and cli-update-gmo targets, the actual files that need to
# depend on this will be added as we go
if (DEFINED GettextTranslate_ALL)
set(_addToALL "ALL")
endif()
add_custom_target(cli-update-po)
add_custom_target(cli-update-gmo ${_addToALL})
#look for all the programs
#xgettext, msginit, msgfilter, msgconv, msgmerge, msgfmt
function(REQUIRE_BINARY binname varname)
if (${${varname}} STREQUAL "${varname}-NOTFOUND")
message(FATAL_ERROR "Could not find " ${binname})
endif()
endfunction()
find_program(GettextTranslate_XGETTEXT_EXECUTABLE xgettext
HINTS ${GettextTranslate_XGETTEXT} ${GettextTranslate_BINARIES}
)
REQUIRE_BINARY(xgettext GettextTranslate_XGETTEXT_EXECUTABLE)
find_program(GettextTranslate_MSGINIT_EXECUTABLE msginit
HINTS ${GettextTranslate_MSGINIT} ${GettextTranslate_BINARIES}
)
REQUIRE_BINARY(msginit GettextTranslate_MSGINIT_EXECUTABLE)
find_program(GettextTranslate_MSGFILTER_EXECUTABLE msgfilter
HINTS ${GettextTranslate_MSGFILTER} ${GettextTranslate_BINARIES}
)
REQUIRE_BINARY(msgfilter GettextTranslate_MSGFILTER_EXECUTABLE)
find_program(GettextTranslate_MSGCONV_EXECUTABLE msgconv
HINTS ${GettextTranslate_MSGCONV} ${GettextTranslate_BINARIES}
)
REQUIRE_BINARY(msgconv GettextTranslate_MSGCONV_EXECUTABLE)
find_program(GettextTranslate_MSGMERGE_EXECUTABLE msgmerge
HINTS ${GettextTranslate_MSGMERGE} ${GettextTranslate_BINARIES}
)
REQUIRE_BINARY(msgmerge GettextTranslate_MSGMERGE_EXECUTABLE)
find_program(GettextTranslate_MSGFMT_EXECUTABLE msgfmt
HINTS ${GettextTranslate_MSGFMT} ${GettextTranslate_BINARIES}
)
REQUIRE_BINARY(msgfmt GettextTranslate_MSGFMT_EXECUTABLE)
mark_as_advanced(
GettextTranslate_MSGCONV_EXECUTABLE
GettextTranslate_MSGFILTER_EXECUTABLE
GettextTranslate_MSGFMT_EXECUTABLE
GettextTranslate_MSGINIT_EXECUTABLE
GettextTranslate_MSGMERGE_EXECUTABLE
GettextTranslate_XGETTEXT_EXECUTABLE
)
macro(GettextTranslate)
if(GettextTranslate_GMO_BINARY)
set (GMO_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
else()
set (GMO_BUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR})
endif()
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in)
message(FATAL_ERROR "There is no POTFILES.in in
${CMAKE_CURRENT_SOURCE_DIR}")
endif()
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Makevars)
message(FATAL_ERROR "There is no Makevars in ${CMAKE_CURRENT_SOURCE_DIR}")
endif()
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/Makevars makevars
REGEX "^[^=]+=(.*)$"
)
foreach(makevar ${makevars})
string(REGEX REPLACE "^([^= ]+) =[ ]?(.*)$" "\\1" MAKEVAR_KEY ${makevar})
string(REGEX REPLACE "^([^= ]+) =[ ]?(.*)$" "\\2"
MAKEVAR_${MAKEVAR_KEY} ${makevar})
endforeach()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in
${CMAKE_CURRENT_BINARY_DIR}/POTFILES
COPYONLY
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/LINGUAS
${CMAKE_CURRENT_BINARY_DIR}/LINGUAS
COPYONLY
)
#set the directory to not clean
#set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
# PROPERTY CLEAN_NO_CUSTOM true)
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in potfiles
REGEX "^[^#].*"
)
foreach(potfile ${potfiles})
list(APPEND source_translatable
${CMAKE_CURRENT_SOURCE_DIR}/${MAKEVAR_top_builddir}/${potfile})
endforeach()
set(TEMPLATE_FILE ${MAKEVAR_DOMAIN}.pot)
set(TEMPLATE_FILE_ABS ${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_FILE})
string(REGEX MATCHALL "[^ ]+" XGETTEXT_OPTS ${MAKEVAR_XGETTEXT_OPTIONS})
#add_custom_target(${MAKEVAR_DOMAIN}.pot-update DEPENDS
# ${TEMPLATE_FILE_ABS}
#)
add_custom_target(${MAKEVAR_DOMAIN}.pot-update
COMMAND ${GettextTranslate_XGETTEXT_EXECUTABLE} ${XGETTEXT_OPTS}
-o ${TEMPLATE_FILE_ABS}
--default-domain=${MAKEVAR_DOMAIN}
--add-comments=TRANSLATORS:
--copyright-holder=${MAKEVAR_COPYRIGHT_HOLDER}
--msgid-bugs-address="${MAKEVAR_MSGID_BUGS_ADDRESS}"
--directory=${MAKEVAR_top_builddir}
--files-from=${CMAKE_CURRENT_BINARY_DIR}/POTFILES
--package-version=${VERSION}
--package-name=${CMAKE_PROJECT_NAME}
DEPENDS ${source_translatable}
${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
#add_custom_command(OUTPUT ${TEMPLATE_FILE_ABS}
# COMMAND ${GettextTranslate_XGETTEXT_EXECUTABLE} ${XGETTEXT_OPTS}
# -o ${TEMPLATE_FILE_ABS}
# --default-domain=${MAKEVAR_DOMAIN}
# --add-comments=TRANSLATORS:
# --copyright-holder=${MAKEVAR_COPYRIGHT_HOLDER}
# --msgid-bugs-address="${MAKEVAR_MSGID_BUGS_ADDRESS}"
# --directory=${MAKEVAR_top_builddir}
# --files-from=${CMAKE_CURRENT_BINARY_DIR}/POTFILES
# --package-version=${VERSION}
# --package-name=${CMAKE_PROJECT_NAME}
# DEPENDS ${source_translatable}
# ${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
#)
#add_dependencies(cli-update-po ${MAKEVAR_DOMAIN}.pot-update)
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/LINGUAS LINGUAS
REGEX "^[^#].*")
string(REGEX MATCHALL "[^ ]+" languages ${LINGUAS})
foreach(lang ${languages})
set(PO_FILE_NAME "${CMAKE_CURRENT_SOURCE_DIR}/${lang}/${CMAKE_PROJECT_NAME}.po")
set(GMO_FILE_NAME "${GMO_BUILD_DIR}/${lang}/${CMAKE_PROJECT_NAME}.gmo")
set(PO_TARGET "generate-${MAKEVAR_DOMAIN}-${lang}-po")
set(GMO_TARGET "generate-${MAKEVAR_DOMAIN}-${lang}-gmo")
list(APPEND po_files ${PO_TARGET})
list(APPEND gmo_files ${GMO_TARGET})
if(${lang} MATCHES "en@(.*)quot")
add_custom_command(OUTPUT ${lang}.insert-header
COMMAND
sed -e "'/^#/d'" -e 's/HEADER/${lang}.header/g'
${CMAKE_CURRENT_SOURCE_DIR}/insert-header.sin > ${lang}.insert-header
)
#generate the en@quot files
add_custom_target(${PO_TARGET}
COMMAND
${GettextTranslate_MSGINIT_EXECUTABLE} -i ${TEMPLATE_FILE_ABS}
--no-translator -l ${lang}
-o - 2>/dev/null
| sed -f ${CMAKE_CURRENT_BINARY_DIR}/${lang}.insert-header
| ${GettextTranslate_MSGCONV_EXECUTABLE} -t UTF-8
| ${GettextTranslate_MSGFILTER_EXECUTABLE} sed -f
${CMAKE_CURRENT_SOURCE_DIR}/`echo ${lang}
| sed -e 's/.*@//'`.sed 2>/dev/null >
${PO_FILE_NAME}
DEPENDS ${lang}.insert-header ${TEMPLATE_FILE_ABS}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
else()
add_custom_target(${PO_TARGET}
COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE} --lang=${lang}
${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
-o ${PO_FILE_NAME}.new
COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
DEPENDS ${TEMPLATE_FILE_ABS}
)
endif()
add_custom_target(${GMO_TARGET}
COMMAND ${GettextTranslate_MSGFMT_EXECUTABLE} -c --statistics --verbose
-o ${GMO_FILE_NAME} ${PO_FILE_NAME}
DEPENDS ${PO_TARGET}
)
add_dependencies(${PO_TARGET} ${MAKEVAR_DOMAIN}.pot-update)
install(FILES ${GMO_FILE_NAME} DESTINATION
${LOCALEDIR}/${lang}/LC_MESSAGES
RENAME ${MAKEVAR_DOMAIN}.mo
)
endforeach()
add_dependencies(cli-update-po ${po_files})
add_dependencies(cli-update-gmo ${gmo_files})
#string(REGEX MATCH "^[^=]+=(.*)$" parsed_variables ${makevars})
endmacro()

View File

@ -0,0 +1,9 @@
PROJECT(zint_po)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../")
set(GettextTranslate_ALL true)
set(GettextTranslate_GMO_BINARY true)
include(GettextTranslate)
GettextTranslate()

1
frontend/po/LINGUAS Normal file
View File

@ -0,0 +1 @@
ru

15
frontend/po/Makevars Normal file
View File

@ -0,0 +1,15 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = zint
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --language=C --sort-output --from-code=UTF-8 --foreign-user --no-wrap
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings
MSGID_BUGS_ADDRESS = rstuart114@gmail.com

1
frontend/po/POTFILES.in Normal file
View File

@ -0,0 +1 @@

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: libzint 2.9\n" "Project-Id-Version: libzint 2.9\n"
"Report-Msgid-Bugs-To: rstuart114@gmail.com\n" "Report-Msgid-Bugs-To: rstuart114@gmail.com\n"
"POT-Creation-Date: 2020-11-20 19:19+0000\n" "POT-Creation-Date: 2020-11-21 19:34+0000\n"
"PO-Revision-Date: 2020-11-20 19:23+0000\n" "PO-Revision-Date: 2020-11-20 19:23+0000\n"
"Last-Translator: Василий Павлов <halmet94@gmail.com>\n" "Last-Translator: Василий Павлов <halmet94@gmail.com>\n"
"Language-Team: Russian\n" "Language-Team: Russian\n"
@ -15,8 +15,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "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"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: main.c:47 #: main.c:47
#, c-format #, c-format
@ -44,10 +43,8 @@ msgid ""
"30: GS1 DataBar Ltd 79: GS1 DataBar Stack 135: Comp UPC-A\n" "30: GS1 DataBar Ltd 79: GS1 DataBar Stack 135: Comp UPC-A\n"
"31: GS1 DataBar Exp 80: GS1 DataBar Stack Omni 136: Comp UPC-E\n" "31: GS1 DataBar Exp 80: GS1 DataBar Stack Omni 136: Comp UPC-E\n"
"32: Telepen Alpha 81: GS1 DataBar Exp Stack 137: Comp DataBar Stack\n" "32: Telepen Alpha 81: GS1 DataBar Exp Stack 137: Comp DataBar Stack\n"
"34: UPC-A 82: PLANET 138: Comp DataBar Stack " "34: UPC-A 82: PLANET 138: Comp DataBar Stack Omni\n"
"Omni\n" "35: UPC-A + Check 84: MicroPDF 139: Comp DataBar Exp Stack\n"
"35: UPC-A + Check 84: MicroPDF 139: Comp DataBar Exp "
"Stack\n"
"37: UPC-E 85: USPS Intelligent Mail 140: Channel Code\n" "37: UPC-E 85: USPS Intelligent Mail 140: Channel Code\n"
"38: UPC-E + Check 86: UK Plessey 141: Code One\n" "38: UPC-E + Check 86: UK Plessey 141: Code One\n"
"40: POSTNET 87: Telepen Numeric 142: Grid Matrix\n" "40: POSTNET 87: Telepen Numeric 142: Grid Matrix\n"
@ -87,7 +84,8 @@ msgid ""
"29: ** GB (PRC) Chinese Character Set\n" "29: ** GB (PRC) Chinese Character Set\n"
"30: ** Korean Character Set (KSX1001:1998)\n" "30: ** Korean Character Set (KSX1001:1998)\n"
"** See note in section 4.10 of the manual\n" "** See note in section 4.10 of the manual\n"
msgstr " 3: ISO-8859-1 - Латинский алфавит №. 1 (по умолчанию)\n" msgstr ""
" 3: ISO-8859-1 - Латинский алфавит №. 1 (по умолчанию)\n"
" 4: ISO-8859-2 - Латинский алфавит №. 2\n" " 4: ISO-8859-2 - Латинский алфавит №. 2\n"
" 5: ISO-8859-3 - Латинский алфавит №. 3\n" " 5: ISO-8859-3 - Латинский алфавит №. 3\n"
" 6: ISO-8859-4 - Латинский алфавит №. 4\n" " 6: ISO-8859-4 - Латинский алфавит №. 4\n"
@ -115,37 +113,34 @@ msgstr " 3: ISO-8859-1 - Латинский алфавит №. 1 (по умол
"30: ** Корейский набор символов (KSX1001:1998)\n" "30: ** Корейский набор символов (KSX1001:1998)\n"
"** См. Примечание в разделе 4.10 руководства\n" "** См. Примечание в разделе 4.10 руководства\n"
#: main.c:674 #: main.c:678
msgid "Border width out of range" msgid "Border width out of range"
msgstr "" msgstr ""
#: main.c:893 #: main.c:897
msgid "Can only define one input file in batch mode, ignoring" msgid "Can only define one input file in batch mode, ignoring"
msgstr "" msgstr ""
#: main.c:882 #: main.c:886
msgid "Can't define data in batch mode, ignoring" msgid "Can't define data in batch mode, ignoring"
msgstr "Невозможно определить данные в пакетном режиме" msgstr "Невозможно определить данные в пакетном режиме"
#: main.c:782 #: main.c:786
msgid "Can't use batch mode if data given, ignoring" msgid "Can't use batch mode if data given, ignoring"
msgstr "" msgstr ""
#: main.c:734 #: main.c:738
msgid "ECC level out of range" msgid "ECC level out of range"
msgstr "" msgstr ""
#: main.c:89 #: main.c:89
#, c-format #, c-format
msgid "" msgid ""
"Encode input data in a barcode and save as BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/" "Encode input data in a barcode and save as BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\n"
"TXT\n"
"\n" "\n"
" -b, --barcode=NUMBER Number of barcode type. Default is 20 (Code 128)\n" " -b, --barcode=NUMBER Number of barcode type. Default is 20 (Code 128)\n"
" --addongap=NUMBER Set add-on gap in multiples of X-dimension for UPC/" " --addongap=NUMBER Set add-on gap in multiples of X-dimension for UPC/EAN\n"
"EAN\n" " --batch Treat each line of input file as a separate data set\n"
" --batch Treat each line of input file as a separate data "
"set\n"
" --bg=COLOUR Specify a background colour (in hex)\n" " --bg=COLOUR Specify a background colour (in hex)\n"
" --binary Treat input as raw binary data\n" " --binary Treat input as raw binary data\n"
" --bind Add boundary bars\n" " --bind Add boundary bars\n"
@ -164,10 +159,8 @@ msgid ""
" --eci=NUMBER Set the ECI (Extended Channel Interpretation) code\n" " --eci=NUMBER Set the ECI (Extended Channel Interpretation) code\n"
" --esc Process escape characters in input data\n" " --esc Process escape characters in input data\n"
" --fg=COLOUR Specify a foreground colour (in hex)\n" " --fg=COLOUR Specify a foreground colour (in hex)\n"
" --filetype=TYPE Set output file type BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/" " --filetype=TYPE Set output file type BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\n"
"TXT\n" " --fullmultibyte Use multibyte for binary/Latin (QR/Han Xin/Grid Matrix)\n"
" --fullmultibyte Use multibyte for binary/Latin (QR/Han Xin/Grid "
"Matrix)\n"
" --gs1 Treat input as GS1 compatible data\n" " --gs1 Treat input as GS1 compatible data\n"
" --gssep Use separator GS for GS1 (Data Matrix)\n" " --gssep Use separator GS for GS1 (Data Matrix)\n"
" -h, --help Display help message\n" " -h, --help Display help message\n"
@ -185,18 +178,16 @@ msgid ""
" --rows=NUMBER Set number of rows (Codablock-F)\n" " --rows=NUMBER Set number of rows (Codablock-F)\n"
" --scale=NUMBER Adjust size of X-dimension\n" " --scale=NUMBER Adjust size of X-dimension\n"
" --secure=NUMBER Set error correction level (ECC)\n" " --secure=NUMBER Set error correction level (ECC)\n"
" --separator=NUMBER Set height of row separator bars (stacked " " --separator=NUMBER Set height of row separator bars (stacked symbologies)\n"
"symbologies)\n"
" --small Use small text\n" " --small Use small text\n"
" --square Force Data Matrix symbols to be square\n" " --square Force Data Matrix symbols to be square\n"
" -t, --types Display table of barcode types\n" " -t, --types Display table of barcode types\n"
" --vers=NUMBER Set symbol version (size, check digits, other " " --vers=NUMBER Set symbol version (size, check digits, other options)\n"
"options)\n"
" -w, --whitesp=NUMBER Set width of whitespace in multiples of X-dimension\n" " -w, --whitesp=NUMBER Set width of whitespace in multiples of X-dimension\n"
" --werror Convert all warnings into errors\n" " --werror Convert all warnings into errors\n"
" --wzpl ZPL compatibility mode (allows non-standard " " --wzpl ZPL compatibility mode (allows non-standard symbols)\n"
"symbols)\n" msgstr ""
msgstr "Кодирование входных данных в штрих-коды с возможностью сохранения в BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF\n" "Кодирование входных данных в штрих-коды с возможностью сохранения в BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF\n"
" -b, --barcode=NUMBER Количество типов штрих-кодов (default is 20 (=Code128))\n" " -b, --barcode=NUMBER Количество типов штрих-кодов (default is 20 (=Code128))\n"
" --batch Обрабатывать каждую строку входного файла как отдельный набор данных\n" " --batch Обрабатывать каждую строку входного файла как отдельный набор данных\n"
" --bg=COLOUR Укажите цвет фона (в шестнадцатеричном формате)\n" " --bg=COLOUR Укажите цвет фона (в шестнадцатеричном формате)\n"
@ -244,7 +235,7 @@ msgstr "Кодирование входных данных в штрих-код
msgid "Error %d: %s" msgid "Error %d: %s"
msgstr "Ошибка %d: %s" msgstr "Ошибка %d: %s"
#: main.c:792 #: main.c:796
msgid "File type not supported, ignoring" msgid "File type not supported, ignoring"
msgstr "" msgstr ""
@ -252,91 +243,91 @@ msgstr ""
msgid "Input too long" msgid "Input too long"
msgstr "" msgstr ""
#: main.c:728 #: main.c:732
msgid "Invalid ECC value" msgid "Invalid ECC value"
msgstr "" msgstr ""
#: main.c:806 #: main.c:810
msgid "Invalid ECI code" msgid "Invalid ECI code"
msgstr "" msgstr ""
#: main.c:800 #: main.c:804
msgid "Invalid ECI value" msgid "Invalid ECI value"
msgstr "" msgstr ""
#: main.c:648 main.c:653 #: main.c:652 main.c:657
msgid "Invalid add-on gap value" msgid "Invalid add-on gap value"
msgstr "" msgstr ""
#: main.c:856 #: main.c:860
msgid "Invalid barcode type" msgid "Invalid barcode type"
msgstr "" msgstr ""
#: main.c:668 #: main.c:672
msgid "Invalid border width value" msgid "Invalid border width value"
msgstr "" msgstr ""
#: main.c:692 #: main.c:696
msgid "Invalid columns value" msgid "Invalid columns value"
msgstr "" msgstr ""
#: main.c:661 #: main.c:665
msgid "Invalid dot radius value" msgid "Invalid dot radius value"
msgstr "" msgstr ""
#: main.c:818 main.c:824 #: main.c:822 main.c:828
msgid "Invalid font size" msgid "Invalid font size"
msgstr "" msgstr ""
#: main.c:753 #: main.c:757
msgid "Invalid mode" msgid "Invalid mode"
msgstr "" msgstr ""
#: main.c:747 #: main.c:751
msgid "Invalid mode value" msgid "Invalid mode value"
msgstr "" msgstr ""
#: main.c:916 #: main.c:920
msgid "Invalid option" msgid "Invalid option"
msgstr "" msgstr ""
#: main.c:760 main.c:773 #: main.c:764 main.c:777
msgid "Invalid rotation value" msgid "Invalid rotation value"
msgstr "" msgstr ""
#: main.c:704 #: main.c:708
msgid "Invalid rows value" msgid "Invalid rows value"
msgstr "" msgstr ""
#: main.c:628 #: main.c:632
msgid "Invalid scale value" msgid "Invalid scale value"
msgstr "" msgstr ""
#: main.c:635 #: main.c:639
msgid "Invalid separator value" msgid "Invalid separator value"
msgstr "" msgstr ""
#: main.c:641 #: main.c:645
msgid "Invalid seperator value" msgid "Invalid seperator value"
msgstr "" msgstr ""
#: main.c:680 #: main.c:684
msgid "Invalid symbol height value" msgid "Invalid symbol height value"
msgstr "" msgstr ""
#: main.c:722 #: main.c:726
msgid "Invalid version" msgid "Invalid version"
msgstr "" msgstr ""
#: main.c:716 #: main.c:720
msgid "Invalid version value" msgid "Invalid version value"
msgstr "" msgstr ""
#: main.c:865 #: main.c:869
msgid "Invalid whitespace value" msgid "Invalid whitespace value"
msgstr "" msgstr ""
#: main.c:983 #: main.c:987
msgid "No data received, no symbol generated" msgid "No data received, no symbol generated"
msgstr "Данне не получены, символы не сгенерированы" msgstr "Данне не получены, символы не сгенерированы"
@ -344,11 +335,11 @@ msgstr "Данне не получены, символы не сгенериро
msgid "No newline at end of file" msgid "No newline at end of file"
msgstr "" msgstr ""
#: main.c:698 #: main.c:702
msgid "Number of columns out of range" msgid "Number of columns out of range"
msgstr "" msgstr ""
#: main.c:710 #: main.c:714
msgid "Number of rows out of range" msgid "Number of rows out of range"
msgstr "" msgstr ""
@ -362,19 +353,19 @@ msgstr ""
msgid "On line %d: %s\n" msgid "On line %d: %s\n"
msgstr "" msgstr ""
#: main.c:741 #: main.c:745
msgid "Primary data string too long" msgid "Primary data string too long"
msgstr "" msgstr ""
#: main.c:937 #: main.c:941
msgid "Processing first input file only" msgid "Processing first input file only"
msgstr "" msgstr ""
#: main.c:945 main.c:957 #: main.c:949 main.c:961
msgid "Scaling less than 0.5 will be set to 0.5" msgid "Scaling less than 0.5 will be set to 0.5"
msgstr "" msgstr ""
#: main.c:686 #: main.c:690
msgid "Symbol height out of range" msgid "Symbol height out of range"
msgstr "" msgstr ""
@ -382,7 +373,7 @@ msgstr ""
msgid "Unable to read input file" msgid "Unable to read input file"
msgstr "" msgstr ""
#: main.c:910 #: main.c:914
msgid "Unknown getopt error" msgid "Unknown getopt error"
msgstr "" msgstr ""
@ -391,7 +382,7 @@ msgstr ""
msgid "Warning %d: %s" msgid "Warning %d: %s"
msgstr "Предупреждение %d: %s" msgstr "Предупреждение %d: %s"
#: main.c:871 #: main.c:875
msgid "Whitespace value out of range" msgid "Whitespace value out of range"
msgstr "" msgstr ""

View File

@ -1,20 +1,20 @@
# SOME DESCRIPTIVE TITLE. # SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package. # This file is distributed under the same license as the zint package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: libzint 2.9\n" "Project-Id-Version: zint 2.9\n"
"Report-Msgid-Bugs-To: rstuart114@gmail.com\n" "Report-Msgid-Bugs-To: rstuart114@gmail.com\n"
"POT-Creation-Date: 2020-11-20 19:19+0000\n" "POT-Creation-Date: 2020-11-21 19:34+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: main.c:47 #: main.c:47
@ -43,10 +43,8 @@ msgid ""
"30: GS1 DataBar Ltd 79: GS1 DataBar Stack 135: Comp UPC-A\n" "30: GS1 DataBar Ltd 79: GS1 DataBar Stack 135: Comp UPC-A\n"
"31: GS1 DataBar Exp 80: GS1 DataBar Stack Omni 136: Comp UPC-E\n" "31: GS1 DataBar Exp 80: GS1 DataBar Stack Omni 136: Comp UPC-E\n"
"32: Telepen Alpha 81: GS1 DataBar Exp Stack 137: Comp DataBar Stack\n" "32: Telepen Alpha 81: GS1 DataBar Exp Stack 137: Comp DataBar Stack\n"
"34: UPC-A 82: PLANET 138: Comp DataBar Stack " "34: UPC-A 82: PLANET 138: Comp DataBar Stack Omni\n"
"Omni\n" "35: UPC-A + Check 84: MicroPDF 139: Comp DataBar Exp Stack\n"
"35: UPC-A + Check 84: MicroPDF 139: Comp DataBar Exp "
"Stack\n"
"37: UPC-E 85: USPS Intelligent Mail 140: Channel Code\n" "37: UPC-E 85: USPS Intelligent Mail 140: Channel Code\n"
"38: UPC-E + Check 86: UK Plessey 141: Code One\n" "38: UPC-E + Check 86: UK Plessey 141: Code One\n"
"40: POSTNET 87: Telepen Numeric 142: Grid Matrix\n" "40: POSTNET 87: Telepen Numeric 142: Grid Matrix\n"
@ -111,14 +109,11 @@ msgstr ""
#: main.c:89 #: main.c:89
#, c-format #, c-format
msgid "" msgid ""
"Encode input data in a barcode and save as BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/" "Encode input data in a barcode and save as BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\n"
"TXT\n"
"\n" "\n"
" -b, --barcode=NUMBER Number of barcode type. Default is 20 (Code 128)\n" " -b, --barcode=NUMBER Number of barcode type. Default is 20 (Code 128)\n"
" --addongap=NUMBER Set add-on gap in multiples of X-dimension for UPC/" " --addongap=NUMBER Set add-on gap in multiples of X-dimension for UPC/EAN\n"
"EAN\n" " --batch Treat each line of input file as a separate data set\n"
" --batch Treat each line of input file as a separate data "
"set\n"
" --bg=COLOUR Specify a background colour (in hex)\n" " --bg=COLOUR Specify a background colour (in hex)\n"
" --binary Treat input as raw binary data\n" " --binary Treat input as raw binary data\n"
" --bind Add boundary bars\n" " --bind Add boundary bars\n"
@ -137,10 +132,8 @@ msgid ""
" --eci=NUMBER Set the ECI (Extended Channel Interpretation) code\n" " --eci=NUMBER Set the ECI (Extended Channel Interpretation) code\n"
" --esc Process escape characters in input data\n" " --esc Process escape characters in input data\n"
" --fg=COLOUR Specify a foreground colour (in hex)\n" " --fg=COLOUR Specify a foreground colour (in hex)\n"
" --filetype=TYPE Set output file type BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/" " --filetype=TYPE Set output file type BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT\n"
"TXT\n" " --fullmultibyte Use multibyte for binary/Latin (QR/Han Xin/Grid Matrix)\n"
" --fullmultibyte Use multibyte for binary/Latin (QR/Han Xin/Grid "
"Matrix)\n"
" --gs1 Treat input as GS1 compatible data\n" " --gs1 Treat input as GS1 compatible data\n"
" --gssep Use separator GS for GS1 (Data Matrix)\n" " --gssep Use separator GS for GS1 (Data Matrix)\n"
" -h, --help Display help message\n" " -h, --help Display help message\n"
@ -158,17 +151,14 @@ msgid ""
" --rows=NUMBER Set number of rows (Codablock-F)\n" " --rows=NUMBER Set number of rows (Codablock-F)\n"
" --scale=NUMBER Adjust size of X-dimension\n" " --scale=NUMBER Adjust size of X-dimension\n"
" --secure=NUMBER Set error correction level (ECC)\n" " --secure=NUMBER Set error correction level (ECC)\n"
" --separator=NUMBER Set height of row separator bars (stacked " " --separator=NUMBER Set height of row separator bars (stacked symbologies)\n"
"symbologies)\n"
" --small Use small text\n" " --small Use small text\n"
" --square Force Data Matrix symbols to be square\n" " --square Force Data Matrix symbols to be square\n"
" -t, --types Display table of barcode types\n" " -t, --types Display table of barcode types\n"
" --vers=NUMBER Set symbol version (size, check digits, other " " --vers=NUMBER Set symbol version (size, check digits, other options)\n"
"options)\n"
" -w, --whitesp=NUMBER Set width of whitespace in multiples of X-dimension\n" " -w, --whitesp=NUMBER Set width of whitespace in multiples of X-dimension\n"
" --werror Convert all warnings into errors\n" " --werror Convert all warnings into errors\n"
" --wzpl ZPL compatibility mode (allows non-standard " " --wzpl ZPL compatibility mode (allows non-standard symbols)\n"
"symbols)\n"
msgstr "" msgstr ""
#: main.c:290 #: main.c:290