Communitygithub.com

Anhvu1107/all-agent-skill

Sempre usar isso quando a requisição corresponder a I18n Localization: padrões de internacionalização e localização.

O que é all-agent-skill?

Esta skill é um guia completo e prático para implementar internacionalização (i18n) e localização (L10n) em aplicações de software. Ela define quando e como usar i18n, fornecendo padrões de implementação para frameworks populares como React (react-i18next), Next.js (next-intl) e Python (gettext). Além disso, a skill aborda a estrutura de arquivos de tradução, boas práticas como uso de chaves de tradução e suporte a RTL (idiomas da direita para a esquerda), e inclui um checklist de qualidade antes do deploy. Um script auxiliar (`scripts/i18n_checker.py`) é mencionado para detectar strings hardcoded e traduções ausentes, tornando esta skill ideal para desenvolvedores que desejam garantir que seus produtos sejam globalmente acessíveis e sigam as melhores práticas do setor.

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

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

i18n & Localização

Regra de Leitura Seletiva

Comece com:

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

Em seguida, carregue apenas os documentos herdados, scripts, assets ou exemplos que correspondam à tarefa real do usuário.

Práticas recomendadas de Internacionalização (i18n) e Localização (L10n).


1. Conceitos Principais

TermoSignificado
i18nInternacionalização - tornar o aplicativo traduzível
L10nLocalização - traduções reais
LocaleIdioma + Região (en-US, tr-TR)
RTLIdiomas da direita para a esquerda (árabe, hebraico)

2. Quando Usar i18n

Tipo de ProjetoPrecisa de i18n?
Aplicativo web público✅ Sim
Produto SaaS✅ Sim
Ferramenta interna⚠️ Talvez
Aplicativo de região única⚠️ Considere o futuro
Projeto pessoal❌ Opcional

3. Padrões de Implementação

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(_("Bem-vindo ao nosso aplicativo"))

4. Estrutura de Arquivos

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

5. Boas Práticas

FAÇA ✅

  • Use chaves de tradução, não texto bruto
  • Namespace as traduções por funcionalidade
  • Suporte a pluralização
  • Lide com formatos de data/número por locale
  • Planeje RTL desde o início
  • Use o formato ICU para strings complexas

NÃO FAÇA ❌

  • Hardcode strings nos componentes
  • Concatene strings traduzidas
  • Presuma o comprimento do texto (alemão é 30% mais longo)
  • Esqueça o layout RTL
  • Misture idiomas no mesmo arquivo

6. Problemas Comuns

ProblemaSolução
Tradução faltandoFallback para o idioma padrão
Strings hardcodedUse script linter/verificador
Formato de dataUse Intl.DateTimeFormat
Formato de númeroUse Intl.NumberFormat
PluralizaçãoUse formato ICU

7. Suporte RTL

/* Propriedades Lógicas CSS */
.container {
  margin-inline-start: 1rem;  /* Não margin-left */
  padding-inline-end: 1rem;   /* Não padding-right */
}

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

8. Checklist

Antes de publicar:

  • Todas as strings voltadas para o usuário usam chaves de tradução
  • Arquivos de locale existem para todos os idiomas suportados
  • Formatação de data/número usa a API Intl
  • Layout RTL testado (se aplicável)
  • Idioma de fallback configurado
  • Nenhuma string hardcoded nos componentes

Script

ScriptPropósitoComando
scripts/i18n_checker.pyDetectar strings hardcoded e traduções ausentespython 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.

Habilidades Relacionadas