Skip to content

Commit 5ebe5db

Browse files
romjeromeprculley
authored andcommitted
Update selectform.py (#173)
Tweak improvement for handling the translation on "form_type" string. As most event types are already loaded from gramps translation domain, we could use existing translations for displaying the localized 'form_type' string. This minor translation issue is visible when we select a form from the list : the model ignores the top level string (event type as parent). e.g., "census" instead of "recensement" under the french locale.
1 parent 027ca61 commit 5ebe5db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Form/selectform.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ def _populate_model(self):
110110
form_id = get_form_id(source)
111111
if form_id in get_form_ids():
112112
form_type = get_form_type(form_id)
113-
if form_type in form_types:
114-
parent = form_types[form_type]
113+
if _(form_type) in form_types:
114+
parent = form_types[_(form_type)]
115115
else:
116-
parent = self.model.append(None, (None, form_type))
117-
form_types[form_type] = parent
116+
parent = self.model.append(None, (None, _(form_type)))
117+
form_types[_(form_type)] = parent
118118
self.model.append(parent, (source.handle, source.title))
119119
self.model.set_sort_column_id(1, Gtk.SortType.ASCENDING)
120120
self.tree.expand_all()

0 commit comments

Comments
 (0)