[mob][auth] Extracted strings
This commit is contained in:
@@ -421,9 +421,9 @@
|
||||
"waitingForVerification": "Waiting for verification...",
|
||||
"passkey": "Passkey",
|
||||
"passKeyPendingVerification": "Verification is still pending",
|
||||
"loginSessionExpired" : "Session expired",
|
||||
"loginSessionExpired": "Session expired",
|
||||
"loginSessionExpiredDetails": "Your session has expired. Please login again.",
|
||||
"developerSettingsWarning":"Are you sure that you want to modify Developer settings?",
|
||||
"developerSettingsWarning": "Are you sure that you want to modify Developer settings?",
|
||||
"developerSettings": "Developer settings",
|
||||
"serverEndpoint": "Server endpoint",
|
||||
"invalidEndpoint": "Invalid endpoint",
|
||||
@@ -456,5 +456,14 @@
|
||||
"next": "Next",
|
||||
"tooManyIncorrectAttempts": "Too many incorrect attempts",
|
||||
"tapToUnlock": "Tap to unlock",
|
||||
"setNewPassword": "Set new password"
|
||||
"setNewPassword": "Set new password",
|
||||
"deviceLock": "Device lock",
|
||||
"hideContent": "Hide content",
|
||||
"hideContentDescriptionAndroid": "Hides app content in the app switcher and disables screenshots",
|
||||
"hideContentDescriptioniOS": "Hides app content in the app switcher",
|
||||
"autoLockFeatureDescription": "Time after which the app locks after being put in the background",
|
||||
"appLockDescription": "Choose between your device's default lock screen and a custom lock screen with a PIN or password.",
|
||||
"pinLock": "Pin lock",
|
||||
"enterPin": "Enter PIN",
|
||||
"setNewPin": "Set new PIN"
|
||||
}
|
||||
@@ -138,7 +138,7 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
|
||||
} else if (duration.inSeconds != 0) {
|
||||
return "in ${duration.inSeconds} second${duration.inSeconds > 1 ? 's' : ''}";
|
||||
} else {
|
||||
return "Immediately";
|
||||
return context.l10n.immediately;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
|
||||
right: 12,
|
||||
),
|
||||
child: Text(
|
||||
'Choose between your device\'s default lock screen and a custom lock screen with a PIN or password.',
|
||||
context.l10n.appLockDescription,
|
||||
style: textTheme.miniFaint,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
@@ -222,9 +222,8 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
|
||||
bgColor: colorTheme.fillFaint,
|
||||
),
|
||||
MenuItemWidget(
|
||||
captionedTextWidget:
|
||||
const CaptionedTextWidget(
|
||||
title: "Pin lock",
|
||||
captionedTextWidget: CaptionedTextWidget(
|
||||
title: context.l10n.pinLock,
|
||||
),
|
||||
alignCaptionedTextToLeft: true,
|
||||
isTopBorderRadiusRemoved: true,
|
||||
@@ -240,9 +239,8 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
|
||||
bgColor: colorTheme.fillFaint,
|
||||
),
|
||||
MenuItemWidget(
|
||||
captionedTextWidget:
|
||||
const CaptionedTextWidget(
|
||||
title: "Password",
|
||||
captionedTextWidget: CaptionedTextWidget(
|
||||
title: context.l10n.password,
|
||||
),
|
||||
alignCaptionedTextToLeft: true,
|
||||
isTopBorderRadiusRemoved: true,
|
||||
@@ -279,7 +277,7 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
|
||||
right: 12,
|
||||
),
|
||||
child: Text(
|
||||
"Time after which the app locks after being put in the background",
|
||||
context.l10n.autoLockFeatureDescription,
|
||||
style: textTheme.miniFaint,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
@@ -314,8 +312,10 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
|
||||
),
|
||||
child: Text(
|
||||
Platform.isAndroid
|
||||
? "Hides app content in the app switcher and disables screenshots"
|
||||
: "Hides app content in the app switcher",
|
||||
? context.l10n
|
||||
.hideContentDescriptionAndroid
|
||||
: context.l10n
|
||||
.hideContentDescriptioniOS,
|
||||
style: textTheme.miniFaint,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import "dart:convert";
|
||||
import "dart:io";
|
||||
|
||||
import "package:ente_auth/l10n/l10n.dart";
|
||||
import "package:ente_auth/theme/colors.dart";
|
||||
import "package:ente_auth/theme/ente_theme.dart";
|
||||
import "package:ente_auth/theme/text_style.dart";
|
||||
@@ -229,7 +230,9 @@ class _LockScreenPinState extends State<LockScreenPin> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
widget.isChangingLockScreenSettings ? "Enter PIN" : "Set new PIN",
|
||||
widget.isChangingLockScreenSettings
|
||||
? context.l10n.enterPin
|
||||
: context.l10n.setNewPin,
|
||||
style: textTheme.bodyBold,
|
||||
),
|
||||
const Padding(padding: EdgeInsets.all(12)),
|
||||
|
||||
@@ -40,11 +40,11 @@ class LockScreenSettings {
|
||||
await setHideAppContent(getShouldHideAppContent());
|
||||
}
|
||||
|
||||
Future<void> setHideAppContent(bool showContent) async {
|
||||
Future<void> setHideAppContent(bool hideContent) async {
|
||||
final brightness =
|
||||
SchedulerBinding.instance.platformDispatcher.platformBrightness;
|
||||
bool isInDarkMode = brightness == Brightness.dark;
|
||||
!showContent
|
||||
!hideContent
|
||||
? PrivacyScreen.instance.disable()
|
||||
: await PrivacyScreen.instance.enable(
|
||||
iosOptions: const PrivacyIosOptions(
|
||||
@@ -58,7 +58,7 @@ class LockScreenSettings {
|
||||
? PrivacyBlurEffect.dark
|
||||
: PrivacyBlurEffect.extraLight,
|
||||
);
|
||||
await _preferences.setBool(keyHideAppContent, showContent);
|
||||
await _preferences.setBool(keyHideAppContent, hideContent);
|
||||
}
|
||||
|
||||
bool getShouldHideAppContent() {
|
||||
|
||||
Reference in New Issue
Block a user