Skip to content

Commit

Permalink
Merge pull request #44 from jkoenig134/add-german-translations
Browse files Browse the repository at this point in the history
Add german translations
  • Loading branch information
kekland authored Sep 24, 2024
2 parents d2222fc + 7e9ed35 commit 30aa61e
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ For a complete runnable example, see `./example`. For the full in-depth document
- Spanish (thanks @Thesergiolg99)
- Chinese (thanks @yohom and @zhushenwudi)
- Hebrew (thanks @kfiross)
- German (thanks @jkoenig134)

If there's a language that you would like to add, please see the [localization](./doc/localization.md) guide.

Expand Down
1 change: 1 addition & 0 deletions lib/src/l10n/_l10n.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export './languages/croppy_ar.dart';
export './languages/croppy_de.dart';
export './languages/croppy_en.dart';
export './languages/croppy_kk.dart';
export './languages/croppy_ru.dart';
Expand Down
3 changes: 3 additions & 0 deletions lib/src/l10n/croppy_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ abstract class CroppyLocalizations {
Locale('es'),
Locale('he'),
Locale('zh'),
Locale('de'),
];

/// Defaults to °
Expand Down Expand Up @@ -119,6 +120,8 @@ CroppyLocalizations lookupCroppyLocalizations(Locale locale) {
return CroppyLocalizationsEs();
case 'zh':
return CroppyLocalizationsZh();
case 'de':
return CroppyLocalizationsDe();
}

if (kDebugMode) {
Expand Down
42 changes: 42 additions & 0 deletions lib/src/l10n/languages/croppy_de.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import 'package:croppy/src/l10n/croppy_localizations.dart';

class CroppyLocalizationsDe extends CroppyLocalizations {
CroppyLocalizationsDe() : super('de');

@override
String get cancelLabel => 'Abbrechen';

@override
String get cupertinoFreeformAspectRatioLabel => 'FREIFORM';

@override
String get cupertinoOriginalAspectRatioLabel => 'ORIGINAL';

@override
String get cupertinoResetLabel => 'ZURÜCKSETZEN';

@override
String get cupertinoSquareAspectRatioLabel => 'QUADRAT';

@override
String get doneLabel => 'Fertig';

@override
String get materialFreeformAspectRatioLabel => 'Freiform';

@override
String materialGetFlipLabel(LocalizationDirection direction) =>
'${direction == LocalizationDirection.vertical ? 'Vertikal' : 'Horizontal'} drehen';

@override
String get materialOriginalAspectRatioLabel => 'Original';

@override
String get materialResetLabel => 'Zurücksetzen';

@override
String get materialSquareAspectRatioLabel => 'Quadrat';

@override
String get saveLabel => 'Speichern';
}

0 comments on commit 30aa61e

Please sign in to comment.