You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
3.4 KiB
45 lines
3.4 KiB
import os
|
|
import json
|
|
|
|
translations = {
|
|
"ar": {"title": "الخلفية العائلية، الحالة الاجتماعية والأطفال", "estimate": "20 دقيقة"},
|
|
"az": {"title": "Ailə Keçmişi, Ailə Vəziyyəti və Uşaqlar", "estimate": "20 dəqiqə"},
|
|
"bn": {"title": "পারিবারিক পটভূমি, বৈবাহিক অবস্থা এবং সন্তানাদি", "estimate": "20 মিনিট"},
|
|
"zh": {"title": "家庭背景、婚姻状况和子女", "estimate": "20 分钟"},
|
|
"da": {"title": "Familiebaggrund, civilstand og børn", "estimate": "20 minutter"},
|
|
"de": {"title": "Familiärer Hintergrund, Familienstand und Kinder", "estimate": "20 Minuten"},
|
|
"en": {"title": "Family Background, Marital Status, and Children", "estimate": "20 minutes"},
|
|
"es": {"title": "Antecedentes familiares, estado civil e hijos", "estimate": "20 minutos"},
|
|
"fa": {"title": "پیشینه خانوادگی، وضعیت تأهل و فرزندان", "estimate": "20 دقیقه"},
|
|
"fr": {"title": "Antécédents familiaux, état civil et enfants", "estimate": "20 minutes"},
|
|
"gu": {"title": "પારિવારિક પૃષ્ઠભૂમિ, વૈવાહિક સ્થિતિ અને બાળકો", "estimate": "20 મિનિટ"},
|
|
"ha": {"title": "Tarihin Iyali, Yanayin Aure da Yara", "estimate": "Minti 20"},
|
|
"he": {"title": "רקע משפחתי, מצב משפחתי וילדים", "estimate": "20 דקות"},
|
|
"hi": {"title": "पारिवारिक पृष्ठभूमि, वैवाहिक स्थिति और बच्चे", "estimate": "20 मिनट"},
|
|
"id": {"title": "Latar Belakang Keluarga, Status Pernikahan, dan Anak-anak", "estimate": "20 menit"},
|
|
"ks": {"title": "خاندانی پس منظر، ازدواجی حیثیت تہٰ شرے", "estimate": "20 منٹ"},
|
|
"pt": {"title": "Histórico familiar, estado civil e filhos", "estimate": "20 minutos"},
|
|
"ru": {"title": "Семейное положение, история брака и дети", "estimate": "20 минут"},
|
|
"sw": {"title": "Historia ya Familia, Hali ya Ndoa na Watoto", "estimate": "Dakika 20"},
|
|
"tg": {"title": "Маълумоти оилавӣ, вазъи оилавӣ ва кӯдакон", "estimate": "20 дақиқа"},
|
|
"tr": {"title": "Aile Geçmişi, Medeni Durum ve Çocuklar", "estimate": "20 dakika"},
|
|
"ul": {"title": "Khandani Pas-manzar, Azdawaji Haisiyat aur Bacche", "estimate": "20 minutes"},
|
|
"ur": {"title": "خاندانی پس منظر، ازدواجی حیثیت اور بچے", "estimate": "20 منٹ"},
|
|
"uz": {"title": "Oila tarixi, oilaviy ahvol va bolalar", "estimate": "20 daqiqa"}
|
|
}
|
|
|
|
locales_dir = "src/translations/locales"
|
|
for lang, data in translations.items():
|
|
file_path = os.path.join(locales_dir, f"{lang}.json")
|
|
if not os.path.exists(file_path):
|
|
print(f"Skipping {file_path} - not found")
|
|
continue
|
|
with open(file_path, "r", encoding="utf-8") as f:
|
|
content = json.load(f)
|
|
if "questions" not in content:
|
|
content["questions"] = {}
|
|
content["questions"]["familyMaritalTitle"] = data["title"]
|
|
content["questions"]["familyMaritalEstimate"] = data["estimate"]
|
|
with open(file_path, "w", encoding="utf-8") as f:
|
|
json.dump(content, f, ensure_ascii=False, indent=2)
|
|
print(f"Updated {file_path}")
|