aboutsummaryrefslogtreecommitdiffstats
path: root/src/_locales/delete.py
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2023-02-02 20:29:48 +0300
committerManeraKai <manerakai@protonmail.com>2023-02-02 20:29:48 +0300
commit7c453664b5245f3da3fe3ee8b9698c9addd022cc (patch)
treec87ac075287c4f88867672f75c16fc0dd8461c1b /src/_locales/delete.py
parentMerged codeberg translations (diff)
downloadlibredirect-7c453664b5245f3da3fe3ee8b9698c9addd022cc.zip
Removed some strings from localizing
Diffstat (limited to 'src/_locales/delete.py')
-rw-r--r--src/_locales/delete.py54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/_locales/delete.py b/src/_locales/delete.py
new file mode 100644
index 00000000..13bfe546
--- /dev/null
+++ b/src/_locales/delete.py
@@ -0,0 +1,54 @@
+import json
+
+
+# langs = ['bs', 'cs', 'de', 'es', 'fr', 'gl', 'hr', 'id', 'it', 'ja', 'ko',
+# 'nb_NO', 'nl', 'pl', 'pt', 'pt_BR', 'ro', 'ru', 'sr', 'tr', 'uk', 'vi', 'zh_Hans']
+en_json = {}
+
+with open('./en/messages.json') as data:
+ en_json = json.load(data)
+
+keys = ['extensionName',
+ 'extensionDescription',
+ 'general',
+ 'theme',
+ 'auto',
+ 'light',
+ 'dark',
+ 'excludeFromRedirecting',
+ 'importSettings',
+ 'exportSettings',
+ 'resetSettings',
+ 'enable',
+ 'showInPopup',
+ 'frontend',
+ 'redirectType',
+ 'both',
+ 'onlyEmbedded',
+ 'onlyNotEmbedded',
+ 'addYourFavoriteInstances',
+ 'switchInstance',
+ 'copyRaw',
+ 'copied',
+ 'settings',
+ 'about',
+ 'redirectToOriginal',
+ 'redirectLink',
+ ]
+
+tmp = {}
+
+for key in en_json:
+ if key in keys:
+ tmp[key] = en_json[key]
+
+en_json = tmp
+
+with open('en/messages.json', 'w') as outfile:
+ outfile.write(
+ json.dumps(
+ en_json,
+ ensure_ascii=False,
+ indent=4
+ )
+ )