Commit 125fe1e0 authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Philipp Hörist

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
parent 881238de
Pipeline #3678 passed with stages
in 2 minutes and 55 seconds
......@@ -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>
......
......@@ -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)
......
......@@ -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)
......
......@@ -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))
......
......@@ -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]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment