Communitygithub.com

Anhvu1107/all-agent-skill

リクエストが i18n ローカリゼーション(国際化と地域化のパターン)に該当する場合に常に使用します。

all-agent-skill とは?

このスキルは、国際化(i18n)およびローカリゼーション(L10n)のベストプラクティスを実装するためのものです。React(react-i18next)、Next.js(next-intl)、Python(gettext)など、主要なフレームワーク向けの実装パターンを提供します。また、ロケールファイルの構造、RTL(右から左)言語のサポート、日付や数値のフォーマット、翻訳の欠落チェックスクリプトなど、実践的なガイドラインを含んでいます。このスキルは、公共のウェブアプリやSaaS製品で多言語対応が必要な場合に特に有用で、プロジェクトに一貫性のあるローカリゼーション戦略をもたらします。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Anhvu1107/all-agent-skill/tree/HEAD/.agent/skills/i18n-localization

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

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

ドキュメント

i18n & ローカリゼーション

選択的読み取りルール

まず以下を参照してください:

  • references/senior-master-standard.md
  • references/usage-routing.md
  • references/quality-checklist.md

その後、ユーザーの実際のタスクに一致する継承されたドキュメント、スクリプト、アセット、または例のみを読み込んでください。

国際化(i18n)と地域化(L10n)のベストプラクティス


1. 基本概念

用語意味
i18n国際化 - アプリを翻訳可能にする
L10n地域化 - 実際の翻訳
ロケール言語+地域(en-US、tr-TR)
RTL右から左へ記述する言語(アラビア語、ヘブライ語)

2. i18n を使用すべき場合

プロジェクトタイプi18n は必要か?
公開ウェブアプリ✅ はい
SaaS 製品✅ はい
内部ツール⚠️ 場合による
単一地域のアプリ⚠️ 将来を考慮
個人プロジェクト❌ 任意

3. 実装パターン

React(react-i18next)

import { useTranslation } from 'react-i18next';

function Welcome() {
  const { t } = useTranslation();
  return <h1>{t('welcome.title')}</h1>;
}

Next.js(next-intl)

import { useTranslations } from 'next-intl';

export default function Page() {
  const t = useTranslations('Home');
  return <h1>{t('title')}</h1>;
}

Python(gettext)

from gettext import gettext as _

print(_("Welcome to our app"))

4. ファイル構造

locales/
├── en/
│   ├── common.json
│   ├── auth.json
│   └── errors.json
├── tr/
│   ├── common.json
│   ├── auth.json
│   └── errors.json
└── ar/          # RTL
    └── ...

5. ベストプラクティス

推奨 ✅

  • 生のテキストではなく翻訳キーを使用する
  • 翻訳を機能ごとに名前空間で分割する
  • 複数形対応をサポートする
  • ロケールに応じた日付・数値フォーマットを扱う
  • 最初から RTL を考慮する
  • 複雑な文字列には ICU メッセージフォーマットを使用する

非推奨 ❌

  • コンポーネント内に文字列をハードコードする
  • 翻訳済み文字列を連結する
  • テキストの長さを想定しない(ドイツ語は30%長い)
  • RTL レイアウトを忘れる
  • 同じファイル内で言語を混在させる

6. よくある問題

問題解決策
翻訳の欠落デフォルト言語にフォールバック
ハードコードされた文字列リンター/チェッカースクリプトを使用
日付フォーマットIntl.DateTimeFormat を使用
数値フォーマットIntl.NumberFormat を使用
複数形ICU メッセージフォーマットを使用

7. RTL サポート

/* CSS 論理プロパティ */
.container {
  margin-inline-start: 1rem;  /* margin-left ではない */
  padding-inline-end: 1rem;   /* padding-right ではない */
}

[dir="rtl"] .icon {
  transform: scaleX(-1);
}

8. チェックリスト

リリース前の確認事項:

  • すべてのユーザー向け文字列が翻訳キーを使用している
  • サポートするすべての言語のロケールファイルが存在する
  • 日付/数値フォーマットが Intl API を使用している
  • RTL レイアウトがテスト済み(該当する場合)
  • フォールバック言語が設定されている
  • コンポーネント内にハードコードされた文字列がない

スクリプト

スクリプト目的コマンド
scripts/i18n_checker.pyハードコードされた文字列と翻訳の欠落を検出python scripts/i18n_checker.py <project_path>

Individual skills in this repo

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

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches 007: Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Agentfolio: Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Animejs Animation: Advanced JavaScript animation library skill for creating complex, high-performance web animations.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astropy: Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astro: Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Emotional ARC Designer: One sentence - what this skill does and when to invoke it

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Fixing Motion Performance: Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Interactive Portfolio: Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches JQ: Expert jq usage for JSON querying, filtering, transformation, and pipeline integration.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Landing Page Generator: Generates high-converting Next.js/React landing pages with Tailwind CSS.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches LEX: Centralized ''Truth Engine'' for cross-jurisdictional legal context (US, EU, CA) and contract scaffolding.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Magic Animator: AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Makepad Animation: CRITICAL: Use for Makepad animation system.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs APP Router Patterns: Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

Anhvu1107/all-agent-skill

ALWAYS use this when the user mentions Nextjs Best Practices, asks to build, debug, review, document, automate, test, configure, migrate, or make decisions in this domain, or the task clearly depends on Nextjs Best Practices; scope: Next.js App Router principles. Apply the bundled workflow, references, scripts, Senior Master standard, and Codex strict review gate before final output.

Anhvu1107/all-agent-skill

description: ALWAYS use this when the work is specifically about modern Next.js or React architecture, data flow, rendering strategy, routing, or performance-sensitive frontend behavior.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs Supabase Auth: Expert integration of Supabase Auth with Next.js App Router

Anhvu1107/all-agent-skill

ALWAYS use this when the task involves reading, extracting, splitting, merging, rotating, creating, validating, OCR-ing, form-filling, or otherwise producing or modifying PDF files.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches React Nextjs Development: React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

Anhvu1107/all-agent-skill

ALWAYS use this when working with Remotion code, video compositions, rendering logic, timing, media assets, or React-based motion workflows.

関連スキル