Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add german translations #44

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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';
}