pluralization
できること
このスキルは、「3件のアイテムがあります」のような件数をサイトがどう表示しているかを確認し、各言語で複数形が正しくなるようにコードを更新します。多言語のアプリを作る開発者向けです。
使う場面
- ✓アプリの翻訳で件数や複数形がどう書かれているか確認するようエージェントに頼むとき。
- ✓言語にとって複数形が不適切で、翻訳された文章が不自然に読めるとき。
- ✓国際化のライブラリを設定し、複数形の選択を正しく扱いたいとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/pluralization/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のアプリでは、一部の言語で「1 items」のような表示になります。すべての言語について、複数形の扱いを直してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、件数をプラス記号で文字列に連結している箇所や、単数と複数だけを確認している箇所を探します。それらをIntl.PluralRulesやICUのメッセージ構文に置き換え、各言語に正しい形が選ばれるようにします。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Handle plural forms with Intl.PluralRules or ICU MessageFormat
Pluralization rules vary dramatically across languages — what works as a simple singular/plural branch in English produces grammatically wrong output in Arabic, Russian, Polish, and dozens of other languages. Shipping incorrect plurals signals low translation quality and breaks trust with native speakers in target markets.
Quick Reference
- English has 2 plural forms but Arabic has 6 and Russian has 3
- Never concatenate a count with a string like '"You have " + count + " items"'
- Use Intl.PluralRules to select the right message key per locale
- ICU MessageFormat in react-intl or i18next handles plural selection automatically
Check
Find all places in this codebase where a count value is concatenated with a string or where only singular/plural branching is used, without Intl.PluralRules or ICU plural syntax.
Fix
Replace count string concatenation and binary singular/plural logic with Intl.PluralRules-based key selection or ICU MessageFormat plural syntax so that all CLDR plural categories are covered for every target locale.
Explain
Explain why languages have different numbers of plural forms, what CLDR plural categories are, and how Intl.PluralRules and ICU MessageFormat solve pluralization correctly across locales.
Code Review
Review translation files and components that render counts. Flag any strings that concatenate a number with text, any ternary that picks only between "singular" and "plural", and any i18next or react-intl message that is missing plural keys required by the target locale.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/i18n/pluralization
よくある質問
単数と複数の二つだけでは、なぜ不十分なのですか?
このスキルによると、言語ごとに大きく異なり、英語は複数形が二つですが、アラビア語は六つ、ロシア語は三つあります。
Intl.PluralRulesとは何ですか?
ブラウザーに標準で備わった機能で、特定の言語で数に対応する正しい複数形の区分を選びます。
人気のライブラリでも使えますか?
このスキルは、複数形の選択を扱うreact-intlやi18nextなどのライブラリのICU MessageFormatに触れています。
詳細
作者による元の説明
Use when reviewing string concatenation involving counts, translation key lookups, or i18n library configurations to check whether plural forms are handled correctly for all target locales.
人気
- GitHubのスター
- 75k
- ランキング
- #2981
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。