Communitygithub.com

Anhvu1107/all-agent-skill

TOUJOURS utiliser cette compétence lorsque la requête correspond à l'internationalisation et aux motifs de localisation.

Qu'est-ce que all-agent-skill ?

Cette compétence fournit un guide complet sur les pratiques d'internationalisation (i18n) et de localisation (L10n) pour les développeurs et les agents IA. Elle couvre les concepts fondamentaux, les schémas de mise en œuvre pour des frameworks web modernes comme React, Next.js et Python, ainsi que des conseils pour gérer les formats de date, les nombres et la pluralisation. La compétence inclut également des directives pour le support des langues s'écrivant de droite à gauche (RTL), une structure de fichiers recommandée pour les traductions, et un script de vérification automatique pour détecter les chaînes codées en dur et les traductions manquantes. Elle est conçue pour fonctionner avec n'importe quel projet ou agent (comme Claude Code, Cursor, Codex) qui doit gérer du contenu multilingue, en proposant des bonnes pratiques éprouvées et des solutions aux problèmes courants de localisation.

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

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

i18n & Localisation

Règle de Lecture Sélective

Commencez par :

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

Chargez ensuite uniquement les documents, scripts, ressources ou exemples hérités qui correspondent à la tâche réelle de l'utilisateur.

Bonnes pratiques en matière d'internationalisation (i18n) et de localisation (L10n).


1. Concepts Fondamentaux

TermeSignification
i18nInternationalisation – rendre l'application traduisible
L10nLocalisation – traductions réelles
LocaleLangue + Région (en-US, tr-TR)
RTLLangues s'écrivant de droite à gauche (Arabe, Hébreu)

2. Quand Utiliser i18n

Type de Projeti18n Nécessaire ?
Application web publique✅ Oui
Produit SaaS✅ Oui
Outil interne⚠️ Peut-être
Application mono-région⚠️ Penser à l'avenir
Projet personnel❌ Optionnel

3. Schémas de Mise en Œuvre

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. Structure des Fichiers

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

5. Bonnes Pratiques

À FAIRE ✅

  • Utiliser des clés de traduction, pas du texte brut
  • Espacer (namespacer) les traductions par fonctionnalité
  • Gérer la pluralisation
  • Adapter les formats de date/chiffres par locale
  • Prévoir le RTL dès le début
  • Utiliser le format de message ICU pour les chaînes complexes

À NE PAS FAIRE ❌

  • Ne pas coder en dur les chaînes dans les composants
  • Ne pas concaténer les chaînes traduites
  • Ne pas oublier la longueur du texte (l'allemand est 30% plus long)
  • Ne pas négliger la mise en page RTL
  • Ne pas mélanger les langues dans le même fichier

6. Problèmes Courants

ProblèmeSolution
Traduction manquanteRepli sur la langue par défaut
Chaînes codées en durUtiliser un script de vérification
Format de dateUtiliser Intl.DateTimeFormat
Format de nombreUtiliser Intl.NumberFormat
PluralisationUtiliser le format de message ICU

7. Support RTL

/* Propriétés logiques CSS */
.container {
  margin-inline-start: 1rem;  /* Pas margin-left */
  padding-inline-end: 1rem;   /* Pas padding-right */
}

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

8. Liste de Vérification

Avant la mise en production :

  • Toutes les chaînes destinées à l'utilisateur utilisent des clés de traduction
  • Les fichiers de locale existent pour toutes les langues prises en charge
  • Le formatage des dates/chiffres utilise l'API Intl
  • La mise en page RTL a été testée (si applicable)
  • La langue de repli est configurée
  • Aucune chaîne codée en dur dans les composants

Script

ScriptObjectifCommande
scripts/i18n_checker.pyDétecter les chaînes codées en dur & traductions manquantespython scripts/i18n_checker.py <chemin_du_projet>

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.

Skills associés