Skip to content

Commit

Permalink
Android resources have also other standard locations
Browse files Browse the repository at this point in the history
  • Loading branch information
jordimas committed Aug 11, 2023
1 parent d089856 commit ffa6fef
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/builder/convertfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,17 @@ def _convert_android_resources_files_to_po(self):
continue

subdirs.add(dir)
src = os.path.join(dir, "values/strings.xml")
tgt = os.path.join(dir, "values-ca/strings.xml")

if os.path.exists(src) and os.path.exists(tgt):
self._convert_android_file(src, tgt, id)
id += 1
for src, tgt in zip(
["values/strings.xml", "values/strings.xml"],
["values-ca/strings.xml", "values-ca-rES/strings.xml"],
):
src = os.path.join(dir, src)
tgt = os.path.join(dir, tgt)

if os.path.exists(src) and os.path.exists(tgt):
self._convert_android_file(src, tgt, id)
id += 1

logging.info("convert Android directory: {0}".format(self.convert_dir))

Expand Down

0 comments on commit ffa6fef

Please sign in to comment.