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; curFile = fileName;
if (curFile.isEmpty()) 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->setToolTip(tr("File was not saved yet."));
ui->lineEditPathToFile->setCursorPosition(0); ui->lineEditPathToFile->setCursorPosition(0);
ui->pushButtonShowInExplorer->setEnabled(false); ui->pushButtonShowInExplorer->setEnabled(false);

View file

@ -106,7 +106,7 @@
<item> <item>
<widget class="QCheckBox" name="forbidFlippingCheck"> <widget class="QCheckBox" name="forbidFlippingCheck">
<property name="toolTip"> <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>
<property name="text"> <property name="text">
<string>Forbid flipping</string> <string>Forbid flipping</string>

View file

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

View file

@ -96,6 +96,10 @@ QT_WARNING_POP
const QString autosavePrefix = QStringLiteral(".autosave"); 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. * @brief MainWindow constructor.
@ -1061,7 +1065,7 @@ void MainWindow::ToolGroup(bool checked)
ToolSelectGroupObjects(); ToolSelectGroupObjects();
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, " const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
"<b>Enter</b> - finish creation") "<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, SetToolButton<DialogGroup>(checked, Tool::Group, ":/cursor/group_plus_cursor.png", tooltip,
&MainWindow::ClosedDialogGroup); &MainWindow::ClosedDialogGroup);
} }
@ -1072,7 +1076,7 @@ void MainWindow::ToolRotation(bool checked)
ToolSelectOperationObjects(); ToolSelectOperationObjects();
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, " const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
"<b>Enter</b> - confirm 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, SetToolButtonWithApply<DialogRotation>(checked, Tool::Rotation, ":/cursor/rotation_cursor.png", tooltip,
&MainWindow::ClosedDrawDialogWithApply<VToolRotation>, &MainWindow::ClosedDrawDialogWithApply<VToolRotation>,
&MainWindow::ApplyDrawDialog<VToolRotation>); &MainWindow::ApplyDrawDialog<VToolRotation>);
@ -1084,7 +1088,7 @@ void MainWindow::ToolFlippingByLine(bool checked)
ToolSelectOperationObjects(); ToolSelectOperationObjects();
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, " const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
"<b>Enter</b> - confirm 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", SetToolButtonWithApply<DialogFlippingByLine>(checked, Tool::FlippingByLine, ":/cursor/flipping_line_cursor.png",
tooltip, &MainWindow::ClosedDrawDialogWithApply<VToolFlippingByLine>, tooltip, &MainWindow::ClosedDrawDialogWithApply<VToolFlippingByLine>,
&MainWindow::ApplyDrawDialog<VToolFlippingByLine>); &MainWindow::ApplyDrawDialog<VToolFlippingByLine>);
@ -1096,7 +1100,7 @@ void MainWindow::ToolFlippingByAxis(bool checked)
ToolSelectOperationObjects(); ToolSelectOperationObjects();
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, " const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
"<b>Enter</b> - confirm 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", SetToolButtonWithApply<DialogFlippingByAxis>(checked, Tool::FlippingByAxis, ":/cursor/flipping_axis_cursor.png",
tooltip, &MainWindow::ClosedDrawDialogWithApply<VToolFlippingByAxis>, tooltip, &MainWindow::ClosedDrawDialogWithApply<VToolFlippingByAxis>,
&MainWindow::ApplyDrawDialog<VToolFlippingByAxis>); &MainWindow::ApplyDrawDialog<VToolFlippingByAxis>);
@ -1108,7 +1112,7 @@ void MainWindow::ToolMove(bool checked)
ToolSelectOperationObjects(); ToolSelectOperationObjects();
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, " const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
"<b>Enter</b> - confirm 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, SetToolButtonWithApply<DialogMove>(checked, Tool::Move, ":/cursor/move_cursor.png", tooltip,
&MainWindow::ClosedDrawDialogWithApply<VToolMove>, &MainWindow::ClosedDrawDialogWithApply<VToolMove>,
&MainWindow::ApplyDrawDialog<VToolMove>); &MainWindow::ApplyDrawDialog<VToolMove>);
@ -2384,7 +2388,7 @@ void MainWindow::ActionLayout(bool checked)
{ {
listDetails.clear(); listDetails.clear();
QMessageBox::warning(this, tr("Layout mode"), 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); QMessageBox::Ok, QMessageBox::Ok);
mode == Draw::Calculation ? ActionDraw(true) : ActionDetails(true); mode == Draw::Calculation ? ActionDraw(true) : ActionDetails(true);
return; return;

View file

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

View file

@ -77,7 +77,7 @@ QString VAbstractConverter::Convert()
} }
else 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); throw VException(errorMsg);
} }

View file

@ -804,7 +804,7 @@ qreal DialogTool::Eval(const QString &text, bool &flag, QLabel *label, const QSt
flag = false; flag = false;
ChangeColor(labelEditFormula, Qt::red); ChangeColor(labelEditFormula, Qt::red);
label->setText(tr("Error") + " (" + postfix + ")"); 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 else
{ {

View file

@ -2211,7 +2211,13 @@ bool DialogSeamAllowance::MainPathIsValid() const
if (valid) if (valid)
{ {
m_ftb->SetTabText(TabOrder::Paths, tr("Paths")); 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 else
{ {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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