GNOME Bugzilla – Bug 787250
[Patch] Migrate from intltool to gettext
Last modified: 2017-12-27 22:10:37 UTC
Created attachment 359073 [details] [review] [Patch] Migrate from intltool to gettext See also https://wiki.gnome.org/MigratingFromIntltoolToGettext
Created attachment 359074 [details] [review] [Patch] Migrate from intltool to gettext (signed) Signed version of the patch
Review of attachment 359074 [details] [review]: Im not a gnome-online-accounts developers but this looks ok to me
Review of attachment 359074 [details] [review]: Niels, thanks for the patch; Javier, thanks for taking a look. People who hack build systems have my utmost respect. :) A few minor details: ::: data/Makefile.am @@ +9,3 @@ gsettings_SCHEMAS = $(gsettings_in_files:.xml.in=.xml) +$(gsettings_SCHEMAS): $(gsettings_in_files) + $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ This was a bug in the previous Makefile.am. We shouldn't be merging translations for GSettings schemas. The INTLTOOL_XML_RULE here is completely useless. It's used for things where the translated strings are merged back into the file itself. eg., appdata files, desktop files, etc.. GOA doesn't have any of those. It only has a GSettings schema where the translations are fetched at run-time, like code, and not merged back into the XML. I noticed this last week while porting away from gnome-common and fixed it in commit 66b2bb58650cde71. ::: git.mk @@ +116,3 @@ if test -f $(srcdir)/po/Makefile.in.in; then \ for x in \ + ABOUT-NLS \ Nitpick: would be nicer to update git.mk to the latest copy from https://github.com/behdad/git.mk. Since that'll create a lot of noise, it would be more readable to use a separate commit. ::: po/Makevars @@ +9,3 @@ + +# 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 Might be nice to add --add-comments too. The Wiki recommends it. @@ +19,3 @@ +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Free Software Foundation, Inc. "GNOME Online Accounts Authors" :) @@ +42,3 @@ +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = Might be nice to provide a URL here.
Created attachment 362546 [details] [review] build: Update to latest git.mk
Created attachment 362547 [details] [review] build: Let git.mk ignore various top-level build artifacts
Created attachment 362548 [details] [review] Migrate from Intltool to Gettext
I took the liberty to rebase it against master, which was ported away from gnome-common, fixed up the above details, and pushed to master.
Thanks everybody!
I was updating gnome-online-accounts in openSUSE Build Service to the 3.27.3 release using the tarball, and I got a failure in the configure checks after removing `intltool` from the spec file. Configure still looks for intltool stuff as you can see: ``` checking for TPAW... yes checking whether NLS is requested... yes ./configure: line 14500: intltool-update: command not found checking for intltool >= 0.50.0... found configure: error: Your intltool is too old. You need intltool 0.50.0 or later. configure: Done configuring in telepathy-account-widgets checking for TPAW... no configure: error: Package requirements (telepathy-account-widgets) were not met: No package 'telepathy-account-widgets' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables TPAW_CFLAGS and TPAW_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. error: Bad exit status from /var/tmp/rpm-tmp.E0gnpg (%build) ```
The telepathy-accounts-widget.git submodule used by gnome-online-accounts still uses intltool. Since the entire Telepathy stack is very weakly maintained, there are no plans to port telepathy-accounts-widget.git away from intltool. I hope the 3.27.3 tarball isn't somehow broken in this regard.
I suspected was something like that. Apart from this, all seems good so far if you don't remove intltool from the spec file.