Finished translatable variables in NarrativeWeb
svn: r12954
This commit is contained in:
parent
b462ef15cf
commit
cfad2f0629
@ -770,28 +770,28 @@ table.download tbody tr td {
|
|||||||
border-width:0 2px 2px 2px;
|
border-width:0 2px 2px 2px;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
}
|
}
|
||||||
table.download td.Description {
|
table.download td.ColumnDescription {
|
||||||
width:45%;
|
width:45%;
|
||||||
}
|
}
|
||||||
table.download td.License {
|
table.download td.ColumnLicense {
|
||||||
width:6%;
|
width:6%;
|
||||||
padding-left:20px;
|
padding-left:20px;
|
||||||
}
|
}
|
||||||
table.download td.Filename {
|
table.download td.ColumnFilename {
|
||||||
width:30%;
|
width:30%;
|
||||||
background-color:#FFF;
|
background-color:#FFF;
|
||||||
}
|
}
|
||||||
table.download td.Filename a {
|
table.download td.ColumnFilename a {
|
||||||
display:block;
|
display:block;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
}
|
}
|
||||||
table.download td.Filename a:hover {
|
table.download td.ColumnFilename a:hover {
|
||||||
text-decoration:underline;
|
text-decoration:underline;
|
||||||
}
|
}
|
||||||
table.download td.Modified {
|
table.download td.ColumnModified {
|
||||||
width:17%;
|
width:17%;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
@ -119,6 +119,22 @@ from libhtmlbackend import HtmlBackend
|
|||||||
# constants
|
# constants
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
# Translatable strings for variables within this plugin
|
||||||
|
# gettext carries a huge footprint with it.
|
||||||
|
EHEAD = _('EventType')
|
||||||
|
DHEAD = _('Date')
|
||||||
|
PHEAD = _('Place')
|
||||||
|
DESCRHEAD = _('Description')
|
||||||
|
SHEAD = _('Sources')
|
||||||
|
NHEAD = _('Notes')
|
||||||
|
STREET = _('Street')
|
||||||
|
CITY = _('City')
|
||||||
|
COUNTY = _('County')
|
||||||
|
STATE = _('State/ Province')
|
||||||
|
COUNTRY = _('Country')
|
||||||
|
POSTAL = _('Postal Code')
|
||||||
|
PHONE = _('Phone')
|
||||||
|
|
||||||
# define clear blank line for proper styling
|
# define clear blank line for proper styling
|
||||||
fullclear = Html('div', class_='fullclear', inline=True)
|
fullclear = Html('div', class_='fullclear', inline=True)
|
||||||
|
|
||||||
@ -251,13 +267,13 @@ class BasePage(object):
|
|||||||
trow = Html('tr')
|
trow = Html('tr')
|
||||||
|
|
||||||
for label, colclass in [
|
for label, colclass in [
|
||||||
[_('Type'), 'LDSType' ],
|
[_('Type'), 'LDSType' ],
|
||||||
[_('Date'), 'LDSDate' ],
|
[HEAD, 'LDSDate' ],
|
||||||
[_('Temple'), 'LDSTemple' ],
|
[_('Temple'), 'LDSTemple' ],
|
||||||
[_('Place'), 'LDSPlace' ],
|
[PHEAD, 'LDSPlace' ],
|
||||||
[_('Status'), 'LDSStatus' ],
|
[_('Status'), 'LDSStatus' ],
|
||||||
[_('Sealed to '), 'LDSSealed'],
|
[_('Sealed to '), 'LDSSealed'],
|
||||||
[_('Sources'), 'LDSSources'] ]:
|
[SHEAD, 'LDSSources'] ]:
|
||||||
|
|
||||||
trow += Html('th', label, class_='Column%s' % colclass, inline=True)
|
trow += Html('th', label, class_='Column%s' % colclass, inline=True)
|
||||||
|
|
||||||
@ -461,20 +477,20 @@ class BasePage(object):
|
|||||||
|
|
||||||
trow = Html('tr')
|
trow = Html('tr')
|
||||||
addr_header = [
|
addr_header = [
|
||||||
[_('Date'), 'Date'],
|
[DHEAD, 'Date'],
|
||||||
[_('Street'), 'StreetAddress'],
|
[STREET, 'StreetAddress'],
|
||||||
[_('City'), 'City'],
|
[CITY, 'City'],
|
||||||
[_('County'), 'County'],
|
[COUNTY, 'County'],
|
||||||
[_('State/ Province'), 'State'],
|
[STATE, 'State'],
|
||||||
[_('Cntry'), 'Cntry'],
|
[COUNTRY, 'Cntry'],
|
||||||
[_('Postal Code'), 'Postalcode'],
|
[POSTAL, 'Postalcode'],
|
||||||
[_('Phone'), 'Phone'] ]
|
[PHONE, 'Phone'] ]
|
||||||
|
|
||||||
# if spec = True -- an individual's address else repository
|
# if spec = True -- an individual's address else repository
|
||||||
if spec:
|
if spec:
|
||||||
addr_header.append([_('Sources'), 'Sources'])
|
addr_header.append([SHEAD, 'Source'])
|
||||||
|
|
||||||
for label, colclass in addr_header:
|
for (label, colclass) in addr_header:
|
||||||
trow += Html('th', label, class_='Column%s' % colclass, inline=True)
|
trow += Html('th', label, class_='Column%s' % colclass, inline=True)
|
||||||
|
|
||||||
# return table header row back to module
|
# return table header row back to module
|
||||||
@ -519,7 +535,7 @@ class BasePage(object):
|
|||||||
|
|
||||||
# get source citation list
|
# get source citation list
|
||||||
if spec:
|
if spec:
|
||||||
addrcollist.append([_('Sources'), address.get_source_references()])
|
addrcollist.append([SHEAD, address.get_source_references()])
|
||||||
addrcollist[8][1] = self.get_citation_links(addrcollist[8][1])
|
addrcollist[8][1] = self.get_citation_links(addrcollist[8][1])
|
||||||
|
|
||||||
for (colclass, value) in addrcollist:
|
for (colclass, value) in addrcollist:
|
||||||
@ -628,7 +644,7 @@ class BasePage(object):
|
|||||||
attr_header_row = [
|
attr_header_row = [
|
||||||
(_('Type'), 'Type'),
|
(_('Type'), 'Type'),
|
||||||
(_('Value'), 'Value'),
|
(_('Value'), 'Value'),
|
||||||
(_('Sources'), 'Source') ]
|
(SHEAD, 'Source') ]
|
||||||
for (label, colclass) in attr_header_row:
|
for (label, colclass) in attr_header_row:
|
||||||
|
|
||||||
trow += Html('th', label, class_='Column%s' % colclass, inline=True)
|
trow += Html('th', label, class_='Column%s' % colclass, inline=True)
|
||||||
@ -665,7 +681,7 @@ class BasePage(object):
|
|||||||
if first:
|
if first:
|
||||||
trow = Html('tr') + (
|
trow = Html('tr') + (
|
||||||
Html('td', ' ', class_='ColumnAttribute', inline=True),
|
Html('td', ' ', class_='ColumnAttribute', inline=True),
|
||||||
Html('td', _('Notes'), class_='ColumnValue', inline=True),
|
Html('td', NHEAD, class_='ColumnValue', inline=True),
|
||||||
Html('td', note_text, class_='ColumnName', inline=True)
|
Html('td', note_text, class_='ColumnName', inline=True)
|
||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
@ -1109,9 +1125,9 @@ class BasePage(object):
|
|||||||
confidence = None
|
confidence = None
|
||||||
|
|
||||||
source_data = [
|
source_data = [
|
||||||
[_('Date'), _dd.display(sref.date)],
|
[DHEAD, _dd.display(sref.date)],
|
||||||
[_('Page'), sref.page],
|
[_('Page'), sref.page],
|
||||||
[_('Confidence'), confidence]
|
[_('Confidence'), confidence]
|
||||||
]
|
]
|
||||||
for (label, data) in source_data:
|
for (label, data) in source_data:
|
||||||
if data:
|
if data:
|
||||||
@ -1774,13 +1790,16 @@ class PlacePage(BasePage):
|
|||||||
|
|
||||||
if place.main_loc:
|
if place.main_loc:
|
||||||
ml = place.main_loc
|
ml = place.main_loc
|
||||||
for val in [(_('Street'), ml.street),
|
for val in [
|
||||||
(_('City'), ml.city),
|
(_('Latitude'), place.lat),
|
||||||
|
(_('Longitude'), place.long),
|
||||||
|
(STREET, ml.street),
|
||||||
|
(CITY, ml.city),
|
||||||
(_('Church Parish'), ml.parish),
|
(_('Church Parish'), ml.parish),
|
||||||
(_('County'), ml.county),
|
(COUNTY, ml.county),
|
||||||
(_('State/Province'), ml.state),
|
(STATE, ml.state),
|
||||||
(_('ZIP/Postal Code'), ml.postal),
|
(POSTAL, ml.postal),
|
||||||
(_('Country'), ml.country)]:
|
(COUNTRY, ml.country)]:
|
||||||
if val[1]:
|
if val[1]:
|
||||||
trow = Html('tr') + (
|
trow = Html('tr') + (
|
||||||
Html('td', val[0], class_='ColumnAttribute', inline=True),
|
Html('td', val[0], class_='ColumnAttribute', inline=True),
|
||||||
@ -1788,20 +1807,6 @@ class PlacePage(BasePage):
|
|||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
if place.lat:
|
|
||||||
trow = Html('tr') + (
|
|
||||||
Html('td', _('Latitude'), class_='ColumnAttribute', inline=True),
|
|
||||||
Html('td', place.lat, class_='ColumnValue', inline=True)
|
|
||||||
)
|
|
||||||
table += trow
|
|
||||||
|
|
||||||
if place.long:
|
|
||||||
trow = Html('tr') + (
|
|
||||||
Html('td', _('Longitude'), class_='ColumnAttribute', inline=True),
|
|
||||||
Html('td', place.long, class_='ColumnValue', inline=True)
|
|
||||||
)
|
|
||||||
table += trow
|
|
||||||
|
|
||||||
# place gallery
|
# place gallery
|
||||||
if self.create_media:
|
if self.create_media:
|
||||||
placegallery = self.display_additional_images_as_gallery(media_list)
|
placegallery = self.display_additional_images_as_gallery(media_list)
|
||||||
@ -2084,7 +2089,7 @@ class MediaPage(BasePage):
|
|||||||
date = _dd.display(photo.get_date_object())
|
date = _dd.display(photo.get_date_object())
|
||||||
if date:
|
if date:
|
||||||
trow = Html('tr') + (
|
trow = Html('tr') + (
|
||||||
Html('td', _('Date'), class_='ColumnAttribute', inline=True),
|
Html('td', DHEAD, class_='ColumnAttribute', inline=True),
|
||||||
Html('td', date, class_='ColumnValue', inline=True)
|
Html('td', date, class_='ColumnValue', inline=True)
|
||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
@ -2587,7 +2592,7 @@ class MediaListPage(BasePage):
|
|||||||
trow = Html('tr') + (
|
trow = Html('tr') + (
|
||||||
Html('th', ' ', class_='ColumnRowLabel', inline=True),
|
Html('th', ' ', class_='ColumnRowLabel', inline=True),
|
||||||
Html('th', _('Name'), class_='ColumnName', inline=True),
|
Html('th', _('Name'), class_='ColumnName', inline=True),
|
||||||
Html('th', _('Date'), class_='ColumnDate', inline=True)
|
Html('th', DHEAD, class_='ColumnDate', inline=True)
|
||||||
)
|
)
|
||||||
thead += trow
|
thead += trow
|
||||||
|
|
||||||
@ -2698,11 +2703,11 @@ class DownloadPage(BasePage):
|
|||||||
trow = Html('tr')
|
trow = Html('tr')
|
||||||
thead += trow
|
thead += trow
|
||||||
|
|
||||||
for (title, colclass) in [(_('File Name'), 'Filename'),
|
for (label, colclass) in [(_('File Name'), 'Filename'),
|
||||||
(_('Description'), 'Description'),
|
(DESCRHEAD, 'Description'),
|
||||||
(_('License'), 'License'),
|
(_('License'), 'License'),
|
||||||
(_('Last Modified'), 'Modified') ]:
|
(_('Last Modified'), 'Modified') ]:
|
||||||
trow += Html('th', title, class_='%s' % colclass, inline=True)
|
trow += Html('th', label, class_='Column%s' % colclass, inline=True)
|
||||||
|
|
||||||
# if dlfname1 is not None, show it???
|
# if dlfname1 is not None, show it???
|
||||||
if dlfname1:
|
if dlfname1:
|
||||||
@ -3951,12 +3956,12 @@ class IndividualPage(BasePage):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
header_row = [
|
header_row = [
|
||||||
(_('EventType'), 'EventType'),
|
(EHEAD, 'EventType'),
|
||||||
(_('Date'), 'Date'),
|
(DHEAD, 'Date'),
|
||||||
(_('Place'), 'Place'),
|
(PHEAD, 'Place'),
|
||||||
(_('Description'), 'Description'),
|
(DESCRHEAD, 'Description'),
|
||||||
(_('Source'), 'Source'),
|
(SHEAD, 'Source'),
|
||||||
(_('Note'), 'Note') ]
|
(NHEAD, 'Note') ]
|
||||||
|
|
||||||
# begin table header row
|
# begin table header row
|
||||||
trow = Html('tr')
|
trow = Html('tr')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user