Communitygithub.com

JantonioFC/skillsbank

UIコードベース(React/TS、i18nextなど、JSONロケール)における国際化/ローカライゼーションのセットアップ、監査、適用を支援するスキル。i18nフレームワークのインストール/設定、ハードコードされた文字列の置き換え、en-US/zh-CNのカバレッジ確保を行います。

skillsbank とは?

このスキルは、UIコードベース(React/TypeScript、i18nextまたは類似フレームワーク、JSONロケールファイル)における国際化(i18n)の完全なセットアップと監査を提供します。開発者がi18nフレームワークをインストール・設定し、ユーザー向けのハードコードされた文字列をキーに置き換え、en-USとzh-CNのロケール間でパリティを確保し、複数形やフォーマットを検証するのを支援します。このスキルはClaude Code、Cursor、その他のAIエージェントで動作し、まずプロジェクトのスコープ(フレームワーク、既存のi18n状態、ターゲットロケール、翻訳品質要件)を確認し、次に監査→修正→検証のワークフローを実行します。スクリプトを使用して欠落キーや未翻訳文字列を検出し、エラーメッセージのローカライズやアクセシビリティラベルの対応も行います。最終成果物には、i18n設定、ロケールファイル、言語切り替え、テスト更新が含まれます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/JantonioFC/skillsbank/tree/HEAD/skills/localization-toolkit

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

I18nエキスパート

概要

完全なi18nセットアップと監査パスを提供します。i18nフレームワークの設定、ユーザー向け文字列のキーへの置き換え、ロケール間のパリティ確保、en-USとzh-CNにおける複数形/フォーマットの検証を行います。

コア機能

  • ライブラリの選択とセットアップ(React、Next.js、Vue)。
  • キーアーキテクチャとロケールファイルの構成。
  • 翻訳生成と品質戦略(AI、プロフェッショナル、手動)。
  • ルーティングと言語検出/切り替え。
  • SEOとメタデータのローカライズ(該当する場合)。
  • RTL対応(RTLロケールが対象の場合のみ)。

スコープ入力(不明な場合は質問)

  • フレームワークとルーティングスタイル。
  • 既存のi18n状態(なし、部分的、レガシー)。
  • ターゲットロケール(デフォルト: en-US + zh-CN)。
  • 翻訳品質のニーズ(AI vs プロフェッショナル vs 手動)。
  • 使用中のロケール形式(JSON、YAML、PO、XLIFF)。
  • 形式/文化的要件(ある場合)。

ワークフロー(監査 -> 修正 -> 検証)

  1. スコープとロケールターゲットの確認
  • i18nフレームワークとロケールの場所を特定する。
  • ロケールを確認する。指定がない場合はデフォルトでen-US + zh-CNとする。
  1. i18nベースラインのセットアップ(不足している場合)
  • フレームワークに適したライブラリを選択する(例:React: react-i18next、Next.js: next-intl、Vue: vue-i18n)。
  • パッケージをインストールし、i18nエントリ/設定ファイルを作成する。
  • プロバイダをアプリケーションルートに配線し、ロケールリソースを読み込む。
  • 言語切り替え機能と永続化(ルート/パラメータ/localStorage)を適宜追加する。
  • ロケールファイルのレイアウトとキーの名前空間を確立する。
  • ルーティングがロケール対応の場合、ロケールセグメント戦略(サブパス、サブドメイン、クエリパラメータ)を早期に定義する。
  • メタデータがユーザー向けの場合は、タイトル/説明の翻訳を含める。
  1. キーの使用状況とロケールパリティの監査
  • 以下を実行する:
    python scripts/i18n_audit.py --src <src-root> --locale <path/to/en-US.json> --locale <path/to/zh-CN.json>
    
  • 欠落キー/パリティギャップはブロッカーとして扱う。
  • 動的キー(t(var))を手動で検証する。
  1. 生のユーザー向け文字列の検出
  • 以下を検索する:
    rg -n --glob '<src>/**/*.{ts,tsx,js,jsx}' "<[^>]+>[^<{]*[A-Za-z][^<{]*<"
    rg -n --glob '<src>/**/*.{ts,tsx,js,jsx}' "aria-label=\"[^\"]+\"|title=\"[^\"]+\"|placeholder=\"[^\"]+\""
    
  • アクセシビリティラベルをローカライズする。
  1. 文字列をキーに置き換え
  • UIテキストには t('namespace.key') を使用する。
  • 複数形には t('key', { count }) + _one/_other キーを使用する。
  • 時刻/日付/数値にはIntl/アプリのフォーマッターを使用する。
  1. エラーハンドリングのローカライズ(重要)
  • エラーコードをローカライズされたキーにマッピングし、ローカライズされたUIのみを表示する。
  • 生のエラー詳細はログにのみ出力する。
  • 不明なコードに対しては、ローカライズされたフォールバックを提供する。
  1. ロケールファイルの更新
  • 欠落したキーを両方のロケールに追加する。
  • プレースホルダーを一貫して保持する。要求がない限り名前の変更は避ける。
  • 合意された方法で翻訳を生成し、プレースホルダーと複数形ルールを保持する。
  1. 検証
  • 欠落/パリティの問題がゼロになるまで監査を再実行する。
  • JSONを検証する(例:python -m json.tool <file>)。
  • 表示テキストをアサートするテストを更新する。

ガードレール

  • 生の error.message をUIに公開しない。ローカライズされた文字列のみを表示する。
  • 明示的に要求がない限り、追加のロケールを追加しない。
  • 構造化された名前空間(例:errors.*、buttons.*、workspace.*)を優先する。
  • 翻訳は簡潔で一貫性を保つ。
  • 一部の技術的/ブランド用語は翻訳しないままにする(例:製品名、API、MCP、Bash)。

成果物(期待される出力)

  • i18n設定/プロバイダの配線。
  • 各ターゲット言語のロケールファイル。
  • 安定したキーに置き換えられたUI文字列。
  • 言語切り替え機能と永続化(該当する場合)。
  • 表示テキストのための更新されたテスト。

アーキテクチャガイダンス(簡潔に)

  • キー構造: エリアごとにネストされた名前空間を優先する(例:common.buttons.save、pricing.tier.pro)。
  • ファイル構成: ロケールごとに1ファイル、またはロケールごとの名前空間ファイル。ロケール間でキーを同期させておく。
  • プレースホルダー: {name}/{{name}} を正確に保持する。ロケールルールに従って複数形を検証する。
  • フォーマット: 日付、時刻、数値、リストのフォーマットにはIntl/アプリのヘルパーを使用する。
  • SEO/メタデータ: アプリがそれらを公開する場合、タイトルと説明をローカライズする。
  • RTL: RTLロケールにのみ必要。論理CSSプロパティを使用し、レイアウトをテストする。
  • 非Webサーフェス(Electronメインプロセスのダイアログ、CLIプロンプト、ネイティブメニュー)もローカライズが必要。

パフォーマンスに関する注意事項(簡潔)

  • アプリがサポートする場合、ロケールバンドルを遅延読み込みする。
  • 大きなロケールファイルは名前空間ごとに分割する。

障害モード(監視リスト)

  • 翻訳の欠落: デフォルトロケールにフォールバックし、警告をログに記録する。
  • RTLレイアウトの問題: 論理CSSを検証し、ページをテストする。
  • SEOの欠落: 該当する場合、代替ページとメタデータがローカライズされていることを確認する。

検証チェックリスト(簡潔)

  • 欠落キーがなく、生のUI文字列がない。
  • ロケール切り替えが機能し、永続化される。
  • 両方のロケールで複数形とフォーマットが検証されている。
  • フォールバックロケールが設定されている。

リソース

scripts/

  • scripts/i18n_audit.py: t('key') の使用状況を抽出し、ロケールJSONファイルと比較する。

アクティベーショントリガー

エラーコードからローカライズされたメッセージへのマッピング、およびキーパリティ、複数形、フォーマットの検証。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

JantonioFC/skillsbank

AI-powered image editing with style transfer and object removal

JantonioFC/skillsbank

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

JantonioFC/skillsbank

Analise e auditoria de editais de leilao judicial e extrajudicial. Riscos ocultos, clausulas perigosas, debitos, ocupante e classificacao da oportunidade.

JantonioFC/skillsbank

Embed Photopea in web apps using photopea.js. Covers embedding, file I/O, scripting, exporting, layers, text, filters, and the full Photoshop-compatible API.

JantonioFC/skillsbank

Best practices for Remotion - Video creation in React

JantonioFC/skillsbank

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

JantonioFC/skillsbank

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

JantonioFC/skillsbank

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

JantonioFC/skillsbank

Video and audio perception, indexing, and editing. Ingest files/URLs/live streams, build visual/spoken indexes, search with timestamps, edit timelines, add overlays/subtitles, generate media, and create real-time alerts.

JantonioFC/skillsbank

Upload, stream, search, edit, transcribe, and generate AI video and audio using the VideoDB SDK.

JantonioFC/skillsbank

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

JantonioFC/skillsbank

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

JantonioFC/skillsbank

Tool lifecycle UI components for React/Next.js from ui.inference.sh. Display tool calls: pending, progress, approval required, results. Capabilities: tool status, progress indicators, approval flows, results display. Use for: showing agent tool calls, human-in-the-loop approvals, tool output. Triggers: tool ui, tool calls, tool status, tool approval, tool results, agent tools, mcp tools ui, function calling ui, tool lifecycle, tool pending

JantonioFC/skillsbank

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

JantonioFC/skillsbank

When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' 'audience targeting,' 'Google Ads,' 'Facebook ads,'...

JantonioFC/skillsbank

Create AI avatar and talking head videos with OmniHuman, Fabric, PixVerse via inference.sh CLI. Models: OmniHuman 1.5, OmniHuman 1.0, Fabric 1.0, PixVerse Lipsync. Capabilities: audio-driven avatars, lipsync videos, talking head generation, virtual presenters. Use for: AI presenters, expla...

JantonioFC/skillsbank

Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awarene...

JantonioFC/skillsbank

Generate AI videos with Google Veo, Seedance, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 1.5 Pro, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, lipsync, avatar animation, video upscaling, fole...

JantonioFC/skillsbank

Production-ready CI/CD configurations for Playwright — GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, parallel sharding, reporting, code coverage, and global setup/teardown.

JantonioFC/skillsbank

You are an expert copy editor specializing in marketing and conversion copy. Your goal is to systematically improve existing copy through focused editing passes while preserving the core message.

関連スキル