Commit 0b4d0301 authored by Martin Blanchard's avatar Martin Blanchard

build: Migrate 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

#70
parent e04f63c6
......@@ -10,16 +10,10 @@ endif
EXTRA_DIST = \
HACKING \
MAINTAINERS \
gedit.doap \
intltool-extract.in \
intltool-merge.in \
intltool-update.in
gedit.doap
DISTCLEANFILES = \
gnome-doc-utils.make \
intltool-extract \
intltool-merge \
intltool-update
gnome-doc-utils.make
MAINTAINERCLEANFILES = \
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
......@@ -100,9 +94,6 @@ CLEANFILES += $(gsettings_SCHEMAS) $(gsettings_ENUMS) $(BUILT_SOURCES)
DISTCLEANFILES += $(gsettings_SCHEMAS) $(gsettings_ENUMS) $(BUILT_SOURCES)
MAINTAINERCLEANFILES += $(gsettings_SCHEMAS:.xml=.valid)
@INTLTOOL_DESKTOP_RULE@
@INTLTOOL_XML_RULE@
dist-hook: dist-hook-cleanup
dist-hook-cleanup:
......
......@@ -13,12 +13,6 @@ if test -z $AUTORECONF; then
exit 1
fi
INTLTOOLIZE=`which intltoolize`
if test -z $INTLTOOLIZE; then
echo "*** No intltoolize found, please install the intltool package ***"
exit 1
fi
GNOMEDOC=`which yelp-build`
if test -z $GNOMEDOC; then
echo "*** The tools to build the documentation are not found,"
......@@ -35,8 +29,7 @@ fi
git submodule update --init --recursive
gtkdocize || exit $?
autopoint --force || exit $?
AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
autoreconf --force --install --verbose
cd $OLDDIR
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
......@@ -174,9 +174,7 @@ dnl ================================================================
dnl Gettext stuff.
dnl ================================================================
IT_PROG_INTLTOOL([0.50.1])
AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT_VERSION([0.19.8])
AM_GNU_GETTEXT([external])
AC_SUBST([GETTEXT_PACKAGE], [gedit])
......
......@@ -2,10 +2,15 @@ data_desktopdir = $(datadir)/applications
data_desktop_in_files = data/org.gnome.gedit.desktop.in
data_desktop_DATA = $(data_desktop_in_files:.desktop.in=.desktop)
$(data_desktop_DATA): $(data_desktop_in_files) $(wildcard $(top_srcdir)/po/*po)
$(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
data_appdatadir = $(datadir)/metainfo
data_appdata_in_files = data/org.gnome.gedit.appdata.xml.in
data_appdata_DATA = $(data_appdata_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
$(data_appdata_DATA): $(data_appdata_in_files) $(wildcard $(top_srcdir)/po/*po)
$(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
data_servicedir = $(datadir)/dbus-1/services
data_service_in_files = data/org.gnome.gedit.service.in
......
......@@ -5,22 +5,22 @@
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<name>gedit</name>
<_summary>Edit text files</_summary>
<summary>Edit text files</summary>
<description>
<_p>
<p>
gedit is the official text editor of the GNOME desktop environment.
While aiming at simplicity and ease of use, gedit is a powerful general
purpose text editor.
</_p>
<_p>
</p>
<p>
Whether you are writing the next bestseller, programming an innovative
application, or simply taking some quick notes, gedit will be a reliable
tool to accomplish your task.
</_p>
<_p>
</p>
<p>
Its flexible plugin system allows you to tailor the application to your
needs and adapt it to your workflow.
</_p>
</p>
</description>
<kudos>
<kudo>AppMenu</kudo>
......
[Desktop Entry]
_Name=Text Editor
_Comment=Edit text files
Name=Text Editor
Comment=Edit text files
Exec=gedit %U
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
# TRANSLATORS: Do NOT translate or transliterate this text!
# This is an icon file name.
Icon=org.gnome.gedit
Categories=GNOME;GTK;Utility;TextEditor;
X-GNOME-DocPath=gedit/gedit.xml
_X-GNOME-FullName=gedit Text Editor
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gedit
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=@VERSION@
X-GNOME-Bugzilla-ExtraInfoScript=@FULL_LIBEXECDIR@/gedit/gedit-bugreport.sh
Actions=new-window;new-document;
_Keywords=Text;Editor;Plaintext;Write;
# TRANSLATORS: Do NOT translate or localize the semicolons!
# The list MUST also end with a semicolon!
# Search terms to find this application.
Keywords=Text;Editor;Plaintext;Write;
DBusActivatable=true
[Desktop Action new-window]
_Name=New Window
Name=New Window
Exec=gedit --new-window
[Desktop Action new-document]
_Name=New Document
Name=New Document
Exec=gedit --new-document
......@@ -21,10 +21,11 @@ include plugins/time/Makefile.am
gsettings_SCHEMAS += $(plugin_gsettings_SCHEMAS)
%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po)
%.plugin: %.plugin.desktop.in $(wildcard $(top_srcdir)/po/*po)
$(AM_V_GEN) \
$(MKDIR_P) "$(dir $@)"; \
$(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
$(AM_V_GEN) \
$(MSGFMT) --desktop --keyword=Name --keyword=Description --template $< -d $(top_srcdir)/po -o $@
GENERATED_PLUGIN_FILES = $(plugin_in_files:.plugin.desktop.in=.plugin)
......
[Plugin]
Module=checkupdate
IAge=3
_Name=Check update
_Description=Check for latest version of gedit
Name=Check update
Description=Check for latest version of gedit
Authors=Ignacio Casal Quinteiro <icq@gnome.org>
Copyright=Copyright © 2009 Ignacio Casal Quinteiro
Website=http://www.gedit.org
[Plugin]
Module=docinfo
IAge=3
_Name=Document Statistics
_Description=Report the number of words, lines and characters in a document.
Name=Document Statistics
Description=Report the number of words, lines and characters in a document.
Authors=Paolo Maggi <paolo.maggi@polito.it>;Jorge Alberto Torres <jorge@deadoak.com>
Copyright=Copyright © 2002-2005 Paolo Maggi
Website=http://www.gedit.org
......@@ -39,6 +39,9 @@ externaltools_all_desktop_in_files = $(externaltools_all_tools_in_files:.tool.in
externaltools_all_desktop_files = $(externaltools_all_tools_in_files:.tool.in=.desktop)
externaltools_all_tools_files = $(externaltools_all_tools_in_files:.tool.in=)
$(externaltools_all_desktop_files): $(externaltools_all_desktop_in_files) $(wildcard $(top_srcdir)/po/*po)
$(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
# Tools are generated by merging a script file (.tool.in) with a data file
# (.desktop), which happens to be translated using intltool.
$(externaltools_tools_SCRIPTS): %: %.tool.in %.desktop $(EXTERNALTOOLS_TOOL_MERGE)
......@@ -52,11 +55,3 @@ EXTRA_DIST += \
CLEANFILES += \
$(externaltools_all_desktop_files) \
$(externaltools_all_tools_files)
# Needed when builddir != srcdir. Normally Autoconf creates the
# directory when creating the Makefile, but since gedit uses
# non-recursive make, the directory is not created, but is needed for
# generating the .desktop files.
# If the following bug is fixed, this hack can normally be removed:
# https://bugs.launchpad.net/intltool/+bug/605826
$(shell $(MKDIR_P) $(top_builddir)/plugins/externaltools/data/)
[Gedit Tool]
_Name=Build
_Comment=Run “make” in the document directory
Name=Build
Comment=Run “make” in the document directory
Input=nothing
Output=output-panel
Shortcut=<Control>F8
......
[Gedit Tool]
_Name=Open terminal here
_Comment=Open a terminal in the document location
Name=Open terminal here
Comment=Open a terminal in the document location
Input=nothing
Output=output-panel
Applicability=local
......
[Gedit Tool]
_Name=Open terminal here
_Comment=Open a terminal in the document location
Name=Open terminal here
Comment=Open a terminal in the document location
Input=nothing
Output=output-panel
Applicability=local
......
[Gedit Tool]
_Name=Remove trailing spaces
_Comment=Remove useless trailing spaces in your file
Name=Remove trailing spaces
Comment=Remove useless trailing spaces in your file
Input=document
Output=replace-document
Shortcut=<Alt>F12
......
[Gedit Tool]
_Name=Run command
_Comment=Execute a custom command and put its output in a new document
Name=Run command
Comment=Execute a custom command and put its output in a new document
Input=nothing
Output=new-document
Applicability=all
......
[Gedit Tool]
_Name=Send to fpaste
_Comment=Paste selected text or current document to fpaste
Name=Send to fpaste
Comment=Paste selected text or current document to fpaste
Input=selection-document
Output=output-panel
Shortcut=<Shift><Super>p
......
......@@ -2,8 +2,8 @@
Loader=python3
Module=externaltools
IAge=3
_Name=External Tools
_Description=Execute external commands and shell scripts.
Name=External Tools
Description=Execute external commands and shell scripts.
Authors=Steve Frécinaux <steve@istique.net>
Copyright=Copyright © 2005 Steve Frécinaux
Website=http://www.gedit.org
......@@ -2,8 +2,8 @@
Loader=C
Module=filebrowser
IAge=3
_Name=File Browser Panel
_Description=Easy file access from the side panel
Name=File Browser Panel
Description=Easy file access from the side panel
Icon=system-file-manager
Authors=Jesse van den Kieboom <jesse@icecrew.nl>
Copyright=Copyright © 2006 Jesse van den Kieboom
......
[Plugin]
Module=modelines
IAge=3
_Name=Modelines
_Description=Emacs, Kate and Vim-style modelines support for gedit.
Name=Modelines
Description=Emacs, Kate and Vim-style modelines support for gedit.
Authors=Steve Frécinaux <steve@istique.net>
Copyright=Copyright © 2005 Steve Frécinaux
Website=http://www.gedit.org
......@@ -2,8 +2,8 @@
Loader=python3
Module=pythonconsole
IAge=3
_Name=Python Console
_Description=Interactive Python console standing in the bottom panel
Name=Python Console
Description=Interactive Python console standing in the bottom panel
Icon=text-x-script
Authors=Steve Frécinaux <steve@istique.net>
Copyright=Copyright © 2006 Steve Frécinaux
......
[Plugin]
Module=quickhighlight
IAge=3
_Name=Quick Highlight
_Description=Highlights every occurrences of selected text.
Name=Quick Highlight
Description=Highlights every occurrences of selected text.
Authors=Martin Blanchard <tchaik@gmx.com>
Copyright=Copyright © 2016 Martin Blanchard
Website=http://www.gedit.org
......@@ -2,8 +2,8 @@
Loader=python3
Module=quickopen
IAge=3
_Name=Quick Open
_Description=Quickly open files
Name=Quick Open
Description=Quickly open files
Icon=document-open
Authors=Jesse van den Kieboom <jessevdk@gnome.org>
Copyright=Copyright © 2009 Jesse van den Kieboom
......
......@@ -2,8 +2,8 @@
Loader=python3
Module=snippets
IAge=3
_Name=Snippets
_Description=Insert often-used pieces of text in a fast way
Name=Snippets
Description=Insert often-used pieces of text in a fast way
Authors=Jesse van den Kieboom <jesse@icecrew.nl>
Copyright=Copyright © 2005 Jesse van den Kieboom
Website=http://www.gedit.org
[Plugin]
Module=sort
IAge=3
_Name=Sort
_Description=Sorts a document or selected text.
Name=Sort
Description=Sorts a document or selected text.
Icon=view-sort-ascending
Authors=Carlo Borreo <borreo@softhome.net>;Lee Mallabone <gnome@fonicmonkey.net>;Paolo Maggi <paolo.maggi@polito.it>;Jorge Alberto Torres H. <jorge@deadoak.com>
Copyright=Copyright © 2001 Carlo Borreo;Copyright © 2002-2003 Lee Mallabone, Paolo Maggi;Copyright © 2004-2005 Paolo Maggi
......
[Plugin]
Module=spell
IAge=3
_Name=Spell Checker
_Description=Checks the spelling of the current document.
Name=Spell Checker
Description=Checks the spelling of the current document.
Icon=tools-check-spelling
Authors=Paolo Maggi <paolo@gnome.org>;Sébastien Wilmet <swilmet@gnome.org>
Copyright=Copyright © 2002-2005 Paolo Maggi;Copyright © 2015 Sébastien Wilmet
......
[Plugin]
Module=time
IAge=3
_Name=Insert Date/Time
_Description=Inserts current date and time at the cursor position.
Name=Insert Date/Time
Description=Inserts current date and time at the cursor position.
Authors=Paolo Maggi <paolo.maggi@polito.it>;Lee Mallabone <gnome@fonicmonkey.net>
Copyright=Copyright © 2002-2005 Paolo Maggi
Website=http://www.gedit.org
# 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 = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --keyword=Description --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 = The gedit authors
# 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 =
# 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/gedit/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
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
[encoding: UTF-8]
data/org.gnome.gedit.appdata.xml.in
data/org.gnome.gedit.desktop.in.in
[type: gettext/gsettings]data/org.gnome.gedit.gschema.xml.in
data/org.gnome.gedit.gschema.xml.in
gedit/gedit-app.c
gedit/gedit-app-osx.c
gedit/gedit.c
......@@ -38,26 +37,26 @@ gedit/gedit-utils.c
gedit/gedit-view.c
gedit/gedit-view-frame.c
gedit/gedit-window.c
[type: gettext/glade]gedit/resources/gtk/menus-common.ui
[type: gettext/glade]gedit/resources/gtk/menus.ui
[type: gettext/glade]gedit/resources/gtk/menus-traditional.ui
[type: gettext/glade]gedit/resources/ui/gedit-encodings-dialog.ui
[type: gettext/glade]gedit/resources/ui/gedit-highlight-mode-dialog.ui
[type: gettext/glade]gedit/resources/ui/gedit-highlight-mode-selector.ui
[type: gettext/glade]gedit/resources/ui/gedit-open-document-selector.ui
[type: gettext/glade]gedit/resources/ui/gedit-preferences-dialog.ui
[type: gettext/glade]gedit/resources/ui/gedit-print-preferences.ui
[type: gettext/glade]gedit/resources/ui/gedit-print-preview.ui
[type: gettext/glade]gedit/resources/ui/gedit-replace-dialog.ui
[type: gettext/glade]gedit/resources/ui/gedit-shortcuts.ui
[type: gettext/glade]gedit/resources/ui/gedit-tab-label.ui
[type: gettext/glade]gedit/resources/ui/gedit-window.ui
gedit/resources/gtk/menus-common.ui
gedit/resources/gtk/menus.ui
gedit/resources/gtk/menus-traditional.ui
gedit/resources/ui/gedit-encodings-dialog.ui
gedit/resources/ui/gedit-highlight-mode-dialog.ui
gedit/resources/ui/gedit-highlight-mode-selector.ui
gedit/resources/ui/gedit-open-document-selector.ui
gedit/resources/ui/gedit-preferences-dialog.ui
gedit/resources/ui/gedit-print-preferences.ui
gedit/resources/ui/gedit-print-preview.ui
gedit/resources/ui/gedit-replace-dialog.ui
gedit/resources/ui/gedit-shortcuts.ui
gedit/resources/ui/gedit-tab-label.ui
gedit/resources/ui/gedit-window.ui
plugins/checkupdate/checkupdate.plugin.desktop.in
plugins/checkupdate/gedit-check-update-plugin.c
[type: gettext/gsettings]plugins/checkupdate/org.gnome.gedit.plugins.checkupdate.gschema.xml.in
plugins/checkupdate/org.gnome.gedit.plugins.checkupdate.gschema.xml.in
plugins/docinfo/docinfo.plugin.desktop.in
plugins/docinfo/gedit-docinfo-plugin.c
[type: gettext/glade]plugins/docinfo/resources/ui/gedit-docinfo-plugin.ui
plugins/docinfo/resources/ui/gedit-docinfo-plugin.ui
plugins/externaltools/data/build.desktop.in
plugins/externaltools/data/open-terminal-here.desktop.in
plugins/externaltools/data/open-terminal-here-osx.desktop.in
......@@ -65,15 +64,15 @@ plugins/externaltools/data/remove-trailing-spaces.desktop.in
plugins/externaltools/data/run-command.desktop.in
plugins/externaltools/data/send-to-fpaste.desktop.in
plugins/externaltools/externaltools.plugin.desktop.in
[type: gettext/gsettings]plugins/externaltools/org.gnome.gedit.plugins.externaltools.gschema.xml.in
plugins/externaltools/org.gnome.gedit.plugins.externaltools.gschema.xml.in
plugins/externaltools/tools/appactivatable.py
plugins/externaltools/tools/capture.py
plugins/externaltools/tools/functions.py
plugins/externaltools/tools/__init__.py
plugins/externaltools/tools/manager.py
plugins/externaltools/tools/outputpanel.py
[type: gettext/glade]plugins/externaltools/tools/outputpanel.ui
[type: gettext/glade]plugins/externaltools/tools/tools.ui
plugins/externaltools/tools/outputpanel.ui
plugins/externaltools/tools/tools.ui
plugins/externaltools/tools/windowactivatable.py
plugins/filebrowser/filebrowser.plugin.desktop.in
plugins/filebrowser/gedit-file-bookmarks-store.c
......@@ -82,12 +81,12 @@ plugins/filebrowser/gedit-file-browser-store.c
plugins/filebrowser/gedit-file-browser-utils.c
plugins/filebrowser/gedit-file-browser-view.c
plugins/filebrowser/gedit-file-browser-widget.c
[type: gettext/gsettings]plugins/filebrowser/org.gnome.gedit.plugins.filebrowser.gschema.xml.in
[type: gettext/glade]plugins/filebrowser/resources/ui/gedit-file-browser-menus.ui
[type: gettext/glade]plugins/filebrowser/resources/ui/gedit-file-browser-widget.ui
plugins/filebrowser/org.gnome.gedit.plugins.filebrowser.gschema.xml.in
plugins/filebrowser/resources/ui/gedit-file-browser-menus.ui
plugins/filebrowser/resources/ui/gedit-file-browser-widget.ui
plugins/modelines/modelines.plugin.desktop.in
[type: gettext/gsettings]plugins/pythonconsole/org.gnome.gedit.plugins.pythonconsole.gschema.xml.in
[type: gettext/glade]plugins/pythonconsole/pythonconsole/config.ui
plugins/pythonconsole/org.gnome.gedit.plugins.pythonconsole.gschema.xml.in
plugins/pythonconsole/pythonconsole/config.ui
plugins/pythonconsole/pythonconsole/__init__.py
plugins/pythonconsole/pythonconsole.plugin.desktop.in
plugins/quickhighlight/quickhighlight.plugin.desktop.in
......@@ -101,16 +100,16 @@ plugins/snippets/snippets/importer.py
plugins/snippets/snippets/manager.py
plugins/snippets/snippets/placeholder.py
plugins/snippets/snippets.plugin.desktop.in
[type: gettext/glade]plugins/snippets/snippets/snippets.ui
plugins/snippets/snippets/snippets.ui
plugins/snippets/snippets/windowactivatable.py
plugins/sort/gedit-sort-plugin.c
[type: gettext/glade]plugins/sort/resources/ui/gedit-sort-plugin.ui
plugins/sort/resources/ui/gedit-sort-plugin.ui
plugins/sort/sort.plugin.desktop.in
plugins/spell/gedit-spell-app-activatable.c
plugins/spell/gedit-spell-plugin.c
plugins/spell/spell.plugin.desktop.in
plugins/time/gedit-time-plugin.c
[type: gettext/gsettings]plugins/time/org.gnome.gedit.plugins.time.gschema.xml.in
[type: gettext/glade]plugins/time/resources/ui/gedit-time-dialog.ui
[type: gettext/glade]plugins/time/resources/ui/gedit-time-setup-dialog.ui
plugins/time/org.gnome.gedit.plugins.time.gschema.xml.in
plugins/time/resources/ui/gedit-time-dialog.ui
plugins/time/resources/ui/gedit-time-setup-dialog.ui
plugins/time/time.plugin.desktop.in
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