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:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
/// Bandeau affichant le nombre de Pokémon découverts sur le total.
|
||||
class PokedexCountBar extends StatelessWidget {
|
||||
@@ -20,8 +21,8 @@ class PokedexCountBar extends StatelessWidget {
|
||||
'${caught.toString().padLeft(3, '0')} / $total',
|
||||
style: const TextStyle(fontSize: 32, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const Text('POKEMON DISCOVERED',
|
||||
style: TextStyle(fontSize: 14, color: Colors.black54, letterSpacing: 1)),
|
||||
Text(AppLocalizations.of(context)!.pokemonDiscovered,
|
||||
style: const TextStyle(fontSize: 14, color: Colors.black54, letterSpacing: 1)),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
/// Barre de titre de la liste du Pokédex.
|
||||
class PokedexListHeader extends StatelessWidget {
|
||||
@@ -9,13 +10,13 @@ class PokedexListHeader extends StatelessWidget {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0),
|
||||
color: const Color(0xFF90A4AE),
|
||||
child: const Row(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Icon(Icons.menu, color: Colors.black87),
|
||||
Text('LIST - NATIONAL',
|
||||
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold, letterSpacing: 2)),
|
||||
Icon(Icons.search, color: Colors.black87),
|
||||
const Icon(Icons.menu, color: Colors.black87),
|
||||
Text(AppLocalizations.of(context)!.listNational,
|
||||
style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold, letterSpacing: 2)),
|
||||
const Icon(Icons.search, color: Colors.black87),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user