Goal
- •Add or update user-visible strings with consistent keys and locale updates.
Inputs (ask only if missing)
- •The UI text (source language) and where it appears (screen/feature).
- •Key naming preference if the project has one (otherwise infer from existing keys).
Steps
- •Find existing patterns
- •Search for the same/similar text or key via
rg
- •Search for the same/similar text or key via
- •Add/update the key in the shared assets
- •
shared/i18n/assets(既存構造に合わせる)
- •
- •Add/update extension locale files
- •
public/_locales(Chrome/Firefox分の運用があればそれに従う)
- •
- •Update the UI usage
- •Hard-coded文字列を避けて i18n を参照
- •Consistency checks
- •Placeholder(例:
{name})は全localeで同じ名前にする - •余った未使用キーを増やさない(必要なら削除・整理)
- •Placeholder(例:
- •Verify
- •
yarn lint - •
yarn build(必要ならyarn build:firefox)
- •
Guardrails
- •ユーザー向け文字列を
entrypoints/**に直書きしない(例外はコメントで理由を書く) - •翻訳が不完全でも、少なくとも既存の fallback 規約に従う
Output format
- •Added/updated keys list
- •Files changed(
shared/...,public/_locales/...) - •Verification commands and results