From 83f9e32fd65ec44a55ace0c411921eea59ba908d Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Sat, 2 May 2015 04:29:41 -0400 Subject: [PATCH 1/4] Corrected word choice. --- src/gtkUI/commonMessageDialogs.py | 2 +- src/wxUI/commonMessageDialogs.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtkUI/commonMessageDialogs.py b/src/gtkUI/commonMessageDialogs.py index 4d095900..36af9727 100644 --- a/src/gtkUI/commonMessageDialogs.py +++ b/src/gtkUI/commonMessageDialogs.py @@ -10,7 +10,7 @@ def retweet_question(parent): def delete_tweet_dialog(parent): dialog = Gtk.MessageDialog(None, 0, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, _(u"Delete")) - dialog.format_secondary_text(_(u"Do you really want to delete this message? It will be eliminated from Twitter as well.")) + dialog.format_secondary_text(_(u"Do you really want to delete this message? It will be deleted from Twitter as well.")) answer = dialog.run() dialog.destroy() return answer diff --git a/src/wxUI/commonMessageDialogs.py b/src/wxUI/commonMessageDialogs.py index c74bf88e..89a07259 100644 --- a/src/wxUI/commonMessageDialogs.py +++ b/src/wxUI/commonMessageDialogs.py @@ -5,7 +5,7 @@ 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() def delete_tweet_dialog(parent): - return wx.MessageDialog(parent, _(u"Do you really want to delete this message? It will be eliminated from Twitter as well."), _(u"Delete"), wx.ICON_QUESTION|wx.YES_NO).ShowModal() + return wx.MessageDialog(parent, _(u"Do you really want to delete this message? It will be deleted from Twitter as well."), _(u"Delete"), wx.ICON_QUESTION|wx.YES_NO).ShowModal() def exit_dialog(parent): dlg = wx.MessageDialog(parent, _(u"Do you really want to close " + application.name + "?"), _(u"Exit"), wx.YES_NO|wx.ICON_QUESTION) From 3e8e2312f2e8d4aa6a92bb7589aa2f091f16c0a6 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Sat, 2 May 2015 18:09:28 -0400 Subject: [PATCH 2/4] Improved the tweet dialogs. --- src/gtkUI/dialogs/message.py | 8 ++++---- src/wxUI/dialogs/message.py | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gtkUI/dialogs/message.py b/src/gtkUI/dialogs/message.py index 18500043..5ed9f797 100644 --- a/src/gtkUI/dialogs/message.py +++ b/src/gtkUI/dialogs/message.py @@ -67,16 +67,16 @@ class tweet(textLimited): def createControls(self, title, message, text): self.createTextArea(message, text) self.box.add(self.textBox) - self.upload_image = Gtk.Button(_(u"Upload a picture")) - self.spellcheck = Gtk.Button(_("Spelling correction")) - self.attach = Gtk.Button(_(u"Attach audio")) + self.upload_image = Gtk.Button(_(u"Upload image...")) + self.spellcheck = Gtk.Button(_("Check spelling...")) + self.attach = Gtk.Button(_(u"Attach audio...")) self.shortenButton = Gtk.Button(_(u"Shorten URL")) self.unshortenButton = Gtk.Button(_(u"Expand URL")) self.shortenButton.hide() self.shortenButton.set_no_show_all(True) self.unshortenButton.hide() self.unshortenButton.set_no_show_all(True) - self.translateButton = Gtk.Button(_(u"Translate message")) + self.translateButton = Gtk.Button(_(u"Translate...")) self.autocompletionButton = Gtk.Button(_(u"&Autocomplete users")) self.buttonsBox1 = Gtk.Box(spacing=6) self.buttonsBox1.add(self.upload_image) diff --git a/src/wxUI/dialogs/message.py b/src/wxUI/dialogs/message.py index fc79b94e..a489bf22 100644 --- a/src/wxUI/dialogs/message.py +++ b/src/wxUI/dialogs/message.py @@ -10,7 +10,7 @@ class textLimited(widgetUtils.BaseDialog): self.panel = wx.Panel(self) self.label = wx.StaticText(self.panel, -1, message) self.SetTitle(str(len(text))) - self.text = wx.TextCtrl(self.panel, -1, text, size=(439, -1), style=wx.TE_MULTILINE) + self.text = wx.TextCtrl(self.panel, -1, text, size=(439, -1)) # font = self.text.GetFont() # dc = wx.WindowDC(self.text) # dc.SetFont(font) @@ -61,14 +61,14 @@ class tweet(textLimited): self.mainBox = wx.BoxSizer(wx.VERTICAL) self.createTextArea(message, text) self.mainBox.Add(self.textBox, 0, wx.ALL, 5) - self.upload_image = wx.Button(self.panel, -1, _(u"Upload a picture"), size=wx.DefaultSize) - self.spellcheck = wx.Button(self.panel, -1, _("Spelling correction"), size=wx.DefaultSize) - self.attach = wx.Button(self.panel, -1, _(u"Attach audio"), size=wx.DefaultSize) + self.upload_image = wx.Button(self.panel, -1, _(u"Upload image..."), size=wx.DefaultSize) + self.spellcheck = wx.Button(self.panel, -1, _("Check spelling..."), size=wx.DefaultSize) + self.attach = wx.Button(self.panel, -1, _(u"Attach audio..."), size=wx.DefaultSize) self.shortenButton = wx.Button(self.panel, -1, _(u"Shorten URL"), size=wx.DefaultSize) self.unshortenButton = wx.Button(self.panel, -1, _(u"Expand URL"), size=wx.DefaultSize) self.shortenButton.Disable() self.unshortenButton.Disable() - self.translateButton = wx.Button(self.panel, -1, _(u"Translate message"), size=wx.DefaultSize) + self.translateButton = wx.Button(self.panel, -1, _(u"Translate..."), size=wx.DefaultSize) self.autocompletionButton = wx.Button(self.panel, -1, _(u"&Autocomplete users")) self.okButton = wx.Button(self.panel, wx.ID_OK, _(u"Send"), size=wx.DefaultSize) self.okButton.SetDefault() From 036edb6c28c2832e6e44ddec1694b449a35629b3 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Sat, 2 May 2015 18:17:40 -0400 Subject: [PATCH 3/4] Cleanup, generalize spell checker. --- src/extra/SpellChecker/spellchecker.py | 2 +- src/extra/SpellChecker/wx_ui.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/extra/SpellChecker/spellchecker.py b/src/extra/SpellChecker/spellchecker.py index 908a648e..60885691 100644 --- a/src/extra/SpellChecker/spellchecker.py +++ b/src/extra/SpellChecker/spellchecker.py @@ -42,7 +42,7 @@ class spellChecker(object): def check(self): try: self.checker.next() - textToSay = _(u"Mis-spelled word: %s") % (self.checker.word,) + textToSay = _(u"Misspelled word: %s") % (self.checker.word,) context = u"... %s %s %s" % (self.checker.leading_context(10), self.checker.word, self.checker.trailing_context(10)) self.dialog.set_title(textToSay) output.speak(textToSay) diff --git a/src/extra/SpellChecker/wx_ui.py b/src/extra/SpellChecker/wx_ui.py index 913a3d11..05133e52 100644 --- a/src/extra/SpellChecker/wx_ui.py +++ b/src/extra/SpellChecker/wx_ui.py @@ -17,13 +17,13 @@ # ############################################################ import wx - +import application class spellCheckerDialog(wx.Dialog): def __init__(self): super(spellCheckerDialog, self).__init__(None, 1) panel = wx.Panel(self) sizer = wx.BoxSizer(wx.VERTICAL) - word = wx.StaticText(panel, -1, _(u"Mis-spelled word")) + word = wx.StaticText(panel, -1, _(u"Misspelled word")) self.word = wx.TextCtrl(panel, -1) wordBox = wx.BoxSizer(wx.HORIZONTAL) wordBox.Add(word, 0, wx.ALL, 5) @@ -73,7 +73,7 @@ class spellCheckerDialog(wx.Dialog): return self.suggestions.GetStringSelection() def dict_not_found_error(): - wx.MessageDialog(None, _(u"A bug has happened. There are no dictionaries available for the selected language in TW Blue"), _(u"Error"), wx.ICON_ERROR).ShowModal() + 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() def finished(): - wx.MessageDialog(None, _(u"The spelling review has finished."), _("Finished"), style=wx.OK).ShowModal() + wx.MessageDialog(None, _(u"Spell check complete."), _(application.name), style=wx.OK).ShowModal() From 0f6b3491f8e38dc3ce28d1ef722861ff05d30248 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Sat, 2 May 2015 18:22:23 -0400 Subject: [PATCH 4/4] Generalization. --- src/wxUI/commonMessageDialogs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wxUI/commonMessageDialogs.py b/src/wxUI/commonMessageDialogs.py index 89a07259..587cee33 100644 --- a/src/wxUI/commonMessageDialogs.py +++ b/src/wxUI/commonMessageDialogs.py @@ -12,7 +12,7 @@ def exit_dialog(parent): return dlg.ShowModal() def needs_restart(): - wx.MessageDialog(None, _(u"The application requires to be restarted to save these changes. Press OK to do it now."), _("Restart TW Blue"), wx.OK).ShowModal() + wx.MessageDialog(None, _(unicode(application.name) + u" must be restarted for these changes to take effect."), _("Restart " + 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()