diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index 87ad4c68..762688a1 100644 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -19,3 +19,20 @@ GETTEXT_CREATE_TRANSLATIONS(exiv2.pot ALL uk.po vi.po ) + +find_program(XGETTEXT xgettext) + +add_custom_target( + update-pot + COMMAND + ${XGETTEXT} -o ${CMAKE_CURRENT_SOURCE_DIR}/exiv2.pot + -D ${PROJECT_SOURCE_DIR} + --keyword=_ --keyword=N_ + --files-from=${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in + --from-code=UTF-8 + --copyright-holder='Exiv2 authors' + --msgid-bugs-address='https://github.com/Exiv2/exiv2/issues' + --package-name=${CMAKE_PROJECT_NAME} + --package-version=${CMAKE_PROJECT_VERSION} + COMMENT "Extract translatable messages to exiv2.pot" +) diff --git a/po/Makevars b/po/Makevars deleted file mode 100644 index 41545181..00000000 --- a/po/Makevars +++ /dev/null @@ -1,41 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = Andreas Huggel - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = ahuggel@gmx.net - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES.in b/po/POTFILES.in index 3e797ed3..270b9877 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,23 +1,24 @@ # List of source files with translatable strings, generated with # $ grep -l '[N ]_(' src/*.cpp src/*.hpp | sort -# Note: Please run 'make update-po' after changing this list +# Note: Please run 'make update-pot' after changing this list src/actions.cpp -src/canonmn.cpp -src/crwimage.cpp +src/canonmn_int.cpp +src/casiomn_int.cpp +src/crwimage_int.cpp src/datasets.cpp src/error.cpp src/exiv2.cpp -src/fujimn.cpp -src/minoltamn.cpp -src/nikonmn.cpp -src/olympusmn.cpp -src/panasonicmn.cpp -src/pentaxmn.cpp +src/fujimn_int.cpp +src/minoltamn_int.cpp +src/nikonmn_int.cpp +src/olympusmn_int.cpp +src/panasonicmn_int.cpp +src/pentaxmn_int.cpp src/properties.cpp -src/sigmamn.cpp -src/sonymn.cpp +src/samsungmn_int.cpp +src/sigmamn_int.cpp +src/sonymn_int.cpp src/tags.cpp -src/tiffimage.cpp -src/tiffvisitor.cpp -src/webpimage.cpp +src/tags_int.cpp +src/tiffimage_int.cpp