Fix for 2416: don't save translated name-formats in XML
svn: r11569
This commit is contained in:
parent
2ed7f7becb
commit
f9be2655d6
@ -5,6 +5,7 @@
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2008 Gary Burton
|
||||
# Copyright (C) 2008 Robert Cheramy <robert@cheramy.net>
|
||||
# Copyright (C) 2009 Douglas S. Blank
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -375,7 +376,7 @@ class GrampsDbXmlWriter(UpdateCallback):
|
||||
for number, name,fmt_str,active in self.db.name_formats:
|
||||
self.g.write('%s<format number="%d" name="%s" '
|
||||
'fmt_str="%s" active="%d"/>\n'
|
||||
% (' ', number, name,fmt_str,int(active)) )
|
||||
% (' ', number, fmt_str, fmt_str, int(active)) )
|
||||
self.g.write(" </name-formats>\n")
|
||||
|
||||
def fix(self,line):
|
||||
@ -1215,4 +1216,4 @@ plugin = ExportPlugin(name = _('GRAMPS _XML database'),
|
||||
export_function = export_data,
|
||||
extension = "gramps",
|
||||
config = _config )
|
||||
pmgr.register_plugin(plugin)
|
||||
pmgr.register_plugin(plugin)
|
||||
|
@ -2,6 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2009 Douglas S. Blank
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -1060,7 +1061,7 @@ class GrampsParser(UpdateCallback):
|
||||
if number in self.taken_name_format_numbers:
|
||||
number = self.remap_name_format(number)
|
||||
|
||||
self.name_formats.append((number, name, fmt_str, active))
|
||||
self.name_formats.append((number, fmt_str, fmt_str, active))
|
||||
|
||||
def remap_name_format(self, old_number):
|
||||
if old_number in self.name_formats_map: # This should not happen
|
||||
@ -2460,4 +2461,4 @@ plugin = ImportPlugin(name = _('GRAMPS XML database'),
|
||||
'present GRAMPS database format.'),
|
||||
import_function = importData,
|
||||
extension = "gramps" )
|
||||
pmgr.register_plugin(plugin)
|
||||
pmgr.register_plugin(plugin)
|
||||
|
Loading…
Reference in New Issue
Block a user