After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787250 - [Patch] Migrate from intltool to gettext
[Patch] Migrate from intltool to gettext
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks: 763587
 
 
Reported: 2017-09-04 12:48 UTC by Niels De Graef
Modified: 2017-12-27 22:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[Patch] Migrate from intltool to gettext (6.04 KB, patch)
2017-09-04 12:48 UTC, Niels De Graef
none Details | Review
[Patch] Migrate from intltool to gettext (signed) (6.09 KB, patch)
2017-09-04 12:49 UTC, Niels De Graef
none Details | Review
build: Update to latest git.mk (14.21 KB, patch)
2017-10-30 13:55 UTC, Debarshi Ray
committed Details | Review
build: Let git.mk ignore various top-level build artifacts (1.05 KB, patch)
2017-10-30 13:55 UTC, Debarshi Ray
committed Details | Review
Migrate from Intltool to Gettext (5.56 KB, patch)
2017-10-30 13:55 UTC, Debarshi Ray
committed Details | Review

Description Niels De Graef 2017-09-04 12:48:11 UTC
Created attachment 359073 [details] [review]
[Patch] Migrate from intltool to gettext

See also https://wiki.gnome.org/MigratingFromIntltoolToGettext
Comment 1 Niels De Graef 2017-09-04 12:49:02 UTC
Created attachment 359074 [details] [review]
[Patch] Migrate from intltool to gettext (signed)

Signed version of the patch
Comment 2 Javier Jardón (IRC: jjardon) 2017-10-25 13:26:37 UTC
Review of attachment 359074 [details] [review]:

Im not a gnome-online-accounts developers but this looks ok to me
Comment 3 Debarshi Ray 2017-10-30 13:54:31 UTC
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.
Comment 4 Debarshi Ray 2017-10-30 13:55:11 UTC
Created attachment 362546 [details] [review]
build: Update to latest git.mk
Comment 5 Debarshi Ray 2017-10-30 13:55:23 UTC
Created attachment 362547 [details] [review]
build: Let git.mk ignore various top-level build artifacts
Comment 6 Debarshi Ray 2017-10-30 13:55:41 UTC
Created attachment 362548 [details] [review]
Migrate from Intltool to Gettext
Comment 7 Debarshi Ray 2017-10-30 13:56:59 UTC
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.
Comment 8 Debarshi Ray 2017-10-30 14:04:46 UTC
Thanks everybody!
Comment 9 Luciano Santos 2017-12-27 01:14:29 UTC
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)
```
Comment 10 Debarshi Ray 2017-12-27 14:50:08 UTC
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.
Comment 11 Luciano Santos 2017-12-27 22:10:37 UTC
I suspected was something like that. Apart from this, all seems good so far if you don't remove intltool from the spec file.