i18n Python scripts: minor changes
- Remove unnecessary imports These imports were a leftover from early versions; now, they are done in modules such as flightgear.meta.i18n and don't need to be in the calling scripts anymore. - Fix an exception message
This commit is contained in:
parent
6b970f8e02
commit
54d6196698
4 changed files with 1 additions and 17 deletions
|
@ -24,11 +24,6 @@ import locale
|
|||
import os
|
||||
import sys
|
||||
|
||||
try:
|
||||
import xml.etree.ElementTree as et
|
||||
except ImportError:
|
||||
import elementtree.ElementTree as et
|
||||
|
||||
import flightgear.meta.logging
|
||||
import flightgear.meta.i18n as fg_i18n
|
||||
|
||||
|
|
|
@ -24,11 +24,6 @@ import locale
|
|||
import os
|
||||
import sys
|
||||
|
||||
try:
|
||||
import xml.etree.ElementTree as et
|
||||
except ImportError:
|
||||
import elementtree.ElementTree as et
|
||||
|
||||
import flightgear.meta.logging
|
||||
import flightgear.meta.i18n as fg_i18n
|
||||
|
||||
|
|
|
@ -25,11 +25,6 @@ import locale
|
|||
import os
|
||||
import sys
|
||||
|
||||
try:
|
||||
import xml.etree.ElementTree as et
|
||||
except ImportError:
|
||||
import elementtree.ElementTree as et
|
||||
|
||||
import flightgear.meta.logging
|
||||
import flightgear.meta.i18n as fg_i18n
|
||||
|
||||
|
|
|
@ -684,8 +684,7 @@ class Translation:
|
|||
|
||||
def mergeMasterForCategory(self, masterTransl, cat, logger=dummyLogger):
|
||||
if cat not in masterTransl:
|
||||
raise BadAPIUse("Bad API use: category {!r} not in " \
|
||||
"'masterTransl'".format(cat))
|
||||
raise BadAPIUse("category {!r} not in 'masterTransl'".format(cat))
|
||||
elif cat not in self:
|
||||
# Category appeared in 'masterTransl' that wasn't in 'self'
|
||||
self.resetCategory(cat)
|
||||
|
|
Loading…
Reference in a new issue