waha-shared 1.0.475 → 1.0.476
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./releaseNotes.schema.json",
|
|
3
3
|
"data": [
|
|
4
|
+
{
|
|
5
|
+
"version": "9.1.0",
|
|
6
|
+
"showInApp": false,
|
|
7
|
+
"notes": {
|
|
8
|
+
"eng": "Launched the Disciple Making Course in Castilian Spanish, fixed several lessons with incorrect Scripture references, migrated to new Spanish bible, and fixed noisy Tagalog Bible.",
|
|
9
|
+
"ara": "تم إطلاق دورة صنع التلاميذ باللغة الإسبانية القشتالية، وتم تصحيح عدة دروس تحتوي على مراجع كتابية غير صحيحة، والانتقال إلى ترجمة إسبانية جديدة للكتاب المقدس، وإصلاح مشكلة الضوضاء في الكتاب المقدس بلغة التاغالوغ.",
|
|
10
|
+
"aze": "Kastilyalı İspan dilində Şagird Yetişdirmə Kursu işə salındı, səhv Müqəddəs Yazı istinadları olan bir neçə dərs düzəldildi, yeni İspan İncillinə keçirildi və səs-küylü Taqaloq İncili düzəldildi.",
|
|
11
|
+
"bni": "কাস্টিলিয়ান স্প্যানিশে শিষ্য তৈরির কোর্স চালু করা হয়েছে, ভুল শাস্ত্রের রেফারেন্স সহ বেশ কয়েকটি পাঠ সংশোধন করা হয়েছে, নতুন স্প্যানিশ বাইবেলে স্থানান্তর করা হয়েছে এবং ত্রুটিপূর্ণ তাগালগ বাইবেল ঠিক করা হয়েছে।",
|
|
12
|
+
"ceb": "Gilunsad ang Disciple Making Course sa Castilian Spanish, giayo ang daghang mga leksyon nga adunay sayop nga mga reperensya sa Kasulatan, gibalhin sa bag-ong Spanish nga Biblia, ug giayo ang maingganong Tagalog nga Biblia.",
|
|
13
|
+
"ckb": "کۆرسی دروستکردنی شاگرد بە زمانی ئیسپانیی کاستیلی دەستی پێکرد، چەند وانەیەک کە سەرچاوەی نادروستی نووسراوەی پیرۆزیان هەبوو راستکرایەوە، گوازرایەوە بۆ کیتێبی پیرۆزی نوێی ئیسپانی، و کیتێبی پیرۆزی تاگالۆگی کێشەداری چاککرا.",
|
|
14
|
+
"cmn": "以卡斯蒂利亚西班牙语推出了门徒培训课程,修正了多个圣经参考经文有误的课程,迁移至新的西班牙语圣经版本,并修复了他加禄语圣经的噪音问题。",
|
|
15
|
+
"deu": "Den Jüngerschaftskurs auf Kastilisch-Spanisch veröffentlicht, mehrere Lektionen mit fehlerhaften Schriftstellen korrigiert, auf eine neue spanische Bibel umgestellt und die fehlerhafte tagalische Bibel behoben.",
|
|
16
|
+
"esp": "Se lanzó el Curso de Formación de Discípulos en español castellano, se corrigieron varias lecciones con referencias bíblicas incorrectas, se migró a una nueva Biblia en español y se corrigió la Biblia en tagalo con errores.",
|
|
17
|
+
"fra": "Lancement du cours de formation de disciples en espagnol castillan, correction de plusieurs leçons contenant des références bibliques incorrectes, migration vers une nouvelle Bible en espagnol et correction de la Bible tagalog présentant des anomalies.",
|
|
18
|
+
"hau": "An ƙaddamar da Kwas ɗin Koyar da Almajiranci a cikin Harshen Sifen na Castilian, an gyara darussan da yawa waɗanda ke da nassoshi na Nassosi marasa daidaituwa, an ƙaura zuwa Littafi Mai Tsarki na Sifen na sabon, kuma an gyara Littafi Mai Tsarki na Tagalog mai rikitarwa.",
|
|
19
|
+
"heb": "השקנו את קורס עשיית התלמידים בספרדית קסטילית, תיקנו מספר שיעורים עם הפניות שגויות לכתבי הקודש, עברנו לתנ\"ך חדש בספרדית, ותיקנו את הבעיות ברעש בתנ\"ך בטאגאלוג.",
|
|
20
|
+
"hin": "कैस्टिलियन स्पेनिश में डिसाइपल मेकिंग कोर्स लॉन्च किया, गलत शास्त्र संदर्भों वाले कई पाठों को ठीक किया, नई स्पेनिश बाइबल पर स्थानांतरित किया, और त्रुटिपूर्ण तागालोग बाइबल को ठीक किया।",
|
|
21
|
+
"hun": "Elindítottuk a Tanítványképző Tanfolyamot kasztíliai spanyol nyelven, kijavítottunk több leckét helytelen szentírási hivatkozásokkal, áttértünk az új spanyol Bibliára, és kijavítottuk a hibás Tagalog Bibliát.",
|
|
22
|
+
"hye": "Գործարկվեց Աշակերտագործության Դասընթացը կաստիլական իսպաներենով, շտկվեց մի քանի դաս, որոնք պարունակում էին սխալ Սուրբ Գրության հղումներ, տեղափոխվեց նոր իսպանական Աստվածաշունչ, և շտկվեց թերի Տագալոգ Աստվածաշունչը։",
|
|
23
|
+
"ind": "Meluncurkan Kursus Pemuridan dalam Bahasa Spanyol Kastilia, memperbaiki beberapa pelajaran dengan referensi Alkitab yang tidak tepat, bermigrasi ke Alkitab Spanyol yang baru, dan memperbaiki Alkitab Tagalog yang bermasalah.",
|
|
24
|
+
"jpn": "カスティーリャ・スペイン語で弟子訓練コースを開始し、誤った聖書の参照箇所があったいくつかのレッスンを修正し、新しいスペイン語聖書に移行し、タガログ語聖書の不具合を修正しました。",
|
|
25
|
+
"khm": "បានដាក់ឱ្យដំណើរការវគ្គសិក្សាការបង្កើតសិស្សក្នុងភាសាអេស្ប៉ាញ Castilian បានជួសជុលមេរៀនជាច្រើនដែលមានឯកសារយោងព្រះគម្ពីរមិនត្រឹមត្រូវ បានផ្លាស់ប្តូរទៅប្រើព្រះគម្ពីរអេស្ប៉ាញថ្មី និងបានជួសជុលព្រះគម្ពីរ Tagalog ដែលមានបញ្ហា។",
|
|
26
|
+
"kor": "카스티야 스페인어로 제자 훈련 과정을 출시하고, 잘못된 성경 구절이 포함된 여러 과를 수정하였으며, 새로운 스페인어 성경으로 마이그레이션하고, 오류가 있던 타갈로그어 성경을 수정하였습니다.",
|
|
27
|
+
"mar": "कॅस्टिलियन स्पॅनिशमध्ये शिष्य निर्माण अभ्यासक्रम सुरू केला, चुकीच्या शास्त्रवचन संदर्भांसह अनेक धडे दुरुस्त केले, नवीन स्पॅनिश बायबलमध्ये स्थलांतरित केले आणि गोंगाट करणारी तागालॉग बायबल दुरुस्त केली.",
|
|
28
|
+
"mlg": "Nanomboka ny Disciple Making Course amin'ny teny Espaniôla Kastiliana, nanamboatra lesona maromaro misy fanovozan-teny tsy mety tamin'ny Soratra Masina, nifindra tany amin'ny Baiboly Espaniôla vaovao, ary nanamboatra ny Baiboly Tagalog nisy olana.",
|
|
29
|
+
"mon": "Кастили испани хэл дээр Шавь Бэлтгэх Сургалтыг эхлүүллээ, буруу Судрын ишлэлтэй хэдэн хичээлийг засварлав, шинэ Испани Библи рүү шилжүүллээ, мөн Тагалог Библийн алдааг засварлав.",
|
|
30
|
+
"mya": "Castilian Spanish ဘာသာဖြင့် တပည့်သင်တန်းကို စတင်လိုက်ပြီး၊ မှားယွင်းသော ကျမ်းညွှန်းများပါဝင်သည့် သင်ခန်းစာများကို ပြင်ဆင်ခဲ့ကာ၊ Spanish သမ္မာကျမ်းစာအသစ်သို့ ပြောင်းရွှေ့ပြီး Tagalog သမ္မာကျမ်းစာ၏ ဆူညံမှုပြဿနာကိုလည်း ဖြေရှင်းခဲ့သည်။",
|
|
31
|
+
"nld": "De cursus Discipelschap is gelanceerd in Castiliaans Spaans, verschillende lessen met onjuiste Bijbelverwijzingen zijn gecorrigeerd, er is overgestapt op een nieuwe Spaanse Bijbel en de ruis in de Tagalog Bijbel is verholpen.",
|
|
32
|
+
"npi": "कास्टिलियन स्पेनिसमा शिष्य बनाउने पाठ्यक्रम सुरु गरियो, गलत शास्त्र सन्दर्भहरू भएका धेरै पाठहरू सच्याइयो, नयाँ स्पेनिस बाइबलमा स्थानान्तरण गरियो, र अव्यवस्थित तागालोग बाइबल सच्याइयो।",
|
|
33
|
+
"pes": "دوره شاگردسازی به زبان اسپانیایی کاستیلی راهاندازی شد، چندین درس با مراجع کتاب مقدسی نادرست اصلاح شد، به کتاب مقدس اسپانیایی جدید منتقل شدیم، و مشکل کتاب مقدس تاگالوگ پر از خطا برطرف شد.",
|
|
34
|
+
"por": "Lançamos o Curso de Formação de Discípulos em espanhol castelhano, corrigimos várias lições com referências bíblicas incorretas, migramos para uma nova Bíblia em espanhol e corrigimos problemas na Bíblia em tagalo.",
|
|
35
|
+
"ron": "Am lansat Cursul de Formare a Ucenicilor în spaniolă castiliană, am corectat mai multe lecții cu referințe scripturistice incorecte, am migrat la o nouă Biblie în spaniolă și am remediat problemele cu Biblia în tagalog.",
|
|
36
|
+
"rus": "Запущен курс по ученичеству на кастильском испанском языке, исправлены несколько уроков с неверными ссылками на Писание, выполнена миграция на новую испанскую Библию, а также устранены ошибки в тагальской Библии.",
|
|
37
|
+
"spa": "Se lanzó el Curso de Formación de Discípulos en español castellano, se corrigieron varias lecciones con referencias bíblicas incorrectas, se migró a una nueva Biblia en español y se corrigió la Biblia en tagalo que presentaba errores.",
|
|
38
|
+
"swe": "Lanserade Lärjungaskapskursen på kastiliansk spanska, åtgärdade flera lektioner med felaktiga Skrifthänvisningar, migrerade till en ny spansk bibel och åtgärdade problem med den brusiga tagalogiska Bibeln.",
|
|
39
|
+
"swz": "Tumezindua Kozi ya Kutengeneza Wanafunzi kwa Kihispania cha Castilian, tulisahihisha masomo kadhaa yenye marejeo ya Maandiko yasiyosahihi, tulihamia kwenye Biblia mpya ya Kihispania, na tulisahihisha Biblia ya Kitagalog iliyokuwa na matatizo.",
|
|
40
|
+
"tam": "காஸ்டிலியன் ஸ்பானிஷ் மொழியில் சீடர் உருவாக்கும் பாடநெறியை தொடங்கியது, தவறான வேதாகம குறிப்புகள் கொண்ட பல பாடங்களை சரிசெய்தது, புதிய ஸ்பானிஷ் வேதாகமத்திற்கு இடம்பெயர்ந்தது, மற்றும் சத்தமான தகலாக் வேதாகமத்தை சரிசெய்தது.",
|
|
41
|
+
"tel": "కాస్టిలియన్ స్పానిష్లో శిష్యత్వ కోర్సును ప్రారంభించారు, తప్పుడు లేఖన సూచనలు ఉన్న అనేక పాఠాలను సరిదిద్దారు, కొత్త స్పానిష్ బైబిల్కు మారారు మరియు అస్తవ్యస్తంగా ఉన్న తగాలాగ్ బైబిల్ను సరిచేశారు.",
|
|
42
|
+
"tgl": "Inilunsad ang Disciple Making Course sa Kastilang Espanyol, inayos ang ilang mga aralin na may maling mga sangguniang Kasulatan, lumipat sa bagong Espanyol na Bibliya, at inayos ang maingay na Tagalog na Bibliya.",
|
|
43
|
+
"tha": "เปิดตัวหลักสูตรการสร้างสาวกในภาษาสเปนคาสตีล แก้ไขบทเรียนหลายบทที่มีการอ้างอิงพระคัมภีร์ไม่ถูกต้อง ย้ายไปใช้พระคัมภีร์ภาษาสเปนฉบับใหม่ และแก้ไขปัญหาพระคัมภีร์ภาษาตากาล็อกที่มีข้อผิดพลาด",
|
|
44
|
+
"tur": "Kastilya İspanyolcasında Mürit Yetiştirme Kursu başlatıldı, hatalı Kutsal Kitap referansları içeren çeşitli dersler düzeltildi, yeni İspanyolca İncil'e geçiş yapıldı ve hatalı Tagalog İncil'i düzeltildi.",
|
|
45
|
+
"uig": "Castilian Spanish tilida Şagirt Yetişturish Kursi ishqa qoyuldi, bir qanche dərsdiki noto'g'ri Muqəddəs Yazma həwalisləri tüzitildi, yengi Ispaniyə Injiligə köchürüldi həm səs-küylük Tagalog Injili tüzitildi.",
|
|
46
|
+
"ukr": "Запущено курс з учнівства іспанською (кастильською) мовою, виправлено кілька уроків із некоректними посиланнями на Святе Письмо, здійснено перехід на нову іспанську Біблію, а також виправлено проблеми з тагальською Біблією.",
|
|
47
|
+
"urd": "کاسٹیلین ہسپانوی میں ڈسائپل میکنگ کورس شروع کیا، غلط صحیفہ حوالہ جات والے کئی اسباق کو درست کیا، نئے ہسپانوی بائبل میں منتقل کیا، اور شور والی تاگالوگ بائبل کو ٹھیک کیا۔",
|
|
48
|
+
"zsm": "Melancarkan Kursus Membuat Murid dalam bahasa Sepanyol Kastilia, membetulkan beberapa pelajaran yang mempunyai rujukan Kitab Suci yang tidak tepat, berpindah kepada Alkitab bahasa Sepanyol yang baharu, dan membetulkan Alkitab bahasa Tagalog yang bermasalah."
|
|
49
|
+
}
|
|
50
|
+
},
|
|
4
51
|
{
|
|
5
52
|
"version": "9.0.2",
|
|
6
|
-
"showInApp": true,
|
|
7
53
|
"notes": {
|
|
8
54
|
"eng": "You can now create an account with Waha! Sign in with your email address, Apple account, or Google account from the new ‘Account’ tab to sync your progress, notes, bookmarks, and language settings across all of your devices. Signing in is optional and Waha works the same as before without an account.",
|
|
9
55
|
"ara": "يمكنك الآن إنشاء حساب في واها! سجّل دخولك باستخدام بريدك الإلكتروني أو حساب Apple أو حساب Google من علامة التبويب الجديدة \"الحساب\" لمزامنة تقدّمك وملاحظاتك وإشاراتك المرجعية وإعدادات اللغة عبر جميع أجهزتك. تسجيل الدخول اختياري، وتعمل واها بنفس الطريقة كما كانت من قبل دون الحاجة إلى حساب.",
|
|
@@ -46,7 +92,8 @@
|
|
|
46
92
|
"ukr": "Тепер ви можете створити обліковий запис у Waha! Увійдіть за допомогою електронної пошти, облікового запису Apple або Google на новій вкладці «Обліковий запис», щоб синхронізувати свій прогрес, нотатки, закладки та мовні налаштування на всіх своїх пристроях. Вхід є необов'язковим, і Waha працює так само, як і раніше, без облікового запису.",
|
|
47
93
|
"urd": "اب آپ Waha کے ساتھ اکاؤنٹ بنا سکتے ہیں! اپنی پیشرفت، نوٹس، بک مارکس، اور زبان کی ترتیبات کو اپنے تمام آلات پر ہم آہنگ کرنے کے لیے نئے 'اکاؤنٹ' ٹیب سے اپنے ای میل ایڈریس، Apple اکاؤنٹ، یا Google اکاؤنٹ کے ذریعے سائن ان کریں۔ سائن ان کرنا اختیاری ہے اور Waha بغیر اکاؤنٹ کے پہلے کی طرح کام کرتا رہے گا۔",
|
|
48
94
|
"zsm": "Anda kini boleh membuat akaun dengan Waha! Log masuk dengan alamat e-mel, akaun Apple, atau akaun Google anda melalui tab 'Akaun' yang baharu untuk menyegerakkan kemajuan, nota, penanda buku, dan tetapan bahasa anda merentas semua peranti anda. Log masuk adalah pilihan dan Waha berfungsi sama seperti sebelumnya tanpa akaun."
|
|
49
|
-
}
|
|
95
|
+
},
|
|
96
|
+
"showInApp": true
|
|
50
97
|
},
|
|
51
98
|
{
|
|
52
99
|
"version": "9.0.1",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type SourceFilesModel } from '@crowdin/crowdin-api-client';
|
|
2
1
|
/**
|
|
3
2
|
* Map of project names to their Crowdin ids. Can be retrieved by going to the
|
|
4
3
|
* project's dashboard in Crowdin and looking on the right side panel for ID:
|
|
@@ -8,14 +7,7 @@ export declare const crowdinProjectIds: {
|
|
|
8
7
|
website: string;
|
|
9
8
|
app: string;
|
|
10
9
|
dmc: string;
|
|
11
|
-
emails: string;
|
|
12
10
|
};
|
|
13
|
-
/**
|
|
14
|
-
* Where a translated file lands, relative to the language folder. Every Waha
|
|
15
|
-
* project maps a language's Crowdin three-letter code onto its Waha id, which
|
|
16
|
-
* is why translations download straight into `crowdin/{wahaLanguageId}`.
|
|
17
|
-
*/
|
|
18
|
-
export declare const CROWDIN_TRANSLATION_PATTERN = "%three_letters_code%/%original_file_name%";
|
|
19
11
|
interface DownloadTranslationsParams {
|
|
20
12
|
/**
|
|
21
13
|
* The id of the project to download translations for. Can either be taken
|
|
@@ -25,45 +17,14 @@ interface DownloadTranslationsParams {
|
|
|
25
17
|
projectId: string;
|
|
26
18
|
/**
|
|
27
19
|
* The folder where translations are stored. Source translations are assumed
|
|
28
|
-
* to be stored in `translationsFolder/eng
|
|
20
|
+
* to be stored in `translationsFolder/eng/*.json`.
|
|
29
21
|
*/
|
|
30
22
|
translationsFolder: string;
|
|
31
23
|
/** The Crowdin personal access token to use for authentication. */
|
|
32
24
|
token: string;
|
|
33
|
-
/**
|
|
34
|
-
* Glob matching the source files to download translations for, relative to
|
|
35
|
-
* `translationsFolder/eng`. Defaults to the JSON files every other project
|
|
36
|
-
* uses; the drip emails are markdown.
|
|
37
|
-
*/
|
|
38
|
-
sourcePattern?: string;
|
|
39
25
|
}
|
|
40
26
|
/**
|
|
41
27
|
* Downloads translations from Crowdin for a given project ID and source path.
|
|
42
28
|
*/
|
|
43
|
-
export declare function downloadTranslations({ projectId, translationsFolder, token,
|
|
44
|
-
interface UploadSourceParams {
|
|
45
|
-
/** The id of the project to upload to, from `crowdinProjectIds`. */
|
|
46
|
-
projectId: string;
|
|
47
|
-
/**
|
|
48
|
-
* Absolute path to the source file to upload, somewhere under a `crowdin/`
|
|
49
|
-
* directory (e.g. `/path/to/project/crowdin/eng/app_interface_text.json`,
|
|
50
|
-
* or `/path/to/project/crowdin/foo.md` for a project that keeps sources at
|
|
51
|
-
* the root). The path Crowdin sees is everything after `crowdin/`.
|
|
52
|
-
*/
|
|
53
|
-
source: string;
|
|
54
|
-
/** The Crowdin personal access token to use for authentication. */
|
|
55
|
-
token: string;
|
|
56
|
-
/**
|
|
57
|
-
* Label to attach, created if Crowdin has not seen it before. Only applies
|
|
58
|
-
* to new keys, which is what makes version tagging work.
|
|
59
|
-
*/
|
|
60
|
-
label?: string;
|
|
61
|
-
/** Parser and import settings, for files needing more than the defaults. */
|
|
62
|
-
fileSettings?: {
|
|
63
|
-
type?: SourceFilesModel.FileType;
|
|
64
|
-
importOptions?: SourceFilesModel.ImportOptions;
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
/** Uploads a source file to Crowdin, creating it or replacing its contents. */
|
|
68
|
-
export declare function uploadSource({ projectId, source, token, label, fileSettings, }: UploadSourceParams): Promise<void>;
|
|
29
|
+
export declare function downloadTranslations({ projectId, translationsFolder, token, }: DownloadTranslationsParams): void;
|
|
69
30
|
export {};
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
3
|
+
exports.crowdinProjectIds = void 0;
|
|
7
4
|
exports.downloadTranslations = downloadTranslations;
|
|
8
|
-
exports.uploadSource = uploadSource;
|
|
9
|
-
const crowdin_api_client_1 = __importDefault(require("@crowdin/crowdin-api-client"));
|
|
10
|
-
const fs_1 = __importDefault(require("fs"));
|
|
11
5
|
const node_child_process_1 = require("node:child_process");
|
|
12
|
-
const path_1 = __importDefault(require("path"));
|
|
13
6
|
/**
|
|
14
7
|
* Map of project names to their Crowdin ids. Can be retrieved by going to the
|
|
15
8
|
* project's dashboard in Crowdin and looking on the right side panel for ID:
|
|
@@ -19,133 +12,23 @@ exports.crowdinProjectIds = {
|
|
|
19
12
|
website: '698737',
|
|
20
13
|
app: '549537',
|
|
21
14
|
dmc: '663528',
|
|
22
|
-
emails: '929263',
|
|
23
15
|
};
|
|
24
|
-
/**
|
|
25
|
-
* Where a translated file lands, relative to the language folder. Every Waha
|
|
26
|
-
* project maps a language's Crowdin three-letter code onto its Waha id, which
|
|
27
|
-
* is why translations download straight into `crowdin/{wahaLanguageId}`.
|
|
28
|
-
*/
|
|
29
|
-
exports.CROWDIN_TRANSLATION_PATTERN = '%three_letters_code%/%original_file_name%';
|
|
30
|
-
/**
|
|
31
|
-
* Derives the Crowdin-relative path (what's shown in the dashboard, e.g.
|
|
32
|
-
* `eng/app_interface_text.json`) from an absolute filesystem path. Every
|
|
33
|
-
* Waha project keeps its Crowdin sources under a `crowdin/` directory, so
|
|
34
|
-
* that directory's name is the anchor: everything after the last `crowdin`
|
|
35
|
-
* segment is the path Crowdin knows about.
|
|
36
|
-
*
|
|
37
|
-
* This indirection exists because callers pass an absolute path rather than
|
|
38
|
-
* one relative to this file. `shared/` ships as a published npm package, so
|
|
39
|
-
* this file can end up executing from inside a consumer's `node_modules`,
|
|
40
|
-
* where a base path hardcoded relative to `__dirname` points nowhere useful.
|
|
41
|
-
*/
|
|
42
|
-
function crowdinRelativePath(absolutePath) {
|
|
43
|
-
const segments = absolutePath.split(path_1.default.sep);
|
|
44
|
-
const crowdinIndex = segments.lastIndexOf('crowdin');
|
|
45
|
-
if (crowdinIndex === -1) {
|
|
46
|
-
throw new Error(`Expected an absolute path under a "crowdin" directory, got "${absolutePath}".`);
|
|
47
|
-
}
|
|
48
|
-
return segments.slice(crowdinIndex + 1).join('/');
|
|
49
|
-
}
|
|
50
16
|
/**
|
|
51
17
|
* Downloads translations from Crowdin for a given project ID and source path.
|
|
52
18
|
*/
|
|
53
|
-
function downloadTranslations({ projectId, translationsFolder, token,
|
|
19
|
+
function downloadTranslations({ projectId, translationsFolder, token, }) {
|
|
54
20
|
(0, node_child_process_1.spawnSync)([
|
|
55
21
|
'npx @crowdin/cli download translations',
|
|
56
22
|
`-i ${projectId}`,
|
|
57
|
-
`-s eng
|
|
23
|
+
`-s eng/*.json`,
|
|
58
24
|
// Add Crowdin token present in .env file.
|
|
59
25
|
`-T ${token}`,
|
|
60
26
|
// Set the base path for which the other paths will be relative to.
|
|
61
27
|
`--base-path="${translationsFolder}"`,
|
|
62
28
|
// Where to download translations to relative to the base path.
|
|
63
|
-
|
|
29
|
+
'-t "/%three_letters_code%/%original_file_name%"',
|
|
64
30
|
].join(' '), {
|
|
65
31
|
shell: true,
|
|
66
32
|
stdio: 'inherit',
|
|
67
33
|
});
|
|
68
34
|
}
|
|
69
|
-
/** Uploads a source file to Crowdin, creating it or replacing its contents. */
|
|
70
|
-
async function uploadSource({ projectId, source, token, label, fileSettings, }) {
|
|
71
|
-
const client = new crowdin_api_client_1.default({ token });
|
|
72
|
-
const id = Number(projectId);
|
|
73
|
-
const relativePath = crowdinRelativePath(source);
|
|
74
|
-
const fileName = relativePath.split('/').pop();
|
|
75
|
-
const contents = fs_1.default.readFileSync(source, 'utf8');
|
|
76
|
-
const storage = await client.uploadStorageApi.addStorage(fileName, contents);
|
|
77
|
-
/*
|
|
78
|
-
* Replacing a file needs its numeric id, and the API has no by-path
|
|
79
|
-
* lookup, so this listing is how the id is obtained rather than a
|
|
80
|
-
* precaution. `filter` narrows it server-side; the path comparison still
|
|
81
|
-
* has to be exact because the filter matches on substrings.
|
|
82
|
-
*/
|
|
83
|
-
const files = await client.sourceFilesApi.listProjectFiles(id, {
|
|
84
|
-
filter: fileName,
|
|
85
|
-
limit: 500,
|
|
86
|
-
});
|
|
87
|
-
const existing = files.data.find((file) => file.data.path === `/${relativePath}`);
|
|
88
|
-
const exportOptions = {
|
|
89
|
-
exportPattern: `/${exports.CROWDIN_TRANSLATION_PATTERN}`,
|
|
90
|
-
};
|
|
91
|
-
const attachLabelIds = label ? [await labelId(client, id, label)] : undefined;
|
|
92
|
-
/*
|
|
93
|
-
* The two requests are built separately rather than sharing a spread. A
|
|
94
|
-
* file's parser `type` is fixed at creation and the replace endpoint
|
|
95
|
-
* rejects it outright, and spreading into a typed parameter skips
|
|
96
|
-
* TypeScript's excess property check — so a shared object hides the
|
|
97
|
-
* mistake until Crowdin returns "Field 'type' is unexpected".
|
|
98
|
-
*/
|
|
99
|
-
if (existing) {
|
|
100
|
-
const request = {
|
|
101
|
-
storageId: storage.data.id,
|
|
102
|
-
exportOptions,
|
|
103
|
-
// Keeps translations of revised strings but drops their approvals, so
|
|
104
|
-
// a reviewer looks again rather than stale copy staying green.
|
|
105
|
-
updateOption: 'keep_translations',
|
|
106
|
-
...(fileSettings?.importOptions && {
|
|
107
|
-
importOptions: fileSettings.importOptions,
|
|
108
|
-
}),
|
|
109
|
-
...(attachLabelIds && { attachLabelIds }),
|
|
110
|
-
};
|
|
111
|
-
await client.sourceFilesApi.updateOrRestoreFile(id, existing.data.id, request);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
const request = {
|
|
115
|
-
storageId: storage.data.id,
|
|
116
|
-
name: fileName,
|
|
117
|
-
exportOptions,
|
|
118
|
-
...fileSettings,
|
|
119
|
-
...(attachLabelIds && { attachLabelIds }),
|
|
120
|
-
...(await directoryId(client, id, relativePath)),
|
|
121
|
-
};
|
|
122
|
-
await client.sourceFilesApi.createFile(id, request);
|
|
123
|
-
}
|
|
124
|
-
/** Resolves a label by title, creating it if Crowdin does not have it. */
|
|
125
|
-
async function labelId(client, projectId, title) {
|
|
126
|
-
const labels = await client.labelsApi.listLabels(projectId, { limit: 500 });
|
|
127
|
-
const existing = labels.data.find((label) => label.data.title === title);
|
|
128
|
-
if (existing)
|
|
129
|
-
return existing.data.id;
|
|
130
|
-
return (await client.labelsApi.addLabel(projectId, { title })).data.id;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Resolves the directory a new file belongs in, or nothing for projects that
|
|
134
|
-
* keep sources at the root.
|
|
135
|
-
*
|
|
136
|
-
* A missing directory is an error rather than something to create: a
|
|
137
|
-
* misspelled path that gets created silently uploads to a new file and
|
|
138
|
-
* orphans every translation attached to the real one.
|
|
139
|
-
*/
|
|
140
|
-
async function directoryId(client, projectId, relativePath) {
|
|
141
|
-
const segments = relativePath.split('/').slice(0, -1);
|
|
142
|
-
if (segments.length === 0)
|
|
143
|
-
return {};
|
|
144
|
-
const wanted = `/${segments.join('/')}`;
|
|
145
|
-
const directories = await client.sourceFilesApi.listProjectDirectories(projectId, { limit: 500 });
|
|
146
|
-
const match = directories.data.find((entry) => entry.data.path === wanted);
|
|
147
|
-
if (!match) {
|
|
148
|
-
throw new Error(`Crowdin project ${projectId} has no ${wanted} directory. Create it before uploading.`);
|
|
149
|
-
}
|
|
150
|
-
return { directoryId: match.data.id };
|
|
151
|
-
}
|
|
@@ -291,8 +291,8 @@ export declare const MicroLessonSubmission: z.ZodObject<{
|
|
|
291
291
|
timeSubmitted: z.ZodNumber;
|
|
292
292
|
platform: z.ZodEnum<{
|
|
293
293
|
web: "web";
|
|
294
|
-
android: "android";
|
|
295
294
|
ios: "ios";
|
|
295
|
+
android: "android";
|
|
296
296
|
}>;
|
|
297
297
|
}, z.core.$strip>;
|
|
298
298
|
export type MicroLessonSubmission = z.infer<typeof MicroLessonSubmission>;
|
package/dist/types/users.d.ts
CHANGED
|
@@ -59,8 +59,8 @@ export type UserReduxState = z.infer<typeof UserReduxState>;
|
|
|
59
59
|
export declare const WahaAppVersion: z.ZodString;
|
|
60
60
|
export declare const DevicePlatform: z.ZodEnum<{
|
|
61
61
|
web: "web";
|
|
62
|
-
android: "android";
|
|
63
62
|
ios: "ios";
|
|
63
|
+
android: "android";
|
|
64
64
|
macos: "macos";
|
|
65
65
|
windows: "windows";
|
|
66
66
|
}>;
|
|
@@ -88,8 +88,8 @@ export declare const DeviceInfo: z.ZodObject<{
|
|
|
88
88
|
}>>;
|
|
89
89
|
platform: z.ZodEnum<{
|
|
90
90
|
web: "web";
|
|
91
|
-
android: "android";
|
|
92
91
|
ios: "ios";
|
|
92
|
+
android: "android";
|
|
93
93
|
macos: "macos";
|
|
94
94
|
windows: "windows";
|
|
95
95
|
}>;
|
|
@@ -210,8 +210,8 @@ export declare const LegacyWahaUser: z.ZodObject<{
|
|
|
210
210
|
lastUpdate: z.ZodNumber;
|
|
211
211
|
platform: z.ZodEnum<{
|
|
212
212
|
web: "web";
|
|
213
|
-
android: "android";
|
|
214
213
|
ios: "ios";
|
|
214
|
+
android: "android";
|
|
215
215
|
macos: "macos";
|
|
216
216
|
windows: "windows";
|
|
217
217
|
}>;
|
|
@@ -296,8 +296,8 @@ export declare const LegacyWahaUser: z.ZodObject<{
|
|
|
296
296
|
timeSubmitted: z.ZodNumber;
|
|
297
297
|
platform: z.ZodEnum<{
|
|
298
298
|
web: "web";
|
|
299
|
-
android: "android";
|
|
300
299
|
ios: "ios";
|
|
300
|
+
android: "android";
|
|
301
301
|
}>;
|
|
302
302
|
}, z.core.$strip>>>;
|
|
303
303
|
obedienceScore: z.ZodOptional<z.ZodNumber>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "waha-shared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.476",
|
|
4
4
|
"author": "Waha",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@types/signale": "^1.4.7",
|
|
@@ -13,8 +13,11 @@
|
|
|
13
13
|
},
|
|
14
14
|
"description": "Shared assets for Waha's various apps",
|
|
15
15
|
"devDependencies": {
|
|
16
|
+
"@types/react": "^19.3.0",
|
|
16
17
|
"copyfiles": "^2.4.1",
|
|
17
|
-
"
|
|
18
|
+
"react": "^19.3.0",
|
|
19
|
+
"typescript": "~5.9.2",
|
|
20
|
+
"zod": "^4.6.2"
|
|
18
21
|
},
|
|
19
22
|
"files": [
|
|
20
23
|
"dist",
|