Skip to content

Commit

Permalink
fix: Use different strings for localization (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxushka authored Oct 18, 2023
1 parent 5a8409e commit 0d040ec
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 18 deletions.
3 changes: 1 addition & 2 deletions chameleonultragui/lib/gui/menu/card_edit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ class CardEditMenuState extends State<CardEditMenu> {
},
decoration: InputDecoration(
labelText: localizations.name,
hintText: localizations
.enter_name(localizations.card.toLowerCase()),
hintText: localizations.enter_name_of_card,
prefix: Transform(
transform: Matrix4.translationValues(0, 7, 0),
child: IconButton(
Expand Down
3 changes: 1 addition & 2 deletions chameleonultragui/lib/gui/menu/dictionary_export.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ class DictionaryExportMenuState extends State<DictionaryExportMenu> {
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text(
localizations.enter_name(localizations.dictionary.toLowerCase())),
title: Text(localizations.enter_name_of_dictionary),
content: TextField(
controller: dictionary,
),
Expand Down
3 changes: 1 addition & 2 deletions chameleonultragui/lib/gui/menu/slot_export.dart
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ class SlotExportMenuState extends State<SlotExportMenu> {
TextEditingController controller =
TextEditingController(text: tag.name);
return AlertDialog(
title: Text(localizations
.enter_name(localizations.card.toLowerCase())),
title: Text(localizations.enter_name_of_card),
content: TextField(controller: controller),
actions: [
ElevatedButton(
Expand Down
11 changes: 4 additions & 7 deletions chameleonultragui/lib/gui/page/read_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -825,8 +825,7 @@ class ReadCardPageState extends State<ReadCardPage> {
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text(localizations.enter_name(
localizations.card.toLowerCase())),
title: Text(localizations.enter_name_of_card),
content: TextField(
onChanged: (value) {
setState(() {
Expand Down Expand Up @@ -1007,9 +1006,8 @@ class ReadCardPageState extends State<ReadCardPage> {
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text(localizations.enter_name(
localizations.card
.toLowerCase())),
title: Text(
localizations.enter_name_of_card),
content: TextField(
onChanged: (value) {
setState(() {
Expand Down Expand Up @@ -1122,8 +1120,7 @@ class ReadCardPageState extends State<ReadCardPage> {
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text(localizations.enter_name(
localizations.card.toLowerCase())),
title: Text(localizations.enter_name_of_card),
content: TextField(
onChanged: (value) {
setState(() {
Expand Down
5 changes: 2 additions & 3 deletions chameleonultragui/lib/gui/page/saved_cards.dart
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,8 @@ class SavedCardsPageState extends State<SavedCardsPage> {
controller: nameController,
decoration: InputDecoration(
labelText: localizations.name,
hintText: localizations.enter_name(
localizations.card
.toLowerCase())),
hintText:
localizations.enter_name_of_card),
),
DropdownButton<MifareClassicType>(
value: selectedType,
Expand Down
5 changes: 3 additions & 2 deletions chameleonultragui/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
"edit_card": "Edit Card",
"please_enter_name": "Please enter a name",
"name": "Name",
"enter_name": "Enter name of {name}",
"pick_color": "Pick a color",
"reset_default": "Reset to default",
"please_enter_something": "Please enter {name}",
Expand Down Expand Up @@ -226,5 +225,7 @@
"export_to_new_card": "Export to new card",
"update_saved_card": "Update saved card",
"must_be_valid_hex": "Must be valid HEX",
"export_to_dictionary": "Export found keys"
"export_to_dictionary": "Export found keys",
"enter_name_of_card": "Enter name of card",
"enter_name_of_dictionary": "Enter name of dictionary"
}

0 comments on commit 0d040ec

Please sign in to comment.