forked from openlp/openlp
Constant names' readability. Thanks, Samuel.
This commit is contained in:
parent
4917831206
commit
556f28db33
@ -435,7 +435,7 @@ class StripRtf():
|
||||
u'writereservhash', u'xe', u'xform', u'xmlattrname', u'xmlattrvalue',
|
||||
u'xmlclose', u'xmlname', u'xmlnstbl', u'xmlopen'))
|
||||
# Translation of some special characters.
|
||||
SPECIALCHARS = {
|
||||
SPECIAL_CHARS = {
|
||||
u'par': u'\n',
|
||||
u'sect': u'\n\n',
|
||||
# Required page and column break.
|
||||
@ -520,8 +520,8 @@ class StripRtf():
|
||||
curskip = 0
|
||||
if word in self.DESTINATIONS:
|
||||
ignorable = True
|
||||
elif word in self.SPECIALCHARS:
|
||||
out.append(self.SPECIALCHARS[word])
|
||||
elif word in self.SPECIAL_CHARS:
|
||||
out.append(self.SPECIAL_CHARS[word])
|
||||
elif word == u'uc':
|
||||
ucskip = int(arg)
|
||||
elif word == u' ':
|
||||
|
@ -42,7 +42,7 @@ class SundayPlusImport(SongImport):
|
||||
The format examples can be found attached to bug report at
|
||||
<http://support.openlp.org/issues/395>
|
||||
"""
|
||||
HOTKEYTOVERSETYPE = {
|
||||
HOTKEY_TO_VERSE_TYPE = {
|
||||
u'1': u'v1',
|
||||
u'2': u'v2',
|
||||
u'3': u'v3',
|
||||
@ -147,8 +147,8 @@ class SundayPlusImport(SongImport):
|
||||
# Hotkey always appears after MARKER_NAME, so it
|
||||
# effectively overrides MARKER_NAME, if present.
|
||||
if len(value) and \
|
||||
value in self.HOTKEYTOVERSETYPE.keys():
|
||||
verse_type = self.HOTKEYTOVERSETYPE[value]
|
||||
value in self.HOTKEY_TO_VERSE_TYPE.keys():
|
||||
verse_type = self.HOTKEY_TO_VERSE_TYPE[value]
|
||||
if name == 'rtf':
|
||||
value = self.unescape(value)
|
||||
verse = self.rtf.strip_rtf(value, self.encoding)
|
||||
|
Loading…
Reference in New Issue
Block a user