feat(i18n): localize remaining hardcoded UI surfaces#9082
Conversation
|
Important Review skippedToo many files! This PR contains 254 files, which is 104 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (254)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Localize remaining hardcoded UI strings across web, space, editor, and shared surfaces using the existing react-i18next namespace JSON files introduced by makeplane#8898. Add the new keys to the relevant auth, common, editor, empty-state, inbox, page, project, work-item, and workspace locale files across all supported locales. Co-authored-by: Codex <noreply@openai.com>
0ca8de5 to
03c1a8d
Compare
|
@coderabbitai you can now review the entire change. (Skip .json files) |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 4774 🏁 Script executed: Length of output: 1 🏁 Script executed: Length of output: 203988
🔍 Code Review🐛 Issues / Potential Regressions1. The -function InputView({ label, value, placeholder, onChange, autoFocus }: InputViewProps) {
+function InputView({ label, value, placeholder, onChange }: InputViewProps) {
...
- autoFocus={autoFocus}Suggestion: Keep 2. Both 3. Duplicate The exact same constant is defined in two files:
Consider extracting it to a shared location (e.g. a 4. Hardcoded English defaults in // packages/propel/src/spinners/circular-spinner.tsx
export function Spinner({ label = "Loading..." }: ISpinner)
// packages/propel/src/banner/banner.tsx
dismissLabel = "Dismiss banner",These propel-level components are locale-agnostic — the defaults will always render English regardless of the active locale. Since callers already hold a 5. Fragile sentence-splitting for Terms & Conditions ( {isSignUp ? t("space_public.by_creating_account") : t("space_public.by_signing_in")},{" "}
{t("space_public.you_agree_to_our")}Splitting a single grammatical sentence across three separate keys is fragile for languages that have different word order or punctuation rules. A better pattern is to use a single key with an interpolated variable and render the link separately, or use ✅ Noteworthy Improvements Bundled InThese are positive changes worth acknowledging:
💬 Minor Notes
|
Restore initial focus for the localized link editor and filter panels without using the autoFocus attribute, keeping the keyboard-first interaction while satisfying the a11y lint rules. Co-authored-by: Codex <noreply@openai.com>
Tighten a small batch of locale strings against the English source for command-style actions, work item terminology, and workspace invitation messaging. Co-authored-by: Codex <noreply@openai.com>
|
@coderabbitai review the latest changes. Skip .json files. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 207639
🔍 Code Review✅ Previous Issues AddressedAll the major items flagged in the last review have been resolved:
🐛 Remaining / New Issues1. Duplicate The identical constant is still defined in both:
This was flagged in the previous review and is still open. Consider extracting it to a shared 2. // packages/propel/src/spinners/circular-spinner.tsx
label = "Loading..."
// packages/propel/src/banner/banner.tsx
dismissLabel = "Dismiss banner",Both props are now properly wired (good progress), but the hardcoded English defaults remain. Callers that don't pass a translated string will still silently display English text. Since propel is locale-agnostic, these defaults should ideally be documented as "callers are required to pass a translated string," or the props should be made required. 3. Fragile Terms & Conditions string splitting (still present) // apps/space/components/account/terms-and-conditions.tsx
{isSignUp ? t("space_public.by_creating_account") : t("space_public.by_signing_in")},{" "}
{t("space_public.you_agree_to_our")}This is still the same split-key pattern. Languages with different word order or punctuation will produce unnatural output. The 4. In three files, a new // apps/space/components/issues/issue-layouts/kanban/default.tsx
const groupList = getGroupByColumns(..., {
allWorkItems: `${t("common.all")} ${t("work_items")}`,
none: t("common.none"),
});
// apps/space/components/issues/issue-layouts/kanban/swimlanes.tsx
const localizedLabels = {
allWorkItems: `${t("common.all")} ${t("work_items")}`,
none: t("common.none"),
};
// apps/space/components/issues/issue-layouts/list/default.tsx
const groupList = getGroupByColumns(..., {
allWorkItems: `${t("common.all")} ${t("work_items")}`,
none: t("common.none"),
});Since const localizedLabels = useMemo(() => ({
allWorkItems: `${t("common.all")} ${t("work_items")}`,
none: t("common.none"),
}), [t]);5. In archive: async (_workspaceSlug: string, _projectId: string, issueId: string) => {
try {
await archiveIssue(_workspaceSlug, _projectId, issueId);
} catch (error) { ... }
},The convention of 💬 Minor Notes
|
|
@codex review the latest changes. Skip .json files. |
|
@claude review the latest changes. Skip .json files. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae52e18462
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <button | ||
| type="button" | ||
| key={invitation.id} | ||
| className={`flex cursor-pointer items-center gap-2 rounded-lg border border-subtle px-3 py-2 hover:bg-surface-2`} | ||
| className={`flex w-full cursor-pointer items-center gap-2 rounded-lg border border-subtle px-3 py-2 text-left hover:bg-surface-2`} |
There was a problem hiding this comment.
Keep invitation row non-button when rendering checkbox
This row was switched to a <button> while it still contains <Checkbox />, and Checkbox renders an actual <input type="checkbox">. Nesting one interactive control inside another is invalid HTML and causes inconsistent keyboard/screen-reader behavior (the row and checkbox become competing controls), so invitation selection can become unreliable for assistive-tech users. Keep the row as a non-button container with explicit click/keyboard handlers, or render a non-interactive check indicator inside the button.
Useful? React with 👍 / 👎.
|
@coderabbitai I reviewed the remaining items.\n\n- : agreed the / names are misleading since they are used. I am treating that as a naming cleanup, not a behavioral issue for this PR.\n- : the current flow is and only then . With normal async semantics, the redirect does not run if the delete call rejects, so I am not treating this as a confirmed regression from the current code.\n- The duplicated date filter map, / English defaults, and the split Terms & Conditions sentence are valid follow-up cleanup ideas, but they are outside the scope of this i18n PR.\n\nI am keeping this PR focused on localized strings and the minimum code changes required to preserve upstream behavior. |
|
@coderabbitai I reviewed the remaining items.
I am keeping this PR focused on localized strings and the minimum code changes required to preserve upstream behavior. |
|
Tip For best results, initiate chat on the files or code changes.
Would you like me to open follow-up GitHub issues for the three deferred items so they don't get lost? I can assign them to you and backlink this PR. |
|
Tip For best results, initiate chat on the files or code changes.
Would you like me to open GitHub issues for the three deferred items so they don't get lost between PRs? I can create them now and backlink this PR. |
|
@coderabbitai Thanks. Please do not open follow-up issues automatically for now. Reasoning:
I will track those separately later if they still matter after merge. |
|
Tip For best results, initiate chat on the files or code changes.
🐇 。 ✿ ✏️ Learnings added
|
Summary
Supersedes #9069 and rebases the i18n hardcoded-UI work on top of the current preview branch after #8898.
This version follows the new react-i18next namespace JSON structure from #8898 instead of adding a catch-all namespace. New strings are added to the relevant existing namespace files:
Scope
Verification