Commit 2c460bd1 authored by Niels De Graef's avatar Niels De Graef Committed by Martin Blanchard

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

#279
parent 39676dda
......@@ -32,7 +32,6 @@ Makefile.in
/*.tar.gz
/junk
/install-sh
/intltool-*
/libtool
/ltmain.sh
/missing
......
......@@ -9,14 +9,9 @@ DIST_SUBDIRS = po data gladeui src plugins tests doc help man
EXTRA_DIST = \
autogen.sh \
COPYING.GPL \
COPYING.LGPL \
intltool-extract.in \
intltool-merge.in \
intltool-update.in
COPYING.LGPL
DISTCLEANFILES = intltool-extract \
intltool-merge \
intltool-update
DISTCLEANFILES =
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection --enable-man-pages
......
......@@ -111,7 +111,8 @@ AC_SUBST(GLADE_DEBUG_FLAGS)
dnl ================================================================
dnl Gettext stuff.
dnl ================================================================
IT_PROG_INTLTOOL([0.41.0])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.8])
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
......@@ -351,6 +352,8 @@ data/icons/hicolor/256x256/Makefile
data/icons/hicolor/256x256/apps/Makefile
data/icons/hicolor/scalable/Makefile
data/icons/hicolor/scalable/apps/Makefile
data/gettext/Makefile
data/gettext/its/Makefile
gladeui/Makefile
gladeui/gladeui.rc
gladeui/glade-previewer.rc
......@@ -361,9 +364,12 @@ plugins/gtk+/Makefile
plugins/gtk+/icons/Makefile
plugins/gtk+/icons/16x16/Makefile
plugins/gtk+/icons/22x22/Makefile
plugins/gtk+/gtk+.xml
plugins/gtk+/gtkunixprint.xml
plugins/python/Makefile
plugins/gladeui/Makefile
plugins/webkit2gtk/Makefile
plugins/webkit2gtk/webkit2gtk.xml
po/Makefile.in
doc/Makefile
doc/version.xml
......
## Process this file with automake to produce Makefile.in
SUBDIRS = icons
SUBDIRS = icons gettext
desktopdir = $(datadir)/applications
desktop_in_files = glade.desktop.in.in
desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
$(desktop_DATA): $(desktop_in_files)
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gladeui-2.0.pc
@INTLTOOL_XML_RULE@
appdatadir = $(datadir)/metainfo
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
appdata_in_files = glade.appdata.xml.in
$(appdata_DATA): $(appdata_in_files)
$(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
EXTRA_DIST = \
$(appdata_in_files) \
......
its_filesdir = $(datadir)/gettext/its
its_files = \
glade-catalog.its \
glade-catalog.loc \
$(NULL)
EXTRA_DIST = \
$(its_files) \
$(NULL)
<?xml version="1.0"?>
<its:rules xmlns:its="http://www.w3.org/2005/11/its"
xmlns:gt="https://www.gnu.org/s/gettext/ns/its/extensions/1.0"
version="2.0">
<its:translateRule selector="/glade-catalog//glade-widget-class/@title" translate="yes"/>
<its:translateRule selector="/glade-catalog//glade-widget-class//action/@name" translate="yes"/>
<its:translateRule selector="/glade-catalog//glade-widget-class//property/@name" translate="yes"/>
<its:translateRule selector="/glade-catalog//glade-widget-class//property//value/@name" translate="yes"/>
<its:translateRule selector="/glade-catalog//glade-widget-class//property/tooltip" translate="yes"/>
<its:translateRule selector="/glade-catalog//glade-widget-group/@title" translate="yes"/>
<!-- Extracted strings are consumed by the library and are never
merged back; we don't want to escape special characters. -->
<gt:escapeRule selector="/glade-catalog" escape="no"/>
</its:rules>
<?xml version="1.0"?>
<locatingRules>
<locatingRule name="GladeCatalog" pattern="*.xml">
<documentRule localName="glade-catalog" target="glade-catalog.its"/>
</locatingRule>
</locatingRules>
......@@ -3,29 +3,29 @@
<id>glade.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+ and LGPL-2.0+</project_license>
<_name>Glade</_name>
<_summary>Create or open user interface designs for GTK+ applications</_summary>
<name>Glade</name>
<summary>Create or open user interface designs for GTK+ applications</summary>
<description>
<!-- To translators: AppData description first paragraph -->
<_p>
<p>
Glade is a RAD tool to enable quick &amp; easy development of user interfaces
for the GTK+ 3 toolkit and the GNOME desktop environment.
</_p>
</p>
<!-- To translators: AppData description second paragraph -->
<_p>
<p>
The user interfaces designed in Glade are saved as XML and these can be
loaded by applications dynamically as needed by using GtkBuilder or used
directly to define a new GtkWidget derived object class using
GTK+ new template feature.
</_p>
</p>
<!-- To translators: AppData description third paragraph -->
<_p>
<p>
By using GtkBuilder, Glade XML files can be used in numerous programming
languages including C, C++, C#, Vala, Java, Perl, Python, and others.
</_p>
</p>
</description>
<screenshots>
<screenshot type="default">
......
[Desktop Entry]
_Name=Glade
_GenericName=Interface Designer
_X-GNOME-FullName=Glade Interface Designer
_Comment=Create or open user interface designs for GTK+ applications
_Keywords=GUI designer;user interface;ui builder;
Name=Glade
GenericName=Interface Designer
X-GNOME-FullName=Glade Interface Designer
Comment=Create or open user interface designs for GTK+ applications
Keywords=GUI designer;user interface;ui builder;
Exec=glade %F
Terminal=false
StartupNotify=true
......
......@@ -8,7 +8,6 @@
/intl.m4
/intldir.m4
/intlmacosx.m4
/intltool.m4
/intmax.m4
/inttypes-pri.m4
/inttypes_h.m4
......
......@@ -262,13 +262,13 @@ endif
# catalog data
catalogsdir = $(pkgdatadir)/catalogs
catalogs_DATA = gtk+.xml
catalogs_in_files = gtk+.xml.in
if HAVE_GTK_UNIX_PRINT
catalogs_DATA += gtkunixprint.xml
catalogs_in_files += gtkunixprint.xml.in
endif
@INTLTOOL_XML_NOMERGE_RULE@
catalogs_DATA = $(catalogs_in_files:.xml.in=.xml)
BUILT_SOURCES = \
glade-gtk-marshallers.c \
......@@ -335,11 +335,13 @@ UI_FILES = \
EXTRA_DIST = \
$(UI_FILES) \
glade-gtk-marshallers.list \
gtk+.xml gtk+.xml.in \
gtkunixprint.xml gtkunixprint.xml.in \
$(catalogs_in_files) \
$(catalog_DATA) \
glade-gtk-resources.gresource.xml
CLEANFILES = gtk+.xml gtkunixprint.xml $(BUILT_SOURCES)
CLEANFILES = \
$(BUILT_SOURCES) \
$(catalog_DATA)
#
# Marshaller generation
......
This diff is collapsed.
<glade-catalog name="unixprint"
library="gladegtk"
icon-prefix="gtk"
depends="gtk+"
domain="glade"
book="gtk">
library="gladegtk"
icon-prefix="gtk"
depends="gtk+"
domain="glade"
book="gtk">
<glade-widget-classes>
<glade-widget-class name="GtkPageSetupUnixDialog" generic-name="pagesetupdialog" _title="Page Setup Dialog"/>
<glade-widget-class name="GtkPrintUnixDialog" generic-name="printdialog" _title="Print Dialog">
<glade-widget-class name="GtkPageSetupUnixDialog" generic-name="pagesetupdialog" title="Page Setup Dialog"/>
<glade-widget-class name="GtkPrintUnixDialog" generic-name="printdialog" title="Print Dialog">
<properties>
<property id="page-setup" disabled="True"/>
<property id="manual-capabilities">
<displayable-values>
<value id="GTK_PRINT_CAPABILITY_PAGE_SET" _name="Page Set"/>
<value id="GTK_PRINT_CAPABILITY_COPIES" _name="Copies"/>
<value id="GTK_PRINT_CAPABILITY_COLLATE" _name="Collate"/>
<value id="GTK_PRINT_CAPABILITY_REVERSE" _name="Reverse"/>
<value id="GTK_PRINT_CAPABILITY_SCALE" _name="Scale"/>
<value id="GTK_PRINT_CAPABILITY_GENERATE_PDF" _name="Generate PDF"/>
<value id="GTK_PRINT_CAPABILITY_GENERATE_PS" _name="Generate PS"/>
<value id="GTK_PRINT_CAPABILITY_PREVIEW" _name="Preview"/>
<value id="GTK_PRINT_CAPABILITY_NUMBER_UP" _name="Number Up"/>
<value id="GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT" _name="Number Up Layout"/>
</displayable-values>
</property>
<displayable-values>
<value id="GTK_PRINT_CAPABILITY_PAGE_SET" name="Page Set"/>
<value id="GTK_PRINT_CAPABILITY_COPIES" name="Copies"/>
<value id="GTK_PRINT_CAPABILITY_COLLATE" name="Collate"/>
<value id="GTK_PRINT_CAPABILITY_REVERSE" name="Reverse"/>
<value id="GTK_PRINT_CAPABILITY_SCALE" name="Scale"/>
<value id="GTK_PRINT_CAPABILITY_GENERATE_PDF" name="Generate PDF"/>
<value id="GTK_PRINT_CAPABILITY_GENERATE_PS" name="Generate PS"/>
<value id="GTK_PRINT_CAPABILITY_PREVIEW" name="Preview"/>
<value id="GTK_PRINT_CAPABILITY_NUMBER_UP" name="Number Up"/>
<value id="GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT" name="Number Up Layout"/>
</displayable-values>
</property>
</properties>
</glade-widget-class>
</glade-widget-classes>
<glade-widget-group name="unixprint-toplevels" _title="GTK+ Unix Print Toplevels">
<glade-widget-group name="unixprint-toplevels" title="GTK+ Unix Print Toplevels">
<glade-widget-class-ref name="GtkPageSetupUnixDialog"/>
<glade-widget-class-ref name="GtkPrintUnixDialog"/>
</glade-widget-group>
......
......@@ -31,10 +31,10 @@ endif
# catalog data
catalogsdir = $(pkgdatadir)/catalogs
catalogs_DATA = webkit2gtk.xml
catalogs_in_files = webkit2gtk.xml.in
@INTLTOOL_XML_NOMERGE_RULE@
catalogs_DATA = $(catalogs_in_files:.xml.in=.xml)
EXTRA_DIST = webkit2gtk.xml webkit2gtk.xml.in
EXTRA_DIST = $(catalogs_in_files) $(catalog_DATA)
CLEANFILES = webkit2gtk.xml
\ No newline at end of file
CLEANFILES = $(catalog_DATA)
......@@ -5,7 +5,6 @@
/Makefile.in.in
/POTFILES
/stamp-it
/.intltool-merge-cache
/Makevars.template
/Rules-quot
......
# 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
[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
# 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment