[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] rename all metadata locale dirs after the Fastlane/Play names
commit 571201009410445043025ced6d0bd499d86e5856
Author: Hans-Christoph Steiner <hans@xxxxxxx>
Date: Fri May 10 15:43:28 2019 +0200
rename all metadata locale dirs after the Fastlane/Play names
```python
import os
googlePlayLocales = sorted(('af', 'am', 'ar', 'az-AZ', 'be', 'bg', 'bn-BD', 'ca', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-CA', 'en-GB', 'en-IN', 'en-SG', 'en-US', 'en-ZA', 'es-419', 'es-ES', 'es-US', 'et', 'eu-ES', 'fa', 'fa-AE', 'fa-AF', 'fa-IR', 'fi-FI', 'fil', 'fr-CA', 'fr-FR', 'gl-ES', 'hi-IN', 'hr', 'hu-HU', 'hy-AM', 'id', 'is-IS', 'it-IT', 'iw-IL', 'ja-JP', 'ka-GE', 'kk', 'km-KH', 'kn-IN', 'ko-KR', 'ky-KG', 'lo-LA', 'lt', 'lv', 'mk-MK', 'ml-IN', 'mn-MN', 'mr-IN', 'ms', 'ms-MY', 'my-MM', 'ne-NP', 'nl-NL', 'no-NO', 'pa', 'pl-PL', 'pt-BR', 'pt-PT', 'rm', 'ro', 'ru-RU', 'si-LK', 'sk', 'sl', 'sr', 'sv-SE', 'sw', 'ta-IN', 'te-IN', 'th', 'tr-TR', 'uk', 'vi', 'zh-CN', 'zh-HK', 'zh-TW', 'zu'))
os.chdir(os.path.join(os.path.dirname(__file__), '..', 'metadata'))
for f in os.listdir():
if f in googlePlayLocales:
continue
else:
for locale in googlePlayLocales:
if locale.startswith(f):
os.rename(f, locale)
break
```
---
metadata/{cs => cs-CZ}/short_description.txt | 0
metadata/{de => de-DE}/full_description.txt | 0
metadata/{de => de-DE}/short_description.txt | 0
metadata/{de => de-DE}/title.txt | 0
metadata/{el => el-GR}/short_description.txt | 0
metadata/{es => es-ES}/full_description.txt | 0
metadata/{fi => fi-FI}/short_description.txt | 0
metadata/{fr => fr-FR}/full_description.txt | 0
metadata/{hi => hi-IN}/short_description.txt | 0
metadata/{hu => hu-HU}/short_description.txt | 0
metadata/{it => it-IT}/short_description.txt | 0
metadata/{ja => ja-JP}/short_description.txt | 0
metadata/{ko => ko-KR}/short_description.txt | 0
metadata/{nl => nl-NL}/short_description.txt | 0
metadata/{no => no-NO}/short_description.txt | 0
metadata/{pl => pl-PL}/short_description.txt | 0
metadata/{ru => ru-RU}/short_description.txt | 0
metadata/{ru => ru-RU}/title.txt | 0
metadata/{sv => sv-SE}/short_description.txt | 0
metadata/{tr => tr-TR}/full_description.txt | 0
tools/check-fastlane-whitespace.py | 4 +++-
21 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/metadata/cs/short_description.txt b/metadata/cs-CZ/short_description.txt
similarity index 100%
rename from metadata/cs/short_description.txt
rename to metadata/cs-CZ/short_description.txt
diff --git a/metadata/de/full_description.txt b/metadata/de-DE/full_description.txt
similarity index 100%
rename from metadata/de/full_description.txt
rename to metadata/de-DE/full_description.txt
diff --git a/metadata/de/short_description.txt b/metadata/de-DE/short_description.txt
similarity index 100%
rename from metadata/de/short_description.txt
rename to metadata/de-DE/short_description.txt
diff --git a/metadata/de/title.txt b/metadata/de-DE/title.txt
similarity index 100%
rename from metadata/de/title.txt
rename to metadata/de-DE/title.txt
diff --git a/metadata/el/short_description.txt b/metadata/el-GR/short_description.txt
similarity index 100%
rename from metadata/el/short_description.txt
rename to metadata/el-GR/short_description.txt
diff --git a/metadata/es/full_description.txt b/metadata/es-ES/full_description.txt
similarity index 100%
rename from metadata/es/full_description.txt
rename to metadata/es-ES/full_description.txt
diff --git a/metadata/fi/short_description.txt b/metadata/fi-FI/short_description.txt
similarity index 100%
rename from metadata/fi/short_description.txt
rename to metadata/fi-FI/short_description.txt
diff --git a/metadata/fr/full_description.txt b/metadata/fr-FR/full_description.txt
similarity index 100%
rename from metadata/fr/full_description.txt
rename to metadata/fr-FR/full_description.txt
diff --git a/metadata/hi/short_description.txt b/metadata/hi-IN/short_description.txt
similarity index 100%
rename from metadata/hi/short_description.txt
rename to metadata/hi-IN/short_description.txt
diff --git a/metadata/hu/short_description.txt b/metadata/hu-HU/short_description.txt
similarity index 100%
rename from metadata/hu/short_description.txt
rename to metadata/hu-HU/short_description.txt
diff --git a/metadata/it/short_description.txt b/metadata/it-IT/short_description.txt
similarity index 100%
rename from metadata/it/short_description.txt
rename to metadata/it-IT/short_description.txt
diff --git a/metadata/ja/short_description.txt b/metadata/ja-JP/short_description.txt
similarity index 100%
rename from metadata/ja/short_description.txt
rename to metadata/ja-JP/short_description.txt
diff --git a/metadata/ko/short_description.txt b/metadata/ko-KR/short_description.txt
similarity index 100%
rename from metadata/ko/short_description.txt
rename to metadata/ko-KR/short_description.txt
diff --git a/metadata/nl/short_description.txt b/metadata/nl-NL/short_description.txt
similarity index 100%
rename from metadata/nl/short_description.txt
rename to metadata/nl-NL/short_description.txt
diff --git a/metadata/no/short_description.txt b/metadata/no-NO/short_description.txt
similarity index 100%
rename from metadata/no/short_description.txt
rename to metadata/no-NO/short_description.txt
diff --git a/metadata/pl/short_description.txt b/metadata/pl-PL/short_description.txt
similarity index 100%
rename from metadata/pl/short_description.txt
rename to metadata/pl-PL/short_description.txt
diff --git a/metadata/ru/short_description.txt b/metadata/ru-RU/short_description.txt
similarity index 100%
rename from metadata/ru/short_description.txt
rename to metadata/ru-RU/short_description.txt
diff --git a/metadata/ru/title.txt b/metadata/ru-RU/title.txt
similarity index 100%
rename from metadata/ru/title.txt
rename to metadata/ru-RU/title.txt
diff --git a/metadata/sv/short_description.txt b/metadata/sv-SE/short_description.txt
similarity index 100%
rename from metadata/sv/short_description.txt
rename to metadata/sv-SE/short_description.txt
diff --git a/metadata/tr/full_description.txt b/metadata/tr-TR/full_description.txt
similarity index 100%
rename from metadata/tr/full_description.txt
rename to metadata/tr-TR/full_description.txt
diff --git a/tools/check-fastlane-whitespace.py b/tools/check-fastlane-whitespace.py
index 2a1865af..b582d02a 100755
--- a/tools/check-fastlane-whitespace.py
+++ b/tools/check-fastlane-whitespace.py
@@ -3,7 +3,9 @@
import glob
import os
-for f in glob.glob('metadata/*/*.txt') + glob.glob('metadata/*/*/*.txt'):
+os.chdir(os.path.join(os.path.dirname(__file__), '..'))
+
+for f in glob.glob('metadata/*/*.txt') + glob.glob('metadata/*/*/*.txt'):
if os.path.getsize(f) == 0:
os.remove(f)
continue
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits