lupdate doesn't see string in variables.
--HG-- branch : feature
This commit is contained in:
parent
0f4cd08eed
commit
9aed00904c
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "options.h"
|
||||
|
||||
// Keep synchronize all names with initialization in VApllication class.
|
||||
//measurements
|
||||
const QString headGirth_M = QStringLiteral("head_girth");
|
||||
const QString midNeckGirth_M = QStringLiteral("mid_neck_girth");
|
||||
|
@ -145,7 +146,8 @@ const QString halfGirthChestThird_M = QStringLiteral("half_girth_c
|
|||
const QString halfGirthWaist_M = QStringLiteral("half_girth_waist");
|
||||
const QString halfGirthHipsConsideringProtrudingAbdomen_M
|
||||
= QStringLiteral("half_girth_hips_considering_protruding_abdomen");
|
||||
const QString halfGirthHipsExcludingProtrudingAbdomen_M = QStringLiteral("half_girth_hips_excluding_protruding_abdomen");
|
||||
const QString halfGirthHipsExcludingProtrudingAbdomen_M
|
||||
= QStringLiteral("half_girth_hips_excluding_protruding_abdomen");
|
||||
const QString girthKneeFlexedFeet_M = QStringLiteral("girth_knee_flexed_feet");
|
||||
const QString neckTransverseDiameter_M = QStringLiteral("neck_transverse_diameter");
|
||||
const QString frontSlashShoulderHeight_M = QStringLiteral("front_slash_shoulder_height");
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -93,7 +93,6 @@ private:
|
|||
QMap<QString, VTranslation> postfixOperators;
|
||||
void InitLineWidth();
|
||||
void InitMeasurements();
|
||||
void InitMeasurement(const QString &measurement, const QString &guiText, const QString & desc);
|
||||
void InitVariables();
|
||||
void InitFunctions();
|
||||
void InitPostfixOperators();
|
||||
|
|
|
@ -50,6 +50,23 @@ VTranslation::VTranslation(const QString &context, const QString &sourceText, co
|
|||
:mcontext(context), msourceText(sourceText), mdisambiguation(disambiguation), mn(n)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VTranslation &VTranslation::operator=(const VTranslation &tr)
|
||||
|
||||
{
|
||||
this->mcontext = tr.getMcontext();
|
||||
this->msourceText = tr.getMsourceText();
|
||||
this->mdisambiguation = tr.getMdisambiguation();
|
||||
this->mn = tr.getN();
|
||||
return *this;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VTranslation::VTranslation(const VTranslation &tr)
|
||||
:mcontext(tr.getMcontext()), msourceText(tr.getMsourceText()), mdisambiguation(tr.getMdisambiguation()),
|
||||
mn(tr.getN())
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VTranslation::VTranslation::translate() const
|
||||
{
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
* I took idea from this article http://ololoepepe.blogspot.com/2013/08/qt.html.
|
||||
* As you know, if wrap string to a function translate, it will be marked for translation. No matter what namespace
|
||||
* contains this function. In class Translation used this circumstance.
|
||||
* It is mean never change name of method translate!!!!!.
|
||||
* Instead of using QT_TRANSLATE_NOOP3 macros we can store strings in QMap.
|
||||
* Example:
|
||||
* create map and fill up its
|
||||
|
@ -52,9 +53,15 @@ class VTranslation
|
|||
public:
|
||||
VTranslation();
|
||||
VTranslation(const QString &context, const QString &sourceText, const QString &disambiguation = 0, int n = -1);
|
||||
VTranslation &operator=(const VTranslation &tr);
|
||||
VTranslation(const VTranslation &tr);
|
||||
QString translate() const;
|
||||
static VTranslation translate(const QString &context, const QString &sourceText, const QString &disambiguation = 0,
|
||||
int n = -1);
|
||||
QString getMcontext() const;
|
||||
QString getMsourceText() const;
|
||||
QString getMdisambiguation() const;
|
||||
int getN() const;
|
||||
private:
|
||||
QString mcontext;
|
||||
QString msourceText;
|
||||
|
@ -62,4 +69,28 @@ private:
|
|||
int mn;
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
inline QString VTranslation::getMcontext() const
|
||||
{
|
||||
return mcontext;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
inline QString VTranslation::getMsourceText() const
|
||||
{
|
||||
return msourceText;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
inline QString VTranslation::getMdisambiguation() const
|
||||
{
|
||||
return mdisambiguation;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
inline int VTranslation::getN() const
|
||||
{
|
||||
return mn;
|
||||
}
|
||||
|
||||
#endif // VTRANSLATION_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user