Fix some strings for a better translation
This commit is contained in:
parent
b93098a379
commit
152be4473b
|
@ -298,7 +298,8 @@ class StandardGroupChatCommands(CommandContainer):
|
|||
@doc(_("Invite a user to a room for a reason"))
|
||||
def invite(self, jid, reason):
|
||||
self.connection.send_invite(self.room_jid, jid, reason)
|
||||
return _("Invited %s to %s") % (jid, self.room_jid)
|
||||
return _("Invited %(jid)s to %(room_jid)s") % {'jid': jid,
|
||||
'room_jid': self.room_jid}
|
||||
|
||||
@command(raw=True, empty=True)
|
||||
@doc(_("Join a group chat given by a jid, optionally using given nickname"))
|
||||
|
|
|
@ -250,7 +250,7 @@ def check_and_possibly_move_config():
|
|||
continue
|
||||
if not os.path.exists(src):
|
||||
continue
|
||||
print(_('moving %s to %s') % (src, dst))
|
||||
print(_('moving %(src)s to %(dst)s') % {'src': src, 'dst': dst})
|
||||
shutil.move(src, dst)
|
||||
app.logger.init_vars()
|
||||
app.logger.attach_cache_database()
|
||||
|
|
|
@ -194,7 +194,7 @@ class Config:
|
|||
'key_up_lines': [opt_int, 25, _('How many lines to store for Ctrl+KeyUP.')],
|
||||
'version': [ opt_str, defs.version ], # which version created the config
|
||||
'search_engine': [opt_str, 'https://www.google.com/search?&q=%s&sourceid=gajim'],
|
||||
'dictionary_url': [opt_str, 'WIKTIONARY', _("Either custom url with %s in it where %s is the word/phrase or 'WIKTIONARY' which means use wiktionary.")],
|
||||
'dictionary_url': [opt_str, 'WIKTIONARY', _("Either custom url with %%s in it where %%s is the word/phrase or 'WIKTIONARY' which means use wiktionary.")],
|
||||
'always_english_wikipedia': [opt_bool, False],
|
||||
'always_english_wiktionary': [opt_bool, True],
|
||||
'remote_control': [opt_bool, False, _('If checked, Gajim can be controlled remotely using gajim-remote.'), True],
|
||||
|
|
|
@ -2078,8 +2078,9 @@ class Connection(CommonConnection, ConnectionHandlers):
|
|||
return
|
||||
if type_ == 'message':
|
||||
if len(contacts) == 1:
|
||||
msg = _('Sent contact: "%s" (%s)') % (contacts[0].get_full_jid(),
|
||||
contacts[0].get_shown_name())
|
||||
msg = _('Sent contact: "%(jid)s" (%(name)s)') % {
|
||||
'jid': contacts[0].get_full_jid(),
|
||||
'name': contacts[0].get_shown_name()}
|
||||
else:
|
||||
msg = _('Sent contacts:')
|
||||
for contact in contacts:
|
||||
|
|
|
@ -121,8 +121,10 @@ class JingleRTPContent(JingleContent):
|
|||
InformationEvent(
|
||||
None, conn=self.session.connection, level='error',
|
||||
pri_txt=_('%s configuration error') % text.capitalize(),
|
||||
sec_txt=_('Couldn’t setup %s. Check your configuration.\n\n'
|
||||
'Pipeline was:\n%s\n\nError was:\n%s') % (text, pipeline, str(e))))
|
||||
sec_txt=_('Couldn’t setup %(text)s. Check your '
|
||||
'configuration.\n\nPipeline was:\n%(pipeline)s\n\n'
|
||||
'Error was:\n%(error)s') % {'text': text,
|
||||
'pipeline': pipeline, 'error': str(e)}))
|
||||
raise JingleContentSetupException
|
||||
|
||||
def add_remote_candidates(self, candidates):
|
||||
|
@ -228,9 +230,9 @@ class JingleRTPContent(JingleContent):
|
|||
InformationEvent(
|
||||
None, conn=self.session.connection, level='error',
|
||||
pri_txt=_('GStreamer error'),
|
||||
sec_txt=_('Error: %s\nDebug: %s' %
|
||||
(message.get_structure().get_value('gerror'),
|
||||
message.get_structure().get_value('debug')))))
|
||||
sec_txt=_('Error: %(error)s\nDebug: %(debug)s' % {
|
||||
'error': message.get_structure().get_value('gerror'),
|
||||
'debug': message.get_structure().get_value('debug')})))
|
||||
|
||||
sink_pad = self.p2psession.get_property('sink-pad')
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ class LibSecretPasswordStorage(PasswordStorage):
|
|||
def save_password(self, account_name, password, update=True):
|
||||
server = app.config.get_per('accounts', account_name, 'hostname')
|
||||
user = app.config.get_per('accounts', account_name, 'name')
|
||||
display_name = _('XMPP account %s@%s') % (user, server)
|
||||
display_name = _('XMPP account %s') % user + '@' + server
|
||||
attributes = {'user': user, 'server': server, 'protocol': 'xmpp'}
|
||||
return self.Secret.password_store_sync(self.GAJIM_SCHEMA, attributes,
|
||||
self.Secret.COLLECTION_DEFAULT, display_name, password or '', None)
|
||||
|
|
|
@ -2693,9 +2693,10 @@ class AccountCreationWizardWindow:
|
|||
'hostname': hostname, 'error': obj.ssl_msg})
|
||||
if obj.errnum in (18, 27):
|
||||
text = _('Add this certificate to the list of trusted '
|
||||
'certificates.\nSHA-1 fingerprint of the certificate:\n%s'
|
||||
'\nSHA-256 fingerprint of the certificate:\n%s') \
|
||||
% (obj.ssl_fingerprint_sha1, obj.ssl_fingerprint_sha256)
|
||||
'certificates.\nSHA-1 fingerprint of the certificate:\n'
|
||||
'%(sha1)s\nSHA-256 fingerprint of the certificate:\n'
|
||||
'%(sha256)s') % {'sha1': obj.ssl_fingerprint_sha1,
|
||||
'sha256': obj.ssl_fingerprint_sha256}
|
||||
self.xml.get_object('ssl_checkbutton').set_label(text)
|
||||
else:
|
||||
self.xml.get_object('ssl_checkbutton').set_no_show_all(True)
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="name">main</property>
|
||||
<property name="title" translatable="yes">page0</property>
|
||||
<property name="title">page0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
@ -894,7 +894,7 @@ class AddNewContactWindow:
|
|||
'group_comboboxentry', 'auto_authorize_checkbutton'):
|
||||
self.__dict__[w] = self.xml.get_object(w)
|
||||
if account and len(app.connections) >= 2:
|
||||
self.default_desc = _('Please fill in the data of the contact you want\n'
|
||||
self.default_desc = _('Please fill in the data of the contact you want '
|
||||
'to add to your account <b>%s</b>') % account
|
||||
else:
|
||||
self.default_desc = _('Please fill in the data of the contact you '
|
||||
|
@ -1276,7 +1276,8 @@ class AddNewContactWindow:
|
|||
if obj.stanza.getError():
|
||||
ErrorDialog(_('Error while adding transport contact'),
|
||||
_('This error occured while adding a contact for transport '
|
||||
'%s:\n\n%s') % (transport, obj.stanza.getErrorMsg()))
|
||||
'%(transport)s:\n\n%(error)s') % {'transport': transport,
|
||||
'error': obj.stanza.getErrorMsg()})
|
||||
return
|
||||
if obj.prompt_jid:
|
||||
self._add_jid(obj.prompt_jid, type_)
|
||||
|
@ -2636,9 +2637,10 @@ class JoinGroupchatWindow:
|
|||
if app.contacts.get_contact(self.account, room_jid) and \
|
||||
not app.contacts.get_contact(self.account, room_jid).is_groupchat():
|
||||
ErrorDialog(_('This is not a group chat'),
|
||||
_('%s is already in your roster. Please check if %s is a '
|
||||
'correct group chat name. If it is, delete it from your roster '
|
||||
'and try joining the group chat again.') % (room_jid, room_jid))
|
||||
_('%(room_jid)s is already in your roster. Please check if '
|
||||
'%(room_jid)s is a correct group chat name. If it is, delete '
|
||||
'it from your roster and try joining the group chat again.') % \
|
||||
{'room_jid': room_jid, 'room_jid': room_jid})
|
||||
return
|
||||
|
||||
full_jid = room_jid + '/' + nickname
|
||||
|
|
|
@ -1360,9 +1360,9 @@ class Interface:
|
|||
'server?') % {'error': obj.error_text}
|
||||
if obj.error_num in (18, 27):
|
||||
checktext1 = _('Add this certificate to the list of trusted '
|
||||
'certificates.\nSHA-1 fingerprint of the certificate:\n%s'
|
||||
'\nSHA256 fingerprint of the certificate:\n%s') % \
|
||||
(obj.fingerprint_sha1, obj.fingerprint_sha256)
|
||||
'certificates.\nSHA-1 fingerprint of the certificate:\n%(sha1)s'
|
||||
'\nSHA256 fingerprint of the certificate:\n%(sha256)s') % \
|
||||
{'sha1': obj.fingerprint_sha1, 'sha256': obj.fingerprint_sha256}
|
||||
else:
|
||||
checktext1 = ''
|
||||
checktext2 = _('Ignore this error for this certificate.')
|
||||
|
@ -1967,9 +1967,10 @@ class Interface:
|
|||
if app.contacts.get_contact(account, room_jid) and \
|
||||
not app.contacts.get_contact(account, room_jid).is_groupchat():
|
||||
dialogs.ErrorDialog(_('This is not a group chat'),
|
||||
_('%s is already in your roster. Please check if %s is a '
|
||||
'correct group chat name. If it is, delete it from your roster '
|
||||
'and try joining the group chat again.') % (room_jid, room_jid))
|
||||
_('%(room_jid)s is already in your roster. Please check '
|
||||
'if %(room_jid)s is a correct group chat name. If it is, '
|
||||
'delete it from your roster and try joining the group chat '
|
||||
'again.') % {'room_jid': room_jid, 'room_jid': room_jid})
|
||||
return
|
||||
|
||||
if not nick:
|
||||
|
|
|
@ -283,7 +283,8 @@ class DownloadHistoryPage(Gtk.Box):
|
|||
self.received += 1
|
||||
if self.count:
|
||||
self.progress.set_fraction(self.received / self.count)
|
||||
self.progress.set_text(_('%s of %s' % (self.received, self.count)))
|
||||
self.progress.set_text(_('%(received)s of %(max)s' % {
|
||||
'received': self.received, 'max': self.count}))
|
||||
else:
|
||||
self.progress.pulse()
|
||||
self.progress.set_text(_('Downloaded %s Messages' % self.received))
|
||||
|
|
|
@ -4642,8 +4642,8 @@ class RosterWindow:
|
|||
# c_dest is None if jid_dest doesn't belong to account
|
||||
return
|
||||
menu = Gtk.Menu()
|
||||
item = Gtk.MenuItem.new_with_label(_('Send %s to %s') % (
|
||||
c_source.get_shown_name(), c_dest.get_shown_name()))
|
||||
item = Gtk.MenuItem.new_with_label(_('Send %(from)s to %(to)s') % {
|
||||
'from': c_source.get_shown_name(), 'to': c_dest.get_shown_name()})
|
||||
item.set_use_underline(False)
|
||||
item.connect('activate', self.on_drop_rosterx, account_source,
|
||||
c_source, account_dest, c_dest, is_big_brother, context, etime)
|
||||
|
@ -4660,8 +4660,8 @@ class RosterWindow:
|
|||
item.set_use_underline(False)
|
||||
else:
|
||||
item = Gtk.MenuItem.new_with_label(
|
||||
_('Make %s and %s metacontacts') % (
|
||||
c_source.get_shown_name(), c_dest.get_shown_name()))
|
||||
_('Make %(contact1)s and %(contact2)s metacontacts') % {
|
||||
'contact1': c_source.get_shown_name(), 'contact2': c_dest.get_shown_name()})
|
||||
item.set_use_underline(False)
|
||||
|
||||
item.connect('activate', self.on_drop_in_contact, account_source,
|
||||
|
|
|
@ -57,7 +57,7 @@ for mod in modules:
|
|||
suite = unittest.defaultTestLoader.loadTestsFromName(mod)
|
||||
result = unittest.TextTestRunner(verbosity=verbose).run(suite)
|
||||
if use_x:
|
||||
# Wait 1s to be sure all timeout_add will be called before we cleanup main loop
|
||||
# Wait 500ms to be sure all timeout_add will be called before we cleanup main loop
|
||||
import time
|
||||
time.sleep(0.5)
|
||||
# Clean main loop
|
||||
|
|
Loading…
Reference in New Issue