Bug 612950 - Function gpm_stats_time_to_text does not translate text
Function gpm_stats_time_to_text does not translate text
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
SVN TRUNK
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2010-03-15 16:01 UTC by Jean-Louis Dupond
Modified: 2010-03-16 21:43 UTC (History)
3 users (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add proper ngettext calls to time amounts (15.53 KB, patch)
2010-03-16 11:02 UTC, Gabor Kelemen
none Details | Diff | Review

Description Jean-Louis Dupond 2010-03-15 16:01:59 UTC
The function gpm_stats_time_to_text in gpm-statistics.c does not translate text.

return g_strdup_printf ("%.0f seconds", value);
should be for example replaced by
return g_strdup_printf ( ngettext ("%.0f second","%.0f seconds",value), value);
Comment 1 Richard Hughes 2010-03-15 17:07:41 UTC
commit 4b0c25509297d4f5de081d7b355ec6ba5f4d2eab
Author: Richard Hughes <richard@hughsie.com>
Date:   Mon Mar 15 17:06:58 2010 +0000

    Mark a few trivial strings as translatable to fix #612950
Comment 2 André Klapper 2010-03-15 17:17:20 UTC
_("%.0f seconds")

What if %.0f == 1? This needs ngettext and does not fix the issue reported here.
Please see http://live.gnome.org/TranslationProject/DevGuidelines/Plurals
Comment 3 Gabor Kelemen 2010-03-16 11:02:06 UTC
Created attachment 156257 [details] [review]
Add proper ngettext calls to time amounts

Richard, please nod if you are ok with this - and do not worry about the string freeze, this is just marking existing strings *properly* :).
Comment 4 Richard Hughes 2010-03-16 13:29:55 UTC
commit 4402aab7703b1e2afad5c1ec5a632559975cebd4
Author: Richard Hughes <richard@hughsie.com>
Date:   Tue Mar 16 13:28:51 2010 +0000

    Fix up a translation using ngettext rather than assuming the plural. Fixes #612950
Comment 5 Richard Hughes 2010-03-16 13:30:26 UTC
Gabor, I think we wrote the same patch in parallel :-)
Comment 6 Jean-Louis Dupond 2010-03-16 17:38:04 UTC
Its not comitted yet ?
http://git.gnome.org/browse/gnome-power-manager/log/
Comment 7 Richard Hughes 2010-03-16 21:43:45 UTC
(In reply to comment #6)
> Its not comitted yet ?
> http://git.gnome.org/browse/gnome-power-manager/log/

Oops, it turns out git actually requires me to push changes to the server :-)

Note You need to log in before you can comment on or make changes to this bug.