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:
@@ -0,0 +1,144 @@
|
||||
// ignore: unused_import
|
||||
import 'package:intl/intl.dart' as intl;
|
||||
import 'app_localizations.dart';
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
|
||||
/// The translations for English (`en`).
|
||||
class AppLocalizationsEn extends AppLocalizations {
|
||||
AppLocalizationsEn([String locale = 'en']) : super(locale);
|
||||
|
||||
@override
|
||||
String get appTitle => 'Archery Bookkeeper';
|
||||
|
||||
@override
|
||||
String get appVersion => 'Alpha 0.1';
|
||||
|
||||
@override
|
||||
String get navMainScorer => 'Main (Scorer)';
|
||||
|
||||
@override
|
||||
String get navSettings => 'Settings';
|
||||
|
||||
@override
|
||||
String get arrowsPerEnd => 'Arrows per end';
|
||||
|
||||
@override
|
||||
String get ruleset => 'Ruleset';
|
||||
|
||||
@override
|
||||
String get rulesetIndoor => 'Indoor';
|
||||
|
||||
@override
|
||||
String get rulesetOutdoor => 'Outdoor';
|
||||
|
||||
@override
|
||||
String endsCount(int count) {
|
||||
return '$count ends';
|
||||
}
|
||||
|
||||
@override
|
||||
String get headerEnd => 'End';
|
||||
|
||||
@override
|
||||
String get headerArrows => 'Arrows';
|
||||
|
||||
@override
|
||||
String get headerSumOf3 => 'Sum of 3';
|
||||
|
||||
@override
|
||||
String get headerSumOf6 => 'Sum of 6';
|
||||
|
||||
@override
|
||||
String get headerAccumulative => 'Accumulative';
|
||||
|
||||
@override
|
||||
String get headerXCount => 'X';
|
||||
|
||||
@override
|
||||
String get header10Count => '10';
|
||||
|
||||
@override
|
||||
String get header9Count => '9';
|
||||
|
||||
@override
|
||||
String get scoreTotal => 'Total';
|
||||
|
||||
@override
|
||||
String get keypadClear => 'CLEAR';
|
||||
|
||||
@override
|
||||
String get keypadClose => 'CLOSE';
|
||||
|
||||
@override
|
||||
String get dialogClearScoresTitle => 'Clear scores';
|
||||
|
||||
@override
|
||||
String get dialogClearScoresMessage =>
|
||||
'This will clear all scores for the current session. Continue?';
|
||||
|
||||
@override
|
||||
String get dialogArrowChangeTitle => 'Change arrow count';
|
||||
|
||||
@override
|
||||
String get dialogArrowChangeMessage =>
|
||||
'Changing arrow count will clear existing scores. Continue?';
|
||||
|
||||
@override
|
||||
String get dialogPreserveScores => 'Preserve existing scores when possible?';
|
||||
|
||||
@override
|
||||
String get dialogCancel => 'Cancel';
|
||||
|
||||
@override
|
||||
String get dialogContinue => 'Continue';
|
||||
|
||||
@override
|
||||
String get dialogYes => 'Yes';
|
||||
|
||||
@override
|
||||
String get dialogNo => 'No';
|
||||
|
||||
@override
|
||||
String get settingsTitle => 'Settings';
|
||||
|
||||
@override
|
||||
String get settingsAppearance => 'Appearance';
|
||||
|
||||
@override
|
||||
String get settingsScoring => 'Scoring';
|
||||
|
||||
@override
|
||||
String get settingsExport => 'Export';
|
||||
|
||||
@override
|
||||
String get settingsAbout => 'About';
|
||||
|
||||
@override
|
||||
String get settingsPlaceholder => 'This is a placeholder settings page.';
|
||||
|
||||
@override
|
||||
String get settingsFutureWillInclude => 'Future settings will include:';
|
||||
|
||||
@override
|
||||
String get settingsColorScheme => '• Color scheme preferences';
|
||||
|
||||
@override
|
||||
String get settingsDefaultArrows => '• Default arrow counts';
|
||||
|
||||
@override
|
||||
String get settingsScoreInput => '• Score input preferences';
|
||||
|
||||
@override
|
||||
String get settingsExportOptions => '• Export settings';
|
||||
|
||||
@override
|
||||
String get settingsSessionManagement => '• Session management';
|
||||
|
||||
@override
|
||||
String get dialogKeepScoresTitle => 'Keep scores?';
|
||||
|
||||
@override
|
||||
String get devTodoLocalization =>
|
||||
'REPLACE ALL THESE TEXTS WITH LOCALISATION MARKERS!!';
|
||||
}
|
||||
Reference in New Issue
Block a user