Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNostalghia <b.vehikel@googlemail.com>2013-07-14 07:16:27 (GMT)
committer Nostalghia <b.vehikel@googlemail.com>2013-07-14 07:16:27 (GMT)
commit9e5932a51d0a4ac0dc110bb0983d5d642dc563fb (patch)
tree25072fe9f3263d8eab8d4fa5dc4df3a6eb806c41
parent8e6fc02292600152fc955ffbb8c2d8cc9613d025 (diff)
Ticket #3122: 0001-fix-gettext-strings-problem.patch
-rw-r--r--activity.py6
-rw-r--r--ep_colorconstraint_gray.py2
-rw-r--r--ep_colorconstraint_none.py8
-rw-r--r--ep_modifier_rectangulartile.py4
-rw-r--r--ep_sampler_affineifs.py6
-rw-r--r--ep_sampler_fermatspiral.py7
-rw-r--r--ep_sampler_logarithmicspiral.py7
-rw-r--r--ep_sampler_rectilineargrid.py4
-rw-r--r--ep_sampler_squaregrid.py4
9 files changed, 26 insertions, 22 deletions
diff --git a/activity.py b/activity.py
index 143ef6f..61442bd 100644
--- a/activity.py
+++ b/activity.py
@@ -190,7 +190,8 @@ class KandidActivity(activity.Activity):
my_nick, my_csh = self._get_my_id()
self._status.set(ka_status.TOPIC_COLLABORATION,
ka_status.SUB_ID,
- _("I am '%s', my handle in that group is %u.") % (my_nick, my_csh))
+ _("I am '%(nick)s', my handle in that group is %(csh)u.") \
+ % {'nick': my_nick, 'csh': my_csh})
def _sharing_setup(self):
@@ -237,7 +238,8 @@ class KandidActivity(activity.Activity):
my_nick, my_csh = self._get_my_id()
self._status.set(ka_status.TOPIC_COLLABORATION,
ka_status.SUB_ID,
- _("I am '%s', my handle in that group is %u.") % (my_nick, my_csh))
+ _("I am '%(nick)s', my handle in that group is %(csh)u.") \
+ % {'nick': my_nick, 'csh': my_csh})
#TODO If a tube already exist, use it.
ka_debug.info('This is not my activity: waiting for a tube...')
diff --git a/ep_colorconstraint_gray.py b/ep_colorconstraint_gray.py
index 78c5902..8e3e48b 100644
--- a/ep_colorconstraint_gray.py
+++ b/ep_colorconstraint_gray.py
@@ -58,6 +58,6 @@ class GrayColorConstraint(model_locus.Locus):
pre: len(rgba) == 4
"""
if alpha:
- return _('%d%% gray, %d%% opaque') % (100*rgba[0], 100*rgba[3])
+ return _('%(gray)d%% gray, %(opaque)d%% opaque') % {'gray': 100*rgba[0], 'opaque': 100*rgba[3]}
else:
return _('Color is reduced to shades of gray, %d%% gray') % (100*rgba[0])
diff --git a/ep_colorconstraint_none.py b/ep_colorconstraint_none.py
index 753f865..b407318 100644
--- a/ep_colorconstraint_none.py
+++ b/ep_colorconstraint_none.py
@@ -64,8 +64,8 @@ class NoneColorConstraint(model_locus.Locus):
pre: len(rgba) == 4
"""
if alpha:
- return _('%d%% red, %d%% green, %d%% blue, %d%% opaque') \
- % (100*rgba[0], 100*rgba[1], 100*rgba[2], 100*rgba[3])
+ return _('%(red)d%% red, %(green)d%% green, %(blue)d%% blue, %(opaque)d%% opaque') \
+ % {'red': 100*rgba[0], 'green': 100*rgba[1], 'blue': 100*rgba[2], 'opaque': 100*rgba[3]}
else:
- return _('%d%% red, %d%% green, %d%% blue') \
- % (100*rgba[0], 100*rgba[1], 100*rgba[2])
+ return _('%(red)d%% red, %(green)d%% green, %(blue)d%% blue') \
+ % {'red': 100*rgba[0], 'green': 100*rgba[1], 'blue': 100*rgba[2]}
diff --git a/ep_modifier_rectangulartile.py b/ep_modifier_rectangulartile.py
index 62494bc..0355f2f 100644
--- a/ep_modifier_rectangulartile.py
+++ b/ep_modifier_rectangulartile.py
@@ -112,8 +112,8 @@ class RectangularTileModifier(model_allele.Allele):
ctx.restore()
def explain(self, task, formater, single_layer, single_treenode):
- formater.text_item(_('Rectangular tile modifier: %d*x, %d*y')
- % (self.x_tiles, self.y_tiles))
+ formater.text_item(_('Rectangular tile modifier: %(x_tiles)d*x, %(y_tiles)d*y')
+ % {'x_tiles': self.x_tiles, 'y_tiles': self.y_tiles})
single_layer.explain(formater)
single_treenode.explain(task, formater)
diff --git a/ep_sampler_affineifs.py b/ep_sampler_affineifs.py
index d2efe9a..060afc3 100644
--- a/ep_sampler_affineifs.py
+++ b/ep_sampler_affineifs.py
@@ -467,9 +467,9 @@ class AffineIfsSampler(model_allele.Allele):
post: len(__return__) == 3
"""
head = _('Affine iterated function system sampler')
- details = _('iterations=%d, transformations=%d symmetry=%d, Dn=%d: ')
- details = details % (self.orbits, self.num_transformations,
- self.symmetry, self.Dn)
+ details = _('iterations=%(iters)d, transformations=%(trans)d symmetry=%(sym)d, Dn=%(dn)d: ')
+ details = details % {'iters': self.orbits, 'trans': self.num_transformations,
+ 'sym': self.symmetry, 'dn': self.Dn}
return ka_utils.explain_points(head + ' ' + details + ': ',
self.get_sample_points())
diff --git a/ep_sampler_fermatspiral.py b/ep_sampler_fermatspiral.py
index 05ef68d..7be08c4 100644
--- a/ep_sampler_fermatspiral.py
+++ b/ep_sampler_fermatspiral.py
@@ -164,9 +164,10 @@ class FermatSpiralSampler(model_allele.Allele):
"""
post: len(__return__) == 3
"""
- head = _("Fermat's spiral sampler: center=%f,%f, start steps=%d, end steps=%d, radian=%f, scaling=%f") \
- % (self.x_center, self.y_center,
- self.start, self.end, self.angle, self.c)
+ head = _("Fermat's spiral sampler: center=%(x_center)f,%(y_center)f, \
+ start steps=%(start)d, end steps=%(end)d, radian=%(rad)f, scaling=%(scaling)f") \
+ % {'x_center': self.x_center, 'y_center': self.y_center,
+ 'start': self.start, 'end': self.end, 'rad': self.angle, 'scaling': self.c}
return ka_utils.explain_points(head, self.get_sample_points())
def copy(self):
diff --git a/ep_sampler_logarithmicspiral.py b/ep_sampler_logarithmicspiral.py
index df9917e..a29c518 100644
--- a/ep_sampler_logarithmicspiral.py
+++ b/ep_sampler_logarithmicspiral.py
@@ -176,9 +176,10 @@ class LogarithmicSpiralSampler(model_allele.Allele):
"""
post: len(__return__) == 3
"""
- head = _('Logarithmic spiral sampler: center=%f,%f, revolutions=%f, steps per revolution=%d, a=%f, b=%f') \
- % (self.x_center, self.y_center,
- self.turns, self.steps, self.a, self.b)
+ head = _('Logarithmic spiral sampler: center=%(x_center)f,%(y_center)f,\
+ revolutions=%(rev)f, steps per revolution=%(steps)d, a=%(a)f, b=%(b)f') \
+ % {'x_center': self.x_center, 'y_center': self.y_center,
+ 'rev': self.turns, 'steps': self.steps, 'a': self.a, 'b': self.b}
return ka_utils.explain_points(head, self.get_sample_points())
def copy(self):
diff --git a/ep_sampler_rectilineargrid.py b/ep_sampler_rectilineargrid.py
index f239cf7..f2f1804 100644
--- a/ep_sampler_rectilineargrid.py
+++ b/ep_sampler_rectilineargrid.py
@@ -114,8 +114,8 @@ class RectilinearGridSampler(model_allele.Allele):
"""
post: len(__return__) == 3
"""
- head = _('Rectilinear grid sampler: %d*x, %d*y') \
- % (self.x_tiles, self.y_tiles)
+ head = _('Rectilinear grid sampler: %(x_tiles)d*x, %(y_tiles)d*y') \
+ % {'x_tiles': self.x_tiles, 'y_tiles': self.y_tiles}
return ka_utils.explain_points(head, self.get_sample_points())
def copy(self):
diff --git a/ep_sampler_squaregrid.py b/ep_sampler_squaregrid.py
index a4a7f82..0875501 100644
--- a/ep_sampler_squaregrid.py
+++ b/ep_sampler_squaregrid.py
@@ -97,8 +97,8 @@ class SquareGridSampler(model_allele.Allele):
"""
post: len(__return__) == 3
"""
- head = _('Squarish grid sampler: %d*%d') \
- % (self.tiles, self.tiles)
+ head = _('Squarish grid sampler: %(tiles)d*%(tiles)d') \
+ % {'tiles': self.tiles}
return ka_utils.explain_points(head, self.get_sample_points())
def copy(self):