@nimee/translations 1.0.64 → 1.0.67
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.
- package/dist/translations.d.ts +149 -0
- package/dist/translations.js +201 -32
- package/dist/translations.js.map +1 -1
- package/package.json +2 -2
- package/src/translations.ts +334 -31
- package/test/translations.test.ts +56 -1
- package/.claude/settings.local.json +0 -8
package/dist/translations.d.ts
CHANGED
|
@@ -595,6 +595,108 @@ interface ITranslationKeys {
|
|
|
595
595
|
ko: string;
|
|
596
596
|
zh: string;
|
|
597
597
|
};
|
|
598
|
+
dashboardButtonText: {
|
|
599
|
+
en: string;
|
|
600
|
+
he: string;
|
|
601
|
+
ar: string;
|
|
602
|
+
ru: string;
|
|
603
|
+
es: string;
|
|
604
|
+
fr: string;
|
|
605
|
+
de: string;
|
|
606
|
+
it: string;
|
|
607
|
+
pt: string;
|
|
608
|
+
nl: string;
|
|
609
|
+
pl: string;
|
|
610
|
+
tr: string;
|
|
611
|
+
ja: string;
|
|
612
|
+
ko: string;
|
|
613
|
+
zh: string;
|
|
614
|
+
};
|
|
615
|
+
viewSellersButtonText: {
|
|
616
|
+
en: string;
|
|
617
|
+
he: string;
|
|
618
|
+
ar: string;
|
|
619
|
+
ru: string;
|
|
620
|
+
es: string;
|
|
621
|
+
fr: string;
|
|
622
|
+
de: string;
|
|
623
|
+
it: string;
|
|
624
|
+
pt: string;
|
|
625
|
+
nl: string;
|
|
626
|
+
pl: string;
|
|
627
|
+
tr: string;
|
|
628
|
+
ja: string;
|
|
629
|
+
ko: string;
|
|
630
|
+
zh: string;
|
|
631
|
+
};
|
|
632
|
+
newAccountCreatedSubject: {
|
|
633
|
+
en: string;
|
|
634
|
+
he: string;
|
|
635
|
+
ar: string;
|
|
636
|
+
ru: string;
|
|
637
|
+
es: string;
|
|
638
|
+
fr: string;
|
|
639
|
+
de: string;
|
|
640
|
+
it: string;
|
|
641
|
+
pt: string;
|
|
642
|
+
nl: string;
|
|
643
|
+
pl: string;
|
|
644
|
+
tr: string;
|
|
645
|
+
ja: string;
|
|
646
|
+
ko: string;
|
|
647
|
+
zh: string;
|
|
648
|
+
};
|
|
649
|
+
emailVerificationLinkInvalid: {
|
|
650
|
+
en: string;
|
|
651
|
+
he: string;
|
|
652
|
+
ar: string;
|
|
653
|
+
ru: string;
|
|
654
|
+
es: string;
|
|
655
|
+
fr: string;
|
|
656
|
+
de: string;
|
|
657
|
+
it: string;
|
|
658
|
+
pt: string;
|
|
659
|
+
nl: string;
|
|
660
|
+
pl: string;
|
|
661
|
+
tr: string;
|
|
662
|
+
ja: string;
|
|
663
|
+
ko: string;
|
|
664
|
+
zh: string;
|
|
665
|
+
};
|
|
666
|
+
verificationEmailResendTooSoon: {
|
|
667
|
+
en: string;
|
|
668
|
+
he: string;
|
|
669
|
+
ar: string;
|
|
670
|
+
ru: string;
|
|
671
|
+
es: string;
|
|
672
|
+
fr: string;
|
|
673
|
+
de: string;
|
|
674
|
+
it: string;
|
|
675
|
+
pt: string;
|
|
676
|
+
nl: string;
|
|
677
|
+
pl: string;
|
|
678
|
+
tr: string;
|
|
679
|
+
ja: string;
|
|
680
|
+
ko: string;
|
|
681
|
+
zh: string;
|
|
682
|
+
};
|
|
683
|
+
emailAlreadyVerified: {
|
|
684
|
+
en: string;
|
|
685
|
+
he: string;
|
|
686
|
+
ar: string;
|
|
687
|
+
ru: string;
|
|
688
|
+
es: string;
|
|
689
|
+
fr: string;
|
|
690
|
+
de: string;
|
|
691
|
+
it: string;
|
|
692
|
+
pt: string;
|
|
693
|
+
nl: string;
|
|
694
|
+
pl: string;
|
|
695
|
+
tr: string;
|
|
696
|
+
ja: string;
|
|
697
|
+
ko: string;
|
|
698
|
+
zh: string;
|
|
699
|
+
};
|
|
598
700
|
orderWaitingForApprovalSubject: {
|
|
599
701
|
en: string;
|
|
600
702
|
he: string;
|
|
@@ -2448,6 +2550,40 @@ interface ITranslationKeys {
|
|
|
2448
2550
|
ko: string;
|
|
2449
2551
|
zh: string;
|
|
2450
2552
|
};
|
|
2553
|
+
sessionCheckInEventNotInStation: {
|
|
2554
|
+
en: string;
|
|
2555
|
+
he: string;
|
|
2556
|
+
ar: string;
|
|
2557
|
+
ru: string;
|
|
2558
|
+
es: string;
|
|
2559
|
+
fr: string;
|
|
2560
|
+
de: string;
|
|
2561
|
+
it: string;
|
|
2562
|
+
pt: string;
|
|
2563
|
+
nl: string;
|
|
2564
|
+
pl: string;
|
|
2565
|
+
tr: string;
|
|
2566
|
+
ja: string;
|
|
2567
|
+
ko: string;
|
|
2568
|
+
zh: string;
|
|
2569
|
+
};
|
|
2570
|
+
sessionCheckInStationAccountMismatch: {
|
|
2571
|
+
en: string;
|
|
2572
|
+
he: string;
|
|
2573
|
+
ar: string;
|
|
2574
|
+
ru: string;
|
|
2575
|
+
es: string;
|
|
2576
|
+
fr: string;
|
|
2577
|
+
de: string;
|
|
2578
|
+
it: string;
|
|
2579
|
+
pt: string;
|
|
2580
|
+
nl: string;
|
|
2581
|
+
pl: string;
|
|
2582
|
+
tr: string;
|
|
2583
|
+
ja: string;
|
|
2584
|
+
ko: string;
|
|
2585
|
+
zh: string;
|
|
2586
|
+
};
|
|
2451
2587
|
basketCheckInTicketNotFoundInOrder: {
|
|
2452
2588
|
en: string;
|
|
2453
2589
|
he: string;
|
|
@@ -3725,5 +3861,18 @@ interface ITranslationKeys {
|
|
|
3725
3861
|
};
|
|
3726
3862
|
}
|
|
3727
3863
|
export declare const translations: Record<keyof ITranslationKeys, Record<ILanguageEnum, string>>;
|
|
3864
|
+
/**
|
|
3865
|
+
* #1305 — normalise a caller-supplied language before it is used to pick copy.
|
|
3866
|
+
*
|
|
3867
|
+
* Every service reads the viewer's language straight off the `X-User-Language` header with a bare
|
|
3868
|
+
* cast (`req.headers["x-user-language"] as ILanguageEnum`), sometimes with `|| ILanguageEnum.en`.
|
|
3869
|
+
* That cast is a lie about caller-supplied data: a proxy can duplicate the header into an array,
|
|
3870
|
+
* and a browser can send a regional tag such as "he-IL". Neither is a member of the enum, and
|
|
3871
|
+
* `|| ILanguageEnum.en` does not catch "he-IL" because a non-empty string is truthy -- so the value
|
|
3872
|
+
* reached a lookup that returned undefined.
|
|
3873
|
+
*
|
|
3874
|
+
* Returns undefined for anything unsupported, so a caller's own default applies.
|
|
3875
|
+
*/
|
|
3876
|
+
export declare const resolveLanguage: (value: string | string[] | undefined) => ILanguageEnum | undefined;
|
|
3728
3877
|
export declare const getTranslation: (key: keyof ITranslationKeys, language: ILanguageEnum, params: Record<string, string>) => string;
|
|
3729
3878
|
export type { ITranslationKeys };
|
package/dist/translations.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTranslation = exports.translations = void 0;
|
|
3
|
+
exports.getTranslation = exports.resolveLanguage = exports.translations = void 0;
|
|
4
|
+
const shared_types_1 = require("@nimee/shared-types");
|
|
4
5
|
// Exported so callers can lint the corpus itself — see send-notification's
|
|
5
6
|
// translationPlaceholders test, which asserts every placeholder is a single-brace {name} token
|
|
6
7
|
// (getTranslation below substitutes {key}, NOT Handlebars {{key}}).
|
|
@@ -516,21 +517,123 @@ exports.translations = {
|
|
|
516
517
|
zh: "欢迎来到平台",
|
|
517
518
|
},
|
|
518
519
|
newSellerRegisteredSubject: {
|
|
519
|
-
en: "New
|
|
520
|
-
he: "
|
|
521
|
-
ar: "
|
|
522
|
-
ru: "
|
|
523
|
-
es: "
|
|
524
|
-
fr: "
|
|
525
|
-
de: "
|
|
526
|
-
it: "
|
|
527
|
-
pt: "
|
|
528
|
-
nl: "Nieuwe verkoper
|
|
529
|
-
pl: "
|
|
530
|
-
tr: "
|
|
531
|
-
ja: "
|
|
532
|
-
ko: "
|
|
533
|
-
zh: "
|
|
520
|
+
en: "New seller registered on {marketplaceName}",
|
|
521
|
+
he: "מוכר חדש נרשם ב-{marketplaceName}",
|
|
522
|
+
ar: "بائع جديد مسجّل في {marketplaceName}",
|
|
523
|
+
ru: "Новый продавец на {marketplaceName}",
|
|
524
|
+
es: "Nuevo vendedor registrado en {marketplaceName}",
|
|
525
|
+
fr: "Nouveau vendeur inscrit sur {marketplaceName}",
|
|
526
|
+
de: "Neuer Verkäufer auf {marketplaceName} registriert",
|
|
527
|
+
it: "Nuovo venditore registrato su {marketplaceName}",
|
|
528
|
+
pt: "Novo vendedor registrado em {marketplaceName}",
|
|
529
|
+
nl: "Nieuwe verkoper geregistreerd op {marketplaceName}",
|
|
530
|
+
pl: "Nowy sprzedawca zarejestrowany na {marketplaceName}",
|
|
531
|
+
tr: "{marketplaceName} üzerinde yeni satıcı kaydı",
|
|
532
|
+
ja: "{marketplaceName}に新しい販売者が登録しました",
|
|
533
|
+
ko: "{marketplaceName}에 새 판매자 등록",
|
|
534
|
+
zh: "{marketplaceName}有新卖家注册",
|
|
535
|
+
},
|
|
536
|
+
dashboardButtonText: {
|
|
537
|
+
en: "Go to my dashboard",
|
|
538
|
+
he: "כניסה ללוח הבקרה",
|
|
539
|
+
ar: "الانتقال إلى لوحة التحكم",
|
|
540
|
+
ru: "Перейти в панель управления",
|
|
541
|
+
es: "Ir a mi panel",
|
|
542
|
+
fr: "Accéder à mon tableau de bord",
|
|
543
|
+
de: "Zu meinem Dashboard",
|
|
544
|
+
it: "Vai alla mia dashboard",
|
|
545
|
+
pt: "Ir para o meu painel",
|
|
546
|
+
nl: "Naar mijn dashboard",
|
|
547
|
+
pl: "Przejdź do panelu",
|
|
548
|
+
tr: "Panelime git",
|
|
549
|
+
ja: "ダッシュボードへ移動",
|
|
550
|
+
ko: "내 대시보드로 이동",
|
|
551
|
+
zh: "前往我的控制台",
|
|
552
|
+
},
|
|
553
|
+
viewSellersButtonText: {
|
|
554
|
+
en: "View my sellers",
|
|
555
|
+
he: "צפייה במוכרים שלי",
|
|
556
|
+
ar: "عرض البائعين",
|
|
557
|
+
ru: "Мои продавцы",
|
|
558
|
+
es: "Ver mis vendedores",
|
|
559
|
+
fr: "Voir mes vendeurs",
|
|
560
|
+
de: "Meine Verkäufer anzeigen",
|
|
561
|
+
it: "Visualizza i miei venditori",
|
|
562
|
+
pt: "Ver meus vendedores",
|
|
563
|
+
nl: "Mijn verkopers bekijken",
|
|
564
|
+
pl: "Zobacz moich sprzedawców",
|
|
565
|
+
tr: "Satıcılarımı görüntüle",
|
|
566
|
+
ja: "販売者一覧を見る",
|
|
567
|
+
ko: "내 판매자 보기",
|
|
568
|
+
zh: "查看我的卖家",
|
|
569
|
+
},
|
|
570
|
+
newAccountCreatedSubject: {
|
|
571
|
+
en: "Welcome to {marketplaceName}",
|
|
572
|
+
he: "ברוכים הבאים ל-{marketplaceName}",
|
|
573
|
+
ar: "مرحبًا بك في {marketplaceName}",
|
|
574
|
+
ru: "Добро пожаловать в {marketplaceName}",
|
|
575
|
+
es: "Bienvenido a {marketplaceName}",
|
|
576
|
+
fr: "Bienvenue sur {marketplaceName}",
|
|
577
|
+
de: "Willkommen bei {marketplaceName}",
|
|
578
|
+
it: "Benvenuto su {marketplaceName}",
|
|
579
|
+
pt: "Bem-vindo ao {marketplaceName}",
|
|
580
|
+
nl: "Welkom bij {marketplaceName}",
|
|
581
|
+
pl: "Witamy w {marketplaceName}",
|
|
582
|
+
tr: "{marketplaceName}'e hoş geldiniz",
|
|
583
|
+
ja: "{marketplaceName}へようこそ",
|
|
584
|
+
ko: "{marketplaceName}에 오신 것을 환영합니다",
|
|
585
|
+
zh: "欢迎来到{marketplaceName}",
|
|
586
|
+
},
|
|
587
|
+
emailVerificationLinkInvalid: {
|
|
588
|
+
en: "This verification link is invalid, has expired or was already used. Sign in to request a new one.",
|
|
589
|
+
he: "קישור האימות אינו תקין, פג תוקפו או שכבר נעשה בו שימוש. יש להתחבר כדי לבקש קישור חדש.",
|
|
590
|
+
ar: "رابط التحقق هذا غير صالح أو منتهي الصلاحية أو تم استخدامه بالفعل. سجّل الدخول لطلب رابط جديد.",
|
|
591
|
+
ru: "Ссылка для подтверждения недействительна, устарела или уже использована. Войдите, чтобы запросить новую.",
|
|
592
|
+
es: "Este enlace de verificación no es válido, ha caducado o ya se utilizó. Inicia sesión para solicitar uno nuevo.",
|
|
593
|
+
fr: "Ce lien de vérification est invalide, a expiré ou a déjà été utilisé. Connectez-vous pour en demander un nouveau.",
|
|
594
|
+
de: "Dieser Bestätigungslink ist ungültig, abgelaufen oder wurde bereits verwendet. Melden Sie sich an, um einen neuen anzufordern.",
|
|
595
|
+
it: "Questo link di verifica non è valido, è scaduto o è già stato usato. Accedi per richiederne uno nuovo.",
|
|
596
|
+
pt: "Este link de verificação é inválido, expirou ou já foi usado. Entre para solicitar um novo.",
|
|
597
|
+
nl: "Deze verificatielink is ongeldig, verlopen of al gebruikt. Log in om een nieuwe aan te vragen.",
|
|
598
|
+
pl: "Ten link weryfikacyjny jest nieprawidłowy, wygasł lub został już użyty. Zaloguj się, aby poprosić o nowy.",
|
|
599
|
+
tr: "Bu doğrulama bağlantısı geçersiz, süresi dolmuş veya zaten kullanılmış. Yeni bir bağlantı istemek için giriş yapın.",
|
|
600
|
+
ja: "この確認リンクは無効、期限切れ、または使用済みです。ログインして新しいリンクをリクエストしてください。",
|
|
601
|
+
ko: "이 인증 링크는 유효하지 않거나 만료되었거나 이미 사용되었습니다. 로그인하여 새 링크를 요청하세요.",
|
|
602
|
+
zh: "此验证链接无效、已过期或已被使用。请登录以申请新的链接。",
|
|
603
|
+
},
|
|
604
|
+
verificationEmailResendTooSoon: {
|
|
605
|
+
en: "We just sent you a verification email. Please wait a minute before requesting another one.",
|
|
606
|
+
he: "שלחנו לך מייל אימות ממש עכשיו. יש להמתין דקה לפני שמבקשים מייל נוסף.",
|
|
607
|
+
ar: "لقد أرسلنا لك للتو رسالة تحقق. يرجى الانتظار دقيقة قبل طلب رسالة أخرى.",
|
|
608
|
+
ru: "Мы только что отправили вам письмо для подтверждения. Подождите минуту, прежде чем запрашивать новое.",
|
|
609
|
+
es: "Acabamos de enviarte un correo de verificación. Espera un minuto antes de solicitar otro.",
|
|
610
|
+
fr: "Nous venons de vous envoyer un e-mail de vérification. Veuillez patienter une minute avant d'en demander un autre.",
|
|
611
|
+
de: "Wir haben Ihnen gerade eine Bestätigungs-E-Mail gesendet. Bitte warten Sie eine Minute, bevor Sie eine weitere anfordern.",
|
|
612
|
+
it: "Ti abbiamo appena inviato un'email di verifica. Attendi un minuto prima di richiederne un'altra.",
|
|
613
|
+
pt: "Acabamos de enviar um e-mail de verificação. Aguarde um minuto antes de solicitar outro.",
|
|
614
|
+
nl: "We hebben je net een verificatie-e-mail gestuurd. Wacht een minuut voordat je een nieuwe aanvraagt.",
|
|
615
|
+
pl: "Właśnie wysłaliśmy Ci e-mail weryfikacyjny. Odczekaj minutę, zanim poprosisz o kolejny.",
|
|
616
|
+
tr: "Size az önce bir doğrulama e-postası gönderdik. Yenisini istemeden önce lütfen bir dakika bekleyin.",
|
|
617
|
+
ja: "確認メールを送信したばかりです。再送信をリクエストする前に1分お待ちください。",
|
|
618
|
+
ko: "방금 인증 이메일을 보냈습니다. 다시 요청하기 전에 1분만 기다려 주세요.",
|
|
619
|
+
zh: "我们刚刚向您发送了验证邮件。请等待一分钟后再申请新的邮件。",
|
|
620
|
+
},
|
|
621
|
+
emailAlreadyVerified: {
|
|
622
|
+
en: "Your email address is already verified.",
|
|
623
|
+
he: "כתובת המייל שלך כבר מאומתת.",
|
|
624
|
+
ar: "تم التحقق من بريدك الإلكتروني بالفعل.",
|
|
625
|
+
ru: "Ваш адрес электронной почты уже подтверждён.",
|
|
626
|
+
es: "Tu correo electrónico ya está verificado.",
|
|
627
|
+
fr: "Votre adresse e-mail est déjà vérifiée.",
|
|
628
|
+
de: "Ihre E-Mail-Adresse ist bereits bestätigt.",
|
|
629
|
+
it: "Il tuo indirizzo email è già verificato.",
|
|
630
|
+
pt: "Seu e-mail já está verificado.",
|
|
631
|
+
nl: "Je e-mailadres is al geverifieerd.",
|
|
632
|
+
pl: "Twój adres e-mail jest już zweryfikowany.",
|
|
633
|
+
tr: "E-posta adresiniz zaten doğrulandı.",
|
|
634
|
+
ja: "メールアドレスはすでに確認済みです。",
|
|
635
|
+
ko: "이메일 주소가 이미 인증되었습니다.",
|
|
636
|
+
zh: "您的邮箱地址已验证。",
|
|
534
637
|
},
|
|
535
638
|
orderWaitingForApprovalSubject: {
|
|
536
639
|
en: "Your order is pending approval",
|
|
@@ -754,21 +857,21 @@ exports.translations = {
|
|
|
754
857
|
pl: "Twoje konto {accountName} zostało utworzone na {marketplaceName}.",
|
|
755
858
|
},
|
|
756
859
|
descriptionTopSellerRegistered: {
|
|
757
|
-
en: "A new seller has registered on {marketplaceName}
|
|
758
|
-
he: "מוכר
|
|
759
|
-
ar: "
|
|
760
|
-
ru: "
|
|
761
|
-
es: "Un nuevo vendedor
|
|
762
|
-
fr: "Un nouveau vendeur s'
|
|
763
|
-
de: "Ein neuer Verkäufer hat sich auf {marketplaceName} registriert
|
|
764
|
-
it: "Un nuovo venditore si è registrato su {marketplaceName}
|
|
765
|
-
pt: "Um novo vendedor
|
|
766
|
-
nl: "Een nieuwe verkoper heeft zich geregistreerd op {marketplaceName}
|
|
767
|
-
pl: "Nowy sprzedawca zarejestrował się na {marketplaceName}
|
|
768
|
-
tr: "
|
|
769
|
-
ja: "{
|
|
770
|
-
ko: "
|
|
771
|
-
zh: "
|
|
860
|
+
en: "A new seller, {accountName}, has just registered on {marketplaceName}.",
|
|
861
|
+
he: "מוכר חדש, {accountName}, נרשם הרגע באתר {marketplaceName}.",
|
|
862
|
+
ar: "سجّل بائع جديد، {accountName}، للتو في {marketplaceName}.",
|
|
863
|
+
ru: "Новый продавец {accountName} только что зарегистрировался на {marketplaceName}.",
|
|
864
|
+
es: "Un nuevo vendedor, {accountName}, acaba de registrarse en {marketplaceName}.",
|
|
865
|
+
fr: "Un nouveau vendeur, {accountName}, vient de s'inscrire sur {marketplaceName}.",
|
|
866
|
+
de: "Ein neuer Verkäufer, {accountName}, hat sich gerade auf {marketplaceName} registriert.",
|
|
867
|
+
it: "Un nuovo venditore, {accountName}, si è appena registrato su {marketplaceName}.",
|
|
868
|
+
pt: "Um novo vendedor, {accountName}, acabou de se registrar em {marketplaceName}.",
|
|
869
|
+
nl: "Een nieuwe verkoper, {accountName}, heeft zich zojuist geregistreerd op {marketplaceName}.",
|
|
870
|
+
pl: "Nowy sprzedawca, {accountName}, właśnie zarejestrował się na {marketplaceName}.",
|
|
871
|
+
tr: "Yeni bir satıcı, {accountName}, az önce {marketplaceName} üzerinde kayıt oldu.",
|
|
872
|
+
ja: "新しい販売者「{accountName}」が{marketplaceName}に登録しました。",
|
|
873
|
+
ko: "새로운 판매자 {accountName}님이 {marketplaceName}에 방금 등록했습니다.",
|
|
874
|
+
zh: "新卖家 {accountName} 刚刚在{marketplaceName}注册。",
|
|
772
875
|
},
|
|
773
876
|
descriptionTopForgetPassword: {
|
|
774
877
|
en: "Click on the link below to reset your password, the link is available for 15 minutes only",
|
|
@@ -2353,6 +2456,45 @@ exports.translations = {
|
|
|
2353
2456
|
ko: "지원팀에 문의",
|
|
2354
2457
|
zh: "联系支持",
|
|
2355
2458
|
},
|
|
2459
|
+
// #1305 — a gate scanner may only admit the events its own scanner session covers. The refusal is
|
|
2460
|
+
// returned as the same resolved envelope as the other refusals on that route, which carries the
|
|
2461
|
+
// real 403 plus a machine-readable error name, so the frontend can tell "wrong gate, offer a
|
|
2462
|
+
// deliberate override" from an ordinary failure — and the copy the officer reads is translated.
|
|
2463
|
+
// {stationName} and {eventName} are substituted by getTranslation.
|
|
2464
|
+
sessionCheckInEventNotInStation: {
|
|
2465
|
+
en: "This gate ({stationName}) is not set up for {eventName}",
|
|
2466
|
+
he: "העמדה הזו ({stationName}) אינה מוגדרת עבור {eventName}",
|
|
2467
|
+
ar: "هذا المدخل ({stationName}) غير معدّ لـ{eventName}",
|
|
2468
|
+
ru: "Этот пункт входа ({stationName}) не настроен для {eventName}",
|
|
2469
|
+
es: "Esta entrada ({stationName}) no está configurada para {eventName}",
|
|
2470
|
+
fr: "Cette entrée ({stationName}) n'est pas configurée pour {eventName}",
|
|
2471
|
+
de: "Dieser Eingang ({stationName}) ist nicht für {eventName} eingerichtet",
|
|
2472
|
+
it: "Questo ingresso ({stationName}) non è configurato per {eventName}",
|
|
2473
|
+
pt: "Esta entrada ({stationName}) não está configurada para {eventName}",
|
|
2474
|
+
nl: "Deze ingang ({stationName}) is niet ingesteld voor {eventName}",
|
|
2475
|
+
pl: "To wejście ({stationName}) nie jest skonfigurowane dla {eventName}",
|
|
2476
|
+
tr: "Bu giriş ({stationName}) {eventName} için ayarlanmamış",
|
|
2477
|
+
ja: "このゲート({stationName})は{eventName}用に設定されていません",
|
|
2478
|
+
ko: "이 게이트({stationName})는 {eventName}에 대해 설정되지 않았습니다",
|
|
2479
|
+
zh: "此入口({stationName})未为{eventName}配置",
|
|
2480
|
+
},
|
|
2481
|
+
sessionCheckInStationAccountMismatch: {
|
|
2482
|
+
en: "This gate belongs to a different account",
|
|
2483
|
+
he: "העמדה הזו שייכת לחשבון אחר",
|
|
2484
|
+
ar: "هذا المدخل ينتمي إلى حساب آخر",
|
|
2485
|
+
ru: "Этот пункт входа принадлежит другой учётной записи",
|
|
2486
|
+
es: "Esta entrada pertenece a otra cuenta",
|
|
2487
|
+
fr: "Cette entrée appartient à un autre compte",
|
|
2488
|
+
de: "Dieser Eingang gehört zu einem anderen Konto",
|
|
2489
|
+
it: "Questo ingresso appartiene a un altro account",
|
|
2490
|
+
pt: "Esta entrada pertence a outra conta",
|
|
2491
|
+
nl: "Deze ingang hoort bij een ander account",
|
|
2492
|
+
pl: "To wejście należy do innego konta",
|
|
2493
|
+
tr: "Bu giriş başka bir hesaba ait",
|
|
2494
|
+
ja: "このゲートは別のアカウントのものです",
|
|
2495
|
+
ko: "이 게이트는 다른 계정에 속해 있습니다",
|
|
2496
|
+
zh: "此入口属于其他账户",
|
|
2497
|
+
},
|
|
2356
2498
|
basketCheckInTicketNotFoundInOrder: {
|
|
2357
2499
|
en: "Ticket not found in this order",
|
|
2358
2500
|
he: "כרטיס לא נמצא בהזמנה זו",
|
|
@@ -3735,8 +3877,35 @@ exports.translations = {
|
|
|
3735
3877
|
zh: "短信额度数量必须是 1 到 100,000 之间的整数。",
|
|
3736
3878
|
},
|
|
3737
3879
|
};
|
|
3880
|
+
/**
|
|
3881
|
+
* #1305 — normalise a caller-supplied language before it is used to pick copy.
|
|
3882
|
+
*
|
|
3883
|
+
* Every service reads the viewer's language straight off the `X-User-Language` header with a bare
|
|
3884
|
+
* cast (`req.headers["x-user-language"] as ILanguageEnum`), sometimes with `|| ILanguageEnum.en`.
|
|
3885
|
+
* That cast is a lie about caller-supplied data: a proxy can duplicate the header into an array,
|
|
3886
|
+
* and a browser can send a regional tag such as "he-IL". Neither is a member of the enum, and
|
|
3887
|
+
* `|| ILanguageEnum.en` does not catch "he-IL" because a non-empty string is truthy -- so the value
|
|
3888
|
+
* reached a lookup that returned undefined.
|
|
3889
|
+
*
|
|
3890
|
+
* Returns undefined for anything unsupported, so a caller's own default applies.
|
|
3891
|
+
*/
|
|
3892
|
+
const resolveLanguage = (value) => {
|
|
3893
|
+
const raw = Array.isArray(value) ? value[0] : value;
|
|
3894
|
+
const candidate = raw === null || raw === void 0 ? void 0 : raw.trim().toLowerCase().split(/[-_]/)[0];
|
|
3895
|
+
return Object.values(shared_types_1.ILanguageEnum).includes(candidate)
|
|
3896
|
+
? candidate
|
|
3897
|
+
: undefined;
|
|
3898
|
+
};
|
|
3899
|
+
exports.resolveLanguage = resolveLanguage;
|
|
3738
3900
|
const getTranslation = (key, language, params) => {
|
|
3739
|
-
|
|
3901
|
+
var _a;
|
|
3902
|
+
// #1305 — `language` arrives from caller-supplied input across several services: a query string,
|
|
3903
|
+
// and the X-User-Language header, which a proxy can duplicate into an array and a browser can set
|
|
3904
|
+
// to a regional tag like "he-IL". Indexing with any of those yields undefined and the substitution
|
|
3905
|
+
// below then threw a TypeError, surfacing as a 500 — on the basket check-in route that is the
|
|
3906
|
+
// SUCCESS path, so a malformed header failed a legitimate scan at a turnstile. A translation
|
|
3907
|
+
// lookup degrades to English rather than throwing; callers normalise with resolveLanguage above.
|
|
3908
|
+
let translation = (_a = exports.translations[key][language]) !== null && _a !== void 0 ? _a : exports.translations[key][shared_types_1.ILanguageEnum.en];
|
|
3740
3909
|
// Replace all parameters in the translation. Function replacer: a plain string replacement would
|
|
3741
3910
|
// interpret "$&", "$'", "$`" and "$$" inside user-entered values (group names, notes).
|
|
3742
3911
|
Object.entries(params).forEach(([key, value]) => {
|