fix: enable translations for validators
This commit is contained in:
parent
f88f79ef8d
commit
858a5d71bd
7 changed files with 177 additions and 7 deletions
|
|
@ -16,9 +16,9 @@ namespace validators {
|
|||
|
||||
AliasValidator::AliasValidator(QLineEdit *parent, ValidationError *error) : LineEditValidator(parent, error)
|
||||
{
|
||||
addValidator(std::make_unique<SpacesValidator>("Computer name cannot contain spaces"));
|
||||
addValidator(std::make_unique<IpAddressValidator>("Aliases may not be ip addresses"));
|
||||
addValidator(std::make_unique<ComputerNameValidator>("Contains invalid characters or is too long"));
|
||||
addValidator(std::make_unique<SpacesValidator>(tr("Computer name cannot contain spaces")));
|
||||
addValidator(std::make_unique<IpAddressValidator>(tr("Aliases may not be ip addresses")));
|
||||
addValidator(std::make_unique<ComputerNameValidator>(tr("Contains invalid characters or is too long")));
|
||||
}
|
||||
|
||||
} // namespace validators
|
||||
|
|
|
|||
|
|
@ -20,12 +20,12 @@ namespace validators {
|
|||
ScreenNameValidator::ScreenNameValidator(QLineEdit *lineEdit, ValidationError *error, const ScreenList *pScreens)
|
||||
: LineEditValidator(lineEdit, error)
|
||||
{
|
||||
addValidator(std::make_unique<EmptyStringValidator>("Computer name cannot be empty"));
|
||||
addValidator(std::make_unique<SpacesValidator>("Computer name cannot contain spaces"));
|
||||
addValidator(std::make_unique<ComputerNameValidator>("Contains invalid characters or is too long"));
|
||||
addValidator(std::make_unique<EmptyStringValidator>(tr("Computer name cannot be empty")));
|
||||
addValidator(std::make_unique<SpacesValidator>(tr("Computer name cannot contain spaces")));
|
||||
addValidator(std::make_unique<ComputerNameValidator>(tr("Contains invalid characters or is too long")));
|
||||
addValidator(
|
||||
std::make_unique<ScreenDuplicationsValidator>(
|
||||
"A computer with this name already exists", lineEdit ? lineEdit->text() : "", pScreens
|
||||
tr("A computer with this name already exists"), lineEdit ? lineEdit->text() : "", pScreens
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1288,4 +1288,38 @@ Al habilitar esta opción, se deshabilitará la interfaz gráfica de usuario (GU
|
|||
<translation>Español</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>validators::AliasValidator</name>
|
||||
<message>
|
||||
<source>Computer name cannot contain spaces</source>
|
||||
<translation type="unfinished">El nombre de la computadora no puede contener espacios</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Aliases may not be ip addresses</source>
|
||||
<translation type="unfinished">Los alias no pueden ser direcciones IP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Contains invalid characters or is too long</source>
|
||||
<translation type="unfinished">Contiene caracteres no válidos o es demasiado largo</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>validators::ScreenNameValidator</name>
|
||||
<message>
|
||||
<source>Computer name cannot be empty</source>
|
||||
<translation type="unfinished">El nombre de la computadora no puede estar vacío</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Computer name cannot contain spaces</source>
|
||||
<translation type="unfinished">El nombre de la computadora no puede contener espacios</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Contains invalid characters or is too long</source>
|
||||
<translation type="unfinished">Contiene caracteres no válidos o es demasiado largo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>A computer with this name already exists</source>
|
||||
<translation type="unfinished">Ya existe un ordenador con este nombre</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
|||
|
|
@ -1288,4 +1288,38 @@ L'abilitazione di questa impostazione disabiliterà l'interfaccia graf
|
|||
<translation>Italiano</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>validators::AliasValidator</name>
|
||||
<message>
|
||||
<source>Computer name cannot contain spaces</source>
|
||||
<translation type="unfinished">Il nome del computer non può contenere spazi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Aliases may not be ip addresses</source>
|
||||
<translation type="unfinished">Gli alias non possono essere indirizzi IP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Contains invalid characters or is too long</source>
|
||||
<translation type="unfinished">Contiene caratteri non validi o è troppo lungo</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>validators::ScreenNameValidator</name>
|
||||
<message>
|
||||
<source>Computer name cannot be empty</source>
|
||||
<translation type="unfinished">Il nome del computer non può essere vuoto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Computer name cannot contain spaces</source>
|
||||
<translation type="unfinished">Il nome del computer non può contenere spazi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Contains invalid characters or is too long</source>
|
||||
<translation type="unfinished">Contiene caratteri non validi o è troppo lungo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>A computer with this name already exists</source>
|
||||
<translation type="unfinished">Esiste già un computer con questo nome</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
|||
|
|
@ -1289,4 +1289,38 @@ Enabling this setting will disable the server config GUI.</source>
|
|||
<translation>日本語</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>validators::AliasValidator</name>
|
||||
<message>
|
||||
<source>Computer name cannot contain spaces</source>
|
||||
<translation>コンピューター名に空白を含めることはできません</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Aliases may not be ip addresses</source>
|
||||
<translation>別名に IP アドレスは設定できません</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Contains invalid characters or is too long</source>
|
||||
<translation>無効な文字が含まれているか長すぎます</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>validators::ScreenNameValidator</name>
|
||||
<message>
|
||||
<source>Computer name cannot be empty</source>
|
||||
<translation>コンピュータ名を空にすることはできません</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Computer name cannot contain spaces</source>
|
||||
<translation>コンピューター名に空白を含めることはできません</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Contains invalid characters or is too long</source>
|
||||
<translation>無効な文字が含まれているか長すぎます</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>A computer with this name already exists</source>
|
||||
<translation>この名前のコンピューターはすでに存在します</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
|||
|
|
@ -1293,4 +1293,38 @@ Enabling this setting will disable the server config GUI.</source>
|
|||
<translation>Русский</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>validators::AliasValidator</name>
|
||||
<message>
|
||||
<source>Computer name cannot contain spaces</source>
|
||||
<translation>Имя компьютера не может содержать пробелы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Aliases may not be ip addresses</source>
|
||||
<translation>Псевдонимы не могут быть IP-адресами</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Contains invalid characters or is too long</source>
|
||||
<translation>Содержит недопустимые символы или слишком длинный</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>validators::ScreenNameValidator</name>
|
||||
<message>
|
||||
<source>Computer name cannot be empty</source>
|
||||
<translation>Имя компьютера не может быть пустым</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Computer name cannot contain spaces</source>
|
||||
<translation>Имя компьютера не может содержать пробелы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Contains invalid characters or is too long</source>
|
||||
<translation>Имя содержит недопосутмые символы или слишком длинное</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>A computer with this name already exists</source>
|
||||
<translation>Компьютер с таким именем уже существует</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
|||
|
|
@ -1289,4 +1289,38 @@ Enabling this setting will disable the server config GUI.</source>
|
|||
<translation>简体中文</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>validators::AliasValidator</name>
|
||||
<message>
|
||||
<source>Computer name cannot contain spaces</source>
|
||||
<translation>计算机名称不能包含空格</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Aliases may not be ip addresses</source>
|
||||
<translation>不能用 IP 地址作为别名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Contains invalid characters or is too long</source>
|
||||
<translation>包含无效字符或过长</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>validators::ScreenNameValidator</name>
|
||||
<message>
|
||||
<source>Computer name cannot be empty</source>
|
||||
<translation>计算机名称不能为空</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Computer name cannot contain spaces</source>
|
||||
<translation>计算机名称不能包含空格</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Contains invalid characters or is too long</source>
|
||||
<translation>包含无效字符或过长</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>A computer with this name already exists</source>
|
||||
<translation>一台同名的计算机已经存在</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
|||
Loading…
Reference in a new issue