feat: Renamed translation strings

This commit is contained in:
Anton Stubenbord
2023-02-16 20:55:10 +01:00
parent fb6f79f017
commit d1a49ac73d
80 changed files with 3281 additions and 3974 deletions

View File

@@ -40,9 +40,7 @@ class _ClientCertificateFormFieldState
}
assert(_selectedFile != null);
if (_selectedFile?.path.split(".").last != 'pfx') {
return S
.of(context)
.loginPageClientCertificateSettingInvalidFileFormatValidationText;
return S.of(context).invalidCertificateFormat;
}
return null;
},
@@ -52,9 +50,8 @@ class _ClientCertificateFormFieldState
return Theme(
data: theme,
child: ExpansionTile(
title: Text(S.of(context).loginPageClientCertificateSettingLabel),
subtitle: Text(
S.of(context).loginPageClientCertificateSettingDescriptionText),
title: Text(S.of(context).clientcertificate),
subtitle: Text(S.of(context).configureMutualTLSAuthentication),
children: [
InputDecorator(
decoration: InputDecoration(
@@ -70,8 +67,7 @@ class _ClientCertificateFormFieldState
children: [
ElevatedButton(
onPressed: () => _onSelectFile(field),
child:
Text(S.of(context).genericActionSelectText),
child: Text(S.of(context).select),
),
_buildSelectedFileText(field).paddedOnly(left: 8),
],
@@ -89,7 +85,7 @@ class _ClientCertificateFormFieldState
// ListTile(
// leading: ElevatedButton(
// onPressed: () => _onSelectFile(field),
// child: Text(S.of(context).genericActionSelectText),
// child: Text(S.of(context).select),
// ),
// title: _buildSelectedFileText(field),
// trailing: AbsorbPointer(
@@ -112,9 +108,7 @@ class _ClientCertificateFormFieldState
onChanged: (value) => field.didChange(
field.value?.copyWith(passphrase: value),
),
label: S
.of(context)
.loginPageClientCertificatePassphraseLabel,
label: S.of(context).passphrase,
).padded(),
] else
...[]
@@ -149,7 +143,7 @@ class _ClientCertificateFormFieldState
if (field.value == null) {
assert(_selectedFile == null);
return Text(
S.of(context).loginPageClientCertificateSettingSelectFileText,
S.of(context).selectFile,
style: Theme.of(context).textTheme.labelMedium?.apply(
color: Theme.of(context).hintColor,
),

View File

@@ -44,18 +44,16 @@ class _ServerAddressFormFieldState extends State<ServerAddressFormField> {
autovalidateMode: AutovalidateMode.onUserInteraction,
validator: FormBuilderValidators.compose([
FormBuilderValidators.required(
errorText:
S.of(context).loginPageServerUrlValidatorMessageRequiredText,
errorText: S.of(context).serverAddressMustNotBeEmpty,
),
FormBuilderValidators.match(
r"https?://.*",
errorText:
S.of(context).loginPageServerUrlValidatorMessageMissingSchemeText,
errorText: S.of(context).serverAddressMustIncludeAScheme,
)
]),
decoration: InputDecoration(
hintText: "http://192.168.1.50:8000",
labelText: S.of(context).loginPageServerUrlFieldLabel,
labelText: S.of(context).serverAddress,
suffixIcon: _canClear
? IconButton(
icon: const Icon(Icons.clear),

View File

@@ -37,22 +37,22 @@ class _UserCredentialsFormFieldState extends State<UserCredentialsFormField> {
UserCredentials(username: username),
),
validator: FormBuilderValidators.required(
errorText: S.of(context).loginPageUsernameValidatorMessageText,
errorText: S.of(context).usernameMustNotBeEmpty,
),
autofillHints: const [AutofillHints.username],
decoration: InputDecoration(
label: Text(S.of(context).loginPageUsernameLabel),
label: Text(S.of(context).username),
),
),
ObscuredInputTextFormField(
key: const ValueKey('login-password'),
label: S.of(context).loginPagePasswordFieldLabel,
label: S.of(context).password,
onChanged: (password) => field.didChange(
field.value?.copyWith(password: password) ??
UserCredentials(password: password),
),
validator: FormBuilderValidators.required(
errorText: S.of(context).loginPagePasswordValidatorMessageText,
errorText: S.of(context).passwordMustNotBeEmpty,
),
),
].map((child) => child.padded()).toList(),
@@ -73,11 +73,11 @@ class _UserCredentialsFormFieldState extends State<UserCredentialsFormField> {
FocusScope.of(context).requestFocus(_focusNodes[fkPassword]);
},
validator: FormBuilderValidators.required(
errorText: S.of(context).loginPageUsernameValidatorMessageText,
errorText: S.of(context).usernameMustNotBeEmpty,
),
autofillHints: const [AutofillHints.username],
decoration: InputDecoration(
labelText: S.of(context).loginPageUsernameLabel,
labelText: S.of(context).username,
),
).padded(),
FormBuilderTextField(
@@ -88,11 +88,11 @@ class _UserCredentialsFormFieldState extends State<UserCredentialsFormField> {
},
autofillHints: const [AutofillHints.password],
validator: FormBuilderValidators.required(
errorText: S.of(context).loginPagePasswordValidatorMessageText,
errorText: S.of(context).passwordMustNotBeEmpty,
),
obscureText: true,
decoration: InputDecoration(
labelText: S.of(context).loginPagePasswordFieldLabel,
labelText: S.of(context).password,
),
).padded(),
],