Bug #3942
closedWt.Auth.user-name is not shown properly since 3.3.4
0%
Description
Good day!
In project I have cyrillic symbols in auth_strings.xml e.g.
<message id="Wt.Auth.user-name">Имя пользователя</message>
<message id="Wt.Auth.user-name-info">Введите имя пользователя</message>
and after going to v3.3.4 instead of correct text of "Wt.Auth.user-name" on the main page shown "???"
Here there is a part of our auth_bootstrap_theme.xml
<div class="control-group">
<label for="${id:user-name}" class="control-label">
${user-name-label}
</label>
<div class="controls">
${user-name} <span class="help-inline">${user-name-info}</span>
</div>
</div>
But all of the other strings (e.g. "user-name-info" which is also cyrillic) displayed properly. Also it worked correctly on v3.3.3
Files
Updated by Kayra Akman over 9 years ago
I also experience this issue, however I hadn't bothered to report it since I could work around it using only Latin-1 text as user-name label.
Updated by Sandor Balogh over 9 years ago
- File patch.patch patch.patch added
I have same problem. In my opinion, there is a bug in WTemplate::resolveString function. See the attached patch.
If the WString comes from WTemplate::_tr function, it is also transformed with toUTF8 function like in my patch and worked well.
This patch resolve my problem.
bool WTemplate::_tr(const std::vector<WString>& args,
std::ostream& result)
{
if (args.size() >= 1) {
WString s = WString::tr(args[0].toUTF8());
for (unsigned j = 1; j < args.size(); ++j)
s.arg(args[j]);
result << s.toUTF8(); // FIXME formatting / escaping ? <-HERE CONVERT TO UTF8
return true;
} else {
LOG_ERROR("Functions::tr(): expects at least one argument");
return false;
}
}
Updated by Koen Deforche over 9 years ago
- Status changed from New to InProgress
- Assignee set to Benoit Daccache
- Target version set to 3.3.5
Updated by Benoit Daccache over 9 years ago
- Status changed from InProgress to Resolved
Updated by Koen Deforche about 9 years ago
- Status changed from Resolved to Closed