diff --git a/src/commandline.py b/src/commandline.py index e11ace2c..e8fd9ad2 100644 --- a/src/commandline.py +++ b/src/commandline.py @@ -2,15 +2,16 @@ import argparse import paths import logging +import application log = logging.getLogger("commandlineLauncher") -parser = argparse.ArgumentParser(description="TW Blue command line launcher") +parser = argparse.ArgumentParser(description=application.name+" command line launcher") group = parser.add_mutually_exclusive_group() -group.add_argument("-p", "--portable", help="Use TW Blue as a portable application.", action="store_true", default=True) -group.add_argument("-i", "--installed", help="Use TW Blue as an installed application. Config files will be saved in the user data directory", action="store_true") -parser.add_argument("-d", "--data-directory", action="store", dest="directory", help="Specifies the directory where TW Blue saves userdata.") +group.add_argument("-p", "--portable", help="Use " + application.name + " as a portable application.", action="store_true", default=True) +group.add_argument("-i", "--installed", help="Use " + application.name + " as an installed application. Config files will be saved in the user data directory", action="store_true") +parser.add_argument("-d", "--data-directory", action="store", dest="directory", help="Specifies the directory where " + application.name + " saves userdata.") args = parser.parse_args() -log.debug("Starting TWBlue with the following arguments: installed = %s, portable = %s and directory = %s" % (args.installed, args.portable, args.directory)) +log.debug("Starting " + application.name + " with the following arguments: installed = %s, portable = %s and directory = %s" % (args.installed, args.portable, args.directory)) if args.installed == True: paths.mode = "installed" elif args.portable == True: paths.mode = "portable" diff --git a/src/extra/AudioUploader/dropbox_transfer.py b/src/extra/AudioUploader/dropbox_transfer.py index cc278a09..035db350 100644 --- a/src/extra/AudioUploader/dropbox_transfer.py +++ b/src/extra/AudioUploader/dropbox_transfer.py @@ -5,6 +5,7 @@ import os import exceptions import dropbox import logging +import application from keys import keyring from utils import * from dropbox.rest import ErrorResponse @@ -51,7 +52,7 @@ class dropboxLogin(object): return self.flow.start() def authorise(self, code): - log.debug("Authorising TWBlue in Dropbox...") + log.debug("Authorising " + application.name + " to Dropbox...") access_token, user_id = self.flow.finish(code) log.debug("Saving tokens...") self.config["services"]["dropbox_token"] = access_token @@ -64,7 +65,7 @@ class dropboxUploader(object): self.client = dropbox.client.DropboxClient(config["services"]["dropbox_token"]) else: log.error("Dropbox is not authorised for this session.") - raise UnauthorisedError("You need authorise TWBlue") + raise UnauthorisedError("You need to authorise " + application.name) self.filename = filename self.short_url = short_url self.file = open(self.filename, "rb") diff --git a/src/extra/autocompletionUsers/wx_settings.py b/src/extra/autocompletionUsers/wx_settings.py index bc9bd53f..036cd0c1 100644 --- a/src/extra/autocompletionUsers/wx_settings.py +++ b/src/extra/autocompletionUsers/wx_settings.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import wx import widgetUtils - +import application class autocompletionSettingsDialog(widgetUtils.BaseDialog): def __init__(self): super(autocompletionSettingsDialog, self).__init__(parent=None, id=-1, title=_(u"Autocomplete users’ settings")) @@ -23,4 +23,4 @@ class autocompletionSettingsDialog(widgetUtils.BaseDialog): self.SetClientSize(sizer.CalcMin()) def show_success_dialog(): - wx.MessageDialog(None, _(u"TWBlue's database of users has been updated."), _(u"Done"), wx.OK).ShowModal() \ No newline at end of file + wx.MessageDialog(None, _(uapplication.name+"'s database of users has been updated."), _(u"Done"), wx.OK).ShowModal() \ No newline at end of file diff --git a/src/gtkUI/dialogs/configuration.py b/src/gtkUI/dialogs/configuration.py index 905b4f43..3e5367d9 100644 --- a/src/gtkUI/dialogs/configuration.py +++ b/src/gtkUI/dialogs/configuration.py @@ -14,13 +14,13 @@ class general(wx.Panel, baseDialog.BaseWXDialog): langBox.Add(language, 0, wx.ALL, 5) langBox.Add(self.language, 0, wx.ALL, 5) sizer.Add(langBox, 0, wx.ALL, 5) - self.ask_at_exit = wx.CheckBox(self, -1, _(U"ask before exiting TwBlue?")) + self.ask_at_exit = wx.CheckBox(self, -1, _(U"ask before exiting " + application.name)) sizer.Add(self.ask_at_exit, 0, wx.ALL, 5) - self.use_invisible_shorcuts = wx.CheckBox(self, -1, _(u"Use invisible interface's keyboard shorcuts on the GUI")) + self.use_invisible_shorcuts = wx.CheckBox(self, -1, _(u"Use invisible interface's keyboard shortcuts while GUI is visible")) sizer.Add(self.use_invisible_shorcuts, 0, wx.ALL, 5) self.disable_sapi5 = wx.CheckBox(self, -1, _(u"Activate Sapi5 when any other screen reader is not being run")) sizer.Add(self.disable_sapi5, 0, wx.ALL, 5) - self.hide_gui = wx.CheckBox(self, -1, _(u"Activate the auto-start of the invisible interface")) + self.hide_gui = wx.CheckBox(self, -1, _(u"Hide GUI on launch")) sizer.Add(self.hide_gui, 0, wx.ALL, 5) self.SetSizer(sizer) diff --git a/src/gtkUI/view.py b/src/gtkUI/view.py index fd0c7e3a..98a05c1c 100644 --- a/src/gtkUI/view.py +++ b/src/gtkUI/view.py @@ -99,8 +99,8 @@ class mainFrame(Gtk.Window): self.changelog = Gtk.MenuItem(label="What's new in this version?") self.check_for_updates = Gtk.MenuItem(label="Check for updates") self.reportError = Gtk.MenuItem(label="Report an error") - self.visit_website = Gtk.MenuItem(label="TWBlue's website") - self.about = Gtk.MenuItem(label="ABout TWBlue") + self.visit_website = Gtk.MenuItem(label=application.name+"'s website") + self.about = Gtk.MenuItem(label="ABout "+application.name) self.append_to_menu(help, self.doc, self.sounds_tutorial, self.changelog, self.check_for_updates, self.reportError, self.visit_website, self.about) help_menu = Gtk.MenuItem(label="Help") help_menu.set_submenu(help) diff --git a/src/issueReporter/issueReporter.py b/src/issueReporter/issueReporter.py index 24c88d2e..10bfd25d 100644 --- a/src/issueReporter/issueReporter.py +++ b/src/issueReporter/issueReporter.py @@ -44,7 +44,7 @@ class reportBug(object): try: client = Client(application.report_bugs_url) issue = client.factory.create('IssueData') - issue.project.name = "TWBlue" + issue.project.name = application.name issue.project.id = 0 issue.summary = self.dialog.get("summary"), issue.description = "Reported by @%s\n\n" % (self.user_name) + self.dialog.get("description") diff --git a/src/main.py b/src/main.py index cdf9056e..5efbf7a9 100644 --- a/src/main.py +++ b/src/main.py @@ -49,7 +49,7 @@ if system == "Linux": log = logging.getLogger("main") def setup(): - log.debug("Starting TWBlue %s" % (application.version,)) + log.debug("Starting " + application.name + " %s" % (application.version,)) config.setup() log.debug("Using %s %s" % (platform.system(), platform.architecture()[0])) log.debug("Application path is %s" % (paths.app_path(),)) diff --git a/src/sound.py b/src/sound.py index 7709047d..1825dea5 100644 --- a/src/sound.py +++ b/src/sound.py @@ -12,7 +12,7 @@ import platform import output system = platform.system() from mysc.repeating_timer import RepeatingTimer - +import application URLPlayer = None def setup(): @@ -46,7 +46,7 @@ class soundSystem(object): self.path = paths.sound_path("default") self.soundpack_OK = True else: - log.error("Path for the current soundpack does not exist and the default soundpack is deleted, TWBlue will not play sounds.") + log.error("The current soundpack could not be found and the default soundpack has been deleted, " + application.name + " will not play sounds.") self.soundpack_OK = False def __init__(self, soundConfig):