Merge lp:~mgorven/openlp/get-strings into lp:openlp

Proposed by Michael Gorven
Status: Merged
Approved by: Michael Gorven
Approved revision: 677
Merged at revision: 674
Proposed branch: lp:~mgorven/openlp/get-strings
Merge into: lp:openlp
Diff against target: 37 lines (+4/-4)
2 files modified
openlp-get-strings.py (+3/-3)
openlp/core/ui/amendthemeform.py (+1/-1)
To merge this branch: bzr merge lp:~mgorven/openlp/get-strings
Reviewer Review Type Date Requested Status
Michael Gorven (community) Approve
Raoul Snyman Approve
Tim Bentley Approve
Review via email: mp+15120@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) :
review: Approve
Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Excellent

review: Approve
Revision history for this message
Michael Gorven (mgorven) wrote :

 status approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp-get-strings.py' (properties changed: -x to +x)
2--- openlp-get-strings.py 2009-11-05 16:29:49 +0000
3+++ openlp-get-strings.py 2009-11-21 13:20:25 +0000
4@@ -42,7 +42,7 @@
5 <translation type="unfinished"></translation>
6 </message>
7 """
8-find_trUtf8 = re.compile(r"trUtf8\(u'([\.:;\\&\w]+)'\)", re.UNICODE)
9+find_trUtf8 = re.compile(r"trUtf8\(u?(['\"])([^\1]+)\1\)", re.UNICODE)
10 strings = {}
11
12 def parse_file(filename):
13@@ -56,9 +56,9 @@
14 class_name = line[6:line.find(u'(')]
15 continue
16 for match in find_trUtf8.finditer(line):
17- key = u'%s-%s' % (class_name, match.group(1))
18+ key = u'%s-%s' % (class_name, match.group(2))
19 if not key in strings:
20- strings[key] = [class_name, filename, line_number, match.group(1)]
21+ strings[key] = [class_name, filename, line_number, match.group(2)]
22 file.close()
23
24 def write_file(filename):
25
26=== modified file 'openlp/core/ui/amendthemeform.py'
27--- openlp/core/ui/amendthemeform.py 2009-11-12 23:49:35 +0000
28+++ openlp/core/ui/amendthemeform.py 2009-11-21 13:20:25 +0000
29@@ -193,7 +193,7 @@
30
31 def onImageToolButtonClicked(self):
32 filename = QtGui.QFileDialog.getOpenFileName(
33- self, self.trUtf8('Open file'))
34+ self, self.trUtf8(u'Open file'))
35 if filename:
36 self.ImageLineEdit.setText(filename)
37 self.theme.background_filename = filename