Implement comprehensive localization framework with English and Finnish support

- Add flutter_localizations dependency and l10n configuration
- Create ARB files for English (en) and Finnish (fi) translations
- Localize UI strings across all major components:
  * Navigation drawer and page titles
  * Scoring interface (arrows per end, ruleset names)
  * Scorecard headers (End, Arrows, Sum of 3/6, Accumulative)
  * Keypad functional buttons (CLEAR/TYHJENNÄ, CLOSE/SULJE)
  * Settings page placeholder content
  * Dialog messages and confirmation prompts
- Preserve universal archery scoring notation (X, 10, 9, M remain unlocalised)
- Use authentic Finnish archery terminology throughout
- Configure main app with proper localization delegates and supported locales
- Generate localization classes automatically via flutter_localizations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Mikkeli Matlock
2025-08-24 20:47:16 +09:00
parent 8f7d870985
commit bb7b1cf6b2
15 changed files with 938 additions and 55 deletions
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import '../../../config/localization/generated/app_localizations.dart';
class ToggleSwitches extends StatelessWidget {
final int arrowsPerEnd;
@@ -15,18 +16,21 @@ class ToggleSwitches extends StatelessWidget {
@override
Widget build(BuildContext context) {
final l10n = AppLocalizations.of(context)!;
return Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
_buildToggleGroup(
'Arrows per end',
context,
l10n.arrowsPerEnd,
[3, 6],
arrowsPerEnd,
onArrowsPerEndChanged,
),
_buildRulesetInfo(),
_buildRulesetInfo(context),
],
),
],
@@ -34,6 +38,7 @@ class ToggleSwitches extends StatelessWidget {
}
Widget _buildToggleGroup(
BuildContext context,
String label,
List<int> options,
int currentValue,
@@ -66,12 +71,14 @@ class ToggleSwitches extends StatelessWidget {
);
}
Widget _buildRulesetInfo() {
final rulesetName = arrowsPerEnd == 3 ? 'Indoor' : 'Outdoor';
Widget _buildRulesetInfo(BuildContext context) {
final l10n = AppLocalizations.of(context)!;
final rulesetName = arrowsPerEnd == 3 ? l10n.rulesetIndoor : l10n.rulesetOutdoor;
return Column(
children: [
Text(
'Ruleset',
l10n.ruleset,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
@@ -95,7 +102,7 @@ class ToggleSwitches extends StatelessWidget {
),
),
Text(
'$endsPerSet ends',
l10n.endsCount(endsPerSet),
style: TextStyle(
fontSize: 12,
color: Colors.blue.shade600,