[gnome-shell] power-status: Mark number with percentage for translation



commit e943dcafa441f70ec9ce24c6f39656cf9946021f
Author: Florian MÃllner <fmuellner gnome org>
Date:   Wed Sep 7 14:25:02 2011 +0200

    power-status: Mark number with percentage for translation
    
    Some locales expect the percentage sign before the number while
    others use a different character, so mark it for translation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644097

 js/ui/status/power.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/status/power.js b/js/ui/status/power.js
index baf0697..6e319e8 100644
--- a/js/ui/status/power.js
+++ b/js/ui/status/power.js
@@ -118,7 +118,7 @@ Indicator.prototype = {
                         timestring = ngettext("%d minute remaining", "%d minutes remaining", minutes).format(minutes);
                     this._batteryItem.label.text = timestring;
                 }
-                this._primaryPercentage.text = Math.round(percentage) + '%';
+                this._primaryPercentage.text = C_("percent of battery remaining", "%d%%").format(Math.round(percentage));
                 this._batteryItem.actor.show();
             } else {
                 this._hasPrimary = false;
@@ -191,7 +191,7 @@ DeviceItem.prototype = {
         this._box.add_actor(this._label);
         this.addActor(this._box);
 
-        let percentLabel = new St.Label({ text: '%d%%'.format(Math.round(percentage)) });
+        let percentLabel = new St.Label({ text: C_("percent of battery remaining", "%d%%").format(Math.round(percentage)) });
         this.addActor(percentLabel, { align: St.Align.END });
     },
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]