Commit d63f0453 authored by Michal Čihař's avatar Michal Čihař

Fixed filename calculation for Android resources (fixes #480)

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 49767a18
......@@ -758,6 +758,17 @@ class AndroidFormat(FileFormat):
'''
return True
@staticmethod
def get_language_filename(path, mask, code):
"""
Return full filename of a language file for given
path, filemaks and language code.
"""
return os.path.join(
path,
mask.replace('*', code.replace('_', '-r'))
)
@staticmethod
def add_language(filename, code, base):
'''
......
......@@ -88,4 +88,4 @@ class AndroidFormatTest(AutoFormatTest):
COUNT = 0
MATCH = '<resources></resources>'
MASK = 'res/values-*/strings.xml'
EXPECTED_PATH = '/path/res/values-cs_CZ/strings.xml'
EXPECTED_PATH = '/path/res/values-cs-rCZ/strings.xml'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment