Subject: changeset in tryton:4.8 Always append ':' at the end of the string From: Cédric Krier <[email protected]>
changeset 9f2cf46eaad0 in tryton:4.8 details: https://hg.tryton.org/tryton?cmd=changeset;node=9f2cf46eaad0 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 83726d19143a -r 9f2cf46eaad0 tryton/gui/window/view_form/view/form.py --- a/tryton/gui/window/view_form/view/form.py Wed Jan 30 10:10:00 2019 +0100 +++ b/tryton/gui/window/view_form/view/form.py Sun Feb 03 20:19:17 2019 +0100 @@ -256,11 +256,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 83726d19143a -r 9f2cf46eaad0 tryton/gui/window/view_form/view/form_gtk/dictionary.py --- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py Wed Jan 30 10:10:00 2019 +0100 +++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py Sun Feb 03 20:19:17 2019 +0100 @@ -486,10 +486,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(set_underline(text)) label.set_use_underline(True) label.set_alignment(1., .5) diff -r 83726d19143a -r 9f2cf46eaad0 tryton/gui/window/view_form/view/form_gtk/widget.py --- a/tryton/gui/window/view_form/view/form_gtk/widget.py Wed Jan 30 10:10:00 2019 +0100 +++ b/tryton/gui/window/view_form/view/form_gtk/widget.py Sun Feb 03 20:19:17 2019 +0100 @@ -151,10 +151,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, xpadding=2) diff -r 83726d19143a -r 9f2cf46eaad0 tryton/gui/window/view_form/view/list.py --- a/tryton/gui/window/view_form/view/list.py Wed Jan 30 10:10:00 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()
