Updated PLANS.md, AGENTS.md, and arabic-localization.md to reflect the “foundations now, full translations later” approach and marked progress accordingly.

Implemented localization foundations across backend and frontend (locale settings/middleware, preferred language, i18n wiring, RTL support, minimal Arabic UI strings, Accept-Language).
Added targeted backend and frontend tests plus a risks note for pending full translation coverage.
This commit is contained in:
2026-02-28 11:48:58 +03:00
parent fd90af33b3
commit d40bb10876
27 changed files with 407 additions and 68 deletions
+14 -3
View File
@@ -1,12 +1,23 @@
import { render, screen } from "@testing-library/react";
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
import App from "./App.jsx";
import i18n from "./i18n";
describe("App", () => {
it("renders the hero copy", () => {
it("renders the hero copy", async () => {
await i18n.changeLanguage("en");
render(<App />);
expect(
screen.getByText("Find, compare, and book top salons near you.")
).toBeInTheDocument();
});
it("switches to Arabic and sets RTL direction", async () => {
await i18n.changeLanguage("en");
render(<App />);
fireEvent.click(screen.getByRole("button", { name: "العربية" }));
await waitFor(() => {
expect(document.documentElement.dir).toBe("rtl");
});
expect(screen.getByText("الصالونات")).toBeInTheDocument();
});
});