forked from openlp/openlp
Fix issues with other merges
This commit is contained in:
commit
5e38d34997
@ -43,14 +43,13 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
||||
def __init__(self, *args):
|
||||
QtGui.QPlainTextEdit.__init__(self, *args)
|
||||
# Default dictionary based on the current locale.
|
||||
self.enchant_available = enchant_available
|
||||
if self.enchant_available:
|
||||
if enchant_available:
|
||||
try:
|
||||
self.dict = enchant.Dict()
|
||||
self.highlighter = Highlighter(self.document())
|
||||
self.highlighter.setDict(self.dict)
|
||||
except DictNotFoundError:
|
||||
self.enchant_available = False
|
||||
self.dict = enchant.Dict(u'en_US')
|
||||
self.highlighter = Highlighter(self.document())
|
||||
self.highlighter.setDict(self.dict)
|
||||
|
||||
def mousePressEvent(self, event):
|
||||
if event.button() == QtCore.Qt.RightButton:
|
||||
@ -71,7 +70,7 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
||||
self.setTextCursor(cursor)
|
||||
# Check if the selected word is misspelled and offer spelling
|
||||
# suggestions if it is.
|
||||
if self.enchant_available and self.textCursor().hasSelection():
|
||||
if enchant_available and self.textCursor().hasSelection():
|
||||
text = unicode(self.textCursor().selectedText())
|
||||
if not self.dict.check(text):
|
||||
spell_menu = QtGui.QMenu(translate('OpenLP.SpellTextEdit',
|
||||
|
@ -107,7 +107,9 @@ class LanguageManager(object):
|
||||
``action``
|
||||
The language menu option
|
||||
"""
|
||||
if action:
|
||||
if action is None:
|
||||
action_name = u'en'
|
||||
else:
|
||||
action_name = u'%s' % action.objectName()
|
||||
qm_list = LanguageManager.get_qm_list()
|
||||
if LanguageManager.auto_language:
|
||||
|
@ -290,6 +290,9 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
def setDefaults(self):
|
||||
settings = QtCore.QSettings()
|
||||
settings.beginGroup(self.bibleplugin.settingsSection)
|
||||
self.restart()
|
||||
self.finishButton.setVisible(False)
|
||||
self.cancelButton.setVisible(True)
|
||||
self.setField(u'source_format', QtCore.QVariant(0))
|
||||
self.setField(u'osis_location', QtCore.QVariant(''))
|
||||
self.setField(u'csv_booksfile', QtCore.QVariant(''))
|
||||
|
@ -361,6 +361,8 @@ class ImportWizardForm(QtGui.QWizard, Ui_SongImportWizard):
|
||||
|
||||
def setDefaults(self):
|
||||
self.restart()
|
||||
self.finishButton.setVisible(False)
|
||||
self.cancelButton.setVisible(True)
|
||||
self.formatComboBox.setCurrentIndex(0)
|
||||
self.openLP2FilenameEdit.setText(u'')
|
||||
self.openLP1FilenameEdit.setText(u'')
|
||||
|
1379
resources/i18n/af.ts
1379
resources/i18n/af.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3921
resources/i18n/et.ts
3921
resources/i18n/et.ts
File diff suppressed because it is too large
Load Diff
2080
resources/i18n/hu.ts
2080
resources/i18n/hu.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -52,6 +52,7 @@ This is done easily via the ``-d``, ``-p`` and ``-u`` options::
|
||||
import os
|
||||
import urllib
|
||||
import re
|
||||
from shutil import copy
|
||||
|
||||
from optparse import OptionParser
|
||||
from PyQt4 import QtCore
|
||||
@ -227,6 +228,7 @@ def update_translations():
|
||||
else:
|
||||
os.chdir(os.path.abspath(u'..'))
|
||||
run(u'pylupdate4 -verbose -noobsolete openlp.pro')
|
||||
os.chdir(os.path.abspath(u'scripts'))
|
||||
|
||||
def generate_binaries():
|
||||
print u'Generate the related *.qm files'
|
||||
@ -239,6 +241,17 @@ def generate_binaries():
|
||||
else:
|
||||
os.chdir(os.path.abspath(u'..'))
|
||||
run(u'lrelease openlp.pro')
|
||||
os.chdir(os.path.abspath(u'scripts'))
|
||||
src_path = os.path.join(os.path.abspath(u'..'), u'resources', u'i18n')
|
||||
dest_path = os.path.join(os.path.abspath(u'..'), u'openlp', u'i18n')
|
||||
if not os.path.exists(dest_path):
|
||||
os.makedirs(dest_path)
|
||||
src_list = os.listdir(src_path)
|
||||
for file in src_list:
|
||||
if re.search('.qm$', file):
|
||||
copy(os.path.join(src_path, u'%s' % file),
|
||||
os.path.join(dest_path, u'%s' % file))
|
||||
|
||||
|
||||
def create_translation(language):
|
||||
"""
|
||||
@ -330,4 +343,3 @@ if __name__ == u'__main__':
|
||||
print u'You need to run this script from the scripts directory.'
|
||||
else:
|
||||
main()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user