mirror of
https://github.com/august-alt/gpui.git
synced 2025-03-14 12:58:39 +03:00
fix: update InputMessageNotifier
in FilesWidget
This commit is contained in:
parent
e370bb18b1
commit
ff0fdf5397
@ -767,39 +767,32 @@ context (user policy option)</translation>
|
||||
<context>
|
||||
<name>preferences::InputMessageNotifier</name>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="27"/>
|
||||
<source>The input field has a space at the beginning or at the end</source>
|
||||
<translation>The input field has a space at the beginning or at the end</translation>
|
||||
<translation type="vanished">The input field has a space at the beginning or at the end</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="31"/>
|
||||
<source>There is a folder '.'/'..' in the path input field</source>
|
||||
<translation>There is a folder '.'/'..' in the path input field</translation>
|
||||
<translation type="vanished">There is a folder '.'/'..' in the path input field</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="35"/>
|
||||
<source>The path input field contains the path to the folder</source>
|
||||
<translation>The path input field contains the path to the folder</translation>
|
||||
<translation type="vanished">The path input field contains the path to the folder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="39"/>
|
||||
<source>The path input field contains a path that is not compatible with windows</source>
|
||||
<translation>The path input field contains a path that is not compatible with windows</translation>
|
||||
<translation type="vanished">The path input field contains a path that is not compatible with windows</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="43"/>
|
||||
<source>The path input field contains a relative path</source>
|
||||
<translation>The path input field contains a relative path</translation>
|
||||
<translation type="vanished">The path input field contains a relative path</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="47"/>
|
||||
<source>The path input field contains a path from root</source>
|
||||
<translation>The path input field contains a path from root</translation>
|
||||
<translation type="vanished">The path input field contains a path from root</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="51"/>
|
||||
<source>The path input field contains a network path</source>
|
||||
<translation>The path input field contains a network path</translation>
|
||||
<translation type="vanished">The path input field contains a network path</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -768,39 +768,32 @@ context (user policy option)</source>
|
||||
<context>
|
||||
<name>preferences::InputMessageNotifier</name>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="27"/>
|
||||
<source>The input field has a space at the beginning or at the end</source>
|
||||
<translation>Поле ввода содержит пробел в начале или в конце</translation>
|
||||
<translation type="vanished">Поле ввода содержит пробел в начале или в конце</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="31"/>
|
||||
<source>There is a folder '.'/'..' in the path input field</source>
|
||||
<translation>В поле ввода пути есть папка "."/".."</translation>
|
||||
<translation type="vanished">В поле ввода пути есть папка "."/".."</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="35"/>
|
||||
<source>The path input field contains the path to the folder</source>
|
||||
<translation>Поле ввода пути содержит путь к папке</translation>
|
||||
<translation type="vanished">Поле ввода пути содержит путь к папке</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="39"/>
|
||||
<source>The path input field contains a path that is not compatible with windows</source>
|
||||
<translation>Поле ввода path содержит путь, который несовместим с Windows</translation>
|
||||
<translation type="vanished">Поле ввода path содержит путь, который несовместим с Windows</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="43"/>
|
||||
<source>The path input field contains a relative path</source>
|
||||
<translation>Поле ввода path содержит относительный путь</translation>
|
||||
<translation type="vanished">Поле ввода path содержит относительный путь</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="47"/>
|
||||
<source>The path input field contains a path from root</source>
|
||||
<translation>Поле ввода path содержит путь от корня</translation>
|
||||
<translation type="vanished">Поле ввода path содержит путь от корня</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../inputmessagenotifier.cpp" line="51"/>
|
||||
<source>The path input field contains a network path</source>
|
||||
<translation>Поле ввода path содержит сетевой путь</translation>
|
||||
<translation type="vanished">Поле ввода path содержит сетевой путь</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -40,11 +40,13 @@ FilesWidget::FilesWidget(QWidget *parent, FilesItem *item)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->inputMessage->addInstance("source_file");
|
||||
ui->inputMessage->addInstance("destination");
|
||||
this->whitespaceDetector = ui->inputMessage->addDetector(std::unique_ptr<InputDetector>(new WhitespaceDetector));
|
||||
|
||||
ui->inputMessage->setInstanceDetection("source_file", InputMessageNotifier::MessageNotifierType::INVISIBLE_SPACE);
|
||||
ui->inputMessage->setInstanceDetection("destination", InputMessageNotifier::MessageNotifierType::INVISIBLE_SPACE);
|
||||
ui->inputMessage->addInput("source_file");
|
||||
ui->inputMessage->addInput("destination");
|
||||
|
||||
ui->inputMessage->attachDetector("source_file", whitespaceDetector, tr("source_file_whitespace"));
|
||||
ui->inputMessage->attachDetector("destination", whitespaceDetector, tr("destination_whitespace"));
|
||||
|
||||
on_actionComboBox_currentIndexChanged(ui->actionComboBox->currentIndex());
|
||||
}
|
||||
|
@ -83,6 +83,8 @@ private:
|
||||
|
||||
bool fileMode {true};
|
||||
|
||||
size_t whitespaceDetector{0};
|
||||
|
||||
private:
|
||||
Ui::FilesWidget *ui {nullptr};
|
||||
};
|
||||
|
@ -105,7 +105,7 @@ void FilesWidget::on_destinationToolButton_clicked()
|
||||
|
||||
void FilesWidget::on_destinationLineEdit_textChanged(const QString &text)
|
||||
{
|
||||
ui->inputMessage->updateInstance("destination", text);
|
||||
ui->inputMessage->updateInput("destination", text);
|
||||
}
|
||||
|
||||
void FilesWidget::on_sourceLineEdit_textChanged(const QString &text)
|
||||
@ -115,14 +115,16 @@ void FilesWidget::on_sourceLineEdit_textChanged(const QString &text)
|
||||
fileMode = false;
|
||||
|
||||
ui->destinationLabel->setText(tr("Destination folder:"));
|
||||
ui->inputMessage->setMessage("destination", this->whitespaceDetector, tr("destination_folder_whitespace"));
|
||||
}
|
||||
else
|
||||
{
|
||||
fileMode = true;
|
||||
|
||||
ui->destinationLabel->setText(tr("Destination file:"));
|
||||
ui->inputMessage->setMessage("destination", this->whitespaceDetector, tr("destination_whitespace"));
|
||||
}
|
||||
ui->inputMessage->updateInstance("source_file", text);
|
||||
ui->inputMessage->updateInput("source_file", text);
|
||||
}
|
||||
|
||||
} // namespace preferences
|
||||
|
@ -57,32 +57,32 @@
|
||||
<translation>Destination:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.ui" line="123"/>
|
||||
<location filename="../fileswidget.ui" line="126"/>
|
||||
<source>Supress errors on individual file actions</source>
|
||||
<translation>Supress errors on individual file actions</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.ui" line="147"/>
|
||||
<location filename="../fileswidget.ui" line="150"/>
|
||||
<source>Attributes</source>
|
||||
<translation>Attributes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.ui" line="153"/>
|
||||
<location filename="../fileswidget.ui" line="156"/>
|
||||
<source>Read-only</source>
|
||||
<translation>Read-only</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.ui" line="160"/>
|
||||
<location filename="../fileswidget.ui" line="163"/>
|
||||
<source>Hidden</source>
|
||||
<translation>Hidden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.ui" line="167"/>
|
||||
<location filename="../fileswidget.ui" line="170"/>
|
||||
<source>Archive</source>
|
||||
<translation>Archive</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.ui" line="174"/>
|
||||
<location filename="../fileswidget.ui" line="177"/>
|
||||
<source>Executable</source>
|
||||
<translation>Executable</translation>
|
||||
</message>
|
||||
@ -120,13 +120,13 @@
|
||||
<translation>Target</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidgetslots.cpp" line="79"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="86"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="80"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="91"/>
|
||||
<source>All files (*)</source>
|
||||
<translation>All files (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidgetslots.cpp" line="90"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="99"/>
|
||||
<source>All files (*.*)</source>
|
||||
<translation>All files (*.*)</translation>
|
||||
</message>
|
||||
@ -134,17 +134,28 @@
|
||||
<context>
|
||||
<name>preferences::FilesWidget</name>
|
||||
<message>
|
||||
<location filename="../fileswidget.cpp" line="79"/>
|
||||
<location filename="../fileswidget.cpp" line="48"/>
|
||||
<source>source_file_whitespace</source>
|
||||
<translation>The input field of the source file contains a space at the beginning or at the end</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.cpp" line="49"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="125"/>
|
||||
<source>destination_whitespace</source>
|
||||
<translation>The input field of the destination file contains a space at the beginning or at the end</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.cpp" line="87"/>
|
||||
<source>Please enter source file(s) value.</source>
|
||||
<translation>Please enter source file(s) value.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.cpp" line="84"/>
|
||||
<location filename="../fileswidget.cpp" line="92"/>
|
||||
<source>Please enter destination file(s) value.</source>
|
||||
<translation>Please enter destination file(s) value.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.cpp" line="94"/>
|
||||
<location filename="../fileswidget.cpp" line="102"/>
|
||||
<source>General</source>
|
||||
<translation>General</translation>
|
||||
</message>
|
||||
@ -155,10 +166,15 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidgetslots.cpp" line="73"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="106"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="124"/>
|
||||
<source>Destination file:</source>
|
||||
<translation>Destination file:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidgetslots.cpp" line="118"/>
|
||||
<source>destination_folder_whitespace</source>
|
||||
<translation>The input field of the destination folder contains a space at the beginning or at the end</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open</source>
|
||||
<translation type="vanished">Open</translation>
|
||||
@ -184,7 +200,7 @@
|
||||
<translation type="vanished">Open Directory</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidgetslots.cpp" line="100"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="117"/>
|
||||
<source>Destination folder:</source>
|
||||
<translation>Destination folder:</translation>
|
||||
</message>
|
||||
|
@ -57,32 +57,32 @@
|
||||
<translation>Назначение:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.ui" line="123"/>
|
||||
<location filename="../fileswidget.ui" line="126"/>
|
||||
<source>Supress errors on individual file actions</source>
|
||||
<translation>Подавление ошибок при действиях с отдельными файлами</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.ui" line="147"/>
|
||||
<location filename="../fileswidget.ui" line="150"/>
|
||||
<source>Attributes</source>
|
||||
<translation>Атрибуты</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.ui" line="153"/>
|
||||
<location filename="../fileswidget.ui" line="156"/>
|
||||
<source>Read-only</source>
|
||||
<translation>Только для чтения</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.ui" line="160"/>
|
||||
<location filename="../fileswidget.ui" line="163"/>
|
||||
<source>Hidden</source>
|
||||
<translation>Скрытый</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.ui" line="167"/>
|
||||
<location filename="../fileswidget.ui" line="170"/>
|
||||
<source>Archive</source>
|
||||
<translation>Архивный</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.ui" line="174"/>
|
||||
<location filename="../fileswidget.ui" line="177"/>
|
||||
<source>Executable</source>
|
||||
<translation>Исполняемый</translation>
|
||||
</message>
|
||||
@ -120,13 +120,13 @@
|
||||
<translation>Цель</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidgetslots.cpp" line="79"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="86"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="80"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="91"/>
|
||||
<source>All files (*)</source>
|
||||
<translation>Все файлы (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidgetslots.cpp" line="90"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="99"/>
|
||||
<source>All files (*.*)</source>
|
||||
<translation>Все файлы (*.*)</translation>
|
||||
</message>
|
||||
@ -134,17 +134,28 @@
|
||||
<context>
|
||||
<name>preferences::FilesWidget</name>
|
||||
<message>
|
||||
<location filename="../fileswidget.cpp" line="79"/>
|
||||
<location filename="../fileswidget.cpp" line="48"/>
|
||||
<source>source_file_whitespace</source>
|
||||
<translation>Поле ввода исходного файла содержит пробел в начале или в конце</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.cpp" line="49"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="125"/>
|
||||
<source>destination_whitespace</source>
|
||||
<translation>Поле ввода целевого файла содержит пробел в начале или в конце</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.cpp" line="87"/>
|
||||
<source>Please enter source file(s) value.</source>
|
||||
<translation>Пожалуйста, введите источник файла(ов).</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.cpp" line="84"/>
|
||||
<location filename="../fileswidget.cpp" line="92"/>
|
||||
<source>Please enter destination file(s) value.</source>
|
||||
<translation>Пожалуйста, введите место назначения файла(ов).</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidget.cpp" line="94"/>
|
||||
<location filename="../fileswidget.cpp" line="102"/>
|
||||
<source>General</source>
|
||||
<translation>Основные настройки</translation>
|
||||
</message>
|
||||
@ -155,10 +166,15 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidgetslots.cpp" line="73"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="106"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="124"/>
|
||||
<source>Destination file:</source>
|
||||
<translation>Место назначения файлов:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidgetslots.cpp" line="118"/>
|
||||
<source>destination_folder_whitespace</source>
|
||||
<translation>Поле ввода целевой папки содержит пробел в начале или в конце</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open</source>
|
||||
<translation type="vanished">Открыть</translation>
|
||||
@ -184,7 +200,7 @@
|
||||
<translation type="vanished">Открыть Директорию</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../fileswidgetslots.cpp" line="100"/>
|
||||
<location filename="../fileswidgetslots.cpp" line="117"/>
|
||||
<source>Destination folder:</source>
|
||||
<translation>Папка назначения:</translation>
|
||||
</message>
|
||||
|
Loading…
x
Reference in New Issue
Block a user