Browse Source

Merge branch 'CountryList-Entry-Title-SortKeyName' into test-v6

develop
Jonathan Golder 6 years ago
parent
commit
da99dee429
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      countrylist.py

+ 14
- 0
countrylist.py View File

@ -278,6 +278,20 @@ missing!" )
for ref in self._titel_raw.ifilter_tags(matches="ref"):
self._titel_raw.remove( ref )
# Handle SortKeyName and SortKey
for template in self._titel_raw.ifilter_templates(
matches="SortKey" ):
if template.name == "SortKeyName":
titel = "[[" + template.get(1) + " " + template.get(2)
if template.has(3):
titel += "|" + template.get(3)
titel += "]]"
self._title_raw.replace( template, titel )
else:
if template.has(2):
self._title_raw.replace( template, template.get(2) )
# Remove whitespace
self._titel_raw = str(self._titel_raw).strip()
else:


Loading…
Cancel
Save