summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--iw/lvm_dialog_gui.py17
-rw-r--r--iw/partition_gui.py22
-rw-r--r--po/Makefile4
-rw-r--r--storage/__init__.py2
-rw-r--r--text.py9
-rw-r--r--vnc.py5
-rw-r--r--yuminstall.py12
7 files changed, 44 insertions, 27 deletions
diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index 733b77602..18e140a8e 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -34,6 +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)
import logging
log = logging.getLogger("anaconda")
@@ -764,12 +765,16 @@ class VolumeGroupEditor:
self.editLogicalVolume(lv)
def addLogicalVolumeCB(self, widget):
- if self.numAvailableLVSlots() < 1:
- self.intf.messageWindow(_("No free slots"),
- _("You cannot create more than %s logical "
- "volumes per volume group.") % (lvm.MAX_LV_SLOTS,), custom_icon="error")
- return
-
+ if self.numAvailableLVSlots() < 1:
+ self.intf.messageWindow(_("No free slots"),
+ P_("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)
+ % (lvm.MAX_LV_SLOTS,),
+ custom_icon="error")
+ return
+
(total, used, free) = self.computeSpaceValues()
if free <= 0:
self.intf.messageWindow(_("No free space"),
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 8215dc45e..a08d07bf4 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -50,6 +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)
import logging
log = logging.getLogger("anaconda")
@@ -1216,15 +1217,18 @@ class PartitionWindow(InstallWindow):
maintable.set_col_spacings(5)
row = 0
- lbltxt = _("Software RAID allows you to combine "
- "several disks into a larger "
- "RAID device. A RAID device can be configured to "
- "provide additional speed and "
- "reliability compared to using an individual drive. "
- "For more information on using RAID devices "
- "please consult the %s documentation.\n\n"
- "You currently have %s software RAID "
- "partition(s) free to use.\n\n") % (productName, len(availraidparts))
+ numparts = P_("You currently have %d software RAID partition free to use.",
+ "You currently have %d software RAID partitions free to use.",
+ len(availraidparts)) % len(availraidparts,)
+
+ lbltxt = _("Software RAID allows you to combine several disks into "
+ "a larger RAID device. A RAID device can be configured "
+ "to provide additional speed and reliability compared "
+ "to using an individual drive. For more information on "
+ "using RAID devices please consult the %s "
+ "documentation.") % (productName,)
+
+ lbltxt = lbltxt + "\n\n" + numparts + "\n\n"
if len(availraidparts) < 2:
lbltxt = lbltxt + _("To use RAID you must first "
diff --git a/po/Makefile b/po/Makefile
index 6e5b1d2bf..b33aee7f5 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -28,9 +28,9 @@ all: $(FMTCATALOGS)
$(NLSPACKAGE).pot: $(POTFILES) $(NONPOTFILES) intltool-po
xgettext --from-code=UTF-8 --default-domain=$(NLSPACKAGE) \
- --keyword=_ --keyword=N_ --lang=python $(PYPOTFILES)
+ --keyword=_ --keyword=N_ --keyword=P_:1,2 --lang=python $(PYPOTFILES)
xgettext --from-code=UTF-8 --default-domain=$(NLSPACKAGE) -j \
- --keyword=_ --keyword=N_ --lang=c $(CPOTFILES) tmp/*.h
+ --keyword=_ --keyword=N_ --keyword=P_:1,2 --lang=c $(CPOTFILES) tmp/*.h
cat ../lang-table | cut -f1 | while read line; do echo -e "\n#. generated from lang-table\nmsgid \"$$line\"\nmsgstr \"\""; done >> $(NLSPACKAGE).po
if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then \
rm -f $(NLSPACKAGE).po; \
diff --git a/storage/__init__.py b/storage/__init__.py
index ab636b9ca..e87db9be1 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -827,7 +827,7 @@ class Storage(object):
if (root and
root.size < self.anaconda.backend.getMinimumSizeMB("/")):
errors.append(_("Your / partition is less than %s "
- "megabytes which is lower than recommended "
+ "MB which is lower than recommended "
"for a normal %s install.")
%(self.anaconda.backend.getMinimumSizeMB("/"),
productName))
diff --git a/text.py b/text.py
index 70a5331dc..3d1c63d4b 100644
--- a/text.py
+++ b/text.py
@@ -40,6 +40,7 @@ import imputil
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
+P_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
import logging
log = logging.getLogger("anaconda")
@@ -369,8 +370,12 @@ class LuksPassphraseWindow:
if len(passphrase) < self.minLength:
ButtonChoiceWindow(self.screen,
_("Error with passphrase"),
- _("The passphrase must be at least "
- "%d characters long.") % (self.minLength,),
+ P_("The passphrase must be at least "
+ "%d character long.",
+ "The passphrase must be at least "
+ "%d characters long.",
+ self.minLength)
+ % (self.minLength,),
buttons=[TEXT_OK_BUTTON])
passphraseentry.set("")
confirmentry.set("")
diff --git a/vnc.py b/vnc.py
index 3e5d8139c..db119d096 100644
--- a/vnc.py
+++ b/vnc.py
@@ -32,6 +32,7 @@ import subprocess
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
+P_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
import logging
log = logging.getLogger("anaconda")
@@ -185,7 +186,9 @@ class VncServer:
else:
log.critical(err)
sys.exit(1)
- self.log.error(_("Giving up attempting to connect after %d tries!\n" % maxTries ))
+ self.log.error(P_("Giving up attempting to connect after %d try!\n",
+ "Giving up attempting to connect after %d tries!\n",
+ maxTries) % (maxTries,))
return False
def VNCListen(self):
diff --git a/yuminstall.py b/yuminstall.py
index 34e3c1859..784cfb1f5 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -51,6 +51,7 @@ import packages
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
+P_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
import network
@@ -81,10 +82,7 @@ def size_string (size):
size = size / 1024
retval = _("%s KB") %(number_format(size),)
else:
- if size == 1:
- retval = _("%s Byte") %(number_format(size),)
- else:
- retval = _("%s Bytes") %(number_format(size),)
+ retval = P_("%s Byte", "%s Bytes", size) % (number_format(size),)
return to_unicode(retval)
@@ -209,8 +207,10 @@ class AnacondaCallback:
self.doneFiles += len(hdr[rpm.RPMTAG_BASENAMES])
if self.donepkgs <= self.numpkgs:
- self.progress.set_text(_("%s of %s packages completed")
- %(self.donepkgs, self.numpkgs))
+ self.progress.set_text(P_("Packages completed: %d of %d",
+ "Packages completed: %d of %d",
+ self.numpkgs)
+ % (self.donepkgs, self.numpkgs,))
self.progress.set_fraction(float(self.doneSize / self.totalSize))
self.progress.processEvents()