一键导入
translation-strings
Use when reviewing a codebase for internationalisation readiness, setting up an i18n library, or preparing strings for a new locale.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when reviewing a codebase for internationalisation readiness, setting up an i18n library, or preparing strings for a new locale.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | translation-strings |
| description | Use when reviewing a codebase for internationalisation readiness, setting up an i18n library, or preparing strings for a new locale. |
| metadata | {"category":"javascript","priority":"medium","difficulty":"intermediate","estimatedTime":"30","source":"frontendchecklist.io","url":"https://frontendchecklist.io/en/rules/javascript/translation-strings"} |
Naive string concatenation produces untranslatable sentences because word order varies dramatically across languages. A pattern like "Found " + count + " results" cannot be translated correctly into languages where the number appears in a different position or where the noun form changes depending on the count. Bad i18n strings force translators to work around developer mistakes — or simply leave content untranslated.
Check whether translation strings use proper message formatting with placeholders rather than string concatenation.
Replace concatenated translation strings with ICU message format patterns and ensure pluralisation is handled via the library, not conditionals.
Explain why string concatenation breaks translations and how ICU MessageFormat handles variable word order, pluralisation, and gender.
Review components and utility functions for hardcoded user-visible strings, string concatenation involving translated text, and missing plural forms.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/en/rules/javascript/translation-strings
Use when reviewing templates, rendered HTML, or shared components related to Implement accessible breadcrumb navigation. Validate the final browser-facing markup, not just the source framework abstraction.
Use when auditing metadata, crawlability, structured data, or indexability related to Implement valid BreadcrumbList schema. Verify the rendered HTML and HTTP response rather than relying only on source files.
Use when reviewing templates, rendered HTML, or shared components related to Declare UTF-8 character encoding. Validate the final browser-facing markup, not just the source framework abstraction.
Use when reviewing templates, rendered HTML, or shared components related to Set text direction for RTL languages. Validate the final browser-facing markup, not just the source framework abstraction.
Use when auditing a site's meta tag uniqueness, generating page-specific meta descriptions, or reviewing CMS templates that inject the same description globally.
Use when you need to find the 2-3 most popular and well-maintained npm packages relevant to a frontend checklist rule, validate they meet quality thresholds, and add them to the rule's frontmatter.