GNOME Bugzilla – Bug 735413
Use ngettext for "minutes" and "minutes"
Last modified: 2014-08-28 21:28:37 UTC
An i18n regression was recently introduced. The string "%d minute"/"%d minutes" has been replaced by some code that constructs the sentence by appending %d and the translated "minute"/"minutes" by hand instead of relying on ngettext. See https://wiki.gnome.org/TranslationProject/DevGuidelines/Plurals
The relevant file is lib/sudoku-game.vala
I think you're looking at bug #731139, which has already been fixed. Are you sure you're looking at the latest version of the code?
Sorry, the issue is actually somewhat different from what I told, but it still exists: the code does use ngettext so that's not an issue; however it still appends %d and the translation of "minute"/"minutes" which is wrong. Do: ngettext("%d minute", "%d minutes", minutes); Don't do: var minute_string = ngettext ("minute", "minutes", minutes); var time_string = "%d %s".printf (minutes, minute_string); Also I'm not sure the way you then insert that string in another string is that good an idea. I'd avoid: var time_str = SudokuGame.seconds_to_minutes_string (time); new MessageDialog (…, _("Well done, you completed the puzzle in %s"), time_str); Instead I'd rather have seconds_to_minutes_string directly return the full string. So you'd have something like: ngettext("Well done, you completed the puzzle in %d minute", "Well done, you completed the puzzle in %d minutes", minutes);
Created attachment 284472 [details] [review] Make a string easier to translate Also, remove this logic from SudokuGame.vala, since it makes absolutely no sense to have it there. Hope this doesn't break anything....
Created attachment 284473 [details] [review] Better translator comment.
Created attachment 284474 [details] [review] Actually use a better translator comment Apparently committing things is hard for me today.
Thanks, that would indeed solve the issue!