| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- import json
- import os
- def fix_translations():
- file_path = os.path.join("src", "locales", "translations.json")
-
- with open(file_path, "r", encoding="utf-8") as f:
- data = json.load(f)
- if "common" not in data: data["common"] = {}
- data["common"]["save_continue"] = {
- "en": "Save and Continue",
- "me": "Sačuvaj i nastavi",
- "ru": "Сохранить и продолжить",
- "ua": "Зберегти та продовжити"
- }
- if "profile" not in data: data["profile"] = {}
-
- data["profile"]["complete_title"] = {
- "en": "Complete Your Profile",
- "me": "Popunite svoj profil",
- "ru": "Заполните профиль",
- "ua": "Заповніть профіль"
- }
-
- data["profile"]["complete_subtitle"] = {
- "en": "Please provide your contact information to continue with the order.",
- "me": "Molimo unesite svoje kontakt podatke da biste nastavili sa narudžbom.",
- "ru": "Пожалуйста, предоставьте контактную информацию, чтобы продолжить оформление заказа.",
- "ua": "Будь ласка, надайте контактну інформацію, щоб продовжити оформлення замовлення."
- }
- with open(file_path, "w", encoding="utf-8") as f:
- json.dump(data, f, ensure_ascii=False, indent=2)
-
- print(f"Successfully updated {file_path}")
- if __name__ == "__main__":
- fix_translations()
|