Skip to content

Commit

Permalink
fix: Localized missed strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-bak committed Apr 10, 2024
1 parent 4630b79 commit f702b3f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
3 changes: 3 additions & 0 deletions assets/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,17 @@
"import_successful": "Import successful",
"ok": "OK",
"day": {
"set_custom_time_title": "Days",
"one": "{} day",
"other": "{} days"
},
"hour": {
"set_custom_time_title": "Hours",
"one": "{} hour",
"other": "{} hours"
},
"minute": {
"set_custom_time_title": "Minutes",
"one": "{} minute",
"other": "{} minutes"
},
Expand Down
6 changes: 3 additions & 3 deletions lib/generated/locale_keys.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ abstract class LocaleKeys {
static const choose_not_finished_shelf = 'choose_not_finished_shelf';
static const import_successful = 'import_successful';
static const ok = 'ok';
static const day_title = 'day.title';
static const daysSetCustomTimeTitle = 'day.set_custom_time_title';
static const day = 'day';
static const hour_title = 'hour.title';
static const hoursSetCustomTimeTitle = 'hour.set_custom_time_title';
static const hour = 'hour';
static const minute_title = 'minute.title';
static const minutesSetCustomTimeTitle = 'minute.set_custom_time_title';
static const minute = 'minute';
static const set_custom_reading_time = 'set_custom_reading_time';
static const select_all = 'select_all';
Expand Down
8 changes: 2 additions & 6 deletions lib/ui/add_book_screen/add_book_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,7 @@ class _AddBookScreenState extends State<AddBookScreen> {
borderRadius: BorderRadius.circular(cornerRadius),
)),
),
child: const Center(
child: Text("Cancel"),
),
child: Center(child: Text(LocaleKeys.cancel.tr())),
),
),
const SizedBox(width: 10),
Expand All @@ -681,9 +679,7 @@ class _AddBookScreenState extends State<AddBookScreen> {
BorderRadius.circular(cornerRadius),
)),
),
child: const Center(
child: Text("Save"),
),
child: Center(child: Text(LocaleKeys.save.tr())),
);
},
),
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/add_book_screen/widgets/reading_time_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class _BookReadingTimeField extends State<BookReadingTimeField> {
controller: _day,
maxLength: 5,
decoration: InputDecoration(
labelText: LocaleKeys.day_title.tr(),
labelText: LocaleKeys.daysSetCustomTimeTitle.tr(),
border: const OutlineInputBorder(),
counterText: "",
),
Expand All @@ -172,7 +172,7 @@ class _BookReadingTimeField extends State<BookReadingTimeField> {
],
maxLength: 2,
decoration: InputDecoration(
labelText: LocaleKeys.hour_title.tr(),
labelText: LocaleKeys.hoursSetCustomTimeTitle.tr(),
border: const OutlineInputBorder(),
counterText: "",
),
Expand All @@ -187,7 +187,7 @@ class _BookReadingTimeField extends State<BookReadingTimeField> {
],
maxLength: 2,
decoration: InputDecoration(
labelText: LocaleKeys.minute_title.tr(),
labelText: LocaleKeys.minutesSetCustomTimeTitle.tr(),
border: const OutlineInputBorder(),
counterText: "",
),
Expand Down

0 comments on commit f702b3f

Please sign in to comment.