Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
MinyazevR committed Nov 2, 2024
1 parent 95a9ba9 commit 6fa90e9
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 12 deletions.
14 changes: 9 additions & 5 deletions plugins/robots/checker/twoDModelRunner/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,14 @@ int main(int argc, char *argv[])
, QObject::tr("Close the window and exit after diagram/script"\
" finishes."));
QCommandLineOption showConsoleOption({"c", "console"}, QObject::tr("Shows robot's console."));
QCommandLineOption generatePathOption("generate-path", QObject::tr("File for save generated python or javascript code.")
QCommandLineOption generatePathOption("generate-path",
QObject::tr("File for save generated python or javascript code.")
, "path-to-save-code", "report.py");
QCommandLineOption generateModeOption("generate-mode", QObject::tr("Select \"python\" or \"javascript\".")
, "generate-mode", "python");
QCommandLineOption directScriptExecutionPathOption("direct-script-path", QObject::tr("Path to \"python\" or \"javascript\" script")
, "direct-script-path");
QCommandLineOption directScriptExecutionPathOption("direct-script-path"
, QObject::tr("Path to \"python\" or \"javascript\" script")
, "direct-script-path");
parser.addOption(backgroundOption);
parser.addOption(reportOption);
parser.addOption(trajectoryOption);
Expand Down Expand Up @@ -157,9 +159,11 @@ int main(int argc, char *argv[])
const bool closeOnFinishMode = backgroundMode || parser.isSet(closeOnFinishOption);
const bool showConsoleMode = parser.isSet(showConsoleOption);
const QString generatePath = parser.isSet(generatePathOption) ? parser.value(generatePathOption) : QString();
const QString generateMode = parser.isSet(generateModeOption) ? parser.value(generateModeOption) : QString("python");
const QString generateMode = parser.isSet(generateModeOption)
? parser.value(generateModeOption) : QString("python");
QScopedPointer<twoDModel::Runner> runner(new twoDModel::Runner(report, trajectory, input, mode, qrsFile));
const QString filePath = parser.isSet(directScriptExecutionPathOption) ? parser.value(directScriptExecutionPathOption) : QString();
const QString filePath = parser.isSet(directScriptExecutionPathOption)
? parser.value(directScriptExecutionPathOption) : QString();
auto speedFactor = parser.value(speedOption).toInt();

if (!runner->openProject()) {
Expand Down
3 changes: 2 additions & 1 deletion plugins/robots/checker/twoDModelRunner/runner.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class Runner : public QObject
/// @param input A path to a file where JSON with inputs for JavaScript.
/// @param mode Interpret mode.
/// @param qrsFile Path to TRIK Studio project
Runner(const QString &report, const QString &trajectory, const QString &input, const QString &mode, const QString &qrsFile);
Runner(const QString &report, const QString &trajectory, const QString &input,
const QString &mode, const QString &qrsFile);

~Runner();

Expand Down
2 changes: 1 addition & 1 deletion qrtranslations/fr/plugins/robots/interpreterCore_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="+111"/>
<location line="+127"/>
<source>No saved code found in the qrs file</source>
<translation type="unfinished"></translation>
</message>
Expand Down
19 changes: 17 additions & 2 deletions qrtranslations/fr/plugins/robots/twoDModelRunner_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ In background mode the session will be terminated just after the execution ended
<source>Speed factor, try from 5 to 20, or even 1000 (at your own risk!).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+10"/>
<source>File for save generated python or javascript code.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Select &quot;python&quot; or &quot;javascript&quot;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Path to &quot;python&quot; or &quot;javascript&quot; script</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this option set to &quot;minimal&quot; to disable connection to X server</source>
<translation type="vanished">Mettez &quot;minimal&quot; dans cette option pour désactiver la connexion au serveur X</translation>
Expand All @@ -49,7 +64,7 @@ In background mode the session will be terminated just after the execution ended
<translation type="vanished">Le chemin au fichier de sauvegarde des resultats (JSON)</translation>
</message>
<message>
<location line="-10"/>
<location line="-25"/>
<source>A path to file where robot`s trajectory will be written. The writing will not be performed not immediately, each trajectory point will be written just when obtained by checker, so FIFOs are recommended to be targets for this option.</source>
<translation>Le chemin au ficher ou la trajectoire du robot sera enregistrée. L&apos;enregistrement ne sera pas fait immediatement, chaque point de trajectoire sera écrit dès lors qu&apos;il est obteneur par le checker, donc FIFO sont récommandés pour cette option.</translation>
</message>
Expand All @@ -72,7 +87,7 @@ In background mode the session will be terminated just after the execution ended
<context>
<name>twoDModel::Runner</name>
<message>
<location filename="../../../../plugins/robots/checker/twoDModelRunner/runner.cpp" line="+203"/>
<location filename="../../../../plugins/robots/checker/twoDModelRunner/runner.cpp" line="+235"/>
<source>Robot console</source>
<translation type="unfinished"></translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion qrtranslations/ru/plugins/robots/interpreterCore_ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
<translation>Экспорт упражнения по заданному пути не удался (попробуйте другой путь)</translation>
</message>
<message>
<location line="+111"/>
<location line="+127"/>
<source>No saved code found in the qrs file</source>
<translation>В qrs не найден сохраннёный код</translation>
</message>
Expand Down
19 changes: 17 additions & 2 deletions qrtranslations/ru/plugins/robots/twoDModelRunner_ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,22 @@ In background mode the session will be terminated just after the execution ended
<translation>Ускорение, попробуйте от 5 до 20, но можно пробовать и 1000.</translation>
</message>
<message>
<location line="-10"/>
<location line="+10"/>
<source>File for save generated python or javascript code.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Select &quot;python&quot; or &quot;javascript&quot;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Path to &quot;python&quot; or &quot;javascript&quot; script</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-25"/>
<source>A path to file where robot`s trajectory will be written. The writing will not be performed not immediately, each trajectory point will be written just when obtained by checker, so FIFOs are recommended to be targets for this option.</source>
<translation>Путь к файлу, куда будет выводиться траектори робота. Запись не будет осуществлена единомоментно, каждый узел траектории будет записан по факту его просчета проверяющей системой. Поэтому разумно использования FIFO-файлов в качестве значения этого параметра.</translation>
</message>
Expand All @@ -74,7 +89,7 @@ In background mode the session will be terminated just after the execution ended
<context>
<name>twoDModel::Runner</name>
<message>
<location filename="../../../../plugins/robots/checker/twoDModelRunner/runner.cpp" line="+203"/>
<location filename="../../../../plugins/robots/checker/twoDModelRunner/runner.cpp" line="+235"/>
<source>Robot console</source>
<translation>Консоль робота</translation>
</message>
Expand Down

0 comments on commit 6fa90e9

Please sign in to comment.