Rename config files
Change-Id: I172dd9a512e6530e398cee415ddc27be7dfa6472
diff --git a/crowdin/crowdin_cm-12.1.yaml b/config/cm-12.1.yaml
similarity index 99%
rename from crowdin/crowdin_cm-12.1.yaml
rename to config/cm-12.1.yaml
index 560ab4c..be614b5 100644
--- a/crowdin/crowdin_cm-12.1.yaml
+++ b/config/cm-12.1.yaml
@@ -1,4 +1,4 @@
-# crowdin_cm-12.1.yaml
+# cm-12.1.yaml
#
# Crowdin configuration file for CyanogenMod
#
diff --git a/crowdin/crowdin_cm-12.1_aosp.yaml b/config/cm-12.1_aosp.yaml
similarity index 99%
rename from crowdin/crowdin_cm-12.1_aosp.yaml
rename to config/cm-12.1_aosp.yaml
index 31f2a88..040b91d 100644
--- a/crowdin/crowdin_cm-12.1_aosp.yaml
+++ b/config/cm-12.1_aosp.yaml
@@ -1,4 +1,4 @@
-# crowdin_cm-12.1_aosp.yaml
+# cm-12.1_aosp.yaml
#
# Crowdin configuration file for CyanogenMod's
# additional languages not supported by AOSP
diff --git a/crowdin/crowdin_cm-13.0.yaml b/config/cm-13.0.yaml
similarity index 99%
rename from crowdin/crowdin_cm-13.0.yaml
rename to config/cm-13.0.yaml
index 582e5e8..71c799e 100644
--- a/crowdin/crowdin_cm-13.0.yaml
+++ b/config/cm-13.0.yaml
@@ -1,4 +1,4 @@
-# crowdin_cm-13.0.yaml
+# cm-13.0.yaml
#
# Crowdin configuration file for CyanogenMod
#
diff --git a/crowdin/crowdin_cm-13.0_aosp.yaml b/config/cm-13.0_aosp.yaml
similarity index 99%
rename from crowdin/crowdin_cm-13.0_aosp.yaml
rename to config/cm-13.0_aosp.yaml
index 317d06f..154e8e7 100644
--- a/crowdin/crowdin_cm-13.0_aosp.yaml
+++ b/config/cm-13.0_aosp.yaml
@@ -1,4 +1,4 @@
-# crowdin_cm-13.0_aosp.yaml
+# cm-13.0_aosp.yaml
#
# Crowdin configuration file for CyanogenMod's
# additional languages not supported by AOSP
diff --git a/crowdin/extra_packages_cm-12.1.xml b/config/extra_packages_cm-12.1.xml
similarity index 100%
rename from crowdin/extra_packages_cm-12.1.xml
rename to config/extra_packages_cm-12.1.xml
diff --git a/crowdin/extra_packages_cm-13.0.xml b/config/extra_packages_cm-13.0.xml
similarity index 100%
rename from crowdin/extra_packages_cm-13.0.xml
rename to config/extra_packages_cm-13.0.xml
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)