Subject: changeset in tryton:4.4 Always append ':' at the end of the string
From: Cédric Krier <[email protected]>

changeset 79beeb929d9a in tryton:4.4
details: https://hg.tryton.org/tryton?cmd=changeset;node=79beeb929d9a
description:
        Always append ':' at the end of the string

        issue8041
        review51611002
        (grafted from b2483ea26df9cace7395069afd5ec0be4f7c002b)
diffstat:

 tryton/gui/window/view_form/view/form.py                |  6 +-----
 tryton/gui/window/view_form/view/form_gtk/dictionary.py |  5 +----
 tryton/gui/window/view_form/view/form_gtk/widget.py     |  5 +----
 tryton/gui/window/view_form/view/list.py                |  5 +----
 4 files changed, 4 insertions(+), 17 deletions(-)

diffs (61 lines):

diff -r 7996183413d2 -r 79beeb929d9a tryton/gui/window/view_form/view/form.py
--- a/tryton/gui/window/view_form/view/form.py  Wed Jan 30 09:33:51 2019 +0100
+++ b/tryton/gui/window/view_form/view/form.py  Sun Feb 03 20:19:17 2019 +0100
@@ -202,11 +202,7 @@
             if 'states' not in attributes and 'states' in field.attrs:
                 attributes['states'] = field.attrs['states']
             if 'string' not in attributes:
-                if gtk.widget_get_default_direction() == \
-                        gtk.TEXT_DIR_RTL:
-                    attributes['string'] = _(':') + field.attrs['string']
-                else:
-                    attributes['string'] = field.attrs['string'] + _(':')
+                attributes['string'] = field.attrs['string'] + _(':')
         if CONFIG['client.modepda']:
             attributes['xalign'] = 0.0
 
diff -r 7996183413d2 -r 79beeb929d9a 
tryton/gui/window/view_form/view/form_gtk/dictionary.py
--- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py   Wed Jan 30 
09:33:51 2019 +0100
+++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py   Sun Feb 03 
20:19:17 2019 +0100
@@ -484,10 +484,7 @@
         alignment.add(hbox)
         n_rows = self.table.props.n_rows
         self.table.resize(n_rows + 1, 3)
-        if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
-            text = _(':') + self.keys[key]['string']
-        else:
-            text = self.keys[key]['string'] + _(':')
+        text = self.keys[key]['string'] + _(':')
         label = gtk.Label(text)
         label.set_alignment(1., .5)
         self.table.attach(label, 0, 1, n_rows - 1, n_rows,
diff -r 7996183413d2 -r 79beeb929d9a 
tryton/gui/window/view_form/view/form_gtk/widget.py
--- a/tryton/gui/window/view_form/view/form_gtk/widget.py       Wed Jan 30 
09:33:51 2019 +0100
+++ b/tryton/gui/window/view_form/view/form_gtk/widget.py       Sun Feb 03 
20:19:17 2019 +0100
@@ -140,10 +140,7 @@
         table.set_row_spacings(2)
         table.set_border_width(1)
         for i, language in enumerate(languages):
-            if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
-                label = _(':') + language['name']
-            else:
-                label = language['name'] + _(':')
+            label = language['name'] + _(':')
             label = gtk.Label(label)
             label.set_alignment(1.0, 0.0 if self.widget.expand else 0.5)
             table.attach(label, 0, 1, i, i + 1, xoptions=gtk.FILL)
diff -r 7996183413d2 -r 79beeb929d9a tryton/gui/window/view_form/view/list.py
--- a/tryton/gui/window/view_form/view/list.py  Wed Jan 30 09:33:51 2019 +0100
+++ b/tryton/gui/window/view_form/view/list.py  Sun Feb 03 20:19:17 2019 +0100
@@ -518,10 +518,7 @@
     def add_sum(self, attributes):
         if 'sum' not in attributes:
             return
-        if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
-            text = _(':') + attributes['sum']
-        else:
-            text = attributes['sum'] + _(':')
+        text = attributes['sum'] + _(':')
         label, sum_ = gtk.Label(text), gtk.Label()
 
         hbox = gtk.HBox()

Reply via email to