Skip to content

Commit

Permalink
Language tests added for other languages
Browse files Browse the repository at this point in the history
  • Loading branch information
BrawlerXull committed Nov 5, 2024
1 parent 0363781 commit c129637
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/app/utils/language/french_sentences.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:taskwarrior/app/utils/language/sentences.dart';

class FrenchSentences extends Sentences {
@override
String get helloWorld => 'Bonjour le monde !';
String get helloWorld => 'Bonjour, le monde!';
@override
String get homePageTitle => 'Page d\'accueil';
@override
Expand Down
24 changes: 23 additions & 1 deletion test/language/sentence_manager_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@ void main() {
expect(sentenceManager.sentences.helloWorld, 'Hello, World!');
});


test('Should return "হ্যালো বিশ্ব!" for Bengali', () {
final sentenceManager = SentenceManager(currentLanguage: SupportedLanguage.bengali);
expect(sentenceManager.sentences.helloWorld, 'হ্যালো বিশ্ব!');
});

test('Should return "नमस्ते दुनिया!" for Hindi', () {
final sentenceManager = SentenceManager(currentLanguage: SupportedLanguage.hindi);
expect(sentenceManager.sentences.helloWorld, 'नमस्ते दुनिया!');
});
test('Should return "Bonjour, le monde!" for French', () {
final sentenceManager = SentenceManager(currentLanguage: SupportedLanguage.french);
expect(sentenceManager.sentences.helloWorld, 'Bonjour, le monde!');
});

test('Should return "¡Hola, Mundo!" for Spanish', () {
final sentenceManager = SentenceManager(currentLanguage: SupportedLanguage.spanish);
expect(sentenceManager.sentences.helloWorld, '¡Hola, mundo!');
});

test('Should return "नमस्ते दुनिया!" for Marathi', () {
final sentenceManager = SentenceManager(currentLanguage: SupportedLanguage.marathi);
expect(sentenceManager.sentences.helloWorld, 'नमस्कार, जग!');
});
});
}

0 comments on commit c129637

Please sign in to comment.