From e0664a1e8864e96e2c7805ddc2c168f7b30ff4e8 Mon Sep 17 00:00:00 2001 From: rimach Date: Tue, 11 May 2010 21:00:21 +0200 Subject: [PATCH] bugfixing for i18n --- openlp/core/ui/mainwindow.py | 29 ++-- resources/i18n/openlp_en.ts | 272 ++++++++++++++++++----------------- 2 files changed, 154 insertions(+), 147 deletions(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index de8da9b66..4432eb9c0 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -260,15 +260,14 @@ class Ui_MainWindow(object): qmList = LanguageManager.get_qm_list() savedLanguage = LanguageManager.get_language() self.AutoLanguageItem.setChecked(LanguageManager.AutoLanguage) - self.LanguageItem = {} - for key in qmList.keys(): - self.LanguageItem[key] = QtGui.QAction(MainWindow) - self.LanguageItem[key].setObjectName(key) - self.LanguageItem[key].setCheckable(True) - self.LanguageItem[key].setDisabled(LanguageManager.AutoLanguage) + for key in sorted(qmList.keys()): + languageItem = QtGui.QAction(MainWindow) + languageItem.setObjectName(key) + languageItem.setCheckable(True) if qmList[key] == savedLanguage: - self.LanguageItem[key].setChecked(True) - add_actions(self.LanguageGroup, [self.LanguageItem[key]]) + languageItem.setChecked(True) + add_actions(self.LanguageGroup, [languageItem]) + self.LanguageGroup.setDisabled(LanguageManager.AutoLanguage) self.ToolsAddToolItem = QtGui.QAction(MainWindow) AddToolIcon = build_icon(u':/tools/tools_add.png') self.ToolsAddToolItem.setIcon(AddToolIcon) @@ -296,8 +295,7 @@ class Ui_MainWindow(object): self.ViewThemeManagerItem, None, self.action_Preview_Panel)) #i18n add Language Actions add_actions(self.OptionsLanguageMenu, (self.AutoLanguageItem, None)) - for item in sorted(self.LanguageItem): - add_actions(self.OptionsLanguageMenu, [self.LanguageItem[item]]) + add_actions(self.OptionsLanguageMenu, self.LanguageGroup.actions()) add_actions(self.OptionsMenu, (self.OptionsLanguageMenu.menuAction(), self.OptionsViewMenu.menuAction(), None, self.OptionsSettingsItem)) add_actions(self.ToolsMenu, @@ -417,10 +415,10 @@ class Ui_MainWindow(object): self.AutoLanguageItem.setText(translate('MainWindow', '&Auto Detect')) self.AutoLanguageItem.setStatusTip( translate('MainWindow', 'Choose System language, if available')) - for item in self.LanguageItem: - self.LanguageItem[item].setText(self.LanguageItem[item].objectName()) - self.LanguageItem[item].setStatusTip( - translate('MainWindow', 'Set the interface language to %1').arg(self.LanguageItem[item].objectName())) + for item in self.LanguageGroup.actions(): + item.setText(item.objectName()) + item.setStatusTip( + translate('MainWindow', 'Set the interface language to %1').arg(item.objectName())) self.ToolsAddToolItem.setText(translate('MainWindow', 'Add &Tool...')) self.ToolsAddToolItem.setStatusTip( translate('MainWindow', 'Add an application to the list of tools')) @@ -575,8 +573,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): #i18n def setAutoLanguage(self, value): - for action in self.LanguageGroup.actions(): - action.setDisabled(value) + self.LanguageGroup.setDisabled(value) LanguageManager.AutoLanguage = value LanguageManager.set_language(self.LanguageGroup.checkedAction()) diff --git a/resources/i18n/openlp_en.ts b/resources/i18n/openlp_en.ts index 41a956423..c3cb8a595 100644 --- a/resources/i18n/openlp_en.ts +++ b/resources/i18n/openlp_en.ts @@ -705,12 +705,12 @@ This General Public License does not permit incorporating your program into prop - + Bible not fully loaded - + No matching book could be found in this Bible. @@ -755,7 +755,7 @@ This General Public License does not permit incorporating your program into prop - + No Book Found @@ -1683,12 +1683,12 @@ Changes don't affect verses already in the service LanguageManager - + Language - + After restart new Language settings will be used. @@ -1696,379 +1696,379 @@ Changes don't affect verses already in the service MainWindow - + The Main Display has been blanked out - + OpenLP Version Updated - + Save Changes to Service? - + OpenLP Main Display Blanked - + New Service - + Open Service - + Save Service - + OpenLP 2.0 - + English - + Default Theme: - + &File - + &Import - + &Export - + &Options - + &View - + M&ode - + &Tools - + &Help - + Media Manager - + Service Manager - + Theme Manager - + &New - + Create a new Service - + Ctrl+N - + &Open - + Open an existing service - + Ctrl+O - + &Save - + Save the current service to disk - + Ctrl+S - + Save &As... - + Save Service As - + Save the current service under a new name - + F12 - + E&xit - + Quit OpenLP - + Alt+F4 - + &Theme - + &Language - + Look && &Feel - + &Settings - + &Media Manager - + Toggle Media Manager - + Toggle the visibility of the Media Manager - + F8 - + &Theme Manager - + Toggle Theme Manager - + Toggle the visibility of the Theme Manager - + F10 - + &Service Manager - + Toggle Service Manager - + Toggle the visibility of the Service Manager - + F9 - + &Preview Panel - + Toggle Preview Panel - + Toggle the visibility of the Preview Panel - + F11 - + &Plugin List - + List the Plugins - + Alt+F7 - + &User Guide - + &About - + More information about OpenLP - + Ctrl+F1 - + &Online Help - + &Web Site - + &Auto Detect - + Choose System language, if available - + Set the interface language to %1 - + Add &Tool... - + Add an application to the list of tools - + &Preview Pane - + &Live - + Version %s of OpenLP is now available for download (you are currently running version %s). You can download the latest version from http://openlp.org - + Your service has changed. Do you want to save those changes? @@ -2217,7 +2217,7 @@ You can download the latest version from http://openlp.org MediaPlugin - + <b>Media Plugin</b><br>This plugin allows the playing of audio and video media @@ -2533,7 +2533,7 @@ You can download the latest version from http://openlp.org - + Present using: @@ -2543,7 +2543,7 @@ You can download the latest version from http://openlp.org - + A presentation with that filename already exists. @@ -2553,12 +2553,12 @@ You can download the latest version from http://openlp.org - + File exists - + Presentations (%s) @@ -2636,140 +2636,150 @@ You can download the latest version from http://openlp.org ServiceManager - + Save Changes to Service? - + Open Service - + Move to top - + Create a new service - + Save this service - + Theme: - + Delete From Service - + Save Service - + &Live Verse - + Move to &top - + New Service - + &Notes - + Move to end - + &Delete From Service - + Move up order - + Move down order - + Move &down - + Load an existing service - + &Preview Verse - + Move &up - + &Edit Item - + Move to &bottom - + &Maintain Item - + Your service is unsaved, do you want to save those changes before creating a new one? - + Your current service is unsaved, do you want to save the changes before opening a new one? - + &Add New Item - + &Add to Selected Item + + + Missing Display Handler + + + + + Your item cannot be displayed as there is no handler to display it + + ServiceNoteForm @@ -2790,97 +2800,97 @@ You can download the latest version from http://openlp.org SlideController - + Move to previous - + Go to Verse - + Start continuous loop - + Live - + Start playing media - + Move to live - + Preview - + Move to last - + Edit and re-preview Song - + Delay between slides in seconds - + Move to next - + Move to first - + Blank Screen - + Verse - + Stop continuous loop - + s - + Theme Screen - + Hide Screen - + Chorus