2006-10-26 Alex Roitman <shura@gramps-project.org>
* help/gramps.pot: Regenerate manual template. * src/data/tips.xml.in (family): Escape quotes. * src/TipOfDay.py (TipParserescape): Remove: no need to escape here. (TipOfDay.escape): Escape here, to allow for gettext lookup. (TipOfDay.next_tip_cb): Escape prior to gettext lookup. svn: r7441
This commit is contained in:
parent
434fbdc38d
commit
00a28ef5c7
@ -1,3 +1,10 @@
|
|||||||
|
2006-10-26 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* help/gramps.pot: Regenerate manual template.
|
||||||
|
* src/data/tips.xml.in (family): Escape quotes.
|
||||||
|
* src/TipOfDay.py (TipParserescape): Remove: no need to escape here.
|
||||||
|
(TipOfDay.escape): Escape here, to allow for gettext lookup.
|
||||||
|
(TipOfDay.next_tip_cb): Escape prior to gettext lookup.
|
||||||
|
|
||||||
2006-10-25 Piotr Czubaszek <pioterus@gmail.com>
|
2006-10-25 Piotr Czubaszek <pioterus@gmail.com>
|
||||||
* src/plugins/rel_pl.py: Update.
|
* src/plugins/rel_pl.py: Update.
|
||||||
|
|
||||||
|
2552
help/gramps.pot
2552
help/gramps.pot
File diff suppressed because it is too large
Load Diff
@ -86,13 +86,20 @@ class TipOfDay(ManagedWindow.ManagedWindow):
|
|||||||
window.show_all()
|
window.show_all()
|
||||||
|
|
||||||
def next_tip_cb(self,dummy=None):
|
def next_tip_cb(self,dummy=None):
|
||||||
self.tip.set_text(_(self.tip_list[self.new_index[self.index]]))
|
tip_text = self.escape(self.tip_list[self.new_index[self.index]])
|
||||||
|
self.tip.set_text(_(tip_text))
|
||||||
self.tip.set_use_markup(True)
|
self.tip.set_use_markup(True)
|
||||||
if self.index >= len(self.tip_list)-1:
|
if self.index >= len(self.tip_list)-1:
|
||||||
self.index = 0
|
self.index = 0
|
||||||
else:
|
else:
|
||||||
self.index += 1
|
self.index += 1
|
||||||
|
|
||||||
|
def escape(self,text):
|
||||||
|
text = text.replace('&','&'); # Must be first
|
||||||
|
text = text.replace(' > ',' > ') # Replace standalone > char
|
||||||
|
text = text.replace('"','"') # quotes
|
||||||
|
return text
|
||||||
|
|
||||||
def close_cb(self,dummy=None):
|
def close_cb(self,dummy=None):
|
||||||
Config.set(Config.USE_TIPS,self.use.get_active())
|
Config.set(Config.USE_TIPS,self.use.get_active())
|
||||||
self.close()
|
self.close()
|
||||||
@ -151,7 +158,7 @@ class TipParser:
|
|||||||
|
|
||||||
def endElement(self,tag):
|
def endElement(self,tag):
|
||||||
if tag == "tip" and not self.skip:
|
if tag == "tip" and not self.skip:
|
||||||
text = self.escape(''.join(self.tlist))
|
text = ''.join(self.tlist)
|
||||||
self.mylist.append(' '.join(text.split()))
|
self.mylist.append(' '.join(text.split()))
|
||||||
elif tag != "tips":
|
elif tag != "tips":
|
||||||
# let all the other tags through, except for the "tips" tag
|
# let all the other tags through, except for the "tips" tag
|
||||||
@ -159,11 +166,3 @@ class TipParser:
|
|||||||
|
|
||||||
def characters(self, data):
|
def characters(self, data):
|
||||||
self.tlist.append(data)
|
self.tlist.append(data)
|
||||||
|
|
||||||
def escape(self,text):
|
|
||||||
"""
|
|
||||||
The tip's text will be interpreted as a markup, so we need to escape
|
|
||||||
some special chars.
|
|
||||||
"""
|
|
||||||
text = text.replace('&','&'); # Must be first
|
|
||||||
return text
|
|
||||||
|
@ -411,8 +411,8 @@ of how powerful GRAMPS is.
|
|||||||
</_tip>
|
</_tip>
|
||||||
|
|
||||||
<_tip number="57">
|
<_tip number="57">
|
||||||
Custom reports can be created by advanced users under the "plugin" system.
|
Custom reports can be created by advanced users under the "plugin"
|
||||||
More information on custom reports can be found at
|
system. More information on custom reports can be found at
|
||||||
http://developers.gramps-project.org
|
http://developers.gramps-project.org
|
||||||
</_tip>
|
</_tip>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user