forked from cwtch.im/cwtch-ui
Update Translations + Error Reporting
This commit is contained in:
parent
958be3e8f7
commit
26f32a0790
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"@@locale": "de",
|
"@@locale": "de",
|
||||||
"@@last_modified": "2022-01-12T22:53:15+01:00",
|
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||||
|
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@locale": "en",
|
||||||
"@@last_modified": "2022-01-12T22:53:15+01:00",
|
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||||
|
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||||
"settingTheme": "Use Light Themes",
|
"settingTheme": "Use Light Themes",
|
||||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"@@locale": "es",
|
"@@locale": "es",
|
||||||
"@@last_modified": "2022-01-12T22:53:15+01:00",
|
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||||
|
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"@@locale": "fr",
|
"@@locale": "fr",
|
||||||
"@@last_modified": "2022-01-12T22:53:15+01:00",
|
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||||
|
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"@@locale": "it",
|
"@@locale": "it",
|
||||||
"@@last_modified": "2022-01-12T22:53:15+01:00",
|
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||||
|
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pl",
|
"@@locale": "pl",
|
||||||
"@@last_modified": "2022-01-12T22:53:15+01:00",
|
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||||
|
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pt",
|
"@@locale": "pt",
|
||||||
"@@last_modified": "2022-01-12T22:53:15+01:00",
|
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||||
|
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
"torSettingsCustomControlPortDescription": "Use a custom port for control connections to the Tor proxy",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"@@locale": "ru",
|
"@@locale": "ru",
|
||||||
"@@last_modified": "2022-01-12T22:53:15+01:00",
|
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||||
|
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||||
"msgAddToAccept": "Добавьте учетную запись в контакты, чтобы принять этот файл.",
|
"msgAddToAccept": "Добавьте учетную запись в контакты, чтобы принять этот файл.",
|
||||||
"btnSendFile": "Отправить файл",
|
"btnSendFile": "Отправить файл",
|
||||||
"msgConfirmSend": "Вы уверены, что хотите отправить?",
|
"msgConfirmSend": "Вы уверены, что хотите отправить?",
|
||||||
|
|
|
@ -96,13 +96,33 @@ class _TorStatusView extends State<TorStatusView> {
|
||||||
subtitle: Text(AppLocalizations.of(context)!.torSettingsCustomSocksPortDescription),
|
subtitle: Text(AppLocalizations.of(context)!.torSettingsCustomSocksPortDescription),
|
||||||
leading: Icon(CwtchIcons.swap_horiz_24px, color: settings.current().mainTextColor),
|
leading: Icon(CwtchIcons.swap_horiz_24px, color: settings.current().mainTextColor),
|
||||||
trailing: Container(
|
trailing: Container(
|
||||||
width: 100,
|
width: 300,
|
||||||
child: CwtchTextField(
|
child: CwtchTextField(
|
||||||
|
number: true,
|
||||||
controller: torSocksPortController,
|
controller: torSocksPortController,
|
||||||
|
validator: (value) {
|
||||||
|
try {
|
||||||
|
var port = int.parse(value);
|
||||||
|
if (port > 0 && port < 65536) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return AppLocalizations.of(
|
||||||
|
context)!
|
||||||
|
.torSettingsErrorSettingPort;
|
||||||
|
}
|
||||||
|
}catch (e) {
|
||||||
|
return AppLocalizations.of(
|
||||||
|
context)!
|
||||||
|
.torSettingsErrorSettingPort;
|
||||||
|
}
|
||||||
|
},
|
||||||
onChanged: (String socksPort) {
|
onChanged: (String socksPort) {
|
||||||
try {
|
try {
|
||||||
settings.socksPort = int.parse(socksPort);
|
var port = int.parse(socksPort);
|
||||||
saveSettings(context);
|
if (port > 0 && port < 65536) {
|
||||||
|
settings.socksPort = int.parse(socksPort);
|
||||||
|
saveSettings(context);
|
||||||
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
},
|
},
|
||||||
))),
|
))),
|
||||||
|
@ -111,13 +131,34 @@ class _TorStatusView extends State<TorStatusView> {
|
||||||
subtitle: Text(AppLocalizations.of(context)!.torSettingsCustomControlPortDescription),
|
subtitle: Text(AppLocalizations.of(context)!.torSettingsCustomControlPortDescription),
|
||||||
leading: Icon(CwtchIcons.swap_horiz_24px, color: settings.current().mainTextColor),
|
leading: Icon(CwtchIcons.swap_horiz_24px, color: settings.current().mainTextColor),
|
||||||
trailing: Container(
|
trailing: Container(
|
||||||
width: 100,
|
width: 300,
|
||||||
child: CwtchTextField(
|
child: CwtchTextField(
|
||||||
|
number: true,
|
||||||
controller: torControlPortController,
|
controller: torControlPortController,
|
||||||
|
validator: (value) {
|
||||||
|
try {
|
||||||
|
var port = int.parse(value);
|
||||||
|
if (port > 0 && port < 65536) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return AppLocalizations.of(
|
||||||
|
context)!
|
||||||
|
.torSettingsErrorSettingPort;
|
||||||
|
}
|
||||||
|
}catch (e) {
|
||||||
|
return AppLocalizations.of(
|
||||||
|
context)!
|
||||||
|
.torSettingsErrorSettingPort;
|
||||||
|
}
|
||||||
|
},
|
||||||
onChanged: (String controlPort) {
|
onChanged: (String controlPort) {
|
||||||
try {
|
try {
|
||||||
settings.controlPort = int.parse(controlPort);
|
var port = int.parse(controlPort);
|
||||||
saveSettings(context);
|
if (port > 0 && port < 65536) {
|
||||||
|
settings.controlPort =
|
||||||
|
int.parse(controlPort);
|
||||||
|
saveSettings(context);
|
||||||
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
},
|
},
|
||||||
))),
|
))),
|
||||||
|
|
|
@ -44,17 +44,22 @@ class _CwtchTextFieldState extends State<CwtchTextField> {
|
||||||
validator: widget.validator,
|
validator: widget.validator,
|
||||||
onChanged: widget.onChanged,
|
onChanged: widget.onChanged,
|
||||||
autofocus: widget.autofocus,
|
autofocus: widget.autofocus,
|
||||||
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
textAlign: widget.number ? TextAlign.end : TextAlign.start,
|
textAlign: widget.number ? TextAlign.end : TextAlign.start,
|
||||||
keyboardType: widget.multiLine
|
keyboardType: widget.multiLine
|
||||||
? TextInputType.multiline
|
? TextInputType.multiline
|
||||||
: widget.number
|
: widget.number
|
||||||
? TextInputType.number
|
? TextInputType.number
|
||||||
: TextInputType.text,
|
: TextInputType.text,
|
||||||
|
inputFormatters: widget.number ? <TextInputFormatter>[
|
||||||
|
FilteringTextInputFormatter.digitsOnly
|
||||||
|
] : null,
|
||||||
maxLines: widget.multiLine ? null : 1,
|
maxLines: widget.multiLine ? null : 1,
|
||||||
scrollController: _scrollController,
|
scrollController: _scrollController,
|
||||||
enableIMEPersonalizedLearning: false,
|
enableIMEPersonalizedLearning: false,
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
errorMaxLines: 2,
|
||||||
hintText: widget.hintText,
|
hintText: widget.hintText,
|
||||||
floatingLabelBehavior: FloatingLabelBehavior.never,
|
floatingLabelBehavior: FloatingLabelBehavior.never,
|
||||||
filled: true,
|
filled: true,
|
||||||
|
@ -64,6 +69,7 @@ class _CwtchTextFieldState extends State<CwtchTextField> {
|
||||||
errorStyle: TextStyle(
|
errorStyle: TextStyle(
|
||||||
color: theme.current().textfieldErrorColor,
|
color: theme.current().textfieldErrorColor,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
overflow: TextOverflow.visible
|
||||||
),
|
),
|
||||||
fillColor: theme.current().textfieldBackgroundColor,
|
fillColor: theme.current().textfieldBackgroundColor,
|
||||||
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
|
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
|
||||||
|
|
Loading…
Reference in New Issue