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 774142 - Crash on synchronizing notes, only with French language
Crash on synchronizing notes, only with French language
Status: RESOLVED FIXED
Product: l10n
Classification: Infrastructure
Component: French [fr]
unspecified
Other Linux
: Normal normal
: ---
Assigned To: French Translator Team
French Translator Team
Depends on:
Blocks:
 
 
Reported: 2016-11-09 12:28 UTC by mossroy
Modified: 2016-11-16 21:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Stacktrace of the gnote crash (14.18 KB, text/plain)
2016-11-09 12:28 UTC, mossroy
  Details
Proposed patch (513 bytes, patch)
2016-11-09 12:31 UTC, mossroy
accepted-commit_now Details | Review

Description mossroy 2016-11-09 12:28:12 UTC
Created attachment 339386 [details]
Stacktrace of the gnote crash

Steps to reproduce :
- open Gnote with French language (LANG=fr_FR.UTF-8)
- in preferences->synchronisation, configure a local folder
- click on save, and confirm that you'd like to synchronize your notes now
- Gnote crashes with the following error message :

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::io::bad_format_string> >'
  what():  boost::bad_format_string: format-string is ill-formed

After that, if you restart gnote, it crashes with the same error whenever you ask it to synchronize the notes.

If you follow the same steps with LANG=C, it does not crash and synchronization works well.

This behavior looks similar to https://bugzilla.gnome.org/show_bug.cgi?id=580868
So I had a look at the translation strings, and might have found the cause : it looks like the following translation string is wrong because of a space before the second '%' (and the translation itself is wrong, too) :

#: ../src/synchronization/syncdialog.cpp:531
msgid "%1% note updated."
msgid_plural "%1% notes updated."
msgstr[0] "%1 % des notes mise à jour."
msgstr[1] "%1 % des notes mise à jour."

I think it should be replaced by something like :

#: ../src/synchronization/syncdialog.cpp:531
msgid "%1% note updated."
msgid_plural "%1% notes updated."
msgstr[0] "%1% note mise à jour."
msgstr[1] "%1% notes mises à jour."
Comment 1 mossroy 2016-11-09 12:31:11 UTC
Created attachment 339387 [details] [review]
Proposed patch

Here is a patch to fix the translation string.
Please note that I did not test it so far
Comment 2 mossroy 2016-11-09 12:33:56 UTC
NB : the patch is against the master branch, where I suspect the issue to be still there.

I experienced the crash on Ubuntu 16.04.1, with Gnote 3.81.1-1 (from Ubuntu repos), on x64 architecture
Comment 3 Alexandre Franke 2016-11-11 12:06:36 UTC
First time I see %1% as a substitution variable form and I'm not surprised the translator got confused by it. For the record, it's a thing that comes from the boost library. I asked the maintainer to remove them or add a translator comment in bug 774262.
Comment 4 Alexandre Franke 2016-11-11 12:07:25 UTC
Review of attachment 339387 [details] [review]:

In the meantime, your patch looks good to me. Please push.
Comment 5 mossroy 2016-11-11 14:41:30 UTC
Alexandre, as I suspected, I don't seem to have the right to push the patch on git myself (which is no surprise as I never commited on Gnome so far).
I suppose a Gnome developer will have to do it?

Regarding the %1% syntax, it seems to be used in some other translation strings in Gnote.
Comment 6 Alexandre Franke 2016-11-11 14:55:18 UTC
(In reply to mossroy from comment #5)
> Alexandre, as I suspected, I don't seem to have the right to push the patch
> on git myself (which is no surprise as I never commited on Gnome so far).
> I suppose a Gnome developer will have to do it?

No problem, I just pushed it as commit 62ef4ec.

> Regarding the %1% syntax, it seems to be used in some other translation
> strings in Gnote.

Yes, and it's an issue for all of them.
Comment 7 Hubert Figuiere (:hub) 2016-11-12 02:45:43 UTC
This patch should also be committed to the 3.22 branch.
Comment 8 Alexandre Franke 2016-11-12 10:23:30 UTC
(In reply to Hubert Figuiere (:hub) from comment #7)
> This patch should also be committed to the 3.22 branch.

Done.
Comment 10 mossroy 2016-11-16 21:22:57 UTC
So far, I did not manage to compile and run Gnote correctly (with or without the patch).
Which means I could not test my patch (as I mentioned in Comment #1).

Where could I find instructions or help to properly compile Gnote on Ubuntu 16.04?
The IRC channel mentioned in https://wiki.gnome.org/Apps/Gnote seems to be empty for now.

The README in source code does not give more instructions than "./configure && make && make install". Here is what I did :
- get the source from git://git.gnome.org/gnote, and switch to branch 3.18.1 (the version packaged with Ubuntu 16.04)
- install the packages mentioned in control file from http://archive.ubuntu.com/ubuntu/pool/universe/g/gnote/gnote_3.18.1-1.debian.tar.xz
- ./autogen.sh (which seems to run ./configure itself)
- make

make fails with the following message :
make[2] : on entre dans le répertoire « /home/mossroy/git/gnote/help »
Makefile:562: *** missing separator. Arrêt.

The corresponding line in help/Makefile is :
@YELP_HELP_RULES@

If I comment this line, Gnote successfully compiles.
But when I run src/gnote , it displays many errors like :
(140010929773184) ERROR: get_icon - Failed to load icon (note, 22): L'icône « note » n'est pas présente dans le thème ubuntu-mono-dark

All the UI is in English, with missing colors and icons, and I can't configure synchronization because the option is greyed out in the Settings, with mention "Not configurable"


This is certainly because I did not do things correctly. Please excuse me if it's a trivial mistake but I did not find what's wrong.
My goals are to :
1) test my patch
2) be able to synchronize my notes on ubuntu 16.04