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 764585 - Fix "format not a string literal" errors
Fix "format not a string literal" errors
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-04-04 13:03 UTC by Bastien Nocera
Modified: 2016-04-16 16:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ui-manager: Fix "format not a string literal" errors (5.60 KB, patch)
2016-04-04 13:03 UTC, Bastien Nocera
committed Details | Review
about-dialog: Fix "format not a string literal" errors (1.64 KB, patch)
2016-04-04 13:03 UTC, Bastien Nocera
committed Details | Review
file-chooser-widget: Fix "format not a string literal" error (4.62 KB, patch)
2016-04-04 13:03 UTC, Bastien Nocera
committed Details | Review
recent-manager: Fix "format not a string literal" error (4.38 KB, patch)
2016-04-04 13:04 UTC, Bastien Nocera
committed Details | Review
cups: Fix "format not a string literal" error (5.13 KB, patch)
2016-04-04 14:38 UTC, Bastien Nocera
committed Details | Review
cups: Fix more "format not a string literal" error (3.72 KB, patch)
2016-04-12 13:59 UTC, Felipe Borges
committed Details | Review
cups: make string non-literals translatable again (980 bytes, patch)
2016-04-13 18:02 UTC, Felipe Borges
committed Details | Review
cups: Fix gettext usage (3.11 KB, patch)
2016-04-15 10:16 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2016-04-04 13:03:40 UTC
.
Comment 1 Bastien Nocera 2016-04-04 13:03:45 UTC
Created attachment 325332 [details] [review]
ui-manager: Fix "format not a string literal" errors

Quite a bit of code movement, but necessary to build with the
default format errors produced by newer versions of GCC.
Comment 2 Bastien Nocera 2016-04-04 13:03:50 UTC
Created attachment 325333 [details] [review]
about-dialog: Fix "format not a string literal" errors

A non-intrusive fix.
Comment 3 Bastien Nocera 2016-04-04 13:03:56 UTC
Created attachment 325334 [details] [review]
file-chooser-widget: Fix "format not a string literal" error
Comment 4 Bastien Nocera 2016-04-04 13:04:01 UTC
Created attachment 325335 [details] [review]
recent-manager: Fix "format not a string literal" error
Comment 5 Matthias Clasen 2016-04-04 14:00:28 UTC
Review of attachment 325332 [details] [review]:

Looks fine to me
Comment 6 Matthias Clasen 2016-04-04 14:01:12 UTC
Review of attachment 325333 [details] [review]:

ok
Comment 7 Matthias Clasen 2016-04-04 14:03:17 UTC
Review of attachment 325334 [details] [review]:

ok
Comment 8 Matthias Clasen 2016-04-04 14:05:12 UTC
Review of attachment 325335 [details] [review]:

ok
Comment 9 Matthias Clasen 2016-04-04 14:06:55 UTC
Can you put those on the 3.20 branch too, please ?
Comment 10 Bastien Nocera 2016-04-04 14:38:25 UTC
Created attachment 325347 [details] [review]
cups: Fix "format not a string literal" error
Comment 11 Bastien Nocera 2016-04-04 14:43:32 UTC
Review of attachment 325347 [details] [review]:

This only fixes one half of the problems in this file.
Comment 12 Bastien Nocera 2016-04-04 14:50:30 UTC
CC:'ing Felipe to finish the patch in comment 10 (it's easy but tedious, and he's young ;)
Comment 13 Bastien Nocera 2016-04-05 11:00:17 UTC
Attachment 325332 [details] pushed as bf8653c - ui-manager: Fix "format not a string literal" errors
Attachment 325333 [details] pushed as a8c5954 - about-dialog: Fix "format not a string literal" errors
Attachment 325334 [details] pushed as 6a5224f - file-chooser-widget: Fix "format not a string literal" error
Attachment 325335 [details] pushed as becc0d4 - recent-manager: Fix "format not a string literal" error
Attachment 325347 [details] pushed as 9336355 - cups: Fix "format not a string literal" error
Comment 14 Felipe Borges 2016-04-12 13:59:46 UTC
Created attachment 325805 [details] [review]
cups: Fix more "format not a string literal" error
Comment 15 Bastien Nocera 2016-04-13 10:51:20 UTC
Review of attachment 325805 [details] [review]:

Looks fine to me. Please commit to gtk-3-20 and master.

Also, it would be good to get rid of those magic numbers in there. I see no reason for bare numbers to be used that way.
Comment 16 Felipe Borges 2016-04-13 12:26:11 UTC
Attachment 325805 [details] pushed as 027702e - cups: Fix more "format not a string literal" error
Comment 17 Piotr Drąg 2016-04-13 13:58:07 UTC
027702e made the strings untranslatable (see the obsolete strings at the end of the file: <https://l10n.gnome.org/POT/gtk+.master/gtk+.master.pl.po>).
Comment 18 Felipe Borges 2016-04-13 18:02:08 UTC
Created attachment 325879 [details] [review]
cups: make string non-literals translatable again

Notice that C_ just takes string literals as arguments.
Comment 19 Bastien Nocera 2016-04-14 12:25:16 UTC
Review of attachment 325879 [details] [review]:

Looks fine.
Comment 20 Felipe Borges 2016-04-14 17:01:03 UTC
Attachment 325879 [details] pushed as b0b1bf2 - cups: make string non-literals translatable again
Comment 21 Piotr Drąg 2016-04-14 17:20:09 UTC
The four strings in question are still not extracted to .pot/.po files.

Additionally, I think commit https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-20&id=830626596b5325c836eeb4760ea47cfada9baad2 changed "Printer “%s” is out of developer." to a duplicate of "Printer “%s” is low on developer.".
Comment 22 Bastien Nocera 2016-04-15 10:16:48 UTC
Created attachment 326077 [details] [review]
cups: Fix gettext usage

The previous patches didn't mark some strings as to be translated, and
tried to translate strings with a variable part already inside the
string, which isn't going to work.

Mark the strings as translatable with context, and also make sure to
translate static strings when getting them out of their structure.
Comment 23 Bastien Nocera 2016-04-15 10:17:39 UTC
(In reply to Piotr Drąg from comment #21)
> The four strings in question are still not extracted to .pot/.po files.
> 
> Additionally, I think commit
> https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-
> 20&id=830626596b5325c836eeb4760ea47cfada9baad2 changed "Printer “%s” is out
> of developer." to a duplicate of "Printer “%s” is low on developer.".

Let me know if that patch fixes it for you. My mistake for not reviewing Felipe's patches properly.
Comment 24 Matthias Clasen 2016-04-15 19:10:31 UTC
Review of attachment 326077 [details] [review]:

looks good to me, fwiw
Comment 25 Piotr Drąg 2016-04-15 20:10:05 UTC
(In reply to Bastien Nocera from comment #23)
> Let me know if that patch fixes it for you. My mistake for not reviewing
> Felipe's patches properly.

It fixes the strings extraction to .po files. Thank you.
Comment 26 Bastien Nocera 2016-04-16 16:42:47 UTC
Attachment 326077 [details] pushed as a69e591 - cups: Fix gettext usage