Convert remaining unicode literals
This commit is contained in:
parent
b70adcb74a
commit
d2363249b9
@ -248,7 +248,7 @@ class DbManager(CLIDbManager):
|
||||
|
||||
if store.get_value(node, STOCK_COL) == Gtk.STOCK_DIALOG_ERROR:
|
||||
path = conv_to_unicode(store.get_value(node, PATH_COL), 'utf8')
|
||||
backup = os.path.join(path, u"person.gbkp")
|
||||
backup = os.path.join(path, "person.gbkp")
|
||||
self.repair.set_sensitive(os.path.isfile(backup))
|
||||
else:
|
||||
self.repair.set_sensitive(False)
|
||||
|
@ -18,6 +18,8 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
#
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from collections import defaultdict
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
@ -66,9 +68,9 @@ class GivenNameCloudGramplet(Gramplet):
|
||||
allnames = [person.get_primary_name()] + person.get_alternate_names()
|
||||
allnames = set(name.get_first_name().strip() for name in allnames)
|
||||
for givenname in allnames:
|
||||
anyNBSP = givenname.split(u'\u00A0')
|
||||
anyNBSP = givenname.split('\u00A0')
|
||||
if len(anyNBSP) > 1: # there was an NBSP, a non-breaking space
|
||||
first_two = anyNBSP[0] + u'\u00A0' + anyNBSP[1].split()[0]
|
||||
first_two = anyNBSP[0] + '\u00A0' + anyNBSP[1].split()[0]
|
||||
givensubnames[first_two] += 1
|
||||
representative_handle[first_two] = person.handle
|
||||
givenname = ' '.join(anyNBSP[1].split()[1:])
|
||||
|
@ -25,6 +25,8 @@
|
||||
Display a people who have a person's same surname or given name.
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
ngettext = glocale.translation.ngettext # else "nearby" comments are ignored
|
||||
@ -68,9 +70,9 @@ class SameGiven(Rule):
|
||||
src = self.list[0].upper()
|
||||
for name in [person.get_primary_name()] + person.get_alternate_names():
|
||||
if name.first_name:
|
||||
anyNBSP = name.first_name.split(u'\u00A0')
|
||||
anyNBSP = name.first_name.split('\u00A0')
|
||||
if len(anyNBSP) > 1: # there was an NBSP, a non-breaking space
|
||||
first_two = anyNBSP[0] + u'\u00A0' + anyNBSP[1].split()[0]
|
||||
first_two = anyNBSP[0] + '\u00A0' + anyNBSP[1].split()[0]
|
||||
if first_two.upper() == src:
|
||||
return True
|
||||
else:
|
||||
|
@ -828,9 +828,9 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator):
|
||||
"""
|
||||
|
||||
rel_str = "parents llunyans"
|
||||
#atgen = u" de la %sena generació"
|
||||
#bygen = u" per la %sena generació"
|
||||
#cmt = u" (germans o germanes d'un avantpassat" + atgen % Ga + ")"
|
||||
#atgen = " de la %sena generació"
|
||||
#bygen = " per la %sena generació"
|
||||
#cmt = " (germans o germanes d'un avantpassat" + atgen % Ga + ")"
|
||||
|
||||
if in_law_a or in_law_b:
|
||||
inlaw = self.INLAW
|
||||
@ -920,7 +920,7 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator):
|
||||
inlaw = ""
|
||||
|
||||
rel_str = "un parent llunyà%s" % inlaw
|
||||
#bygen = u" per la %sena generació"
|
||||
#bygen = " per la %sena generació"
|
||||
if Ga == 0:
|
||||
|
||||
# b is descendant of a
|
||||
|
Loading…
Reference in New Issue
Block a user