[PATCH] Use N_() for gettext plural macro instead of P_().

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

 



Nonfunctional change, just bringing the code more in line with what
standard gettext docs say.
---
 iw/lvm_dialog_gui.py |    4 ++--
 iw/partition_gui.py  |    4 ++--
 text.py              |    4 ++--
 vnc.py               |    4 ++--
 yuminstall.py        |    4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index 63d997f..b04c987 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -34,7 +34,7 @@ from storage.deviceaction import *
 
 import gettext
 _ = lambda x: gettext.ldgettext("anaconda", x)
-P_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
+N_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
 
 import logging
 log = logging.getLogger("anaconda")
@@ -792,7 +792,7 @@ class VolumeGroupEditor:
     def addLogicalVolumeCB(self, widget):
         if self.numAvailableLVSlots() < 1:
             self.intf.messageWindow(_("No free slots"),
-                P_("You cannot create more than %d logical volume "
+                N_("You cannot create more than %d logical volume "
                    "per volume group.",
                    "You cannot create more than %d logical volumes "
                    "per volume group.", lvm.MAX_LV_SLOTS)
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 6f49ce7..4d00d9e 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -50,7 +50,7 @@ from storage.devices import devicePathToName, PartitionDevice
 
 import gettext
 _ = lambda x: gettext.ldgettext("anaconda", x)
-P_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
+N_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
 
 import logging
 log = logging.getLogger("anaconda")
@@ -1220,7 +1220,7 @@ class PartitionWindow(InstallWindow):
         maintable.set_col_spacings(5)
         row = 0
 
-	numparts = P_("You currently have %d software RAID partition free to use.",
+	numparts = N_("You currently have %d software RAID partition free to use.",
 		    "You currently have %d software RAID partitions free to use.",
 		    len(availraidparts)) % len(availraidparts,)
 
diff --git a/text.py b/text.py
index aeaa585..974a664 100644
--- a/text.py
+++ b/text.py
@@ -40,7 +40,7 @@ import imputil
 
 import gettext
 _ = lambda x: gettext.ldgettext("anaconda", x)
-P_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
+N_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
 
 import logging
 log = logging.getLogger("anaconda")
@@ -194,7 +194,7 @@ class LuksPassphraseWindow:
                 if len(passphrase) < self.minLength:
                     ButtonChoiceWindow(self.screen,
                                        _("Error with passphrase"),
-                                       P_("The passphrase must be at least "
+                                       N_("The passphrase must be at least "
                                           "%d character long.",
                                           "The passphrase must be at least "
                                           "%d characters long.",
diff --git a/vnc.py b/vnc.py
index 0a6a049..629eb7e 100644
--- a/vnc.py
+++ b/vnc.py
@@ -32,7 +32,7 @@ import subprocess
 
 import gettext
 _ = lambda x: gettext.ldgettext("anaconda", x)
-P_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
+N_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
 
 import logging
 log = logging.getLogger("anaconda")
@@ -192,7 +192,7 @@ class VncServer:
             else:
                 log.critical(err)
                 sys.exit(1)
-        self.log.error(P_("Giving up attempting to connect after %d try!\n",
+        self.log.error(N_("Giving up attempting to connect after %d try!\n",
                           "Giving up attempting to connect after %d tries!\n",
                           maxTries) % (maxTries,))
         return False
diff --git a/yuminstall.py b/yuminstall.py
index 5a116f5..98b6aa1 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -54,7 +54,7 @@ import packages
 
 import gettext
 _ = lambda x: gettext.ldgettext("anaconda", x)
-P_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
+N_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
 
 import network
 
@@ -85,7 +85,7 @@ def size_string (size):
         size = size / 1024
         retval = _("%s KB") %(number_format(size),)
     else:
-        retval = P_("%s Byte", "%s Bytes", size) % (number_format(size),)
+        retval = N_("%s Byte", "%s Bytes", size) % (number_format(size),)
 
     return to_unicode(retval)
 
-- 
1.6.2.5

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux