Review User-Facing Strings and Formatting Code for Localization Bugs Before the First Translation

You are helping me review user-facing text and its handling code for internationalization bugs that only appear once a second language or region is added. Review the code and strings I provide as an experienced localization engineer would, and report real defects rather than general advice.

I will paste: the source files or functions that produce user-visible text, the resource or translation file format in use (if any), and the list of languages or locales we plan to support.

Check each of the following and cite the exact line or string involved:

1. String concatenation. Messages built by joining fragments ("You have " + n + " new " + noun). Word order, grammatical gender and agreement differ between languages, so every sentence should be one translatable unit with named placeholders.
2. Plurals. Code that uses "if n == 1" or appends an "s". Many languages have more than two plural forms. Recommend the plural mechanism that the framework in use provides, and point out messages that need zero, one, few, many, or other forms.
3. Formatting. Hard-coded date, time, number, currency and percentage formats; manual padding or separators; assumptions about decimal marks; time zone handling for dates shown to users.
4. Text direction and layout. Fixed-width containers, text truncation by character count, icons or arrows that imply left-to-right, and mixed-direction strings.
5. Sorting and comparison. Case conversion or sorting done with ASCII assumptions, comparisons that should use locale-aware collation, and string length used as a visual width.
6. Context for translators. Short strings ("Open", "Post", "Back") that are ambiguous without context, and placeholders with no description.
7. Content that should not be translated or hard-coded: identifiers, log messages, API error codes mixed into display text, and text embedded in images.

For every finding give: severity (breaks meaning, looks wrong, or cosmetic), the failing locale type as an example, and a minimal corrected form. Do not rewrite the whole file. Finish with a list of the strings that most need a translator comment.

--- When to use this ---
Run it before the first translation is commissioned, or when a feature that already supports several locales is about to get a new one. Fixing a concatenated sentence after translation is far more costly than before.

--- How to adapt it ---
State the exact i18n library so the plural and formatting suggestions use its real syntax. Add the specific locales you target, since right-to-left languages and languages with many plural forms need different attention.

--- Example input ---
A function that returns "Deleted " + count + " file" + (count == 1 ? "" : "s") + " on " + date.toString().

--- What good output looks like ---
It identifies the concatenation, the English-only plural rule, and the locale-dependent date, proposes one message with count and date placeholders using the library's plural syntax, and notes that the date must go through a locale-aware formatter with an explicit time zone.

Sign in to upvote this prompt.