mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-13 18:12:20 -06:00
feat: Renamed translation strings
This commit is contained in:
@@ -12,21 +12,19 @@ class BiometricAuthenticationSetting extends StatelessWidget {
|
||||
builder: (context, settings) {
|
||||
return SwitchListTile(
|
||||
value: settings.isLocalAuthenticationEnabled,
|
||||
title: Text(S.of(context).appSettingsBiometricAuthenticationLabel),
|
||||
subtitle: Text(
|
||||
S.of(context).appSettingsBiometricAuthenticationDescriptionText),
|
||||
title: Text(S.of(context).biometricAuthentication),
|
||||
subtitle: Text(S.of(context).authenticateOnAppStart),
|
||||
onChanged: (val) async {
|
||||
final String localizedReason = val
|
||||
? S
|
||||
.of(context)
|
||||
.appSettingsEnableBiometricAuthenticationReasonText
|
||||
: S
|
||||
.of(context)
|
||||
.appSettingsDisableBiometricAuthenticationReasonText;
|
||||
final String localizedReason =
|
||||
S.of(context).authenticateToToggleBiometricAuthentication(
|
||||
val ? 'enable' : 'disable',
|
||||
);
|
||||
await context
|
||||
.read<ApplicationSettingsCubit>()
|
||||
.setIsBiometricAuthenticationEnabled(val,
|
||||
localizedReason: localizedReason);
|
||||
.setIsBiometricAuthenticationEnabled(
|
||||
val,
|
||||
localizedReason: localizedReason,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
@@ -18,7 +18,7 @@ class ColorSchemeOptionSetting extends StatelessWidget {
|
||||
return BlocBuilder<ApplicationSettingsCubit, ApplicationSettingsState>(
|
||||
builder: (context, settings) {
|
||||
return ListTile(
|
||||
title: Text(S.of(context).settingsPageColorSchemeSettingLabel),
|
||||
title: Text(S.of(context).colors),
|
||||
subtitle: Text(
|
||||
translateColorSchemeOption(
|
||||
context,
|
||||
@@ -28,9 +28,8 @@ class ColorSchemeOptionSetting extends StatelessWidget {
|
||||
onTap: () => showDialog(
|
||||
context: context,
|
||||
builder: (_) => RadioSettingsDialog<ColorSchemeOption>(
|
||||
titleText: S.of(context).settingsPageColorSchemeSettingLabel,
|
||||
descriptionText:
|
||||
S.of(context).settingsPageColorSchemeSettingDialogDescription,
|
||||
titleText: S.of(context).colors,
|
||||
descriptionText: S.of(context).colorSchemeHint,
|
||||
options: [
|
||||
RadioOption(
|
||||
value: ColorSchemeOption.classic,
|
||||
@@ -47,9 +46,7 @@ class ColorSchemeOptionSetting extends StatelessWidget {
|
||||
],
|
||||
footer: _isBelowAndroid12()
|
||||
? HintCard(
|
||||
hintText: S
|
||||
.of(context)
|
||||
.settingsPageColorSchemeSettingDynamicThemeingVersionMismatchWarning,
|
||||
hintText: S.of(context).colorSchemeNotSupportedWarning,
|
||||
hintIcon: Icons.warning_amber,
|
||||
)
|
||||
: null,
|
||||
|
||||
@@ -25,7 +25,7 @@ class _LanguageSelectionSettingState extends State<LanguageSelectionSetting> {
|
||||
return BlocBuilder<ApplicationSettingsCubit, ApplicationSettingsState>(
|
||||
builder: (context, settings) {
|
||||
return ListTile(
|
||||
title: Text(S.of(context).settingsPageLanguageSettingLabel),
|
||||
title: Text(S.of(context).language),
|
||||
subtitle: Text(_languageOptions[settings.preferredLocaleSubtag]!),
|
||||
onTap: () => showDialog<String>(
|
||||
context: context,
|
||||
@@ -33,7 +33,7 @@ class _LanguageSelectionSettingState extends State<LanguageSelectionSetting> {
|
||||
footer: const Text(
|
||||
"* Work in progress, not fully translated yet. Some words may be displayed in English!",
|
||||
),
|
||||
titleText: S.of(context).settingsPageLanguageSettingLabel,
|
||||
titleText: S.of(context).language,
|
||||
options: [
|
||||
RadioOption(
|
||||
value: 'en',
|
||||
|
||||
@@ -41,11 +41,11 @@ class _RadioSettingsDialogState<T> extends State<RadioSettingsDialog<T>> {
|
||||
widget.confirmButton ??
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text(S.of(context).genericActionCancelLabel)),
|
||||
child: Text(S.of(context).cancel)),
|
||||
widget.confirmButton ??
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context, _groupValue),
|
||||
child: Text(S.of(context).genericActionOkLabel)),
|
||||
child: Text(S.of(context).ok)),
|
||||
],
|
||||
title: widget.titleText != null ? Text(widget.titleText!) : null,
|
||||
content: Column(
|
||||
|
||||
@@ -12,13 +12,13 @@ class ThemeModeSetting extends StatelessWidget {
|
||||
return BlocBuilder<ApplicationSettingsCubit, ApplicationSettingsState>(
|
||||
builder: (context, settings) {
|
||||
return ListTile(
|
||||
title: Text(S.of(context).settingsPageAppearanceSettingTitle),
|
||||
title: Text(S.of(context).appearance),
|
||||
subtitle: Text(_mapThemeModeToLocalizedString(
|
||||
settings.preferredThemeMode, context)),
|
||||
onTap: () => showDialog<ThemeMode>(
|
||||
context: context,
|
||||
builder: (_) => RadioSettingsDialog<ThemeMode>(
|
||||
titleText: S.of(context).settingsPageAppearanceSettingTitle,
|
||||
titleText: S.of(context).appearance,
|
||||
initialValue: context
|
||||
.read<ApplicationSettingsCubit>()
|
||||
.state
|
||||
@@ -26,20 +26,15 @@ class ThemeModeSetting extends StatelessWidget {
|
||||
options: [
|
||||
RadioOption(
|
||||
value: ThemeMode.system,
|
||||
label: S
|
||||
.of(context)
|
||||
.settingsPageAppearanceSettingSystemThemeLabel,
|
||||
label: S.of(context).systemTheme,
|
||||
),
|
||||
RadioOption(
|
||||
value: ThemeMode.light,
|
||||
label: S
|
||||
.of(context)
|
||||
.settingsPageAppearanceSettingLightThemeLabel,
|
||||
label: S.of(context).lightTheme,
|
||||
),
|
||||
RadioOption(
|
||||
value: ThemeMode.dark,
|
||||
label:
|
||||
S.of(context).settingsPageAppearanceSettingDarkThemeLabel,
|
||||
label: S.of(context).darkTheme,
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -56,11 +51,11 @@ class ThemeModeSetting extends StatelessWidget {
|
||||
String _mapThemeModeToLocalizedString(ThemeMode theme, BuildContext context) {
|
||||
switch (theme) {
|
||||
case ThemeMode.system:
|
||||
return S.of(context).settingsThemeModeSystemLabel;
|
||||
return S.of(context).system;
|
||||
case ThemeMode.light:
|
||||
return S.of(context).settingsThemeModeLightLabel;
|
||||
return S.of(context).light;
|
||||
case ThemeMode.dark:
|
||||
return S.of(context).settingsThemeModeDarkLabel;
|
||||
return S.of(context).dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user