Improvement for test 'TestTemplatePlaceholders()'.
--HG-- branch : release
This commit is contained in:
parent
d8a2464455
commit
55441a4483
|
@ -239,10 +239,18 @@ void TST_BuitInRegExp::TestTemplatePlaceholders()
|
||||||
|
|
||||||
const QRegularExpression re(QLatin1String("^[^\\s]+$"));
|
const QRegularExpression re(QLatin1String("^[^\\s]+$"));
|
||||||
if (re.match(translated).hasMatch())
|
if (re.match(translated).hasMatch())
|
||||||
|
{
|
||||||
|
if (not translations.contains(translated))
|
||||||
{
|
{
|
||||||
translations.insert(translated);
|
translations.insert(translated);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
issue << QString("Duplicate translation '%1' for placeholder '%2' in locale '%3'.\n")
|
||||||
|
.arg(translated, placeholder, m_locale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
issue << QString("Invalid translation '%1' for placeholder '%2' in locale '%3'.\n")
|
issue << QString("Invalid translation '%1' for placeholder '%2' in locale '%3'.\n")
|
||||||
.arg(translated, placeholder, m_locale);
|
.arg(translated, placeholder, m_locale);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user