feat(i18n): add Azerbaijani language support (#6278)

This commit is contained in:
Jamal Ali 2026-09-06 18:52:59 +04:00 committed by GitHub
parent c031b77c83
commit 3d97b39f2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 1126 additions and 0 deletions

View file

@ -5,6 +5,7 @@ import { findNearestMatchedLanguage } from "./utils/i18n";
export const locales = orderBy([ export const locales = orderBy([
"ar", "ar",
"az",
"bg", "bg",
"ca", "ca",
"cs", "cs",

1115
web/src/locales/az.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,6 @@
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { locales } from "@/i18n"; import { locales } from "@/i18n";
import azTranslation from "@/locales/az.json";
import enTranslation from "@/locales/en.json"; import enTranslation from "@/locales/en.json";
import heTranslation from "@/locales/he.json"; import heTranslation from "@/locales/he.json";
import { getLocaleSearchLabels, localeMatchesSearch, normalizeLocaleSearchText } from "@/utils/i18n"; import { getLocaleSearchLabels, localeMatchesSearch, normalizeLocaleSearchText } from "@/utils/i18n";
@ -45,6 +46,15 @@ describe("locale search helpers", () => {
expect(heTranslation.auth).not.toHaveProperty("host-tip"); expect(heTranslation.auth).not.toHaveProperty("host-tip");
}); });
it("includes Azerbaijani in the supported locale list", () => {
expect(locales).toContain("az");
expect(localeMatchesSearch("az", "azerbaijani", "en")).toBe(true);
});
it("keeps the Azerbaijani catalog aligned with the English one", () => {
expect(flattenTranslationKeys(azTranslation).sort()).toEqual(flattenTranslationKeys(enTranslation).sort());
});
it("uses future-oriented wording for expiring Hebrew links and tokens", () => { it("uses future-oriented wording for expiring Hebrew links and tokens", () => {
expect(heTranslation.memo.share["expires-on"]).toBe("יפוג תוקף בתאריך {{date}}"); expect(heTranslation.memo.share["expires-on"]).toBe("יפוג תוקף בתאריך {{date}}");
expect(heTranslation.setting["access-token"].expires).toBe("יפוג תוקף"); expect(heTranslation.setting["access-token"].expires).toBe("יפוג תוקף");