# brainstorm: Frontend Chinese UI ## Goal Make the existing JSP/Servlet frontend interface display in Simplified Chinese so users see Chinese page titles, navigation, labels, action buttons, empty states, accessibility labels, and server-rendered feedback messages. ## What I already know * The user requested: "前端界面需要中文". * The project uses JSP/CSS rendered by Servlet/Tomcat, not a SPA framework. * Visible English text is concentrated in `src/main/webapp/WEB-INF/jsp/**`. * Some user-facing messages are set by Java controllers/services and rendered by JSP pages. * The application already uses UTF-8 JSP page encoding and a UTF-8 character encoding filter. ## Assumptions * Use Simplified Chinese for all user-visible frontend copy. * Keep URLs, form field names, Java identifiers, enum codes, database values, CSS class names, and servlet names unchanged. * Translate dynamic display names exposed by Java enums/role helpers where they are shown in the UI. * Do not add a full i18n framework in this task. ## Open Questions * None blocking; proceed with the Simplified Chinese assumption. ## Requirements * Translate all hardcoded visible English text in JSP pages to Simplified Chinese. * Change HTML language attributes from English to Simplified Chinese where applicable. * Translate visible document titles and the web app display name. * Translate server-generated messages that are displayed to users on the frontend. * Preserve existing page structure, routing, permissions, form submission behavior, JSTL/EL bindings, and backend workflows. * Leave stored data and machine-readable codes unchanged. ## Acceptance Criteria * [x] Navigation, page headings, labels, buttons, table headers, empty states, option labels, and accessible labels appear in Simplified Chinese. * [x] Login, unauthorized, dashboard, role home, catalog, management, reader, borrowing, report, system log, and admin user pages no longer show English UI copy except product/brand names and technical/user data. * [x] Server-rendered success/error messages shown in the UI are Simplified Chinese. * [x] Maven build succeeds. ## Definition of Done * Tests or build verification run where practical. * Lint/typecheck/build green for the Java webapp. * Spec update considered after implementation. ## Out of Scope * Runtime language switching. * Browser locale detection. * New translation resource bundles. * Database data migration. * Visual redesign beyond any minor layout-preserving text fit adjustments. ## Technical Notes * Relevant spec index: `.trellis/spec/frontend/index.md`. * Backend messages may require `.trellis/spec/backend/error-handling.md` and `.trellis/spec/backend/quality-guidelines.md`. * Likely affected frontend files include `src/main/webapp/WEB-INF/jsp/**`, `src/main/webapp/WEB-INF/web.xml`, and possibly `src/main/webapp/static/images/library-login.svg` for accessible text. * Likely affected Java files include controllers/services/entities that expose user-facing display names or request messages.