* src/PeopleView.py: replace unique string with one already translated

* src/gramps_main.py: replace unique string with one already translated
* src/plugins/Ancestors.py: replace unique string with one already translated
* src/plugins/Eval.py: replace unique string with one already translated
* src/plugins/WriteCD.py: replace unique string with one already translated
* src/po/check_po: produce a sorted list of used text strings,
split strings better


svn: r5165
This commit is contained in:
Don Allingham 2005-09-01 22:24:39 +00:00
parent 59172268eb
commit a1d64c63a7
7 changed files with 42 additions and 17 deletions

View File

@ -1,4 +1,11 @@
2005-09-01 Don Allingham <don@gramps-project.org> 2005-09-01 Don Allingham <don@gramps-project.org>
* src/PeopleView.py: replace unique string with one already translated
* src/gramps_main.py: replace unique string with one already translated
* src/plugins/Ancestors.py: replace unique string with one already translated
* src/plugins/Eval.py: replace unique string with one already translated
* src/plugins/WriteCD.py: replace unique string with one already translated
* src/po/check_po: produce a sorted list of used text strings,
split strings better
* src/ImageSelect.py: Local edit of a media Note type now * src/ImageSelect.py: Local edit of a media Note type now
brings up the Note editor instead of the media editor. brings up the Note editor instead of the media editor.
* src/plugins/Verify.py: don't complain about difference in * src/plugins/Verify.py: don't complain about difference in

View File

@ -65,7 +65,7 @@ column_names = [
_('Death Place'), _('Death Place'),
_('Spouse'), _('Spouse'),
_('Last Change'), _('Last Change'),
_('Cause of Death'), _('Cause of death'),
] ]
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

View File

@ -1084,7 +1084,7 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
mlist = self.people_view.get_selected_objects() mlist = self.people_view.get_selected_objects()
if len(mlist) != 2: if len(mlist) != 2:
msg = _("Cannot merge people.") msg = _("Cannot merge people")
msg2 = _("Exactly two people must be selected to perform a merge. " msg2 = _("Exactly two people must be selected to perform a merge. "
"A second person can be selected by holding down the " "A second person can be selected by holding down the "
"control key while clicking on the desired person.") "control key while clicking on the desired person.")
@ -1096,7 +1096,7 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
if p1 and p2: if p1 and p2:
merger = MergePeople.MergePeopleUI(self.db,p1,p2,self.merge_update) merger = MergePeople.MergePeopleUI(self.db,p1,p2,self.merge_update)
else: else:
msg = _("Cannot merge people.") msg = _("Cannot merge people")
msg2 = _("Exactly two people must be selected to perform a merge. " msg2 = _("Exactly two people must be selected to perform a merge. "
"A second person can be selected by holding down the " "A second person can be selected by holding down the "
"control key while clicking on the desired person.") "control key while clicking on the desired person.")
@ -1114,7 +1114,7 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
mlist = self.people_view.get_selected_objects() mlist = self.people_view.get_selected_objects()
if len(mlist) != 2: if len(mlist) != 2:
msg = _("Cannot merge people.") msg = _("Cannot merge people")
msg2 = _("Exactly two people must be selected to perform a merge. " msg2 = _("Exactly two people must be selected to perform a merge. "
"A second person can be selected by holding down the " "A second person can be selected by holding down the "
"control key while clicking on the desired person.") "control key while clicking on the desired person.")
@ -1126,7 +1126,7 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
if p1 and p2: if p1 and p2:
merger = MergePeople.Compare(self.db,p1,p2,self.merge_update) merger = MergePeople.Compare(self.db,p1,p2,self.merge_update)
else: else:
msg = _("Cannot merge people.") msg = _("Cannot merge people")
msg2 = _("Exactly two people must be selected to perform a merge. " msg2 = _("Exactly two people must be selected to perform a merge. "
"A second person can be selected by holding down the " "A second person can be selected by holding down the "
"control key while clicking on the desired person.") "control key while clicking on the desired person.")

View File

@ -810,8 +810,8 @@ class ComprehensiveAncestorsReport (Report.Report):
if (len (event_handles) + len (addresses) + len (names)) > 0: if (len (event_handles) + len (addresses) + len (names)) > 0:
paras.append ((self.doc.start_paragraph, ['AR-SubEntry'])) paras.append ((self.doc.start_paragraph, ['AR-SubEntry']))
paras.append ((self.doc.write_text, paras.append ((self.doc.write_text,
[_("More about %(name)s:") % [_("More about %(person_name)s:") %
{'name': self.first_name_or_nick (person)}])) {'person_name': self.first_name_or_nick (person)}]))
paras.append ((self.doc.end_paragraph, [])) paras.append ((self.doc.end_paragraph, []))
for name in names: for name in names:

View File

@ -79,7 +79,7 @@ class EvalWindow:
}) })
Utils.set_titles(self.top,self.glade.get_widget('title'), Utils.set_titles(self.top,self.glade.get_widget('title'),
_("Python Evaluation Window")) _("Python evaluation window"))
self.add_itself_to_menu() self.add_itself_to_menu()
self.top.show() self.top.show()
@ -93,7 +93,7 @@ class EvalWindow:
def add_itself_to_menu(self): def add_itself_to_menu(self):
self.parent.child_windows[self.win_key] = self self.parent.child_windows[self.win_key] = self
self.parent_menu_item = gtk.MenuItem(_('Python Evaluation Window')) self.parent_menu_item = gtk.MenuItem(_('Python evaluation window'))
self.parent_menu_item.connect("activate",self.present) self.parent_menu_item.connect("activate",self.present)
self.parent_menu_item.show() self.parent_menu_item.show()
self.parent.winsmenu.append(self.parent_menu_item) self.parent.winsmenu.append(self.parent_menu_item)

View File

@ -103,8 +103,9 @@ class PackageWriter:
"1 %s " % str(msg)) "1 %s " % str(msg))
return return
except: except:
uri_name = "burn:///" + base
QuestionDialog.ErrorDialog("CD export preparation failed", QuestionDialog.ErrorDialog("CD export preparation failed",
'Could not create burn:///%s' % base) 'Could not create %s' % uri_name)
return return
try: try:
@ -148,8 +149,9 @@ class PackageWriter:
"File already exists") "File already exists")
return return
except: except:
uri_name = "burn:///" + base
QuestionDialog.ErrorDialog(_("CD export preparation failed"), QuestionDialog.ErrorDialog(_("CD export preparation failed"),
_('Could not create burn:///%s') % base) _('Could not create %s') % uri_name)
return return
try: try:
@ -160,8 +162,9 @@ class PackageWriter:
"4 %s " % str(msg)) "4 %s " % str(msg))
return return
except: except:
uri_name = "burn:///" + base + "/.thumb"
QuestionDialog.ErrorDialog(_("CD export preparation failed"), QuestionDialog.ErrorDialog(_("CD export preparation failed"),
_('Could not create burn:///%s/.thumb') % base) _('Could not create %s') % uri_name)
return return
#-------------------------------------------------------- #--------------------------------------------------------

View File

@ -14,6 +14,13 @@ all_named_s = {}
all_bnamed_s = {} all_bnamed_s = {}
all_coverage = {} all_coverage = {}
def strip_quotes(st):
if len(st.strip()) > 2:
return st.strip()[1:-1]
else:
return ""
args = sys.argv args = sys.argv
while len(args) > 1: while len(args) > 1:
args = args[1:] args = args[1:]
@ -31,20 +38,21 @@ while len(args) > 1:
if mode == NONE: if mode == NONE:
if len(data) > 0 and data[0] == "msgid": if len(data) > 0 and data[0] == "msgid":
mode = MSGID mode = MSGID
if len(data) > 1:
current_msgid = data[1].split('"')[1] current_msgid = strip_quotes(data[1])
elif mode == MSGID: elif mode == MSGID:
if data[0][0] == '"': if data[0][0] == '"':
current_msgid += line.split('"')[1] current_msgid += strip_quotes(line)
elif data[0] == "msgstr": elif data[0] == "msgstr":
mode = MSGSTR mode = MSGSTR
current_msgstr = data[1].split('"')[1] if len(data) > 1:
current_msgstr = strip_quotes(data[1])
elif mode == MSGSTR: elif mode == MSGSTR:
if line == "" or line[0] == "#": if line == "" or line[0] == "#":
mode = NONE mode = NONE
string_map[current_msgid] = current_msgstr string_map[current_msgid] = current_msgstr
elif len(data) > 0 and data[0][0] == '"': elif len(data) > 0 and data[0][0] == '"':
current_msgstr += line.split('"')[1] current_msgstr += strip_quotes(line)
f.close() f.close()
@ -133,3 +141,10 @@ if len(sys.argv) > 2:
all_named_s[pofile], all_named_s[pofile],
all_bnamed_s[pofile], all_bnamed_s[pofile],
all_coverage[pofile]) all_coverage[pofile])
f = open("used_strings.txt","w")
keys = string_map.keys()
keys.sort()
for i in keys:
f.write(i + "\n")
f.close()