diff options
author | Ernestas Kulik <ernestask@src.gnome.org> | 2016-08-02 12:24:24 +0300 |
---|---|---|
committer | Ernestas Kulik <ernestask@src.gnome.org> | 2016-08-03 10:42:40 +0300 |
commit | fc2139c117d43e42ce4802370560ac279ea2cebd (patch) | |
tree | 0e33ae43f451a3f26e88060dde1aec6f15446ddc | |
parent | c76cace9e60f40648c7bb25879399451dbed2894 (diff) | |
download | nautilus-fc2139c117d43e42ce4802370560ac279ea2cebd.tar.gz |
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
-rw-r--r-- | Makefile.am | 30 | ||||
-rwxr-xr-x | autogen.sh | 2 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | data/Makefile.am | 19 | ||||
-rw-r--r-- | data/nautilus-autorun-software.desktop.in (renamed from data/nautilus-autorun-software.desktop.in.in) | 2 | ||||
-rw-r--r-- | data/org.gnome.Nautilus.appdata.xml.in | 12 | ||||
-rw-r--r-- | data/org.gnome.Nautilus.desktop.in (renamed from data/org.gnome.Nautilus.desktop.in.in) | 8 | ||||
-rw-r--r-- | git.mk | 2 | ||||
-rw-r--r-- | nautilus-desktop/Makefile.am | 1 | ||||
-rw-r--r-- | nautilus-desktop/main-desktop.c | 2 | ||||
-rw-r--r-- | nautilus-sendto-extension/Makefile.am | 1 | ||||
-rw-r--r-- | nautilus-sendto-extension/nautilus-sendto-module.c | 2 | ||||
-rw-r--r-- | po/Makevars | 78 | ||||
-rw-r--r-- | po/POTFILES.in | 41 | ||||
-rw-r--r-- | po/POTFILES.skip | 8 | ||||
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/nautilus-autorun-software.c | 2 | ||||
-rw-r--r-- | src/nautilus-main.c | 2 |
18 files changed, 136 insertions, 90 deletions
diff --git a/Makefile.am b/Makefile.am index acd665e0e..ba8397626 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/autogen.sh b/autogen.sh index e931e2bcd..57179148b 100755 --- a/autogen.sh +++ b/autogen.sh @@ -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" diff --git a/configure.ac b/configure.ac index d204b885c..4d6e4da09 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -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 diff --git a/data/Makefile.am b/data/Makefile.am index 05214a960..6d16e53b7 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -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 \ diff --git a/data/nautilus-autorun-software.desktop.in.in b/data/nautilus-autorun-software.desktop.in index df386ef4a..9f0f32e3f 100644 --- a/data/nautilus-autorun-software.desktop.in.in +++ b/data/nautilus-autorun-software.desktop.in @@ -1,5 +1,5 @@ [Desktop Entry] -_Name=Run Software +Name=Run Software TryExec=nautilus-autorun-software Exec=nautilus-autorun-software %u Icon=application-x-executable diff --git a/data/org.gnome.Nautilus.appdata.xml.in b/data/org.gnome.Nautilus.appdata.xml.in index 7f9ec12cf..9ec61d52a 100644 --- a/data/org.gnome.Nautilus.appdata.xml.in +++ b/data/org.gnome.Nautilus.appdata.xml.in @@ -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> diff --git a/data/org.gnome.Nautilus.desktop.in.in b/data/org.gnome.Nautilus.desktop.in index 770b2ed83..442296ab6 100644 --- a/data/org.gnome.Nautilus.desktop.in.in +++ b/data/org.gnome.Nautilus.desktop.in @@ -1,7 +1,7 @@ [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 \ diff --git a/nautilus-desktop/Makefile.am b/nautilus-desktop/Makefile.am index 627a36ef7..4d4baba2b 100644 --- a/nautilus-desktop/Makefile.am +++ b/nautilus-desktop/Makefile.am @@ -17,6 +17,7 @@ AM_CPPFLAGS = \ $(EXEMPI_CFLAGS) \ -DDATADIR=\""$(datadir)"\" \ -DLIBDIR=\""$(libdir)"\" \ + -DLOCALEDIR=\""$(localedir)"\" \ -DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \ -DPREFIX=\""$(prefix)"\" \ -DVERSION="\"$(VERSION)\"" \ diff --git a/nautilus-desktop/main-desktop.c b/nautilus-desktop/main-desktop.c index b2e151b57..09851d3a4 100644 --- a/nautilus-desktop/main-desktop.c +++ b/nautilus-desktop/main-desktop.c @@ -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); diff --git a/nautilus-sendto-extension/Makefile.am b/nautilus-sendto-extension/Makefile.am index 8fa6687db..49b37e071 100644 --- a/nautilus-sendto-extension/Makefile.am +++ b/nautilus-sendto-extension/Makefile.am @@ -7,6 +7,7 @@ AM_CPPFLAGS=\ $(WARNING_CFLAGS) \ $(DISABLE_DEPRECATED) \ -DDATADIR=\""$(datadir)"\" \ + -DLOCALEDIR=\""$(localedir)"\" \ $(NULL) nautilus_extensiondir = $(libdir)/nautilus/extensions-3.0 diff --git a/nautilus-sendto-extension/nautilus-sendto-module.c b/nautilus-sendto-extension/nautilus-sendto-module.c index bf413a8e7..24c53f6b6 100644 --- a/nautilus-sendto-extension/nautilus-sendto-module.c +++ b/nautilus-sendto-extension/nautilus-sendto-module.c @@ -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"); } diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 000000000..5b96a1f74 --- /dev/null +++ b/po/Makevars @@ -0,0 +1,78 @@ +# 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 diff --git a/po/POTFILES.in b/po/POTFILES.in index d4f8ec2a9..897b78289 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,9 +1,8 @@ # 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 diff --git a/po/POTFILES.skip b/po/POTFILES.skip deleted file mode 100644 index e15facfba..000000000 --- a/po/POTFILES.skip +++ /dev/null @@ -1,8 +0,0 @@ -# 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 diff --git a/src/Makefile.am b/src/Makefile.am index 1aa60645e..7238e57c1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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) \ diff --git a/src/nautilus-autorun-software.c b/src/nautilus-autorun-software.c index 8720daa6f..cfe528eea 100644 --- a/src/nautilus-autorun-software.c +++ b/src/nautilus-autorun-software.c @@ -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); diff --git a/src/nautilus-main.c b/src/nautilus-main.c index 511cfdad0..e54d5ad39 100644 --- a/src/nautilus-main.c +++ b/src/nautilus-main.c @@ -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); |