openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #00874
[Merge] lp:~mgorven/openlp/get-strings into lp:openlp
Michael Gorven has proposed merging lp:~mgorven/openlp/get-strings into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
--
https://code.launchpad.net/~mgorven/openlp/get-strings/+merge/15120
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp-get-strings.py' (properties changed: -x to +x)
--- openlp-get-strings.py 2009-11-05 16:29:49 +0000
+++ openlp-get-strings.py 2009-11-21 13:20:25 +0000
@@ -42,7 +42,7 @@
<translation type="unfinished"></translation>
</message>
"""
-find_trUtf8 = re.compile(r"trUtf8\(u'([\.:;\\&\w]+)'\)", re.UNICODE)
+find_trUtf8 = re.compile(r"trUtf8\(u?(['\"])([^\1]+)\1\)", re.UNICODE)
strings = {}
def parse_file(filename):
@@ -56,9 +56,9 @@
class_name = line[6:line.find(u'(')]
continue
for match in find_trUtf8.finditer(line):
- key = u'%s-%s' % (class_name, match.group(1))
+ key = u'%s-%s' % (class_name, match.group(2))
if not key in strings:
- strings[key] = [class_name, filename, line_number, match.group(1)]
+ strings[key] = [class_name, filename, line_number, match.group(2)]
file.close()
def write_file(filename):
=== modified file 'openlp/core/ui/amendthemeform.py'
--- openlp/core/ui/amendthemeform.py 2009-11-12 23:49:35 +0000
+++ openlp/core/ui/amendthemeform.py 2009-11-21 13:20:25 +0000
@@ -193,7 +193,7 @@
def onImageToolButtonClicked(self):
filename = QtGui.QFileDialog.getOpenFileName(
- self, self.trUtf8('Open file'))
+ self, self.trUtf8(u'Open file'))
if filename:
self.ImageLineEdit.setText(filename)
self.theme.background_filename = filename
Follow ups