| 1 | import 'package:flutter/material.dart'; |
| 2 | import 'package:flutter_test/flutter_test.dart'; |
| 3 | import 'package:localmind/l10n/app_localizations.dart'; |
| 4 | |
| 5 | void main() { |
| 6 | test('Turkish locale is supported and loads translations', () { |
| 7 | expect( |
| 8 | AppLocalizations.supportedLocales.contains(const Locale('tr')), |
| 9 | isTrue, |
| 10 | ); |
| 11 | |
| 12 | final l10n = lookupAppLocalizations(const Locale('tr')); |
| 13 | expect(l10n.app_name, 'LocalMind'); |
| 14 | expect(l10n.cancel, 'İptal'); |
| 15 | expect(l10n.settings_language, 'Dil'); |
| 16 | expect(l10n.onboarding_choose_language, 'LocalMind dillerini keşfedin'); |
| 17 | }); |
| 18 | |
| 19 | test('French locale is supported and loads translations', () { |
| 20 | expect( |
| 21 | AppLocalizations.supportedLocales.contains(const Locale('fr')), |
| 22 | isTrue, |
| 23 | ); |
| 24 | |
| 25 | final l10n = lookupAppLocalizations(const Locale('fr')); |
| 26 | expect(l10n.app_name, 'LocalMind'); |
| 27 | expect(l10n.cancel, 'Annuler'); |
| 28 | expect(l10n.settings_language, 'Langue'); |
| 29 | expect( |
| 30 | l10n.onboarding_choose_language, |
| 31 | 'Découvrez les langues de LocalMind', |
| 32 | ); |
| 33 | }); |
| 34 | } |