Skip to content

Commit

Permalink
Fix some XML fragments to aboid double translations
Browse files Browse the repository at this point in the history
  • Loading branch information
prculley authored and Nick-Hall committed Jun 15, 2019
1 parent 1f778e8 commit 6d67dff
Show file tree
Hide file tree
Showing 19 changed files with 4,893 additions and 3,710 deletions.
4 changes: 2 additions & 2 deletions gramps/gui/displaystate.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def history_changed(self):
_RCT_MENU = '''
<item>
<attribute name="action">win.%s</attribute>
<attribute name="label" translatable="no">%s</attribute>
<attribute name="label">%s</attribute>
</item>'''
_RCT_BTM = '\n </placeholder>\n'
_RCT_BAR_TOP = ('<object class="GtkMenu" id="OpenBtnMenu">\n'
Expand All @@ -262,7 +262,7 @@ def history_changed(self):
<child>
<object class="GtkMenuItem">
<property name="action-name">win.%s</property>
<property name="label" translatable="yes">%s</property>
<property name="label">%s</property>
<property name="use_underline">False</property>
<property name="visible">True</property>
</object>
Expand Down
2 changes: 1 addition & 1 deletion gramps/gui/plug/quick/_quickreports.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

MENUITEM = ('<item>\n'
'<attribute name="action">{prefix}.{action}</attribute>\n'
'<attribute name="label" translatable="yes">'
'<attribute name="label">'
'{label}</attribute>\n'
'</item>\n')

Expand Down
11 changes: 5 additions & 6 deletions gramps/gui/viewmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ def __change_undo_label(self, label, update_menu=True):
_menu = '''<placeholder id="undo">
<item>
<attribute name="action">win.Undo</attribute>
<attribute name="label" translatable="yes">%s</attribute>
<attribute name="label">%s</attribute>
</item>
</placeholder>
'''
Expand All @@ -1132,7 +1132,7 @@ def __change_redo_label(self, label, update_menu=True):
_menu = '''<placeholder id="redo">
<item>
<attribute name="action">win.Redo</attribute>
<attribute name="label" translatable="yes">%s</attribute>
<attribute name="label">%s</attribute>
</item>
</placeholder>
'''
Expand Down Expand Up @@ -1405,8 +1405,7 @@ def build_plugin_menu(self, text, item_list, categories, func):
"""
menuitem = ('<item>\n'
'<attribute name="action">win.%s</attribute>\n'
'<attribute name="label" translatable="yes">'
'%s...</attribute>\n'
'<attribute name="label">%s...</attribute>\n'
'</item>\n')

actions = []
Expand All @@ -1426,7 +1425,7 @@ def build_plugin_menu(self, text, item_list, categories, func):

for key in catlist:
ofile.write('<submenu>\n<attribute name="label"'
' translatable="yes">%s</attribute>\n' % key[1])
'>%s</attribute>\n' % key[1])
pdatas = hash_data[key]
pdatas.sort(key=lambda x: x.name)
for pdata in pdatas:
Expand All @@ -1440,7 +1439,7 @@ def build_plugin_menu(self, text, item_list, categories, func):
# and the unsupported category at the end of the menu
if _UNSUPPORTED in hash_data:
ofile.write('<submenu>\n<attribute name="label"'
' translatable="yes">%s</attribute>\n' %
'>%s</attribute>\n' %
_UNSUPPORTED[1])
pdatas = hash_data[_UNSUPPORTED]
pdatas.sort(key=lambda x: x.name)
Expand Down
3 changes: 1 addition & 2 deletions gramps/gui/views/bookmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ def redraw(self, update_menu=True):
"""Create the pulldown menu."""
menuitem = ('<item>\n'
'<attribute name="action">win.%s</attribute>\n'
'<attribute name="label" translatable="yes">'
'%s</attribute>\n'
'<attribute name="label">%s</attribute>\n'
'</item>\n')
text = StringIO()

Expand Down
2 changes: 1 addition & 1 deletion gramps/gui/views/navigationview.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def update_mru_menu(self, items, update_menu=True):
"""
menuitem = ''' <item>
<attribute name="action">win.%s%02d</attribute>
<attribute name="label" translatable="yes">%s</attribute>
<attribute name="label">%s</attribute>
</item>
'''
menus = ''
Expand Down
2 changes: 1 addition & 1 deletion gramps/gui/views/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def _build_tag_menu(self):
menuitem = '''
<item>
<attribute name="action">win.TAG_%s</attribute>
<attribute name="label" translatable="yes">%s</attribute>
<attribute name="label">%s</attribute>
</item>'''

for tag_name, handle in self.__tag_list:
Expand Down
3 changes: 1 addition & 2 deletions gramps/gui/widgets/grampletpane.py
Original file line number Diff line number Diff line change
Expand Up @@ -1455,8 +1455,7 @@ def _button_press(self, obj, event):
''')
menuitem = ('<item>\n'
'<attribute name="action">win.%s</attribute>\n'
'<attribute name="label" translatable="yes">'
'%s</attribute>\n'
'<attribute name="label">%s</attribute>\n'
'</item>\n')

if is_right_click(event):
Expand Down
12 changes: 6 additions & 6 deletions gramps/plugins/lib/libpersonview.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def get_stock(self):
</item>
<item>
<attribute name="action">win.Edit</attribute>
<attribute name="label" translatable="yes">%s</attribute>
<attribute name="label">%s</attribute>
</item>
<item>
<attribute name="action">win.Remove</attribute>
Expand Down Expand Up @@ -306,7 +306,7 @@ def get_stock(self):
<object class="GtkToolButton">
<property name="icon-name">list-add</property>
<property name="action-name">win.Add</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">_Add...</property>
<property name="use-underline">True</property>
</object>
Expand All @@ -318,7 +318,7 @@ def get_stock(self):
<object class="GtkToolButton">
<property name="icon-name">gtk-edit</property>
<property name="action-name">win.Edit</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">Edit...</property>
<property name="use-underline">True</property>
</object>
Expand All @@ -330,7 +330,7 @@ def get_stock(self):
<object class="GtkToolButton">
<property name="icon-name">list-remove</property>
<property name="action-name">win.Remove</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">_Delete</property>
<property name="use-underline">True</property>
</object>
Expand All @@ -342,7 +342,7 @@ def get_stock(self):
<object class="GtkToolButton">
<property name="icon-name">gramps-merge</property>
<property name="action-name">win.Merge</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">_Merge...</property>
<property name="use-underline">True</property>
</object>
Expand Down Expand Up @@ -382,7 +382,7 @@ def get_stock(self):
</item>
<item>
<attribute name="action">win.Edit</attribute>
<attribute name="label" translatable="yes">%s</attribute>
<attribute name="label">%s</attribute>
</item>
<item>
<attribute name="action">win.Remove</attribute>
Expand Down
16 changes: 8 additions & 8 deletions gramps/plugins/lib/libplaceview.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def __create_maps_menu_actions(self):
<item>
<attribute name="action">win.MapChoice</attribute>
<attribute name="target">%s</attribute>
<attribute name="label" translatable="yes">%s</attribute>
<attribute name="label">%s</attribute>
</item>
'''
menu = ''
Expand Down Expand Up @@ -308,7 +308,7 @@ def get_stock(self):
</item>
<item>
<attribute name="action">win.Edit</attribute>
<attribute name="label" translatable="yes">%s</attribute>
<attribute name="label">%s</attribute>
</item>
<item>
<attribute name="action">win.Remove</attribute>
Expand Down Expand Up @@ -365,7 +365,7 @@ def get_stock(self):
<object class="GtkToolButton">
<property name="icon-name">list-add</property>
<property name="action-name">win.Add</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">_Add...</property>
<property name="use-underline">True</property>
</object>
Expand All @@ -377,7 +377,7 @@ def get_stock(self):
<object class="GtkToolButton">
<property name="icon-name">gtk-edit</property>
<property name="action-name">win.Edit</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">Edit...</property>
<property name="use-underline">True</property>
</object>
Expand All @@ -389,7 +389,7 @@ def get_stock(self):
<object class="GtkToolButton">
<property name="icon-name">list-remove</property>
<property name="action-name">win.Remove</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">_Delete</property>
<property name="use-underline">True</property>
</object>
Expand All @@ -401,7 +401,7 @@ def get_stock(self):
<object class="GtkToolButton">
<property name="icon-name">gramps-merge</property>
<property name="action-name">win.Merge</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">_Merge...</property>
<property name="use-underline">True</property>
</object>
Expand Down Expand Up @@ -431,7 +431,7 @@ def get_stock(self):
</item>
<item>
<attribute name="action">win.Edit</attribute>
<attribute name="label" translatable="yes">%s</attribute>
<attribute name="label">%s</attribute>
</item>
<item>
<attribute name="action">win.Remove</attribute>
Expand Down Expand Up @@ -471,7 +471,7 @@ def get_stock(self):
<property name="tooltip_text" translatable="yes">'''
'''Attempt to see selected locations with a Map Service '''
'''(OpenstreetMap, Google Maps, ...)</property>
<property name="label" translatable="yes">%s</property>
<property name="label">%s</property>
<property name="use-underline">True</property>
</object>
<packing>
Expand Down
11 changes: 5 additions & 6 deletions gramps/plugins/view/citationlistview.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def get_stock(self):
</item>
<item>
<attribute name="action">win.Edit</attribute>
<attribute name="label" translatable="yes">%s</attribute>
<attribute name="label">%s</attribute>
</item>
<item>
<attribute name="action">win.Remove</attribute>
Expand Down Expand Up @@ -257,7 +257,7 @@ def get_stock(self):
<object class="GtkToolButton">
<property name="icon-name">list-add</property>
<property name="action-name">win.Add</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">_Add...</property>
<property name="use-underline">True</property>
</object>
Expand All @@ -269,7 +269,7 @@ def get_stock(self):
<object class="GtkToolButton">
<property name="icon-name">gtk-edit</property>
<property name="action-name">win.Edit</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">Edit...</property>
<property name="use-underline">True</property>
</object>
Expand All @@ -281,7 +281,7 @@ def get_stock(self):
<object class="GtkToolButton">
<property name="icon-name">list-remove</property>
<property name="action-name">win.Remove</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">_Delete</property>
<property name="use-underline">True</property>
</object>
Expand All @@ -293,7 +293,7 @@ def get_stock(self):
<object class="GtkToolButton">
<property name="icon-name">gramps-merge</property>
<property name="action-name">win.Merge</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text" >%s</property>
<property name="label" translatable="yes">_Merge...</property>
<property name="use-underline">True</property>
</object>
Expand Down Expand Up @@ -324,7 +324,6 @@ def get_stock(self):
</item>
<item>
<attribute name="action">win.Edit</attribute>
<attribute name="label" translatable="yes">%s</attribute>
</item>
<item>
<attribute name="action">win.Remove</attribute>
Expand Down
16 changes: 8 additions & 8 deletions gramps/plugins/view/citationtreeview.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def define_actions(self):
</item>
<item>
<attribute name="action">win.Edit</attribute>
<attribute name="label" translatable="yes">%s</attribute>
<attribute name="label">%s</attribute>
</item>
<item>
<attribute name="action">win.Remove</attribute>
Expand Down Expand Up @@ -403,7 +403,7 @@ def define_actions(self):
<object class="GtkToolButton">
<property name="icon-name">list-add</property>
<property name="action-name">win.Add</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">_Add...</property>
<property name="use-underline">True</property>
</object>
Expand All @@ -415,7 +415,7 @@ def define_actions(self):
<object class="GtkToolButton">
<property name="icon-name">gramps-source</property>
<property name="action-name">win.AddSource</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">Add source...</property>
</object>
<packing>
Expand All @@ -426,7 +426,7 @@ def define_actions(self):
<object class="GtkToolButton">
<property name="icon-name">gramps-citation</property>
<property name="action-name">win.AddCitation</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">Add citation...</property>
</object>
<packing>
Expand All @@ -437,7 +437,7 @@ def define_actions(self):
<object class="GtkToolButton">
<property name="icon-name">gtk-edit</property>
<property name="action-name">win.Edit</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">Edit...</property>
<property name="use-underline">True</property>
</object>
Expand All @@ -449,7 +449,7 @@ def define_actions(self):
<object class="GtkToolButton">
<property name="icon-name">list-remove</property>
<property name="action-name">win.Remove</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">_Delete</property>
<property name="use-underline">True</property>
</object>
Expand All @@ -461,7 +461,7 @@ def define_actions(self):
<object class="GtkToolButton">
<property name="icon-name">gramps-merge</property>
<property name="action-name">win.Merge</property>
<property name="tooltip_text" translatable="yes">%s</property>
<property name="tooltip_text">%s</property>
<property name="label" translatable="yes">_Merge...</property>
<property name="use-underline">True</property>
</object>
Expand Down Expand Up @@ -508,7 +508,7 @@ def define_actions(self):
</item>
<item>
<attribute name="action">win.Edit</attribute>
<attribute name="label" translatable="yes">%s</attribute>
<attribute name="label">%s</attribute>
</item>
<item>
<attribute name="action">win.Remove</attribute>
Expand Down

0 comments on commit 6d67dff

Please sign in to comment.