mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Fixed lots of strings for translatable text
This commit is contained in:
parent
920c1cf863
commit
bb0227f3b8
@ -319,14 +319,14 @@ class Controller(object):
|
||||
for i in session.settings["other_buffers"]["timelines"]:
|
||||
tl = buffersController.baseBufferController(self.view.nb, "get_user_timeline", "%s-timeline" % (i,), session, session.db["user_name"], bufferType=None, screen_name=i)
|
||||
self.buffers.append(tl)
|
||||
self.view.insert_buffer(tl.buffer, name=_(u"Timeline for {}".format(i)), pos=self.view.search("timelines", session.db["user_name"]))
|
||||
self.view.insert_buffer(tl.buffer, name=_(u"Timeline for {}").format(i,), pos=self.view.search("timelines", session.db["user_name"]))
|
||||
favs_timelines = buffersController.emptyPanel(self.view.nb, "favs_timelines", session.db["user_name"])
|
||||
self.buffers.append(favs_timelines)
|
||||
self.view.insert_buffer(favs_timelines.buffer , name=_(u"Favourites timelines"), pos=self.view.search(session.db["user_name"], session.db["user_name"]))
|
||||
for i in session.settings["other_buffers"]["favourites_timelines"]:
|
||||
tl = buffersController.baseBufferController(self.view.nb, "get_favorites", "%s-favorite" % (i,), session, session.db["user_name"], bufferType=None, screen_name=i)
|
||||
self.buffers.append(tl)
|
||||
self.view.insert_buffer(tl.buffer, name=_(u"Favourites timeline for {}".format(i)), pos=self.view.search("favs_timelines", session.db["user_name"]))
|
||||
self.view.insert_buffer(tl.buffer, name=_(u"Favourites timeline for {}").format(i,), pos=self.view.search("favs_timelines", session.db["user_name"]))
|
||||
tl.timer = RepeatingTimer(300, tl.start_stream)
|
||||
tl.timer.start()
|
||||
lists = buffersController.emptyPanel(self.view.nb, "lists", session.db["user_name"])
|
||||
@ -343,7 +343,7 @@ class Controller(object):
|
||||
for i in session.settings["other_buffers"]["tweet_searches"]:
|
||||
tl = buffersController.searchBufferController(self.view.nb, "search", "%s-searchterm" % (i,), session, session.db["user_name"], bufferType="searchPanel", q=i, count=session.settings["general"]["max_tweets_per_call"])
|
||||
self.buffers.append(tl)
|
||||
self.view.insert_buffer(tl.buffer, name=_(u"Search for {}".format(i)), pos=self.view.search("searches", session.db["user_name"]))
|
||||
self.view.insert_buffer(tl.buffer, name=_(u"Search for {}").format(i), pos=self.view.search("searches", session.db["user_name"]))
|
||||
tl.timer = RepeatingTimer(180, tl.start_stream)
|
||||
tl.timer.start()
|
||||
for i in session.settings["other_buffers"]["trending_topic_buffers"]:
|
||||
@ -413,7 +413,7 @@ class Controller(object):
|
||||
search = buffersController.searchPeopleBufferController(self.view.nb, "search_users", "%s-searchUser" % (term,), buffer.session, buffer.session.db["user_name"], bufferType=None, q=term)
|
||||
self.buffers.append(search)
|
||||
search.start_stream()
|
||||
self.view.insert_buffer(search.buffer, name=_(u"Search for {}".format(term)), pos=self.view.search("searches", buffer.session.db["user_name"]))
|
||||
self.view.insert_buffer(search.buffer, name=_(u"Search for {}").format(term), pos=self.view.search("searches", buffer.session.db["user_name"]))
|
||||
search.timer = RepeatingTimer(180, search.start_stream)
|
||||
search.timer.start()
|
||||
dlg.Destroy()
|
||||
@ -443,7 +443,7 @@ class Controller(object):
|
||||
page.buffer.list.select_item(i)
|
||||
if string.lower() in page.get_message().lower():
|
||||
return output.speak(page.get_message(), True)
|
||||
output.speak(unicode(string)+unicode(" ")+_(u"not found."), True)
|
||||
output.speak(_(u"{0} not found.").format(string,), True)
|
||||
page.buffer.list.select_item(start)
|
||||
def edit_keystrokes(self, *args, **kwargs):
|
||||
editor = keystrokeEditor.KeystrokeEditor()
|
||||
@ -719,7 +719,7 @@ class Controller(object):
|
||||
tl = buffersController.baseBufferController(self.view.nb, "get_user_timeline", "%s-timeline" % (dlg.get_user(),), buffer.session, buffer.session.db["user_name"], bufferType=None, screen_name=dlg.get_user())
|
||||
tl.start_stream()
|
||||
self.buffers.append(tl)
|
||||
self.view.insert_buffer(tl.buffer, name=_(u"Timeline for {}".format(dlg.get_user())), pos=self.view.search("timelines", buffer.session.db["user_name"]))
|
||||
self.view.insert_buffer(tl.buffer, name=_(u"Timeline for {}").format(dlg.get_user()), pos=self.view.search("timelines", buffer.session.db["user_name"]))
|
||||
buffer.session.settings["other_buffers"]["timelines"].append(dlg.get_user())
|
||||
pub.sendMessage("restart-streams", streams=["timelinesStream"], session=buffer.session)
|
||||
buffer.session.sound.play("create_timeline.ogg")
|
||||
@ -729,7 +729,7 @@ class Controller(object):
|
||||
return
|
||||
tl = buffersController.baseBufferController(self.view.nb, "get_favorites", "%s-favorite" % (dlg.get_user(),), buffer.session, buffer.session.db["user_name"], bufferType=None, screen_name=dlg.get_user())
|
||||
self.buffers.append(tl)
|
||||
self.view.insert_buffer(buffer=tl.buffer, name=_(u"Favourites timeline for {}".format(dlg.get_user())), pos=self.view.search("favs_timelines", buffer.session.db["user_name"]))
|
||||
self.view.insert_buffer(buffer=tl.buffer, name=_(u"Favourites timeline for {}").format(dlg.get_user()), pos=self.view.search("favs_timelines", buffer.session.db["user_name"]))
|
||||
tl.start_stream()
|
||||
tl.timer = RepeatingTimer(300, tl.start_stream)
|
||||
tl.timer.start()
|
||||
@ -746,7 +746,7 @@ class Controller(object):
|
||||
search.tweet = buffer.get_right_tweet()
|
||||
search.start_stream(start=True)
|
||||
self.buffers.append(search)
|
||||
self.view.insert_buffer(search.buffer, name=_(u"Conversation with {0}".format(user)), pos=self.view.search("searches", buffer.session.db["user_name"]))
|
||||
self.view.insert_buffer(search.buffer, name=_(u"Conversation with {0}").format(user), pos=self.view.search("searches", buffer.session.db["user_name"]))
|
||||
search.timer = RepeatingTimer(300, search.start_stream)
|
||||
search.timer.start()
|
||||
|
||||
|
@ -15,7 +15,7 @@ actions = reverse_sort.reverse_sort([ ("audio", _(u"Audio tweet.")),
|
||||
("max_length", _(u"Too many characters.")),
|
||||
("mention_received", _(u"Mention received.")),
|
||||
("new_event", _(u"New event.")),
|
||||
("ready", _(unicode(application.name+" is ready."))),
|
||||
("ready", _(u"{0} is ready.").format(application.name,)),
|
||||
("reply_send", _(u"Mention sent.")),
|
||||
("retweet_send", _(u"Tweet retweeted.")),
|
||||
("search_updated", _(u"Search buffer updated.")),
|
||||
|
@ -73,7 +73,7 @@ class spellCheckerDialog(wx.Dialog):
|
||||
return self.suggestions.GetStringSelection()
|
||||
|
||||
def dict_not_found_error():
|
||||
wx.MessageDialog(None, _(u"An error has occurred. There are no dictionaries available for the selected language in " + application.name), _(u"Error"), wx.ICON_ERROR).ShowModal()
|
||||
wx.MessageDialog(None, _(u"An error has occurred. There are no dictionaries available for the selected language in {0}").format(application.name,), _(u"Error"), wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def finished():
|
||||
wx.MessageDialog(None, _(u"Spell check complete."), _(application.name), style=wx.OK).ShowModal()
|
||||
wx.MessageDialog(None, _(u"Spell check complete."), application.name, style=wx.OK).ShowModal()
|
||||
|
@ -8,7 +8,7 @@ class autocompletionManageDialog(widgetUtils.BaseDialog):
|
||||
super(autocompletionManageDialog, self).__init__(parent=None, id=-1, title=_(u"Manage Autocompletion database"))
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
label = wx.StaticText(panel, -1, _(u"Editing " + application.name + " users database"))
|
||||
label = wx.StaticText(panel, -1, _(u"Editing {0} users database").format(application.name,))
|
||||
self.users = widgets.list(panel, _(u"Username"), _(u"Name"), style=wx.LC_REPORT)
|
||||
sizer.Add(label, 0, wx.ALL, 5)
|
||||
sizer.Add(self.users.list, 0, wx.ALL, 5)
|
||||
|
@ -24,4 +24,4 @@ class autocompletionSettingsDialog(widgetUtils.BaseDialog):
|
||||
self.SetClientSize(sizer.CalcMin())
|
||||
|
||||
def show_success_dialog():
|
||||
wx.MessageDialog(None, _(uapplication.name+"'s database of users has been updated."), _(u"Done"), wx.OK).ShowModal()
|
||||
wx.MessageDialog(None, _(u"{0}'s database of users has been updated.").format(application.name,), _(u"Done"), wx.OK).ShowModal()
|
@ -66,7 +66,7 @@ class reportBugDialog(widgetUtils.BaseDialog):
|
||||
severityB.Add(severityLabel, 0, wx.ALL, 5)
|
||||
severityB.Add(self.severity, 0, wx.ALL, 5)
|
||||
sizer.Add(severityB, 0, wx.ALL, 5)
|
||||
self.agree = wx.CheckBox(panel, -1, _(u"I know that the " + application.name + " bug system will get my Twitter username to contact me and fix the bug quickly"))
|
||||
self.agree = wx.CheckBox(panel, -1, _(u"I know that the {0} bug system will get my Twitter username to contact me and fix the bug quickly").format(application.name,))
|
||||
self.agree.SetValue(False)
|
||||
sizer.Add(self.agree, 0, wx.ALL, 5)
|
||||
self.ok = wx.Button(panel, wx.ID_OK, _(u"Send report"))
|
||||
|
@ -119,8 +119,8 @@ def compose_event(data, username):
|
||||
if data["source"]["screen_name"] == username: event = _(u"You've unsubscribed from the list %s, which is owned by %s(@%s)") % (data["target_object"]["name"], data["target"]["name"], data["target"]["screen_name"])
|
||||
else: event = _("You've been unsubscribed from the list %s, which is owned by %s(@%s)") % (data["target_object"]["name"], data["source"]["name"], data["source"]["screen_name"])
|
||||
elif data["event"] == "retweeted_retweet":
|
||||
if data["source"]["screen_name"] == username: event = _(u"You have retweeted a retweet from %s(@%s): %s" % (data["target"]["name"], data["target"]["screen_name"], data["target_object"]["text"]))
|
||||
else: event = _(u"%s(@%s) has retweeted your retweet: %s" % (data["source"]["name"], data["source"]["screen_name"], data["target_object"]["text"]))
|
||||
if data["source"]["screen_name"] == username: event = _(u"You have retweeted a retweet from %s(@%s): %s") % (data["target"]["name"], data["target"]["screen_name"], data["target_object"]["text"])
|
||||
else: event = _(u"%s(@%s) has retweeted your retweet: %s") % (data["source"]["name"], data["source"]["screen_name"], data["target_object"]["text"])
|
||||
else:
|
||||
event = _("Unknown")
|
||||
log.error("event: %s\n target: %s\n source: %s\n target_object: %s" % (data["event"], data["target"], data["source"], data["target_object"]))
|
||||
|
@ -1,5 +1,5 @@
|
||||
import platform
|
||||
if platform.system() == "Windows":
|
||||
from wxUtils import *
|
||||
elif platform.system() == "Linux":
|
||||
from gtkUtils import *
|
||||
#elif platform.system() == "Linux":
|
||||
# from gtkUtils import *
|
||||
|
@ -2,7 +2,7 @@
|
||||
import wx
|
||||
import application
|
||||
def retweet_as_link(parent):
|
||||
return wx.MessageDialog(parent, _(u"This retweet is over 140 characters. Would you like to post it as a mention to the poster with your comments and a link to the original tweet?"), _(application.name), wx.YES_NO|wx.ICON_QUESTION).ShowModal()
|
||||
return wx.MessageDialog(parent, _(u"This retweet is over 140 characters. Would you like to post it as a mention to the poster with your comments and a link to the original tweet?"), application.name, wx.YES_NO|wx.ICON_QUESTION).ShowModal()
|
||||
|
||||
def retweet_question(parent):
|
||||
return wx.MessageDialog(parent, _(u"Would you like to add a comment to this tweet?"), _("Retweet"), wx.YES_NO|wx.CANCEL|wx.ICON_QUESTION).ShowModal()
|
||||
@ -15,7 +15,7 @@ def exit_dialog(parent):
|
||||
return dlg.ShowModal()
|
||||
|
||||
def needs_restart():
|
||||
wx.MessageDialog(None, _(unicode(application.name) + u" must be restarted for these changes to take effect."), _("Restart " + application.name), wx.OK).ShowModal()
|
||||
wx.MessageDialog(None, _(u" {0} must be restarted for these changes to take effect.").format(application.name,), _("Restart {0} ").format(application.name,), wx.OK).ShowModal()
|
||||
|
||||
def delete_user_from_db():
|
||||
return wx.MessageDialog(None, _(u"Are you sure you want to delete this user from the database? This user will not appear on the autocomplete results anymore."), _(u"Confirm"), wx.YES_NO|wx.ICON_QUESTION).ShowModal()
|
||||
|
@ -269,7 +269,7 @@ class servicesPanel(wx.Panel):
|
||||
def __init__(self, parent):
|
||||
super(servicesPanel, self).__init__(parent)
|
||||
mainSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
apiKeyLabel = wx.StaticText(self, -1, _(u"If you have a SndUp account, enter your API Key here. If your API Key is invalid, " + application.name + " will fail to upload. If there is no API Key here, " + application.name + " will upload annonymously."))
|
||||
apiKeyLabel = wx.StaticText(self, -1, _(u"If you have a SndUp account, enter your API Key here. If your API Key is invalid, {0} will fail to upload. If there is no API Key here, {0} will upload annonymously.").format(application.name,))
|
||||
self.apiKey = wx.TextCtrl(self, -1)
|
||||
dc = wx.WindowDC(self.apiKey)
|
||||
dc.SetFont(self.apiKey.GetFont())
|
||||
@ -305,7 +305,7 @@ class configurationDialog(baseDialog.BaseWXDialog):
|
||||
def __init__(self):
|
||||
super(configurationDialog, self).__init__(None, -1)
|
||||
self.panel = wx.Panel(self)
|
||||
self.SetTitle(_(unicode(application.name + " preferences")))
|
||||
self.SetTitle(_(u"{0} preferences").format(application.name,))
|
||||
self.sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.notebook = wx.Notebook(self.panel)
|
||||
|
||||
|
@ -67,8 +67,8 @@ class mainFrame(wx.Frame):
|
||||
self.changelog.Enable(False)
|
||||
self.check_for_updates = help.Append(wx.NewId(), _(u"&Check for updates"))
|
||||
self.reportError = help.Append(wx.NewId(), _(u"&Report an error"))
|
||||
self.visit_website = help.Append(-1, _(unicode(application.name+"'s &website")))
|
||||
self.about = help.Append(-1, _(u"About &"+application.name))
|
||||
self.visit_website = help.Append(-1, _(u"{0}'s &website").format(application.name,))
|
||||
self.about = help.Append(-1, _(u"About &{0}").format(application.name,))
|
||||
|
||||
# Add all to the menu Bar
|
||||
menuBar.Append(app, _(u"&Application"))
|
||||
@ -179,4 +179,4 @@ class mainFrame(wx.Frame):
|
||||
getattr(self, menuitem).Check(check)
|
||||
|
||||
def no_update_available():
|
||||
wx.MessageDialog(None, _(u"Your {0} version is up to date").format(application.name,), _(u"Update"), style=wx.OK).ShowModal()
|
||||
wx.MessageDialog(None, _(u"Your {0} version is up to date").format(application.name,), _(u"Update"), style=wx.OK).ShowModal()
|
Loading…
Reference in New Issue
Block a user