Philipp Hörist pushed to branch master at gajim / gajim


Commits:
125fe1e0 by Daniel Brötzmann at 2019-06-20T12:56:12Z
Make some strings translatable

Sync threshold options in the preferences window did not translate correctly,
Add Account was not translatable in accounts window,
Context menu Delete item was not translatable in history manager

- - - - -


5 changed files:

- gajim/data/gui/history_manager.ui
- gajim/gtk/accounts.py
- gajim/gtk/features.py
- gajim/gtk/preferences.py
- gajim/history_manager.py


Changes:

=====================================
gajim/data/gui/history_manager.ui
=====================================
@@ -17,7 +17,7 @@
       <object class="GtkMenuItem" id="delete_menuitem">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="label">_Delete</property>
+        <property name="label" translatable="yes">_Delete</property>
         <property name="use_underline">True</property>
       </object>
     </child>


=====================================
gajim/gtk/accounts.py
=====================================
@@ -670,7 +670,7 @@ class AddNewAccountPage(Gtk.Box):
         Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL)
         self.set_vexpand(True)
         self.set_hexpand(True)
-        button = Gtk.Button(label='Add Account')
+        button = Gtk.Button(label=_('Add Account'))
         button.get_style_context().add_class('suggested-action')
         button.set_action_name('app.add-account')
         button.set_halign(Gtk.Align.CENTER)


=====================================
gajim/gtk/features.py
=====================================
@@ -207,7 +207,7 @@ class FeatureItem(Gtk.Grid):
                 self.box.pack_start(self.feature_dependency_u, True, True, 0)
 
         self.icon = Gtk.Image()
-        self.label_disabled = Gtk.Label(label='Disabled in Preferences')
+        self.label_disabled = Gtk.Label(label=_('Disabled in Preferences'))
         self.label_disabled.get_style_context().add_class('dim-label')
         self.set_feature(feature.available, feature.enabled)
 


=====================================
gajim/gtk/preferences.py
=====================================
@@ -148,15 +148,15 @@ class Preferences(Gtk.ApplicationWindow):
         st = app.config.get('show_subject_on_join')
         self._ui.subject_on_join_checkbutton.set_active(st)
 
-
         # Group chat settings
         threshold_model = self._ui.sync_threshold_combobox.get_model()
-        for day in app.config.get_options('threshold_options'):
-            if day == '0':
+        days = app.config.get_options('threshold_options', return_type=int)
+        for day in days:
+            if day == 0:
                 label = _('No threshold')
             else:
-                label = ngettext('%s day' % day, '%s days' % day, int(day))
-            threshold_model.append([day, label])
+                label = ngettext('%i day', '%i days', day, day, day)
+            threshold_model.append([str(day), label])
         public_threshold = app.config.get('public_room_sync_threshold')
         self._ui.sync_threshold_combobox.set_id_column(0)
         self._ui.sync_threshold_combobox.set_active_id(str(public_threshold))


=====================================
gajim/history_manager.py
=====================================
@@ -105,7 +105,7 @@ class HistoryManager:
         log_db_path = configpaths.get('LOG_DB')
         if not os.path.exists(log_db_path):
             ErrorDialog(_('Cannot find history logs database'),
-                        '%s does not exist.' % log_db_path)
+                        _('%s does not exist.') % log_db_path)
             sys.exit()
 
         self._ui = get_builder('history_manager.ui')
@@ -246,11 +246,11 @@ class HistoryManager:
 
         dialog = YesNoDialog(
             _('Do you want to clean up the database? '
-            '(STRONGLY NOT RECOMMENDED IF GAJIM IS RUNNING)'),
+              '(STRONGLY NOT RECOMMENDED IF GAJIM IS RUNNING)'),
             _('Normally allocated database size will not be freed, '
-                'it will just become reusable. If you really want to reduce '
-                'database filesize, click YES, else click NO.'
-                '\n\nIn case you click YES, please wait…'),
+              'it will just become reusable. If you really want to reduce '
+              'database filesize, click YES, else click NO.'
+              '\n\nIn case you click YES, please wait…'),
             on_response_yes=on_yes, on_response_no=on_no)
         dialog.set_title(_('Database Cleanup'))
         button_box = dialog.get_children()[0].get_children()[1]



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/125fe1e0f6c8f909104726a8c4b1584e91782716

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/125fe1e0f6c8f909104726a8c4b1584e91782716
You're receiving this email because of your account on dev.gajim.org.

_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to