mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-28 10:33:59 +00:00
Update countries.pot parser since format changed (iso_code -> iso.code)
It changed in https://bitbucket.org/metabrainz/musicbrainz-server/pull-request/426/mbs-6373-only-translate-and-extract-area/diff
This commit is contained in:
committed by
Wieland Hoffmann
parent
5aacfe2880
commit
3468dddd4f
5
setup.py
5
setup.py
@@ -355,6 +355,7 @@ class picard_update_countries(Command):
|
||||
break
|
||||
if relpath is not None:
|
||||
potfile = os.path.join(relpath, 'countries.pot')
|
||||
isocode_comment = u'iso.code:'
|
||||
if os.path.isfile(potfile):
|
||||
log.info('Parsing %s' % potfile)
|
||||
with open(potfile, 'rb') as f:
|
||||
@@ -363,8 +364,8 @@ class picard_update_countries(Command):
|
||||
if not message.id or not isinstance(message.id, unicode):
|
||||
continue
|
||||
for comment in message.auto_comments:
|
||||
if comment.startswith(u'iso_code:'):
|
||||
code = comment.replace(u'iso_code:', u'')
|
||||
if comment.startswith(isocode_comment):
|
||||
code = comment.replace(isocode_comment, u'')
|
||||
country = message.id
|
||||
country_list.append((code, country))
|
||||
if country_list:
|
||||
|
||||
Reference in New Issue
Block a user