6403: Remove markup in translatable messages -- slight tweaks
This commit is contained in:
parent
8c94dcfd27
commit
1c75a997d6
@ -36,6 +36,16 @@ from gramps.gen.const import URL_WIKISTRING, URL_MANUAL_PAGE
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Constants
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
URL_WIKI_START = '<a href="' + URL_WIKISTRING
|
||||
URL_MANUAL_START = URL_WIKI_START + URL_MANUAL_PAGE + '_-_Manage_Family_Trees'
|
||||
URL_BACKUP1_START = URL_WIKI_START + 'How_to_make_a_backup">'
|
||||
URL_BACKUP2_START = URL_MANUAL_START + '#Backing_up_a_Family_Tree">'
|
||||
URL_EXPORT_START = URL_MANUAL_START + '#Export_into_Gramps_formats">'
|
||||
|
||||
class DbException(Exception):
|
||||
|
||||
@ -114,12 +124,10 @@ class BsddbDowngradeError(Exception):
|
||||
'this is bound to fail.\n\n'
|
||||
'You should start your '
|
||||
'%(bold_start)snewer%(bold_end)s version of Gramps and '
|
||||
'%(wiki_html_start)s'
|
||||
'How_to_make_a_backup%(html_middle)smake a backup'
|
||||
'%(html_end)s of your Family Tree. You can then import '
|
||||
'%(wiki_backup_html_start)smake a backup%(html_end)s '
|
||||
'of your Family Tree. You can then import '
|
||||
'this backup into this version of Gramps.') % {
|
||||
'wiki_html_start' : '<a href="' + URL_WIKISTRING ,
|
||||
'html_middle' : '">' ,
|
||||
'wiki_backup_html_start' : URL_BACKUP1_START ,
|
||||
'html_end' : '</a>' ,
|
||||
'bold_start' : '<b>' ,
|
||||
'bold_end' : '</b>' ,
|
||||
@ -148,11 +156,9 @@ class BsddbDowngradeRequiredError(Exception):
|
||||
'If you have not already made a backup of your Family Tree, '
|
||||
'then you should start your '
|
||||
'%(bold_start)snewer%(bold_end)s version of Gramps and '
|
||||
'%(wiki_html_start)s'
|
||||
'How_to_make_a_backup%(html_middle)smake a backup'
|
||||
'%(html_end)s of your Family Tree.') % {
|
||||
'wiki_html_start' : '<a href="' + URL_WIKISTRING ,
|
||||
'html_middle' : '">' ,
|
||||
'%(wiki_backup_html_start)smake a backup%(html_end)s '
|
||||
'of your Family Tree.') % {
|
||||
'wiki_backup_html_start' : URL_BACKUP1_START ,
|
||||
'html_end' : '</a>' ,
|
||||
'bold_start' : '<b>' ,
|
||||
'bold_end' : '</b>' ,
|
||||
@ -181,11 +187,9 @@ class BsddbUpgradeRequiredError(Exception):
|
||||
'If you have not already made a backup of your Family Tree, '
|
||||
'then you should start your %(bold_start)sold%(bold_end)s '
|
||||
'version of Gramps and '
|
||||
'%(wiki_html_start)s'
|
||||
'How_to_make_a_backup%(html_middle)smake a backup'
|
||||
'%(html_end)s of your Family Tree.') % {
|
||||
'wiki_html_start' : '<a href="' + URL_WIKISTRING ,
|
||||
'html_middle' : '">' ,
|
||||
'%(wiki_backup_html_start)smake a backup%(html_end)s '
|
||||
'of your Family Tree.') % {
|
||||
'wiki_backup_html_start' : URL_BACKUP1_START ,
|
||||
'html_end' : '</a>' ,
|
||||
'bold_start' : '<b>' ,
|
||||
'bold_end' : '</b>' ,
|
||||
@ -236,25 +240,20 @@ class DbUpgradeRequiredError(Exception):
|
||||
'Family Tree.\n\n'
|
||||
'If you upgrade then you won\'t be able to use the previous '
|
||||
'version of Gramps, even if you subsequently '
|
||||
'%(wiki_html_start)s%(gramps_manual)s'
|
||||
'_-_Manage_Family_Trees#Backing_up_a_Family_Tree'
|
||||
'%(html_middle)sbackup%(html_end)s or '
|
||||
'%(wiki_html_start)s%(gramps_manual)s'
|
||||
'_-_Manage_Family_Trees#Export_into_Gramps_formats'
|
||||
'%(html_middle)sexport'
|
||||
'%(html_end)s your upgraded Family Tree.\n\n'
|
||||
'%(wiki_manual_backup_html_start)sbackup%(html_end)s or '
|
||||
'%(wiki_manual_export_html_start)sexport%(html_end)s '
|
||||
'your upgraded Family Tree.\n\n'
|
||||
'Upgrading is a difficult task which could irretrievably '
|
||||
'corrupt your Family Tree if it is interrupted or fails.\n\n'
|
||||
'If you have not already made a backup of your Family Tree, '
|
||||
'then you should start your %(bold_start)sold%(bold_end)s '
|
||||
'version of Gramps and '
|
||||
'%(wiki_html_start)s'
|
||||
'How_to_make_a_backup%(html_middle)smake a backup'
|
||||
'%(html_end)s of your Family Tree.') % {
|
||||
'wiki_html_start' : '<a href="' + URL_WIKISTRING ,
|
||||
'html_middle' : '">' ,
|
||||
'%(wiki_backup_html_start)smake a backup%(html_end)s '
|
||||
'of your Family Tree.') % {
|
||||
'wiki_backup_html_start' : URL_BACKUP1_START ,
|
||||
'wiki_manual_backup_html_start' : URL_BACKUP2_START ,
|
||||
'wiki_manual_export_html_start' : URL_EXPORT_START ,
|
||||
'html_end' : '</a>' ,
|
||||
'gramps_manual' : URL_MANUAL_PAGE,
|
||||
'bold_start' : '<b>' ,
|
||||
'bold_end' : '</b>' ,
|
||||
'oldschema' : self.oldschema,
|
||||
@ -280,12 +279,10 @@ class PythonDowngradeError(Exception):
|
||||
'this is bound to fail.\n\n'
|
||||
'You should start your '
|
||||
'%(bold_start)snewer%(bold_end)s version of Gramps and '
|
||||
'%(wiki_html_start)s'
|
||||
'How_to_make_a_backup%(html_middle)smake a backup'
|
||||
'%(html_end)s of your Family Tree. You can then import '
|
||||
'%(wiki_backup_html_start)smake a backup%(html_end)s '
|
||||
'of your Family Tree. You can then import '
|
||||
'this backup into this version of Gramps.') % {
|
||||
'wiki_html_start' : '<a href="' + URL_WIKISTRING ,
|
||||
'html_middle' : '">' ,
|
||||
'wiki_backup_html_start' : URL_BACKUP1_START ,
|
||||
'html_end' : '</a>' ,
|
||||
'bold_start' : '<b>' ,
|
||||
'bold_end' : '</b>' ,
|
||||
@ -311,25 +308,20 @@ class PythonUpgradeRequiredError(Exception):
|
||||
'Python version of the Family Tree.\n\n'
|
||||
'If you upgrade then you won\'t be able to use the previous '
|
||||
'version of Gramps, even if you subsequently '
|
||||
'%(wiki_html_start)s%(gramps_manual)s'
|
||||
'_-_Manage_Family_Trees#Backing_up_a_Family_Tree'
|
||||
'%(html_middle)sbackup%(html_end)s or '
|
||||
'%(wiki_html_start)s%(gramps_manual)s'
|
||||
'_-_Manage_Family_Trees#Export_into_Gramps_formats'
|
||||
'%(html_middle)sexport'
|
||||
'%(html_end)s your upgraded Family Tree.\n\n'
|
||||
'%(wiki_manual_backup_html_start)sbackup%(html_end)s or '
|
||||
'%(wiki_manual_export_html_start)sexport%(html_end)s '
|
||||
'your upgraded Family Tree.\n\n'
|
||||
'Upgrading is a difficult task which could irretrievably '
|
||||
'corrupt your Family Tree if it is interrupted or fails.\n\n'
|
||||
'If you have not already made a backup of your Family Tree, '
|
||||
'then you should start your %(bold_start)sold%(bold_end)s '
|
||||
'version of Gramps and '
|
||||
'%(wiki_html_start)s'
|
||||
'How_to_make_a_backup%(html_middle)smake a backup'
|
||||
'%(html_end)s of your Family Tree.') % {
|
||||
'wiki_html_start' : '<a href="' + URL_WIKISTRING ,
|
||||
'html_middle' : '">' ,
|
||||
'%(wiki_backup_html_start)smake a backup%(html_end)s '
|
||||
'of your Family Tree.') % {
|
||||
'wiki_backup_html_start' : URL_BACKUP1_START ,
|
||||
'wiki_manual_backup_html_start' : URL_BACKUP2_START ,
|
||||
'wiki_manual_export_html_start' : URL_EXPORT_START ,
|
||||
'html_end' : '</a>' ,
|
||||
'gramps_manual' : URL_MANUAL_PAGE,
|
||||
'bold_start' : '<b>' ,
|
||||
'bold_end' : '</b>' ,
|
||||
'db_python_version': self.db_python_version,
|
||||
|
@ -696,7 +696,7 @@ class DbManager(CLIDbManager):
|
||||
"a backup is needed. If the repair fails, or too much "
|
||||
"information is lost, you can fix the original "
|
||||
"Family Tree manually. For details, see the webpage\n"
|
||||
"%(gramps_wiki_url)sRecover_corrupted_family_tree\n"
|
||||
"%(gramps_wiki_recover_url)s\n"
|
||||
"Before doing a repair, try to open the Family Tree "
|
||||
"in the normal manner. Several errors that trigger the "
|
||||
"repair button can be fixed automatically. "
|
||||
@ -706,7 +706,8 @@ class DbManager(CLIDbManager):
|
||||
) % { 'bold_start' : '<b>' ,
|
||||
'bold_end' : '</b>' ,
|
||||
'recover_file' : '<i>need_recover</i>' ,
|
||||
'gramps_wiki_url' : URL_WIKISTRING ,
|
||||
'gramps_wiki_recover_url' :
|
||||
URL_WIKISTRING + 'Recover_corrupted_family_tree',
|
||||
'dirname' : dirname },
|
||||
_("Proceed, I have taken a backup"),
|
||||
_("Stop"))
|
||||
|
@ -66,36 +66,36 @@ class FAQGramplet(Gramplet):
|
||||
self.render_text("\n<b>%s</b>\n\n" % _("Editing Spouses"))
|
||||
|
||||
faq_dict.update(
|
||||
{ 'faq_section' : "#How_do_I_change_the_order_of_spouses.3F" })
|
||||
{ 'faq_section' : "#How_do_I_change_the_order_of_spouses.3F'>" })
|
||||
self.render_text(
|
||||
_(" 1. %(gramps_FAQ_html_start)s%(faq_section)s%(html_middle)s"
|
||||
_(" 1. %(gramps_FAQ_html_start)s%(faq_section)s"
|
||||
"How do I change the order of spouses?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
faq_dict.update(
|
||||
{ 'faq_section' : "#How_do_I_add_an_additional_spouse.3F" })
|
||||
{ 'faq_section' : "#How_do_I_add_an_additional_spouse.3F'>" })
|
||||
self.render_text(
|
||||
_(" 2. %(gramps_FAQ_html_start)s%(faq_section)s%(html_middle)s"
|
||||
_(" 2. %(gramps_FAQ_html_start)s%(faq_section)s"
|
||||
"How do I add an additional spouse?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
faq_dict.update(
|
||||
{ 'faq_section' : "#How_do_I_remove_a_spouse.3F" })
|
||||
{ 'faq_section' : "#How_do_I_remove_a_spouse.3F'>" })
|
||||
self.render_text(
|
||||
_(" 3. %(gramps_FAQ_html_start)s%(faq_section)s%(html_middle)s"
|
||||
_(" 3. %(gramps_FAQ_html_start)s%(faq_section)s"
|
||||
"How do I remove a spouse?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
|
||||
self.render_text("\n<b>%s</b>\n\n" % _("Backups and Updates"))
|
||||
|
||||
faq_dict.update(
|
||||
{ 'faq_section' : "#How_do_I_keep_backups.3F" })
|
||||
{ 'faq_section' : "#How_do_I_keep_backups.3F'>" })
|
||||
self.render_text(
|
||||
_(" 4. %(gramps_FAQ_html_start)s%(faq_section)s%(html_middle)s"
|
||||
_(" 4. %(gramps_FAQ_html_start)s%(faq_section)s"
|
||||
"How do I make backups safely?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
faq_dict.update(
|
||||
{ 'faq_section' : "#How_do_I_upgrade_GRAMPS.3F" })
|
||||
{ 'faq_section' : "#How_do_I_upgrade_GRAMPS.3F'>" })
|
||||
self.render_text(
|
||||
_(" 5. %(gramps_FAQ_html_start)s%(faq_section)s%(html_middle)s"
|
||||
_(" 5. %(gramps_FAQ_html_start)s%(faq_section)s"
|
||||
"Is it necessary to update Gramps "
|
||||
"every time an update is released?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
@ -104,31 +104,31 @@ class FAQGramplet(Gramplet):
|
||||
|
||||
faq_dict.update( { 'section' :
|
||||
"Entering_and_Editing_Data:_Detailed_-_part_1"
|
||||
"#Editing_Information_About_Relationships" })
|
||||
"#Editing_Information_About_Relationships'>" })
|
||||
self.render_text(
|
||||
_(" 6. %(gramps_manual_html_start)s%(section)s%(html_middle)s"
|
||||
_(" 6. %(gramps_manual_html_start)s%(section)s"
|
||||
"How should information about marriages be entered?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
faq_dict.update( { 'faq_section' :
|
||||
"#What_is_the_difference_"
|
||||
"between_a_residence_and_an_address.3F" })
|
||||
"between_a_residence_and_an_address.3F'>" })
|
||||
self.render_text(
|
||||
_(" 7. %(gramps_FAQ_html_start)s%(faq_section)s%(html_middle)s"
|
||||
_(" 7. %(gramps_FAQ_html_start)s%(faq_section)s"
|
||||
"What's the difference between a residence and an address?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
|
||||
self.render_text("\n<b>%s</b>\n\n" % _("Media Files"))
|
||||
|
||||
faq_dict.update(
|
||||
{ 'faq_section' : "#How_do_you_add_photos_to_an_item.3F" })
|
||||
{ 'faq_section' : "#How_do_you_add_photos_to_an_item.3F'>" })
|
||||
self.render_text(
|
||||
_(" 8. %(gramps_FAQ_html_start)s%(faq_section)s%(html_middle)s"
|
||||
_(" 8. %(gramps_FAQ_html_start)s%(faq_section)s"
|
||||
"How do you add a photo of a person/source/event?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
faq_dict.update(
|
||||
{ 'faq_section' : "#How_do_you_find_unused_media_objects.3F" })
|
||||
{ 'faq_section' : "#How_do_you_find_unused_media_objects.3F'>" })
|
||||
self.render_text(
|
||||
_(" 9. %(gramps_FAQ_html_start)s%(faq_section)s%(html_middle)s"
|
||||
_(" 9. %(gramps_FAQ_html_start)s%(faq_section)s"
|
||||
"How do you find unused media objects?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
|
||||
@ -136,42 +136,42 @@ class FAQGramplet(Gramplet):
|
||||
|
||||
faq_dict.update( { 'faq_section' :
|
||||
"#How_can_I_publish_web_sites_"
|
||||
"generated_by_GRAMPS.3F" })
|
||||
"generated_by_GRAMPS.3F'>" })
|
||||
self.render_text(
|
||||
_(" 10. %(gramps_FAQ_html_start)s%(faq_section)s%(html_middle)s"
|
||||
_(" 10. %(gramps_FAQ_html_start)s%(faq_section)s"
|
||||
"How can I make a website with Gramps and my tree?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
faq_dict.update( { 'web_html_start' :
|
||||
"<a href='http://sourceforge.net/mailarchive"
|
||||
"/message.php?msg_id=21487967" })
|
||||
"/message.php?msg_id=21487967'>" })
|
||||
self.render_text(
|
||||
_(" 11. %(web_html_start)s%(html_middle)s"
|
||||
_(" 11. %(web_html_start)s"
|
||||
"How do I record one's occupation?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
faq_dict.update(
|
||||
{ 'faq_section' : "#What_do_I_do_if_I_have_found_a_bug.3F" })
|
||||
{ 'faq_section' : "#What_do_I_do_if_I_have_found_a_bug.3F'>" })
|
||||
self.render_text(
|
||||
_(" 12. %(gramps_FAQ_html_start)s%(faq_section)s%(html_middle)s"
|
||||
_(" 12. %(gramps_FAQ_html_start)s%(faq_section)s"
|
||||
"What do I do if I have found a bug?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
faq_dict.update( { 'section' : "Portal:Using_GRAMPS" })
|
||||
faq_dict.update( { 'section' : "Portal:Using_GRAMPS'>" })
|
||||
self.render_text(
|
||||
_(" 13. %(gramps_wiki_html_start)s%(section)s%(html_middle)s"
|
||||
_(" 13. %(gramps_wiki_html_start)s%(section)s"
|
||||
"Is there a manual for Gramps?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
faq_dict.update( { 'section' : "Category:Tutorials" })
|
||||
faq_dict.update( { 'section' : "Category:Tutorials'>" })
|
||||
self.render_text(
|
||||
_(" 14. %(gramps_wiki_html_start)s%(section)s%(html_middle)s"
|
||||
_(" 14. %(gramps_wiki_html_start)s%(section)s"
|
||||
"Are there tutorials available?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
faq_dict.update( { 'section' : "Category:How_do_I..." })
|
||||
faq_dict.update( { 'section' : "Category:How_do_I...'>" })
|
||||
self.render_text(
|
||||
_(" 15. %(gramps_wiki_html_start)s%(section)s%(html_middle)s"
|
||||
_(" 15. %(gramps_wiki_html_start)s%(section)s"
|
||||
"How do I ...?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
faq_dict.update( { 'section' : "How_you_can_help" })
|
||||
faq_dict.update( { 'section' : "How_you_can_help'>" })
|
||||
self.render_text(
|
||||
_(" 16. %(gramps_wiki_html_start)s%(section)s%(html_middle)s"
|
||||
_(" 16. %(gramps_wiki_html_start)s%(section)s"
|
||||
"How can I help with Gramps?"
|
||||
"%(html_end)s\n") % faq_dict )
|
||||
self.append_text("", scroll_to='begin')
|
||||
|
@ -1613,13 +1613,11 @@ class BasePage(object):
|
||||
center_person.handle, "ppl", self.up)
|
||||
|
||||
person_name = self.get_name(center_person)
|
||||
msg += _('%(http_break)sCreated for %(url_start)s'
|
||||
'%(name)s%(url_end)s') % {
|
||||
subject_url = '<a href="' + center_person_url + '">'
|
||||
subject_url += person_name + '</a>'
|
||||
msg += _('%(http_break)sCreated for %(subject_url)s') % {
|
||||
'http_break' : '<br />' ,
|
||||
'url_start' :
|
||||
'<a href="' + center_person_url + '">' ,
|
||||
'url_end' : '</a>' ,
|
||||
'name' : person_name }
|
||||
'subject_url' : subject_url }
|
||||
|
||||
# creation author
|
||||
footer += Html("p", msg, id = 'createdate')
|
||||
|
Loading…
Reference in New Issue
Block a user