Skip to content

Commit

Permalink
Remove duplicate strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
elibon99 committed Dec 5, 2023
1 parent d24d552 commit 2316023
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions lib/app/models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ enum Application {
String getDisplayName(AppLocalizations l10n) => switch (this) {
Application.oath => l10n.s_authenticator,
Application.fido => l10n.s_webauthn,
Application.piv => l10n.s_piv,
Application.otp => l10n.s_otp,
Application.piv => l10n.s_certificates,
Application.otp => l10n.s_slots,
_ => name.substring(0, 1).toUpperCase() + name.substring(1),
};

Expand Down
6 changes: 2 additions & 4 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
"s_manage": "Manage",
"s_setup": "Setup",
"s_settings": "Settings",
"s_piv": "Certificates",
"s_certificates": "Certificates",
"s_webauthn": "WebAuthn",
"s_otp": "Slots",
"s_slots": "Slots",
"s_help_and_about": "Help and about",
"s_help_and_feedback": "Help and feedback",
"s_send_feedback": "Send us feedback",
Expand Down Expand Up @@ -441,7 +441,6 @@

"@_certificates": {},
"s_certificate": "Certificate",
"s_certificates": "Certificates",
"s_csr": "CSR",
"s_subject": "Subject",
"l_export_csr_file": "Save CSR to file",
Expand Down Expand Up @@ -517,7 +516,6 @@
"s_slot_9e": "Card Authentication",

"@_otp_slots": {},
"s_otp_slots": "Slots",
"s_otp_slot_one": "Short touch",
"s_otp_slot_two": "Long touch",
"l_otp_slot_empty": "Slot is empty",
Expand Down
8 changes: 4 additions & 4 deletions lib/otp/views/otp_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ class OtpScreen extends ConsumerWidget {
final hasFeature = ref.watch(featureProvider);
return ref.watch(otpStateProvider(devicePath)).when(
loading: () => MessagePage(
title: Text(l10n.s_otp),
title: Text(l10n.s_slots),
graphic: const CircularProgressIndicator(),
delayedContent: true,
),
error: (error, _) =>
AppFailurePage(title: Text(l10n.s_otp), cause: error),
AppFailurePage(title: Text(l10n.s_slots), cause: error),
data: (otpState) {
return AppPage(
title: Text(l10n.s_otp),
title: Text(l10n.s_slots),
keyActionsBuilder: hasFeature(features.actions)
? (context) =>
otpBuildActions(context, devicePath, otpState, ref)
: null,
child: Column(children: [
ListTitle(l10n.s_otp_slots),
ListTitle(l10n.s_slots),
...otpState.slots.map((e) => registerOtpActions(devicePath, e,
ref: ref,
actions: {
Expand Down
6 changes: 3 additions & 3 deletions lib/piv/views/piv_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ class PivScreen extends ConsumerWidget {
final hasFeature = ref.watch(featureProvider);
return ref.watch(pivStateProvider(devicePath)).when(
loading: () => MessagePage(
title: Text(l10n.s_piv),
title: Text(l10n.s_certificates),
graphic: const CircularProgressIndicator(),
delayedContent: true,
),
error: (error, _) => AppFailurePage(
title: Text(l10n.s_piv),
title: Text(l10n.s_certificates),
cause: error,
),
data: (pivState) {
final pivSlots = ref.watch(pivSlotsProvider(devicePath)).asData;
return AppPage(
title: Text(l10n.s_piv),
title: Text(l10n.s_certificates),
keyActionsBuilder: hasFeature(features.actions)
? (context) =>
pivBuildActions(context, devicePath, pivState, ref)
Expand Down

0 comments on commit 2316023

Please sign in to comment.