lupdate doesn't see string in variables.

--HG--
branch : feature
This commit is contained in:
dismine 2014-05-24 19:50:40 +03:00
parent 0f4cd08eed
commit 9aed00904c
12 changed files with 27612 additions and 6096 deletions

View File

@ -28,6 +28,7 @@
#include "options.h" #include "options.h"
// Keep synchronize all names with initialization in VApllication class.
//measurements //measurements
const QString headGirth_M = QStringLiteral("head_girth"); const QString headGirth_M = QStringLiteral("head_girth");
const QString midNeckGirth_M = QStringLiteral("mid_neck_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 halfGirthWaist_M = QStringLiteral("half_girth_waist");
const QString halfGirthHipsConsideringProtrudingAbdomen_M const QString halfGirthHipsConsideringProtrudingAbdomen_M
= QStringLiteral("half_girth_hips_considering_protruding_abdomen"); = 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 girthKneeFlexedFeet_M = QStringLiteral("girth_knee_flexed_feet");
const QString neckTransverseDiameter_M = QStringLiteral("neck_transverse_diameter"); const QString neckTransverseDiameter_M = QStringLiteral("neck_transverse_diameter");
const QString frontSlashShoulderHeight_M = QStringLiteral("front_slash_shoulder_height"); 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

View File

@ -93,7 +93,6 @@ private:
QMap<QString, VTranslation> postfixOperators; QMap<QString, VTranslation> postfixOperators;
void InitLineWidth(); void InitLineWidth();
void InitMeasurements(); void InitMeasurements();
void InitMeasurement(const QString &measurement, const QString &guiText, const QString & desc);
void InitVariables(); void InitVariables();
void InitFunctions(); void InitFunctions();
void InitPostfixOperators(); void InitPostfixOperators();

View File

@ -50,6 +50,23 @@ VTranslation::VTranslation(const QString &context, const QString &sourceText, co
:mcontext(context), msourceText(sourceText), mdisambiguation(disambiguation), mn(n) :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 QString VTranslation::VTranslation::translate() const
{ {

View File

@ -39,6 +39,7 @@
* I took idea from this article http://ololoepepe.blogspot.com/2013/08/qt.html. * 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 * 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. * 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. * Instead of using QT_TRANSLATE_NOOP3 macros we can store strings in QMap.
* Example: * Example:
* create map and fill up its * create map and fill up its
@ -52,9 +53,15 @@ class VTranslation
public: public:
VTranslation(); VTranslation();
VTranslation(const QString &context, const QString &sourceText, const QString &disambiguation = 0, int n = -1); 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; QString translate() const;
static VTranslation translate(const QString &context, const QString &sourceText, const QString &disambiguation = 0, static VTranslation translate(const QString &context, const QString &sourceText, const QString &disambiguation = 0,
int n = -1); int n = -1);
QString getMcontext() const;
QString getMsourceText() const;
QString getMdisambiguation() const;
int getN() const;
private: private:
QString mcontext; QString mcontext;
QString msourceText; QString msourceText;
@ -62,4 +69,28 @@ private:
int mn; 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 #endif // VTRANSLATION_H