feat(i18n): add FR/EN internationalization with in-app language selector

- gen-l10n setup (flutter_localizations, intl, l10n.yaml, ARB en/fr)
- localeProvider (persisted) wired into MaterialApp
- language selector in the System page (alongside the color palette)
- all user-facing strings across screens moved to AppLocalizations

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-23 12:13:51 +02:00
co-authored by Claude Opus 4.8
parent 409ab9c1dd
commit a2a7ffd79f
26 changed files with 1012 additions and 70 deletions
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import '../../../domain/entities/pokemon.dart';
import '../../../l10n/app_localizations.dart';
/// Écran inférieur du détail : stats de base, description et éléments décoratifs.
class PokemonStatsPanel extends StatelessWidget {
@@ -8,6 +9,7 @@ class PokemonStatsPanel extends StatelessWidget {
@override
Widget build(BuildContext context) {
final l = AppLocalizations.of(context)!;
return Container(
margin: const EdgeInsets.symmetric(horizontal: 16),
padding: const EdgeInsets.all(8),
@@ -21,7 +23,7 @@ class PokemonStatsPanel extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text("BASE STATS", style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold, letterSpacing: 2)),
Text(l.baseStats, style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold, letterSpacing: 2)),
Text("MODEL: DS-01", style: TextStyle(fontSize: 12, color: Colors.grey[700], fontWeight: FontWeight.bold)),
],
),
@@ -38,7 +40,7 @@ class PokemonStatsPanel extends StatelessWidget {
child: Text(
pokemon.description != null && pokemon.description!.isNotEmpty
? '"${pokemon.description!}"'
: '"No description available for this Pokémon."',
: '"${l.noDescription}"',
style: const TextStyle(fontSize: 16, height: 1.5),
),
),