Add custom update-pot target

While working on a separate localization bug, I noticed that
`po/exiv2.pot` hasn't been updated since 2017, and that with the removal
of the autotools build system there's no longer any way to update it.
Add a simple `update-pot` target to do so, and bring `po/POTFILES.in` up
to date with the current source tree.

I haven't updated `po/exiv2.pot` itself because that would be a large
diff, though I've checked that the output looks reasonable.  I suggest
that maintainers do this.
main
Colin Watson 4 years ago
parent 774e6625e3
commit ec58aec960

@ -19,3 +19,20 @@ GETTEXT_CREATE_TRANSLATIONS(exiv2.pot ALL
uk.po uk.po
vi.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='Andreas Huggel'
--msgid-bugs-address=ahuggel@gmx.net
--package-name=${CMAKE_PROJECT_NAME}
--package-version=${CMAKE_PROJECT_VERSION}
COMMENT "Extract translatable messages to exiv2.pot"
)

@ -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 =

@ -1,23 +1,24 @@
# List of source files with translatable strings, generated with # List of source files with translatable strings, generated with
# $ grep -l '[N ]_(' src/*.cpp src/*.hpp | sort # $ 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/actions.cpp
src/canonmn.cpp src/canonmn_int.cpp
src/crwimage.cpp src/casiomn_int.cpp
src/crwimage_int.cpp
src/datasets.cpp src/datasets.cpp
src/error.cpp src/error.cpp
src/exiv2.cpp src/exiv2.cpp
src/fujimn.cpp src/fujimn_int.cpp
src/minoltamn.cpp src/minoltamn_int.cpp
src/nikonmn.cpp src/nikonmn_int.cpp
src/olympusmn.cpp src/olympusmn_int.cpp
src/panasonicmn.cpp src/panasonicmn_int.cpp
src/pentaxmn.cpp src/pentaxmn_int.cpp
src/properties.cpp src/properties.cpp
src/sigmamn.cpp src/samsungmn_int.cpp
src/sonymn.cpp src/sigmamn_int.cpp
src/sonymn_int.cpp
src/tags.cpp src/tags.cpp
src/tiffimage.cpp src/tags_int.cpp
src/tiffvisitor.cpp src/tiffimage_int.cpp
src/webpimage.cpp

Loading…
Cancel
Save