Commit fc2139c1 authored by Ernestas Kulik's avatar Ernestas Kulik

Port from intltool

gettext has been continuously improving, up to a point where intltool
can be deprecated in favor of it. This commit ports the project files to
use upstream gettext.

https://bugzilla.gnome.org/show_bug.cgi?id=769362
parent c76cace9
......@@ -6,8 +6,8 @@ DIRS = \
libgd \
src \
test \
po \
data \
po \
docs \
$(NULL)
......@@ -28,35 +28,13 @@ EXTRA_DIST= \
HACKING \
MAINTAINERS \
README.commits \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
Makefile.shared \
$(NULL)
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/aclocal.m4 \
$(srcdir)/autoscan.log \
$(srcdir)/compile \
$(srcdir)/config.guess \
$(srcdir)/config.h.in \
$(srcdir)/config.sub \
$(srcdir)/configure.scan \
$(srcdir)/depcomp \
$(srcdir)/install-sh \
$(srcdir)/ltmain.sh \
$(srcdir)/missing \
$(srcdir)/mkinstalldirs \
$(srcdir)/omf.make \
$(srcdir)/xmldocs.make \
$(srcdir)/gtk-doc.make \
`find "$(srcdir)" -type f -name Makefile.in -print`
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
$(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
$(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL)
DISTCHECK_CONFIGURE_FLAGS = --disable-update-mimedb --enable-gtk-doc
......
......@@ -25,9 +25,7 @@ if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
fi
aclocal --install || exit 1
glib-gettextize --force --copy || exit 1
gtkdocize --copy || exit 1
intltoolize --force --copy --automake || exit 1
autoreconf --verbose --force --install || exit 1
cd "$olddir"
......
AC_PREREQ(2.54)
AC_PREREQ(2.60)
dnl ===========================================================================
......@@ -56,13 +56,11 @@ AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
[the gettext translation domain])
AM_GLIB_GNU_GETTEXT
GLIB_DEFINE_LOCALEDIR(GNOMELOCALEDIR)
AM_GNU_GETTEXT_VERSION([0.19.8])
AM_GNU_GETTEXT([external])
GLIB_GSETTINGS
IT_PROG_INTLTOOL([0.50])
dnl ==========================================================================
AX_REQUIRE_DEFINED([GTK_DOC_CHECK])
......@@ -321,9 +319,6 @@ LIBGD_INIT([
AC_CONFIG_FILES([
Makefile
data/Makefile
data/org.gnome.Nautilus.desktop.in
data/nautilus-autorun-software.desktop.in
data/nautilus-classic.desktop
docs/Makefile
docs/reference/Makefile
docs/reference/libnautilus-extension/Makefile
......
......@@ -5,24 +5,29 @@ desktop_in_files = \
org.gnome.Nautilus.desktop.in \
nautilus-autorun-software.desktop.in
desktop_DATA = \
$(desktop_in_files:.desktop.in=.desktop)
autostart_in_files = nautilus-autostart.desktop.in
if ENABLE_DESKTOP
desktop_DATA += nautilus-classic.desktop
desktop_in_files += nautilus-classic.desktop.in
autostartdir = $(sysconfdir)/xdg/autostart
autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
$(autostart_DATA): $(autostart_in_files)
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
endif
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
$(desktop_DATA): %.desktop: %.desktop.in
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
appdatadir = $(datadir)/appdata
appdata_in_files = org.gnome.Nautilus.appdata.xml.in
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
@INTLTOOL_DESKTOP_RULE@
$(appdata_DATA): $(appdata_in_files)
$(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
servicedir = $(datadir)/dbus-1/services
service_DATA = $(service_in_files:.service.in=.service)
......@@ -44,8 +49,6 @@ gsettings_SCHEMAS = org.gnome.nautilus.gschema.xml
@GSETTINGS_RULES@
EXTRA_DIST = \
org.gnome.Nautilus.desktop \
org.gnome.Nautilus.desktop.in \
dbus-interfaces.xml \
freedesktop-dbus-interfaces.xml \
shell-search-provider-dbus-interfaces.xml \
......
[Desktop Entry]
_Name=Run Software
Name=Run Software
TryExec=nautilus-autorun-software
Exec=nautilus-autorun-software %u
Icon=application-x-executable
......
......@@ -3,20 +3,20 @@
<id>org.gnome.Nautilus.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<_name>Nautilus</_name>
<_summary>Access and organize files</_summary>
<name>Nautilus</name>
<summary>Access and organize files</summary>
<description>
<_p>
<p>
Nautilus, also known as Files, is the default file manager of the GNOME desktop.
It provides a simple and integrated way of managing your files and browsing your file system.
</_p>
<_p>
</p>
<p>
Nautilus supports all the basic functions of a file manager and more.
It can search and manage your files and folders, both locally and on a network,
read and write data to and from removable media, run scripts, and launch applications.
It has three views: Icon Grid, Icon List, and Tree List.
Its functions can be extended with plugins and scripts.
</_p>
</p>
</description>
<kudos>
<kudo>AppMenu</kudo>
......
[Desktop Entry]
_Name=Files
_Comment=Access and organize files
_Keywords=folder;manager;explore;disk;filesystem;
Name=Files
Comment=Access and organize files
Keywords=folder;manager;explore;disk;filesystem;
Exec=nautilus --new-window %U
Icon=system-file-manager
Terminal=false
......@@ -18,5 +18,5 @@ X-GNOME-UsesNotifications=true
Actions=new-window;
[Desktop Action new-window]
_Name=New Window
Name=New Window
Exec=nautilus --new-window
......@@ -86,6 +86,7 @@ GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \
ar-lib \
compile \
config.guess \
config.rpath \
config.sub \
depcomp \
install-sh \
......@@ -235,6 +236,7 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
fi; \
if test -f $(srcdir)/po/Makefile.in.in; then \
for x in \
ABOUT-NLS \
po/Makefile.in.in \
po/Makefile.in.in~ \
po/Makefile.in \
......
......@@ -17,6 +17,7 @@ AM_CPPFLAGS = \
$(EXEMPI_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DLOCALEDIR=\""$(localedir)"\" \
-DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \
-DPREFIX=\""$(prefix)"\" \
-DVERSION="\"$(VERSION)\"" \
......
......@@ -20,7 +20,7 @@ main (int argc, char *argv[])
int retval;
/* Initialize gettext support */
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
......
......@@ -7,6 +7,7 @@ AM_CPPFLAGS=\
$(WARNING_CFLAGS) \
$(DISABLE_DEPRECATED) \
-DDATADIR=\""$(datadir)"\" \
-DLOCALEDIR=\""$(localedir)"\" \
$(NULL)
nautilus_extensiondir = $(libdir)/nautilus/extensions-3.0
......
......@@ -32,7 +32,7 @@ nautilus_module_initialize (GTypeModule*module)
{
nautilus_nste_register_type (module);
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
}
......
# 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_
# 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 = Free Software Foundation, Inc.
# 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 =
# 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 = no
# 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.Nautilus.appdata.xml.in
data/nautilus-autorun-software.desktop.in.in
data/org.gnome.Nautilus.desktop.in.in
data/nautilus-autorun-software.desktop.in
data/org.gnome.Nautilus.desktop.in
data/org.gnome.nautilus.gschema.xml
eel/eel-canvas.c
eel/eel-glib-extensions.c
......@@ -73,23 +72,23 @@ src/nautilus-trash-bar.c
src/nautilus-window.c
src/nautilus-window-slot.c
src/nautilus-x-content-bar.c
[type: gettext/glade]src/resources/gtk/help-overlay.ui
[type: gettext/glade]src/resources/gtk/menus.ui
[type: gettext/glade]src/resources/ui/nautilus-create-folder-dialog.ui
[type: gettext/glade]src/resources/ui/nautilus-files-view-context-menus.ui
[type: gettext/glade]src/resources/ui/nautilus-folder-is-empty.ui
[type: gettext/glade]src/resources/ui/nautilus-move-to-trash-shortcut-changed.ui
[type: gettext/glade]src/resources/ui/nautilus-no-search-results.ui
[type: gettext/glade]src/resources/ui/nautilus-pathbar-context-menu.ui
[type: gettext/glade]src/resources/ui/nautilus-preferences-window.ui
[type: gettext/glade]src/resources/ui/nautilus-progress-info-widget.ui
[type: gettext/glade]src/resources/ui/nautilus-rename-file-popover.ui
[type: gettext/glade]src/resources/ui/nautilus-search-popover.ui
[type: gettext/glade]src/resources/ui/nautilus-toolbar-menu.ui
[type: gettext/glade]src/resources/ui/nautilus-toolbar.ui
[type: gettext/glade]src/resources/ui/nautilus-toolbar-view-menu.ui
[type: gettext/glade]src/resources/ui/nautilus-window.ui
src/resources/gtk/help-overlay.ui
src/resources/gtk/menus.ui
src/resources/ui/nautilus-create-folder-dialog.ui
src/resources/ui/nautilus-files-view-context-menus.ui
src/resources/ui/nautilus-folder-is-empty.ui
src/resources/ui/nautilus-move-to-trash-shortcut-changed.ui
src/resources/ui/nautilus-no-search-results.ui
src/resources/ui/nautilus-pathbar-context-menu.ui
src/resources/ui/nautilus-preferences-window.ui
src/resources/ui/nautilus-progress-info-widget.ui
src/resources/ui/nautilus-rename-file-popover.ui
src/resources/ui/nautilus-search-popover.ui
src/resources/ui/nautilus-toolbar-menu.ui
src/resources/ui/nautilus-toolbar.ui
src/resources/ui/nautilus-toolbar-view-menu.ui
src/resources/ui/nautilus-window.ui
src/gtk/nautilusgtkplacesview.c
src/gtk/nautilusgtkplacesviewrow.c
[type: gettext/glade]src/gtk/nautilusgtkplacesviewrow.ui
[type: gettext/glade]src/gtk/nautilusgtkplacesview.ui
src/gtk/nautilusgtkplacesviewrow.ui
src/gtk/nautilusgtkplacesview.ui
# List of source files that should NOT be translated.
# Please keep this file sorted alphabetically.
data/nautilus-autorun-software.desktop.in
data/nautilus-computer.desktop.in
data/org.gnome.Nautilus.desktop.in
sub/data/nautilus-autorun-software.desktop.in
sub/data/nautilus-computer.desktop.in
sub/data/org.gnome.Nautilus.desktop.in
......@@ -21,6 +21,7 @@ AM_CPPFLAGS = \
$(TRACKER_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DLOCALEDIR=\""$(localedir)"\" \
-DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \
-DNAUTILUS_EXTENSIONDIR=\""$(libdir)/nautilus/extensions-3.0"\" \
-DPREFIX=\""$(prefix)"\" \
......@@ -376,8 +377,6 @@ BUILT_SOURCES = \
TESTS=check-nautilus
@INTLTOOL_SERVER_RULE@
CLEANFILES = \
$(BUILT_SOURCES) \
$(server_DATA) \
......
......@@ -254,7 +254,7 @@ main (int argc, char *argv[])
GMount *mount;
GError *error;
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
......
......@@ -79,7 +79,7 @@ main (int argc, char *argv[])
}
/* Initialize gettext support */
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
......
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