fix: correct no-providers message grammar, translate it, and cover both branches

Reword "May be" to "Maybe" in the auth.no-providers message and run
translation:generate to register the key in every locale dictionary, then
replace the English placeholders with proper translations for each locale.
Add a test asserting the error is hidden when providers are configured.
This commit is contained in:
Dmitry Verkhoturov
2026-06-30 18:23:21 -05:00
committed by Umputun
parent 406df022ba
commit fff9127976
26 changed files with 36 additions and 3 deletions
@@ -67,6 +67,6 @@ export const messages = defineMessages<string>({
},
noProviders: {
id: 'auth.no-providers',
defaultMessage: 'No providers available. May be you forgot to enable them?',
defaultMessage: 'No providers available. Maybe you forgot to enable them?',
},
});
@@ -263,6 +263,15 @@ describe('<Auth/>', () => {
expect(container.querySelector('.auth-error')).toBeInTheDocument();
});
it('should not show error when auth providers are configured', () => {
StaticStore.config.auth_providers = ['google'];
const { container } = render(<Auth />);
fireEvent.click(screen.getByText('Sign In'));
expect(container.querySelector('.auth-error')).not.toBeInTheDocument();
});
describe('OAuth providers', () => {
it('should not set user if unauthorized', async () => {
StaticStore.config.auth_providers = ['google'];
@@ -2,6 +2,7 @@
"auth.back": "رجوع",
"auth.email-address": "البريد الإلكتروني",
"auth.loading": "جارٍ التحميل...",
"auth.no-providers": "لا يوجد مزوّدون متاحون. ربما نسيت تفعيلهم؟",
"auth.oauth-button": "سجل دخولاً عبر {provider}",
"auth.oauth-source": "عبر التواصل الاجتماعي",
"auth.open-profile": "الصفحة الشخصية",
@@ -2,6 +2,7 @@
"auth.back": "Назад",
"auth.email-address": "Email адрас",
"auth.loading": "Загрузка...",
"auth.no-providers": "Няма даступных правайдараў. Магчыма, вы забыліся іх уключыць?",
"auth.oauth-button": "Увайсці праз {provider}",
"auth.oauth-source": "Скарыстацца сацыяльнай сеткай",
"auth.open-profile": "Open My Profile",
@@ -2,6 +2,7 @@
"auth.back": "Обратно",
"auth.email-address": "Адрес на електронна поща",
"auth.loading": "Зареждане...",
"auth.no-providers": "Няма налични доставчици. Може би сте забравили да ги активирате?",
"auth.oauth-button": "Sign In with {provider}",
"auth.oauth-source": "Use Social Network",
"auth.open-profile": "Open My Profile",
@@ -2,6 +2,7 @@
"auth.back": "Anterior",
"auth.email-address": "Endereço de email",
"auth.loading": "Carregando...",
"auth.no-providers": "Nenhum provedor disponível. Talvez você tenha esquecido de ativá-los?",
"auth.oauth-button": "Entrar com {provider}",
"auth.oauth-source": "Use redes sociais",
"auth.open-profile": "Abrir meu perfil",
@@ -2,6 +2,7 @@
"auth.back": "Zpět",
"auth.email-address": "Emailová adresa",
"auth.loading": "Načítání...",
"auth.no-providers": "Nejsou k dispozici žádní poskytovatelé. Možná jste je zapomněli povolit?",
"auth.oauth-button": "Přihlásit se pomocí {provider}",
"auth.oauth-source": "Použít sociální sítě",
"auth.open-profile": "Otevřít můj profil",
@@ -2,6 +2,7 @@
"auth.back": "Zurück",
"auth.email-address": "E-Mail-Adresse",
"auth.loading": "Wird geladen ...",
"auth.no-providers": "Keine Anbieter verfügbar. Vielleicht haben Sie vergessen, sie zu aktivieren?",
"auth.oauth-button": "Mit {provider} anmelden",
"auth.oauth-source": "Soziales Netzwerk verwenden",
"auth.open-profile": "Mein Profil öffnen",
@@ -2,6 +2,7 @@
"auth.back": "Back",
"auth.email-address": "Email Address",
"auth.loading": "Loading...",
"auth.no-providers": "No providers available. Maybe you forgot to enable them?",
"auth.oauth-button": "Sign In with {provider}",
"auth.oauth-source": "Use Social Network",
"auth.open-profile": "Open My Profile",
@@ -2,6 +2,7 @@
"auth.back": "Regresar",
"auth.email-address": "Correo electrónico",
"auth.loading": "Cargando...",
"auth.no-providers": "No hay proveedores disponibles. ¿Quizás olvidó habilitarlos?",
"auth.oauth-button": "Iniciar sesión con {provider}",
"auth.oauth-source": "Inicia sesión con tus redes sociales",
"auth.open-profile": "Abrir mi perfil",
@@ -2,6 +2,7 @@
"auth.back": "بازگشت",
"auth.email-address": "آدرس ایمیل",
"auth.loading": "در حال بارگذاری...",
"auth.no-providers": "هیچ ارائه‌دهنده‌ای در دسترس نیست. شاید فراموش کرده‌اید آن‌ها را فعال کنید؟",
"auth.oauth-button": "ورود با {provider}",
"auth.oauth-source": "استفاده از شبکه اجتماعی",
"auth.open-profile": "نمایش پروفایل من",
@@ -2,6 +2,7 @@
"auth.back": "Takaisin",
"auth.email-address": "Sähköposti",
"auth.loading": "Ladataan...",
"auth.no-providers": "Palveluntarjoajia ei ole saatavilla. Ehkä unohdit ottaa ne käyttöön?",
"auth.oauth-button": "Sign In with {provider}",
"auth.oauth-source": "Use Social Network",
"auth.open-profile": "Open My Profile",
@@ -2,6 +2,7 @@
"auth.back": "Retour",
"auth.email-address": "Adresse e-mail",
"auth.loading": "Chargement...",
"auth.no-providers": "Aucun fournisseur disponible. Vous avez peut-être oublié de les activer ?",
"auth.oauth-button": "Se connecter avec {provider}",
"auth.oauth-source": "Utiliser les réseaux sociaux",
"auth.open-profile": "Ouvrir mon profil",
@@ -2,6 +2,7 @@
"auth.back": "Indietro",
"auth.email-address": "Indirizzo email",
"auth.loading": "Caricamento...",
"auth.no-providers": "Nessun provider disponibile. Forse hai dimenticato di abilitarli?",
"auth.oauth-button": "Accedi con {provider}",
"auth.oauth-source": "Usa un Social Network",
"auth.open-profile": "Apri il mio profilo",
@@ -2,6 +2,7 @@
"auth.back": "戻る",
"auth.email-address": "メールアドレス",
"auth.loading": "読み込んでいます…",
"auth.no-providers": "利用可能なプロバイダーがありません。有効にするのを忘れていませんか?",
"auth.oauth-button": "{provider} でサインイン",
"auth.oauth-source": "ソーシャルネットワークを使用",
"auth.open-profile": "マイプロファイルを開く",
+2 -1
View File
@@ -2,6 +2,7 @@
"auth.back": "뒤로",
"auth.email-address": "이메일 주소",
"auth.loading": "로딩 중...",
"auth.no-providers": "사용 가능한 제공자가 없습니다. 활성화하는 것을 잊으셨나요?",
"auth.oauth-button": "{provider}로 로그인하기",
"auth.oauth-source": "소셜 네트워크 사용하기",
"auth.open-profile": "내 프로필 열기",
@@ -165,7 +166,7 @@
"token.invalid": "토큰이 유효하지 않습니다",
"toolbar.attach-image": "이미지 첨부, 드래그 & 드롭 또는 클립보드에서 붙여넣기",
"toolbar.bold": "굵은 텍스트 추가하기 {shortcut}",
"toolbar.code":"코드 삽입하기",
"toolbar.code": "코드 삽입하기",
"toolbar.header": "헤더 텍스트 추가하기",
"toolbar.italic": "기울임꼴 텍스트 추가하기 {shortcut}",
"toolbar.link": "링크 추가하기 {shortcut}",
@@ -2,6 +2,7 @@
"auth.back": "Назад",
"auth.email-address": "Е-пошта",
"auth.loading": "Се вчитува...",
"auth.no-providers": "Нема достапни провајдери. Можеби заборавивте да ги овозможите?",
"auth.oauth-button": "Најава со {provider}",
"auth.oauth-source": "Користи социјална мрежа",
"auth.open-profile": "Отвори го мојот профил",
@@ -2,6 +2,7 @@
"auth.back": "Powrót",
"auth.email-address": "Adres email",
"auth.loading": "Ładuję...",
"auth.no-providers": "Brak dostępnych dostawców. Może zapomniałeś ich włączyć?",
"auth.oauth-button": "Zaloguj się korzystając z {provider}",
"auth.oauth-source": "Użyj sieci społecznościowej",
"auth.open-profile": "Otwórz mój profil",
+2 -1
View File
@@ -2,6 +2,7 @@
"auth.back": "Înapoi",
"auth.email-address": "Adresă de email",
"auth.loading": "Se încarcă...",
"auth.no-providers": "Niciun furnizor disponibil. Poate ați uitat să îi activați?",
"auth.oauth-button": "Autentifică-te cu {provider}",
"auth.oauth-source": "Folosește rețeaua socială",
"auth.open-profile": "Deschide profilul meu",
@@ -179,4 +180,4 @@
"vote.downvote": "Votează negativ",
"vote.score": "Scorul voturilor",
"vote.upvote": "Votează pozitiv"
}
}
@@ -2,6 +2,7 @@
"auth.back": "Назад",
"auth.email-address": "Адрес эл. почты",
"auth.loading": "Загрузка...",
"auth.no-providers": "Нет доступных провайдеров. Возможно, вы забыли их включить?",
"auth.oauth-button": "Войти через {provider}",
"auth.oauth-source": "Использовать социальные сети",
"auth.open-profile": "Открыть Мой Профиль",
@@ -2,6 +2,7 @@
"auth.back": "ย้อนกลับ",
"auth.email-address": "อีเมลล์",
"auth.loading": "กำลังโหลด",
"auth.no-providers": "ไม่มีผู้ให้บริการที่พร้อมใช้งาน คุณอาจลืมเปิดใช้งานหรือไม่?",
"auth.oauth-button": "เข้าสู่ระบบด้วย {provider}",
"auth.oauth-source": "เข้าสู่ระบบง่ายๆด้วย",
"auth.open-profile": "เปิดโปรไฟล์ของฉัน",
@@ -2,6 +2,7 @@
"auth.back": "Geri",
"auth.email-address": "E-posta adresi",
"auth.loading": "Yükleniyor...",
"auth.no-providers": "Kullanılabilir sağlayıcı yok. Belki de etkinleştirmeyi unuttunuz?",
"auth.oauth-button": "{provider} ile Oturum Aç",
"auth.oauth-source": "Sosyal Ağ Kullan",
"auth.open-profile": "Open My Profile",
@@ -2,6 +2,7 @@
"auth.back": "Назад",
"auth.email-address": "Email адреса",
"auth.loading": "Завантаження...",
"auth.no-providers": "Немає доступних провайдерів. Можливо, ви забули їх увімкнути?",
"auth.oauth-button": "Увійти за допомогою {provider}",
"auth.oauth-source": "Використати соціальну мережу",
"auth.open-profile": "Відкрити мій профіль",
@@ -2,6 +2,7 @@
"auth.back": "Quay lại",
"auth.email-address": "Địa chỉ email",
"auth.loading": "Đang tải...",
"auth.no-providers": "Không có nhà cung cấp nào khả dụng. Có thể bạn đã quên bật chúng?",
"auth.oauth-button": "Đăng nhập với {provider}",
"auth.oauth-source": "Dùng mạng xã hội",
"auth.open-profile": "Mở hồ sơ của tôi",
@@ -2,6 +2,7 @@
"auth.back": "返回",
"auth.email-address": "電子郵件地址",
"auth.loading": "載入中...",
"auth.no-providers": "沒有可用的提供者。也許您忘記啟用它們了?",
"auth.oauth-button": "透過 {provider} 登入",
"auth.oauth-source": "透過社群網路",
"auth.open-profile": "檢視我的個人資料",
@@ -2,6 +2,7 @@
"auth.back": "返回",
"auth.email-address": "电子邮件地址",
"auth.loading": "加载中...",
"auth.no-providers": "没有可用的提供商。也许您忘记启用它们了?",
"auth.oauth-button": "通过 {provider} 登录",
"auth.oauth-source": "通过社交网络",
"auth.open-profile": "打开我的资料",