mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 13:15:35 +03:00
use new metadata locations for fdroid
This commit is contained in:
parent
1b200a5bad
commit
2b793f3bb2
7 changed files with 20 additions and 12 deletions
|
@ -1 +0,0 @@
|
||||||
Nextcloud
|
|
|
@ -1 +0,0 @@
|
||||||
Nextcloud
|
|
|
@ -1 +0,0 @@
|
||||||
Nextcloud
|
|
|
@ -1 +0,0 @@
|
||||||
Nextcloud
|
|
|
@ -12,7 +12,8 @@ from xml.etree import ElementTree
|
||||||
|
|
||||||
|
|
||||||
XML_PATH = '../../src/main/res'
|
XML_PATH = '../../src/main/res'
|
||||||
METADATA_PATH = '../../fastlane/metadata/android'
|
METADATA_PATH = '../../src/generic/fastlane/metadata/android/'
|
||||||
|
METADATA_DEV_PATH = '../../src/versionDev/fastlane/metadata/android/'
|
||||||
DEFAULT_LANG = 'en-US'
|
DEFAULT_LANG = 'en-US'
|
||||||
LANG_MAP = {
|
LANG_MAP = {
|
||||||
'values': 'en-US',
|
'values': 'en-US',
|
||||||
|
@ -79,15 +80,24 @@ def main():
|
||||||
e = ElementTree.parse(strings_file).getroot()
|
e = ElementTree.parse(strings_file).getroot()
|
||||||
short_desc = e.find('.//string[@name="store_short_desc"]')
|
short_desc = e.find('.//string[@name="store_short_desc"]')
|
||||||
full_desc = e.find('.//string[@name="store_full_desc"]')
|
full_desc = e.find('.//string[@name="store_full_desc"]')
|
||||||
if short_desc is None or full_desc is None:
|
short_dev_desc = e.find('.//string[@name="store_short_dev_desc"]')
|
||||||
print("Warning: Skipping %s because of incomplete translation" % entry)
|
full_dev_desc = e.find('.//string[@name="store_full_dev_desc"]')
|
||||||
continue
|
if short_desc is not None:
|
||||||
save_file(short_desc.text, LANG_MAP[entry], 'short_description.txt')
|
save_file(short_desc.text, LANG_MAP[entry], 'short_description.txt', False)
|
||||||
save_file(full_desc.text, LANG_MAP[entry], 'full_description.txt')
|
if short_dev_desc is not None:
|
||||||
|
save_file(short_dev_desc.text, LANG_MAP[entry], 'short_description.txt', True)
|
||||||
|
if full_desc is not None:
|
||||||
|
save_file(full_desc.text, LANG_MAP[entry], 'full_description.txt', False)
|
||||||
|
if full_dev_desc is not None:
|
||||||
|
save_file(full_dev_desc.text, LANG_MAP[entry], 'full_description.txt', True)
|
||||||
|
|
||||||
|
|
||||||
def save_file(text, directory, filename):
|
def save_file(text, directory, filename, dev):
|
||||||
|
if dev:
|
||||||
|
directory_path = os.path.join(PATH, METADATA_DEV_PATH, directory)
|
||||||
|
else:
|
||||||
directory_path = os.path.join(PATH, METADATA_PATH, directory)
|
directory_path = os.path.join(PATH, METADATA_PATH, directory)
|
||||||
|
|
||||||
if not os.path.exists(directory_path):
|
if not os.path.exists(directory_path):
|
||||||
os.makedirs(directory_path)
|
os.makedirs(directory_path)
|
||||||
if filename == 'short_description.txt':
|
if filename == 'short_description.txt':
|
||||||
|
|
1
src/generic/fastlane/metadata/android/en-US/title.txt
Normal file
1
src/generic/fastlane/metadata/android/en-US/title.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Nextcloud
|
1
src/versionDev/fastlane/metadata/android/en-US/title.txt
Normal file
1
src/versionDev/fastlane/metadata/android/en-US/title.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Nextcloud Dev
|
Loading…
Reference in a new issue