aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/locales/ar.json9
-rw-r--r--lib/locales/bn.json9
-rw-r--r--lib/locales/de.json4
-rw-r--r--lib/locales/el.json4
-rw-r--r--lib/locales/es.json4
-rw-r--r--lib/locales/fa.json4
-rw-r--r--lib/locales/fr.json4
-rw-r--r--lib/locales/guided_translation.py10
-rw-r--r--lib/locales/hi.json9
-rw-r--r--lib/locales/it.json9
-rw-r--r--lib/locales/ja.json4
-rw-r--r--lib/locales/ko.json9
-rw-r--r--lib/locales/lang.json21
-rw-r--r--lib/locales/nl.json9
-rw-r--r--lib/locales/pl.json9
-rw-r--r--lib/locales/pt.json4
-rw-r--r--lib/locales/ru.json4
-rw-r--r--lib/locales/th.json9
-rw-r--r--lib/locales/tr.json9
-rw-r--r--lib/locales/zh.json4
20 files changed, 135 insertions, 13 deletions
diff --git a/lib/locales/ar.json b/lib/locales/ar.json
new file mode 100644
index 00000000..9b1d2e2b
--- /dev/null
+++ b/lib/locales/ar.json
@@ -0,0 +1,9 @@
+{
+ "balanceAdjustment": "تسوية الرصيد",
+ "paymentReceived": "المدفوعات الواردة",
+ "hello": "مرحبا",
+ "youReceived": "لقد حصلت على دفعة",
+ "withdrawalTriggered": "هذا أدى إلى سحب",
+ "problemWithdrawing": "كان هناك مشكلة إرسال إلى عنوان سحب السيارة",
+ "insufficientFunds": "عدم كفاية الأموال"
+}
diff --git a/lib/locales/bn.json b/lib/locales/bn.json
new file mode 100644
index 00000000..c0c1f568
--- /dev/null
+++ b/lib/locales/bn.json
@@ -0,0 +1,9 @@
+{
+ "balanceAdjustment": "মাপে পরিবর্তন",
+ "paymentReceived": "মূল্য প্রদান করা হয়েছে",
+ "hello": "হ্যালো",
+ "youReceived": "আপনি পেমেন্ট পেয়েছিলাম",
+ "withdrawalTriggered": "এটা প্রত্যাহারের সূত্রপাত ঘটিয়েছে",
+ "problemWithdrawing": "আপনার অটো-রান ঠিকানায় প্রেরিত হয়েছে",
+ "insufficientFunds": "অপর্যাপ্ত অর্থ"
+}
diff --git a/lib/locales/de.json b/lib/locales/de.json
index 24a8c895..b6d101e2 100644
--- a/lib/locales/de.json
+++ b/lib/locales/de.json
@@ -3,5 +3,7 @@
"youReceived": "Sie haben eine Zahlung von erhalten",
"withdrawalTriggered": "Dies löste einen Rückzug von aus",
"problemWithdrawing": "Beim Senden an Ihre automatische Auszahlungsadresse ist ein Problem aufgetreten",
- "paymentReceived": "Zahlung erhalten"
+ "paymentReceived": "Zahlung erhalten",
+ "balanceAdjustment": "Bilanzanpassung",
+ "insufficientFunds": "Unzureichende Mittel"
}
diff --git a/lib/locales/el.json b/lib/locales/el.json
index 4cef5bad..e3451349 100644
--- a/lib/locales/el.json
+++ b/lib/locales/el.json
@@ -3,5 +3,7 @@
"youReceived": "Λάβατε μια πληρωμή του",
"withdrawalTriggered": "Αυτό προκάλεσε την απόσυρση του",
"problemWithdrawing": "Παρουσιάστηκε πρόβλημα κατά την αποστολή στη διεύθυνση αυτόματης απόσυρσής σας",
- "paymentReceived": "Η πληρωμή ελήφθη"
+ "paymentReceived": "Η πληρωμή ελήφθη",
+ "balanceAdjustment": "Προσαρμογή υπολοίπου",
+ "insufficientFunds": "Ανεπαρκή κεφάλαια"
}
diff --git a/lib/locales/es.json b/lib/locales/es.json
index 635d04b3..1bbb2b1b 100644
--- a/lib/locales/es.json
+++ b/lib/locales/es.json
@@ -3,5 +3,7 @@
"youReceived": "Recibiste un pago de",
"withdrawalTriggered": "Esto provocó la retirada de",
"problemWithdrawing": "Hubo un problema al enviar a su dirección de retiro automático",
- "paymentReceived": "Pago recibido"
+ "paymentReceived": "Pago recibido",
+ "balanceAdjustment": "Ajuste del equilibrio",
+ "insufficientFunds": "Fondos insuficientes"
}
diff --git a/lib/locales/fa.json b/lib/locales/fa.json
index 0c7d87b2..da9f94d7 100644
--- a/lib/locales/fa.json
+++ b/lib/locales/fa.json
@@ -3,5 +3,7 @@
"youReceived": "شما پرداختی دریافت کردید",
"withdrawalTriggered": "این باعث خروج از",
"problemWithdrawing": "مشکلی در ارسال به آدرس برداشت خودکار شما وجود داشت",
- "paymentReceived": "پرداخت دریافت شد"
+ "paymentReceived": "پرداخت دریافت شد",
+ "balanceAdjustment": "تعدیل تعادل تعادل",
+ "insufficientFunds": "صندوق های بی کفایت"
}
diff --git a/lib/locales/fr.json b/lib/locales/fr.json
index 72c27f92..63c69352 100644
--- a/lib/locales/fr.json
+++ b/lib/locales/fr.json
@@ -3,5 +3,7 @@
"youReceived": "Vous avez reçu un paiement de",
"withdrawalTriggered": "Cela a déclenché un retrait de",
"problemWithdrawing": "Un problème est survenu lors de l'envoi à votre adresse de retrait automatique",
- "paymentReceived": "Paiement reçu"
+ "paymentReceived": "Paiement reçu",
+ "balanceAdjustment": "Ajustement du solde",
+ "insufficientFunds": "Insuffisance des fonds"
}
diff --git a/lib/locales/guided_translation.py b/lib/locales/guided_translation.py
index 27342314..15c5629b 100644
--- a/lib/locales/guided_translation.py
+++ b/lib/locales/guided_translation.py
@@ -4,7 +4,7 @@ import argparse, json, logging, sys, requests, os
from pathlib import Path
DEFAULT_FROM_LOCALE = 'en'
-LOCALE_DATA_FILEPATH = '../lib/translations/lang.json'
+LOCALE_DATA_FILEPATH = 'lang.json'
def nested_dict_keys(d, _keyname_prefix=''):
entry_list = []
@@ -33,13 +33,15 @@ def localize_string(string_id, from_data, to_data, to_locale):
logging.debug("Translating string with id %s", string_id)
id_parts = string_id.split('.')
+ if id_parts[0] == "lang": return
+
# get original string
to_translate = from_data
for id_part in id_parts:
to_translate = to_translate[id_part]
# Google Translate API endpoint
- url = "https://translation.googleapis.com/language/translate/v2"
+ url = "http://127.0.0.1:5000/translate"
# Prepare data for POST request
data = {
@@ -53,12 +55,12 @@ def localize_string(string_id, from_data, to_data, to_locale):
headers = {"Content-Type": "application/json"}
# Make the request
- response = requests.post(url, headers=headers, params={'key': api_key}, json=data)
+ response = requests.post(url, headers=headers, json=data)
# Check if the request was successful
if response.status_code == 200:
# Parse the response and extract translation
- translated_text = response.json()['data']['translations'][0]['translatedText']
+ translated_text = response.json()['translatedText']
print("Translated text:", translated_text)
else:
print("Error while translating:", response.json())
diff --git a/lib/locales/hi.json b/lib/locales/hi.json
new file mode 100644
index 00000000..02b52e38
--- /dev/null
+++ b/lib/locales/hi.json
@@ -0,0 +1,9 @@
+{
+ "balanceAdjustment": "संतुलन समायोजन",
+ "paymentReceived": "भुगतान प्राप्त",
+ "hello": "नमस्ते",
+ "youReceived": "आपको भुगतान प्राप्त हुआ",
+ "withdrawalTriggered": "यह ट्रिगर की वापसी",
+ "problemWithdrawing": "वहाँ एक समस्या अपने autowithdrawal पते पर भेज रहा था",
+ "insufficientFunds": "अपर्याप्त निधि"
+}
diff --git a/lib/locales/it.json b/lib/locales/it.json
new file mode 100644
index 00000000..1de81168
--- /dev/null
+++ b/lib/locales/it.json
@@ -0,0 +1,9 @@
+{
+ "balanceAdjustment": "Regolazione del saldo",
+ "paymentReceived": "Pagamento ricevuto",
+ "hello": "Ciao",
+ "youReceived": "Hai ricevuto un pagamento",
+ "withdrawalTriggered": "Questo ha innescato un ritiro",
+ "problemWithdrawing": "C'è stato un problema di inviare al tuo indirizzo di autoritiro",
+ "insufficientFunds": "Fondi insufficienti"
+}
diff --git a/lib/locales/ja.json b/lib/locales/ja.json
index 544ae31a..7d3f2ef3 100644
--- a/lib/locales/ja.json
+++ b/lib/locales/ja.json
@@ -3,5 +3,7 @@
"youReceived": "の支払いを受けました",
"withdrawalTriggered": "これが撤退のきっかけとなった",
"problemWithdrawing": "自動引き出しアドレスへの送信中に問題が発生しました",
- "paymentReceived": "お支払い頂いた"
+ "paymentReceived": "お支払い頂いた",
+ "balanceAdjustment": "バランス調整",
+ "insufficientFunds": "十分な資金"
}
diff --git a/lib/locales/ko.json b/lib/locales/ko.json
new file mode 100644
index 00000000..93b052cb
--- /dev/null
+++ b/lib/locales/ko.json
@@ -0,0 +1,9 @@
+{
+ "balanceAdjustment": "균형 조정",
+ "paymentReceived": "지불받은",
+ "hello": "이름 *",
+ "youReceived": "당신은 지불을 받았습니다",
+ "withdrawalTriggered": "이 방아쇠 인출",
+ "problemWithdrawing": "Autowithdrawal 주소로 보내는 문제가 있었습니다",
+ "insufficientFunds": "충분한 자금"
+}
diff --git a/lib/locales/lang.json b/lib/locales/lang.json
new file mode 100644
index 00000000..c4ce80b4
--- /dev/null
+++ b/lib/locales/lang.json
@@ -0,0 +1,21 @@
+{
+ "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/locales/nl.json b/lib/locales/nl.json
new file mode 100644
index 00000000..85fb65da
--- /dev/null
+++ b/lib/locales/nl.json
@@ -0,0 +1,9 @@
+{
+ "balanceAdjustment": "Balansaanpassing",
+ "paymentReceived": "Ontvangen betaling",
+ "hello": "Hallo",
+ "youReceived": "U ontving een betaling van",
+ "withdrawalTriggered": "Dit leidde tot een intrekking van",
+ "problemWithdrawing": "Er was een probleem met het verzenden naar uw automatisch intrekadres",
+ "insufficientFunds": "Onvoldoende middelen"
+}
diff --git a/lib/locales/pl.json b/lib/locales/pl.json
new file mode 100644
index 00000000..1baeadd2
--- /dev/null
+++ b/lib/locales/pl.json
@@ -0,0 +1,9 @@
+{
+ "balanceAdjustment": "Korekta salda",
+ "paymentReceived": "Otrzymane płatności",
+ "hello": "Halo",
+ "youReceived": "Otrzymałeś zapłatę",
+ "withdrawalTriggered": "Wywołało to wycofanie",
+ "problemWithdrawing": "Był problem z wysłaniem na twój adres autowycofania",
+ "insufficientFunds": "Niewystarczające fundusze"
+}
diff --git a/lib/locales/pt.json b/lib/locales/pt.json
index 2e96b146..114e4f43 100644
--- a/lib/locales/pt.json
+++ b/lib/locales/pt.json
@@ -3,5 +3,7 @@
"youReceived": "Você recebeu um pagamento de",
"withdrawalTriggered": "Isto desencadeou uma retirada de",
"problemWithdrawing": "Ocorreu um problema ao enviar para seu endereço de retirada automática",
- "paymentReceived": "Pagamento recebido"
+ "paymentReceived": "Pagamento recebido",
+ "balanceAdjustment": "Ajustamento do saldo",
+ "insufficientFunds": "Fundos insuficientes"
}
diff --git a/lib/locales/ru.json b/lib/locales/ru.json
index f61680ce..78fd7701 100644
--- a/lib/locales/ru.json
+++ b/lib/locales/ru.json
@@ -3,5 +3,7 @@
"youReceived": "Вы получили выплату в размере",
"withdrawalTriggered": "Это послужило толчком к выводу",
"problemWithdrawing": "Возникла проблема с отправкой на ваш адрес автоматического вывода средств.",
- "paymentReceived": "Платеж получен"
+ "paymentReceived": "Платеж получен",
+ "balanceAdjustment": "Корректировка баланса",
+ "insufficientFunds": "Недостаточно средств"
}
diff --git a/lib/locales/th.json b/lib/locales/th.json
new file mode 100644
index 00000000..7a3f4e1e
--- /dev/null
+++ b/lib/locales/th.json
@@ -0,0 +1,9 @@
+{
+ "balanceAdjustment": "ปรับสมดุล",
+ "paymentReceived": "ได้รับค่าจ้าง",
+ "hello": "สวัสดี",
+ "youReceived": "คุณได้รับเงิน",
+ "withdrawalTriggered": "นี่กระตุ้นให้เกิดการถอน",
+ "problemWithdrawing": "เกิดปัญหาในการส่งที่อยู่โดยอัตโนมัติของคุณ",
+ "insufficientFunds": "เงินทุนไม่เพียงพอ"
+}
diff --git a/lib/locales/tr.json b/lib/locales/tr.json
new file mode 100644
index 00000000..73d37b89
--- /dev/null
+++ b/lib/locales/tr.json
@@ -0,0 +1,9 @@
+{
+ "balanceAdjustment": "Denge ayarı",
+ "paymentReceived": "Ödeme alındı",
+ "hello": "Merhaba",
+ "youReceived": "Bir ödeme aldın",
+ "withdrawalTriggered": "Bu, bir geri çekilmeyi tetikledi",
+ "problemWithdrawing": "AutoWithdrawal adresinize gönderilen bir sorun vardı",
+ "insufficientFunds": "Yetersiz fonlarda"
+}
diff --git a/lib/locales/zh.json b/lib/locales/zh.json
index dbc579e3..b1799118 100644
--- a/lib/locales/zh.json
+++ b/lib/locales/zh.json
@@ -3,5 +3,7 @@
"youReceived": "您收到了一笔付款",
"withdrawalTriggered": "这引发了撤回",
"problemWithdrawing": "发送至您的自动提款地址时出现问题",
- "paymentReceived": "已收到付款"
+ "paymentReceived": "已收到付款",
+ "balanceAdjustment": "余额调整",
+ "insufficientFunds": "资金不足"
}