From 592eafa5ec19b3c7f3d998680fb66bdfa323ce85 Mon Sep 17 00:00:00 2001
From: Alan Aguiar <alanjas@hotmail.com>
Date: Sat, 15 Dec 2012 06:28:54 -0200
Subject: [PATCH] fix gettext strings problem
---
activity.py | 6 ++++--
ep_colorconstraint_gray.py | 2 +-
ep_colorconstraint_none.py | 8 ++++----
ep_modifier_rectangulartile.py | 4 ++--
ep_sampler_affineifs.py | 6 +++---
ep_sampler_fermatspiral.py | 7 ++++---
ep_sampler_logarithmicspiral.py | 7 ++++---
ep_sampler_rectilineargrid.py | 4 ++--
ep_sampler_squaregrid.py | 4 ++--
9 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/activity.py b/activity.py
index 143ef6f..61442bd 100644
a
|
b
|
class KandidActivity(activity.Activity): |
190 | 190 | my_nick, my_csh = self._get_my_id() |
191 | 191 | self._status.set(ka_status.TOPIC_COLLABORATION, |
192 | 192 | ka_status.SUB_ID, |
193 | | _("I am '%s', my handle in that group is %u.") % (my_nick, my_csh)) |
| 193 | _("I am '%(nick)s', my handle in that group is %(csh)u.") \ |
| 194 | % {'nick': my_nick, 'csh': my_csh}) |
194 | 195 | |
195 | 196 | |
196 | 197 | def _sharing_setup(self): |
… |
… |
class KandidActivity(activity.Activity): |
237 | 238 | my_nick, my_csh = self._get_my_id() |
238 | 239 | self._status.set(ka_status.TOPIC_COLLABORATION, |
239 | 240 | ka_status.SUB_ID, |
240 | | _("I am '%s', my handle in that group is %u.") % (my_nick, my_csh)) |
| 241 | _("I am '%(nick)s', my handle in that group is %(csh)u.") \ |
| 242 | % {'nick': my_nick, 'csh': my_csh}) |
241 | 243 | |
242 | 244 | #TODO If a tube already exist, use it. |
243 | 245 | 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
|
b
|
class GrayColorConstraint(model_locus.Locus): |
58 | 58 | pre: len(rgba) == 4 |
59 | 59 | """ |
60 | 60 | if alpha: |
61 | | return _('%d%% gray, %d%% opaque') % (100*rgba[0], 100*rgba[3]) |
| 61 | return _('%(gray)d%% gray, %(opaque)d%% opaque') % {'gray': 100*rgba[0], 'opaque': 100*rgba[3]} |
62 | 62 | else: |
63 | 63 | 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
|
b
|
class NoneColorConstraint(model_locus.Locus): |
64 | 64 | pre: len(rgba) == 4 |
65 | 65 | """ |
66 | 66 | if alpha: |
67 | | return _('%d%% red, %d%% green, %d%% blue, %d%% opaque') \ |
68 | | % (100*rgba[0], 100*rgba[1], 100*rgba[2], 100*rgba[3]) |
| 67 | return _('%(red)d%% red, %(green)d%% green, %(blue)d%% blue, %(opaque)d%% opaque') \ |
| 68 | % {'red': 100*rgba[0], 'green': 100*rgba[1], 'blue': 100*rgba[2], 'opaque': 100*rgba[3]} |
69 | 69 | else: |
70 | | return _('%d%% red, %d%% green, %d%% blue') \ |
71 | | % (100*rgba[0], 100*rgba[1], 100*rgba[2]) |
| 70 | return _('%(red)d%% red, %(green)d%% green, %(blue)d%% blue') \ |
| 71 | % {'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
|
b
|
class RectangularTileModifier(model_allele.Allele): |
112 | 112 | ctx.restore() |
113 | 113 | |
114 | 114 | def explain(self, task, formater, single_layer, single_treenode): |
115 | | formater.text_item(_('Rectangular tile modifier: %d*x, %d*y') |
116 | | % (self.x_tiles, self.y_tiles)) |
| 115 | formater.text_item(_('Rectangular tile modifier: %(x_tiles)d*x, %(y_tiles)d*y') |
| 116 | % {'x_tiles': self.x_tiles, 'y_tiles': self.y_tiles}) |
117 | 117 | single_layer.explain(formater) |
118 | 118 | single_treenode.explain(task, formater) |
119 | 119 | |
diff --git a/ep_sampler_affineifs.py b/ep_sampler_affineifs.py
index d2efe9a..060afc3 100644
a
|
b
|
class AffineIfsSampler(model_allele.Allele): |
467 | 467 | post: len(__return__) == 3 |
468 | 468 | """ |
469 | 469 | head = _('Affine iterated function system sampler') |
470 | | details = _('iterations=%d, transformations=%d symmetry=%d, Dn=%d: ') |
471 | | details = details % (self.orbits, self.num_transformations, |
472 | | self.symmetry, self.Dn) |
| 470 | details = _('iterations=%(iters)d, transformations=%(trans)d symmetry=%(sym)d, Dn=%(dn)d: ') |
| 471 | details = details % {'iters': self.orbits, 'trans': self.num_transformations, |
| 472 | 'sym': self.symmetry, 'dn': self.Dn} |
473 | 473 | return ka_utils.explain_points(head + ' ' + details + ': ', |
474 | 474 | self.get_sample_points()) |
475 | 475 | |
diff --git a/ep_sampler_fermatspiral.py b/ep_sampler_fermatspiral.py
index 05ef68d..7be08c4 100644
a
|
b
|
class FermatSpiralSampler(model_allele.Allele): |
164 | 164 | """ |
165 | 165 | post: len(__return__) == 3 |
166 | 166 | """ |
167 | | head = _("Fermat's spiral sampler: center=%f,%f, start steps=%d, end steps=%d, radian=%f, scaling=%f") \ |
168 | | % (self.x_center, self.y_center, |
169 | | self.start, self.end, self.angle, self.c) |
| 167 | head = _("Fermat's spiral sampler: center=%(x_center)f,%(y_center)f, \ |
| 168 | start steps=%(start)d, end steps=%(end)d, radian=%(rad)f, scaling=%(scaling)f") \ |
| 169 | % {'x_center': self.x_center, 'y_center': self.y_center, |
| 170 | 'start': self.start, 'end': self.end, 'rad': self.angle, 'scaling': self.c} |
170 | 171 | return ka_utils.explain_points(head, self.get_sample_points()) |
171 | 172 | |
172 | 173 | def copy(self): |
diff --git a/ep_sampler_logarithmicspiral.py b/ep_sampler_logarithmicspiral.py
index df9917e..a29c518 100644
a
|
b
|
class LogarithmicSpiralSampler(model_allele.Allele): |
176 | 176 | """ |
177 | 177 | post: len(__return__) == 3 |
178 | 178 | """ |
179 | | head = _('Logarithmic spiral sampler: center=%f,%f, revolutions=%f, steps per revolution=%d, a=%f, b=%f') \ |
180 | | % (self.x_center, self.y_center, |
181 | | self.turns, self.steps, self.a, self.b) |
| 179 | head = _('Logarithmic spiral sampler: center=%(x_center)f,%(y_center)f,\ |
| 180 | revolutions=%(rev)f, steps per revolution=%(steps)d, a=%(a)f, b=%(b)f') \ |
| 181 | % {'x_center': self.x_center, 'y_center': self.y_center, |
| 182 | 'rev': self.turns, 'steps': self.steps, 'a': self.a, 'b': self.b} |
182 | 183 | return ka_utils.explain_points(head, self.get_sample_points()) |
183 | 184 | |
184 | 185 | def copy(self): |
diff --git a/ep_sampler_rectilineargrid.py b/ep_sampler_rectilineargrid.py
index f239cf7..f2f1804 100644
a
|
b
|
class RectilinearGridSampler(model_allele.Allele): |
114 | 114 | """ |
115 | 115 | post: len(__return__) == 3 |
116 | 116 | """ |
117 | | head = _('Rectilinear grid sampler: %d*x, %d*y') \ |
118 | | % (self.x_tiles, self.y_tiles) |
| 117 | head = _('Rectilinear grid sampler: %(x_tiles)d*x, %(y_tiles)d*y') \ |
| 118 | % {'x_tiles': self.x_tiles, 'y_tiles': self.y_tiles} |
119 | 119 | return ka_utils.explain_points(head, self.get_sample_points()) |
120 | 120 | |
121 | 121 | def copy(self): |
diff --git a/ep_sampler_squaregrid.py b/ep_sampler_squaregrid.py
index a4a7f82..0875501 100644
a
|
b
|
class SquareGridSampler(model_allele.Allele): |
97 | 97 | """ |
98 | 98 | post: len(__return__) == 3 |
99 | 99 | """ |
100 | | head = _('Squarish grid sampler: %d*%d') \ |
101 | | % (self.tiles, self.tiles) |
| 100 | head = _('Squarish grid sampler: %(tiles)d*%(tiles)d') \ |
| 101 | % {'tiles': self.tiles} |
102 | 102 | return ka_utils.explain_points(head, self.get_sample_points()) |
103 | 103 | |
104 | 104 | def copy(self): |