summaryrefslogtreecommitdiff
path: root/po
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2017-09-07 12:20:17 +0200
committerMartin Blanchard <tchaik@gmx.com>2019-03-10 18:55:28 +0000
commit2c460bd113678b20519cdec4447815b05a3cca1c (patch)
treef10c8492b65228b1871d86764fd8b1db7dcd1805 /po
parent39676dda2db54c9e8698527d3183b01eb8fda6fc (diff)
downloadglade-2c460bd113678b20519cdec4447815b05a3cca1c.tar.gz
Migrate from intltool to gettext
Recent gettext version can extract and merge back strings from and to various file formats, no need for intltool anymore. https://wiki.gnome.org/Initiatives/GnomeGoals/GettextMigration https://gitlab.gnome.org/GNOME/glade/issues/279
Diffstat (limited to 'po')
-rw-r--r--po/.gitignore1
-rw-r--r--po/Makevars80
-rw-r--r--po/POTFILES.in122
-rw-r--r--po/POTFILES.skip8
4 files changed, 144 insertions, 67 deletions
diff --git a/po/.gitignore b/po/.gitignore
index 7614a910..76d14b09 100644
--- a/po/.gitignore
+++ b/po/.gitignore
@@ -5,7 +5,6 @@
/Makefile.in.in
/POTFILES
/stamp-it
-/.intltool-merge-cache
/Makevars.template
/Rules-quot
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 00000000..14dbec39
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,80 @@
+# 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 = ..
+
+XGETTEXT := env GETTEXTDATADIRS="$(top_srcdir)/data/gettext" $(XGETTEXT)
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments
+
+# 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 = Glade contributors
+
+# This tells whether or not to prepend "GNU " prefix to the package
+# name that gets inserted into the header of the $(DOMAIN).pot file.
+# Possible values are "yes", "no", or empty. If it is empty, try to
+# detect it automatically by scanning the files in $(top_srcdir) for
+# "GNU packagename" string.
+PACKAGE_GNU = no
+
+# 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 = https://gitlab.gnome.org/GNOME/glade/issues
+
+# 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 =
+
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
+# context. Possible values are "yes" and "no". Set this to yes if the
+# package uses functions taking also a message context, like pgettext(), or
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
+USE_MSGCTXT = yes
+
+# These options get passed to msgmerge.
+# Useful options are in particular:
+# --previous to keep previous msgids of translated messages,
+# --quiet to reduce the verbosity.
+MSGMERGE_OPTIONS =
+
+# These options get passed to msginit.
+# If you want to disable line wrapping when writing PO files, add
+# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
+# MSGINIT_OPTIONS.
+MSGINIT_OPTIONS =
+
+# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
+# has changed. Possible values are "yes" and "no". Set this to no if
+# the POT file is checked in the repository and the version control
+# program ignores timestamps.
+PO_DEPENDS_ON_POT = no
+
+# This tells whether or not to forcibly update $(DOMAIN).pot and
+# regenerate PO files on "make dist". Possible values are "yes" and
+# "no". Set this to no if the POT file and PO files are maintained
+# externally.
+DIST_DEPENDS_ON_UPDATE_PO = no
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 356194c0..b846a0ba 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,4 +1,3 @@
-[encoding: UTF-8]
# List of source files containing translatable strings.
# Main application
@@ -6,10 +5,10 @@ data/glade.desktop.in.in
data/glade.appdata.xml.in
src/glade-window.c
src/main.c
-[type: gettext/glade]src/glade.glade
-[type: gettext/glade]src/glade-preferences.glade
+src/glade.glade
+src/glade-preferences.glade
src/glade-registration.c
-[type: gettext/glade]src/glade-registration.glade
+src/glade-registration.glade
# libgladeui shared core library
gladeui/glade-app.c
@@ -50,10 +49,10 @@ gladeui/glade-widget-adaptor.c
gladeui/glade-widget.c
gladeui/glade-xml-utils.c
gladeui/icon-naming-spec.c
-[type: gettext/glade]gladeui/glade-adaptor-chooser.ui
-[type: gettext/glade]gladeui/glade-editor.ui
-[type: gettext/glade]gladeui/glade-project-properties.ui
-[type: gettext/glade]gladeui/glade-property-label.ui
+gladeui/glade-adaptor-chooser.ui
+gladeui/glade-editor.ui
+gladeui/glade-project-properties.ui
+gladeui/glade-property-label.ui
# gtk plugin backend
plugins/gtk+/glade-about-dialog-editor.c
@@ -192,56 +191,57 @@ plugins/gtk+/glade-widget-editor.c
plugins/gtk+/glade-window-editor.c
plugins/gtk+/gtkunixprint.xml.in
plugins/gtk+/gtk+.xml.in
-[type: gettext/glade]plugins/gtk+/glade-about-dialog-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-action-bar-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-action-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-activatable-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-app-chooser-button-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-app-chooser-widget-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-arrow-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-box-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-button-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-combo-box-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-combo-box-text-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-entry-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-file-chooser-button-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-file-chooser-dialog-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-file-chooser-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-file-chooser-widget-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-font-button-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-font-chooser-dialog-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-font-chooser-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-grid-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-header-bar-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-icon-view-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-image-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-label-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-layout-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-level-bar-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-message-dialog-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-misc-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-model-button-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-notebook-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-popover-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-popover-menu-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-progress-bar-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-real-tree-view-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-recent-action-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-recent-chooser-dialog-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-recent-chooser-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-recent-chooser-menu-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-recent-chooser-widget-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-scale-button-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-scale-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-scrollable-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-scrollbar-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-scrolled-window-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-spin-button-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-stack-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-stack-switcher-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-text-view-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-tool-button-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-tool-palette-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-viewport-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-widget-editor.ui
-[type: gettext/glade]plugins/gtk+/glade-window-editor.ui
+plugins/gtk+/glade-about-dialog-editor.ui
+plugins/gtk+/glade-action-bar-editor.ui
+plugins/gtk+/glade-action-editor.ui
+plugins/gtk+/glade-activatable-editor.ui
+plugins/gtk+/glade-app-chooser-button-editor.ui
+plugins/gtk+/glade-app-chooser-widget-editor.ui
+plugins/gtk+/glade-arrow-editor.ui
+plugins/gtk+/glade-box-editor.ui
+plugins/gtk+/glade-button-editor.ui
+plugins/gtk+/glade-combo-box-editor.ui
+plugins/gtk+/glade-combo-box-text-editor.ui
+plugins/gtk+/glade-entry-editor.ui
+plugins/gtk+/glade-file-chooser-button-editor.ui
+plugins/gtk+/glade-file-chooser-dialog-editor.ui
+plugins/gtk+/glade-file-chooser-editor.ui
+plugins/gtk+/glade-file-chooser-widget-editor.ui
+plugins/gtk+/glade-font-button-editor.ui
+plugins/gtk+/glade-font-chooser-dialog-editor.ui
+plugins/gtk+/glade-font-chooser-editor.ui
+plugins/gtk+/glade-grid-editor.ui
+plugins/gtk+/glade-header-bar-editor.ui
+plugins/gtk+/glade-icon-view-editor.ui
+plugins/gtk+/glade-image-editor.ui
+plugins/gtk+/glade-label-editor.ui
+plugins/gtk+/glade-layout-editor.ui
+plugins/gtk+/glade-level-bar-editor.ui
+plugins/gtk+/glade-message-dialog-editor.ui
+plugins/gtk+/glade-misc-editor.ui
+plugins/gtk+/glade-model-button-editor.ui
+plugins/gtk+/glade-notebook-editor.ui
+plugins/gtk+/glade-popover-editor.ui
+plugins/gtk+/glade-popover-menu-editor.ui
+plugins/gtk+/glade-progress-bar-editor.ui
+plugins/gtk+/glade-real-tree-view-editor.ui
+plugins/gtk+/glade-recent-action-editor.ui
+plugins/gtk+/glade-recent-chooser-dialog-editor.ui
+plugins/gtk+/glade-recent-chooser-editor.ui
+plugins/gtk+/glade-recent-chooser-menu-editor.ui
+plugins/gtk+/glade-recent-chooser-widget-editor.ui
+plugins/gtk+/glade-scale-button-editor.ui
+plugins/gtk+/glade-scale-editor.ui
+plugins/gtk+/glade-scrollable-editor.ui
+plugins/gtk+/glade-scrollbar-editor.ui
+plugins/gtk+/glade-scrolled-window-editor.ui
+plugins/gtk+/glade-spin-button-editor.ui
+plugins/gtk+/glade-stack-editor.ui
+plugins/gtk+/glade-stack-switcher-editor.ui
+plugins/gtk+/glade-text-view-editor.ui
+plugins/gtk+/glade-tool-button-editor.ui
+plugins/gtk+/glade-tool-palette-editor.ui
+plugins/gtk+/glade-viewport-editor.ui
+plugins/gtk+/glade-widget-editor.ui
+plugins/gtk+/glade-window-editor.ui
+plugins/webkit2gtk/webkit2gtk.xml.in
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 9a1919e3..7113552b 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,6 +1,4 @@
+# List of source files to skip.
+
+# Main application
data/glade.desktop.in
-# distcheck will fail if we do not explicitly skip this because a bug in intltool
-# https://bugs.launchpad.net/intltool/+bug/1117944
-sub/data/glade.desktop.in
-tests/toplevel_order_test5.glade
-tests/toplevel_order_test6.glade