Review a Code Change for Internationalization Bugs: Hardcoded Strings, Concatenated Messages, and Locale-Blind Formatting

You are reviewing a code change for internationalization (i18n) and localization problems before it merges. Focus only on issues that will break or degrade the feature for users in other languages, locales, or regions. Do not comment on general style.

Inputs I will provide:
- The diff (or the relevant files)
- The locales we support or plan to support (e.g. en-US, de-DE, ja-JP, ar-SA)
- Which i18n library or message format we use, if any

Check for each of the following, and cite the exact file and line for every finding:
1. Hardcoded user-facing strings that bypass the translation system, including strings in error messages, emails, notifications, and alt text.
2. Messages built by concatenation or interpolation in a fixed word order ("You have " + n + " items"), which cannot be translated correctly in languages with different word order.
3. Plural handling that assumes singular/plural only (n === 1), instead of using the library's plural rules.
4. Dates, times, numbers, currencies, and percentages formatted manually or with a hardcoded pattern instead of locale-aware formatting.
5. Assumptions about text: fixed-width layouts that will truncate longer translations, uppercase/lowercase conversions that are locale-sensitive, sorting with a plain string comparison, or string length used as a proxy for display width.
6. Right-to-left issues: hardcoded left/right instead of start/end, icons or arrows that should mirror.
7. Locale or timezone taken from the server instead of the user, or a default locale silently applied when the user's preference is missing.
8. Translation keys that are reused for strings with different meanings in different contexts, or keys missing a description for translators.

For each finding, give: the location, what will go wrong for which locale (a concrete example output), severity (blocks merge / should fix / minor), and the smallest fix.

If a category has no problems, say so in one line rather than skipping it. If you cannot tell whether a string is user-facing, list it under "needs confirmation" instead of guessing. End with the single most important fix if only one can be made before merge.

Sign in to upvote this prompt.