Communitygithub.com

AbobakrDiara61/railway-system

Modèles d'internationalisation et de localisation. Détection des chaînes codées en dur, gestion des traductions, fichiers de locale, support RTL.

Qu'est-ce que railway-system ?

Cette compétence fournit un guide complet sur les bonnes pratiques d'internationalisation (i18n) et de localisation (L10n) pour les applications web, SaaS ou internes. Elle couvre la détection des chaînes codées en dur, la gestion des fichiers de traduction, le support des langues RTL (comme l'arabe ou l'hébreu), et la configuration des formats de dates et nombres par locale. L'utilisateur peut s'en servir pour auditer un projet, implémenter i18n proprement, ou corriger des problèmes courants comme les chaînes manquantes ou les concaténations. Elle est applicable sur tous types de projets logiciels où une interface multilingue est requise, mais ne remplace pas une validation spécifique à l'environnement ni un test d'accessibilité RTL.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/AbobakrDiara61/railway-system/tree/HEAD/frontend/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

Meilleures pratiques d'internationalisation (i18n) et de localisation (L10n).


1. Concepts clés

TermeSignification
i18nInternationalisation – rendre l'application traduisible
L10nLocalisation – traductions réelles
LocaleLangue + Région (en-US, tr-TR)
RTLLangues 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 au futur
Projet personnel❌ Optionnel

3. Modèles d'implémentation

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(_("Bienvenue dans notre application"))

4. Structure de 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
  • Espaces de noms pour les traductions par fonctionnalité
  • Gérer la plurilisation
  • Adapter les formats de date/nombre par locale
  • Planifier le support RTL dès le début
  • Utiliser le format de message ICU pour les chaînes complexes

À ÉVITER ❌

  • Chaînes codées en dur dans les composants
  • Concaténer des chaînes traduites
  • Supposer la longueur du texte (l'allemand est 30% plus long)
  • Oublier la mise en page RTL
  • Mélanger les langues dans un même fichier

6. Problèmes courants

ProblèmeSolution
Traduction manquanteRepli vers la langue par défaut
Chaînes codées en durUtiliser un linter/script de vérification
Format de dateUtiliser Intl.DateTimeFormat
Format de nombreUtiliser Intl.NumberFormat
PlurilisationUtiliser 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 de livrer :

  • Toutes les chaînes visibles par l'utilisateur utilisent des clés de traduction
  • Les fichiers de locale existent pour toutes les langues supportées
  • Le formatage des dates/nombres utilise l'API Intl
  • La mise en page RTL est 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 et les traductions manquantespython scripts/i18n_checker.py <chemin_du_projet>

Quand utiliser

Cette compétence est applicable pour exécuter le workflow ou les actions décrits dans l'aperçu.

Limitations

  • Utiliser cette compétence uniquement lorsque la tâche correspond clairement au périmètre décrit ci-dessus.
  • Ne pas considérer le résultat comme un substitut à une validation spécifique à l'environnement, des tests ou un examen par un expert.
  • S'arrêter et demander des clarifications si les entrées requises, les autorisations, les limites de sécurité ou les critères de succès sont absents.

Individual skills in this repo

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

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

Advanced JavaScript animation library skill for creating complex, high-performance web animations.

AbobakrDiara61/railway-system

Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

AbobakrDiara61/railway-system

One sentence - what this skill does and when to invoke it

AbobakrDiara61/railway-system

Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

AbobakrDiara61/railway-system

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.

AbobakrDiara61/railway-system

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO.

AbobakrDiara61/railway-system

AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

AbobakrDiara61/railway-system

CRITICAL: Use for Makepad animation system. Triggers on: makepad animation, makepad animator, makepad hover, makepad state, makepad transition, "from: { all: Forward", makepad pressed, makepad 动画, makepad 状态, makepad 过渡, makepad 悬停效果

AbobakrDiara61/railway-system

Best practices for Remotion - Video creation in React

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

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.

AbobakrDiara61/railway-system

Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.

AbobakrDiara61/railway-system

Automate TikTok tasks via Rube MCP (Composio): upload/publish videos, post photos, manage content, and view user profiles/stats. Always search tools first for current schemas.

AbobakrDiara61/railway-system

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.

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

One sentence - what this skill does and when to invoke it

AbobakrDiara61/railway-system

Automate YouTube tasks via Rube MCP (Composio): upload videos, manage playlists, search content, get analytics, and handle comments. Always search tools first for current schemas.

AbobakrDiara61/railway-system

Extract transcripts from YouTube videos and generate comprehensive, detailed summaries using intelligent analysis frameworks

Skills associés