Localization improvements.

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2017-04-21 17:28:25 +03:00
parent 07021680a4
commit 7734c0564b
14 changed files with 42 additions and 32 deletions

View File

@ -2233,7 +2233,7 @@ void TMainWindow::SetCurrentFile(const QString &fileName)
curFile = fileName;
if (curFile.isEmpty())
{
ui->lineEditPathToFile->setText(tr("<Empty>"));
ui->lineEditPathToFile->setText(QLatin1String("<") + tr("Empty") + QLatin1String(">"));
ui->lineEditPathToFile->setToolTip(tr("File was not saved yet."));
ui->lineEditPathToFile->setCursorPosition(0);
ui->pushButtonShowInExplorer->setEnabled(false);

View File

@ -106,7 +106,7 @@
<item>
<widget class="QCheckBox" name="forbidFlippingCheck">
<property name="toolTip">
<string>By default forbid flipping for all new created workpieces&quot;</string>
<string>By default forbid flipping for all new created workpieces</string>
</property>
<property name="text">
<string>Forbid flipping</string>

View File

@ -21,7 +21,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>3</number>
<number>1</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
@ -725,7 +725,7 @@
<item row="7" column="2">
<widget class="QCheckBox" name="checkBoxH200">
<property name="text">
<string>200</string>
<string notr="true">200</string>
</property>
<property name="checked">
<bool>true</bool>

View File

@ -96,6 +96,10 @@ QT_WARNING_POP
const QString autosavePrefix = QStringLiteral(".autosave");
// String below need for getting translation for key Ctrl
const QString strQShortcut = QStringLiteral("QShortcut"); // Context
const QString strCtrl = QStringLiteral("Ctrl"); // String
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief MainWindow constructor.
@ -1061,7 +1065,7 @@ void MainWindow::ToolGroup(bool checked)
ToolSelectGroupObjects();
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
"<b>Enter</b> - finish creation")
.arg(QCoreApplication::translate("QShortcut", "Ctrl"));
.arg(QCoreApplication::translate(strQShortcut.toUtf8().constData(), strCtrl.toUtf8().constData()));
SetToolButton<DialogGroup>(checked, Tool::Group, ":/cursor/group_plus_cursor.png", tooltip,
&MainWindow::ClosedDialogGroup);
}
@ -1072,7 +1076,7 @@ void MainWindow::ToolRotation(bool checked)
ToolSelectOperationObjects();
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
"<b>Enter</b> - confirm selection")
.arg(QCoreApplication::translate("QShortcut", "Ctrl"));
.arg(QCoreApplication::translate(strQShortcut.toUtf8().constData(), strCtrl.toUtf8().constData()));
SetToolButtonWithApply<DialogRotation>(checked, Tool::Rotation, ":/cursor/rotation_cursor.png", tooltip,
&MainWindow::ClosedDrawDialogWithApply<VToolRotation>,
&MainWindow::ApplyDrawDialog<VToolRotation>);
@ -1084,7 +1088,7 @@ void MainWindow::ToolFlippingByLine(bool checked)
ToolSelectOperationObjects();
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
"<b>Enter</b> - confirm selection")
.arg(QCoreApplication::translate("QShortcut", "Ctrl"));
.arg(QCoreApplication::translate(strQShortcut.toUtf8().constData(), strCtrl.toUtf8().constData()));
SetToolButtonWithApply<DialogFlippingByLine>(checked, Tool::FlippingByLine, ":/cursor/flipping_line_cursor.png",
tooltip, &MainWindow::ClosedDrawDialogWithApply<VToolFlippingByLine>,
&MainWindow::ApplyDrawDialog<VToolFlippingByLine>);
@ -1096,7 +1100,7 @@ void MainWindow::ToolFlippingByAxis(bool checked)
ToolSelectOperationObjects();
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
"<b>Enter</b> - confirm selection")
.arg(QCoreApplication::translate("QShortcut", "Ctrl"));
.arg(QCoreApplication::translate(strQShortcut.toUtf8().constData(), strCtrl.toUtf8().constData()));
SetToolButtonWithApply<DialogFlippingByAxis>(checked, Tool::FlippingByAxis, ":/cursor/flipping_axis_cursor.png",
tooltip, &MainWindow::ClosedDrawDialogWithApply<VToolFlippingByAxis>,
&MainWindow::ApplyDrawDialog<VToolFlippingByAxis>);
@ -1108,7 +1112,7 @@ void MainWindow::ToolMove(bool checked)
ToolSelectOperationObjects();
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
"<b>Enter</b> - confirm selection")
.arg(QCoreApplication::translate("QShortcut", "Ctrl"));
.arg(QCoreApplication::translate(strQShortcut.toUtf8().constData(), strCtrl.toUtf8().constData()));
SetToolButtonWithApply<DialogMove>(checked, Tool::Move, ":/cursor/move_cursor.png", tooltip,
&MainWindow::ClosedDrawDialogWithApply<VToolMove>,
&MainWindow::ApplyDrawDialog<VToolMove>);
@ -2384,7 +2388,7 @@ void MainWindow::ActionLayout(bool checked)
{
listDetails.clear();
QMessageBox::warning(this, tr("Layout mode"),
tr("You can't use now the Layout mode. \n%1").arg(e.ErrorMessage()),
tr("You can't use now the Layout mode.") + QLatin1String(" \n") + e.ErrorMessage(),
QMessageBox::Ok, QMessageBox::Ok);
mode == Draw::Calculation ? ActionDraw(true) : ActionDetails(true);
return;

View File

@ -55,7 +55,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<width>127</width>
<height>358</height>
</rect>
</property>
@ -427,7 +427,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<width>140</width>
<height>110</height>
</rect>
</property>
@ -536,7 +536,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<width>140</width>
<height>248</height>
</rect>
</property>
@ -798,7 +798,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<width>140</width>
<height>248</height>
</rect>
</property>
@ -1146,8 +1146,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>196</height>
<width>140</width>
<height>326</height>
</rect>
</property>
<attribute name="icon">
@ -1324,7 +1324,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<width>140</width>
<height>196</height>
</rect>
</property>
@ -1511,8 +1511,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>58</height>
<width>140</width>
<height>326</height>
</rect>
</property>
<attribute name="icon">
@ -2568,7 +2568,7 @@
<string>Open Tape</string>
</property>
<property name="toolTip">
<string>Open Tape app for creating or editing measurements file </string>
<string>Open Tape app for creating or editing measurements file</string>
</property>
<property name="shortcut">
<string notr="true"/>
@ -2650,8 +2650,8 @@
</customwidget>
</customwidgets>
<resources>
<include location="../../libs/vmisc/share/resources/icon.qrc"/>
<include location="share/resources/toolicon.qrc"/>
<include location="../../libs/vmisc/share/resources/icon.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -77,7 +77,7 @@ QString VAbstractConverter::Convert()
}
else
{
const QString errorMsg(tr("Error openning a temp file file: %1.").arg(m_tmpFile.errorString()));
const QString errorMsg(tr("Error openning a temp file: %1.").arg(m_tmpFile.errorString()));
throw VException(errorMsg);
}

View File

@ -804,7 +804,7 @@ qreal DialogTool::Eval(const QString &text, bool &flag, QLabel *label, const QSt
flag = false;
ChangeColor(labelEditFormula, Qt::red);
label->setText(tr("Error") + " (" + postfix + ")");
label->setToolTip(tr("Value can't be lass than 0"));
label->setToolTip(tr("Value can't be less than 0"));
}
else
{

View File

@ -2211,7 +2211,13 @@ bool DialogSeamAllowance::MainPathIsValid() const
if (valid)
{
m_ftb->SetTabText(TabOrder::Paths, tr("Paths"));
uiTabPaths->helpLabel->setText(tr("Ready!"));
QString tooltip = tr("Ready!");
if (not applyAllowed)
{
tooltip = tooltip + QLatin1String(" <b>") +
tr("To open all detail's features complete creating the main path.") + QLatin1String("</b>");
}
uiTabPaths->helpLabel->setText(tooltip);
}
else
{

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string notr="true">Form</string>
</property>
<property name="windowIcon">
<iconset resource="../../../../../vmisc/share/resources/icon.qrc">

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string notr="true">Form</string>
</property>
<property name="windowIcon">
<iconset resource="../../../../../vmisc/share/resources/icon.qrc">

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string notr="true">Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
@ -161,7 +161,7 @@
<resources/>
<connections/>
<buttongroups>
<buttongroup name="buttonGroupAngleType"/>
<buttongroup name="buttonGroupLineType"/>
<buttongroup name="buttonGroupAngleType"/>
</buttongroups>
</ui>

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string notr="true">Form</string>
</property>
<property name="windowIcon">
<iconset resource="../../../../../vmisc/share/resources/icon.qrc">
@ -21,7 +21,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tabMainPath">
<attribute name="title">

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string notr="true">Form</string>
</property>
<property name="windowIcon">
<iconset resource="../../../../../vmisc/share/resources/icon.qrc">

View File

@ -414,7 +414,7 @@ QMap<QString, QString> VAbstractTool::ColorsList()
name = tr("light salmon");
break;
case 8: // ColorGoldenRod
name = tr("golden rod");
name = tr("goldenrod");
break;
case 9: // ColorOrange
name = tr("orange");