aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-05-12 12:36:28 -0700
committerAdam Soltys <[email protected]>2025-05-12 12:36:28 -0700
commitf85ae08db1dd6471d9e2d5edc28025684d0f3af4 (patch)
tree74bce0b17195b8bda4973e6a203215b1a87cf364 /lib
parent67f9ec53b7348860ab55e49574a81df4706dfb06 (diff)
downloadcoinos-server-f85ae08db1dd6471d9e2d5edc28025684d0f3af4.tar.gz
coinos-server-f85ae08db1dd6471d9e2d5edc28025684d0f3af4.zip
locked balance
Diffstat (limited to 'lib')
-rw-r--r--lib/locales/guided_translation.py17
-rw-r--r--lib/locales/lang.json21
-rw-r--r--lib/whitelist.ts1
3 files changed, 1 insertions, 38 deletions
diff --git a/lib/locales/guided_translation.py b/lib/locales/guided_translation.py
index 15c5629b..a2f10177 100644
--- a/lib/locales/guided_translation.py
+++ b/lib/locales/guided_translation.py
@@ -4,7 +4,6 @@ import argparse, json, logging, sys, requests, os
from pathlib import Path
DEFAULT_FROM_LOCALE = 'en'
-LOCALE_DATA_FILEPATH = 'lang.json'
def nested_dict_keys(d, _keyname_prefix=''):
entry_list = []
@@ -16,18 +15,6 @@ def nested_dict_keys(d, _keyname_prefix=''):
entry_list += [_keyname_prefix + key]
return entry_list
-def create_locale(locale_code):
- logging.debug("Creating locale %s...", locale_code)
- with open(LOCALE_DATA_FILEPATH, 'r', encoding='utf-8') as lang_file:
- lang_data = json.load(lang_file)
-
- lang_data[locale_code] = input("What is the name of the language " + locale_code + "? ")
-
- with open(LOCALE_DATA_FILEPATH, 'w') as lang_file:
- json.dump(lang_data, lang_file, ensure_ascii=False, indent='\t')
- lang_file.write('\n')
- logging.debug("Created locale %s.", locale_code)
-
def localize_string(string_id, from_data, to_data, to_locale):
api_key = os.environ.get('GOOGLE_API_KEY')
logging.debug("Translating string with id %s", string_id)
@@ -125,10 +112,6 @@ if __name__ == "__main__":
to_json_text = to_file.read()
logging.debug("Converting to data from JSON to object")
to_data = json.loads(to_json_text)
- else:
- logging.info("No file found. Creating new locale.")
- create_locale(to_locale)
- to_data = {}
to_id_list = nested_dict_keys(to_data)
logging.info("Successfully obtained %d strings from locale %s",
len(to_id_list), to_locale)
diff --git a/lib/locales/lang.json b/lib/locales/lang.json
deleted file mode 100644
index c4ce80b4..00000000
--- a/lib/locales/lang.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "en": "English",
- "es": "Español",
- "fr": "Français",
- "de": "Deutsch",
- "ja": "日本語",
- "ru": "Русский",
- "pt": "Português",
- "zh": "中文",
- "fa": "فارسی",
- "el": "Ελληνικά",
- "ar": "العربية",
- "hi": "हिन्दी",
- "bn": "বাংলা",
- "tr": "Türkçe",
- "ko": "한국어",
- "it": "Italiano",
- "nl": "Nederlands",
- "th": "ไทย",
- "pl": "Polski"
-}
diff --git a/lib/whitelist.ts b/lib/whitelist.ts
index 07706432..5df18184 100644
--- a/lib/whitelist.ts
+++ b/lib/whitelist.ts
@@ -21,6 +21,7 @@ export default [
"keys",
"language",
"linked",
+ "locked",
"locktime",
"memoPrompt",
"nip5",