Rename config files
Change-Id: I172dd9a512e6530e398cee415ddc27be7dfa6472
diff --git a/crowdin_sync.py b/crowdin_sync.py
index 1d64bc2..0d57253 100755
--- a/crowdin_sync.py
+++ b/crowdin_sync.py
@@ -159,17 +159,17 @@
if config:
print('\nUploading sources to Crowdin (custom config)')
check_run(['crowdin-cli',
- '--config=%s/crowdin/%s' % (_DIR, config),
+ '--config=%s/config/%s' % (_DIR, config),
'upload', 'sources', '--branch=%s' % branch])
else:
print('\nUploading sources to Crowdin (AOSP supported languages)')
check_run(['crowdin-cli',
- '--config=%s/crowdin/crowdin_%s.yaml' % (_DIR, branch),
+ '--config=%s/config/%s.yaml' % (_DIR, branch),
'upload', 'sources', '--branch=%s' % branch])
print('\nUploading sources to Crowdin (non-AOSP supported languages)')
check_run(['crowdin-cli',
- '--config=%s/crowdin/crowdin_%s_aosp.yaml' % (_DIR, branch),
+ '--config=%s/config/%s_aosp.yaml' % (_DIR, branch),
'upload', 'sources', '--branch=%s' % branch])
@@ -177,7 +177,7 @@
if config:
print('\nUploading translations to Crowdin (custom config)')
check_run(['crowdin-cli',
- '--config=%s/crowdin/%s' % (_DIR, config),
+ '--config=%s/config/%s' % (_DIR, config),
'upload', 'translations', '--branch=%s' % branch,
'--no-import-duplicates', '--import-eq-suggestions',
'--auto-approve-imported'])
@@ -185,7 +185,7 @@
print('\nUploading translations to Crowdin '
'(AOSP supported languages)')
check_run(['crowdin-cli',
- '--config=%s/crowdin/crowdin_%s.yaml' % (_DIR, branch),
+ '--config=%s/config/%s.yaml' % (_DIR, branch),
'upload', 'translations', '--branch=%s' % branch,
'--no-import-duplicates', '--import-eq-suggestions',
'--auto-approve-imported'])
@@ -193,7 +193,7 @@
print('\nUploading translations to Crowdin '
'(non-AOSP supported languages)')
check_run(['crowdin-cli',
- '--config=%s/crowdin/crowdin_%s_aosp.yaml' % (_DIR, branch),
+ '--config=%s/config/%s_aosp.yaml' % (_DIR, branch),
'upload', 'translations', '--branch=%s' % branch,
'--no-import-duplicates', '--import-eq-suggestions',
'--auto-approve-imported'])
@@ -203,19 +203,19 @@
if config:
print('\nDownloading translations from Crowdin (custom config)')
check_run(['crowdin-cli',
- '--config=%s/crowdin/%s' % (_DIR, config),
+ '--config=%s/config/%s' % (_DIR, config),
'download', '--branch=%s' % branch])
else:
print('\nDownloading translations from Crowdin '
'(AOSP supported languages)')
check_run(['crowdin-cli',
- '--config=%s/crowdin/crowdin_%s.yaml' % (_DIR, branch),
+ '--config=%s/config/%s.yaml' % (_DIR, branch),
'download', '--branch=%s' % branch])
print('\nDownloading translations from Crowdin '
'(non-AOSP supported languages)')
check_run(['crowdin-cli',
- '--config=%s/crowdin/crowdin_%s_aosp.yaml' % (_DIR, branch),
+ '--config=%s/config/%s_aosp.yaml' % (_DIR, branch),
'download', '--branch=%s' % branch])
print('\nRemoving useless empty translation files')
@@ -243,10 +243,10 @@
# Get all files that Crowdin pushed
paths = []
if config:
- files = ['%s/crowdin/%s' % (_DIR, config)]
+ files = ['%s/config/%s' % (_DIR, config)]
else:
- files = ['%s/crowdin/crowdin_%s.yaml' % (_DIR, branch),
- '%s/crowdin/crowdin_%s_aosp.yaml' % (_DIR, branch)]
+ files = ['%s/config/%s.yaml' % (_DIR, branch),
+ '%s/config/%s_aosp.yaml' % (_DIR, branch)]
for c in files:
cmd = ['crowdin-cli', '--config=%s' % c, 'list', 'project',
'--branch=%s' % branch]
@@ -284,7 +284,7 @@
# project in all_projects and check if it's already in there.
all_projects.append(result)
- # Search android/default.xml or crowdin/extra_packages_%(branch).xml
+ # Search android/default.xml or config/extra_packages_%(branch).xml
# for the project's name
for project in items:
path = project.attributes['path'].value
@@ -326,16 +326,16 @@
if xml_android is None:
sys.exit(1)
- xml_extra = load_xml(x='%s/crowdin/extra_packages_%s.xml'
+ xml_extra = load_xml(x='%s/config/extra_packages_%s.xml'
% (_DIR, default_branch))
if xml_extra is None:
sys.exit(1)
if args.config:
- files = ['%s/crowdin/%s' % (_DIR, args.config)]
+ files = ['%s/config/%s' % (_DIR, args.config)]
else:
- files = ['%s/crowdin/crowdin_%s.yaml' % (_DIR, default_branch),
- '%s/crowdin/crowdin_%s_aosp.yaml' % (_DIR, default_branch)]
+ files = ['%s/config/%s.yaml' % (_DIR, default_branch),
+ '%s/config/%s_aosp.yaml' % (_DIR, default_branch)]
if not check_files(files):
sys.exit(1)