mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-02 09:35:33 -05:00
Merge pull request #1535 from mig5/censorship_update_countries_json
Update countries json files and script
This commit is contained in:
commit
622d689b2c
1
desktop/onionshare/resources/countries/el.json
Normal file
1
desktop/onionshare/resources/countries/el.json
Normal file
File diff suppressed because one or more lines are too long
1
desktop/onionshare/resources/countries/fr.json
Normal file
1
desktop/onionshare/resources/countries/fr.json
Normal file
File diff suppressed because one or more lines are too long
1
desktop/onionshare/resources/countries/ja.json
Normal file
1
desktop/onionshare/resources/countries/ja.json
Normal file
File diff suppressed because one or more lines are too long
1
desktop/onionshare/resources/countries/pt_PT.json
Normal file
1
desktop/onionshare/resources/countries/pt_PT.json
Normal file
File diff suppressed because one or more lines are too long
@ -22,9 +22,7 @@ def main():
|
|||||||
available_locales = list(settings.available_locales)
|
available_locales = list(settings.available_locales)
|
||||||
|
|
||||||
# Make a dictionary that makes a language's ISO 3166-1 to its name in all enabled languages
|
# Make a dictionary that makes a language's ISO 3166-1 to its name in all enabled languages
|
||||||
os.makedirs(
|
os.makedirs(os.path.join("onionshare", "resources", "countries"), exist_ok=True)
|
||||||
os.path.join("src", "onionshare", "resources", "countries"), exist_ok=True
|
|
||||||
)
|
|
||||||
for locale in available_locales:
|
for locale in available_locales:
|
||||||
with open(os.path.join(repo_dir, "data", locale, "country.json")) as f:
|
with open(os.path.join(repo_dir, "data", locale, "country.json")) as f:
|
||||||
countries = json.loads(f.read())
|
countries = json.loads(f.read())
|
||||||
@ -34,9 +32,7 @@ def main():
|
|||||||
del countries[key]
|
del countries[key]
|
||||||
|
|
||||||
with open(
|
with open(
|
||||||
os.path.join(
|
os.path.join("onionshare", "resources", "countries", f"{locale}.json"),
|
||||||
"src", "onionshare", "resources", "countries", f"{locale}.json"
|
|
||||||
),
|
|
||||||
"w",
|
"w",
|
||||||
) as f:
|
) as f:
|
||||||
f.write(json.dumps(countries))
|
f.write(json.dumps(countries))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user