Project

General

Profile

Actions

Bug #3942

closed

Wt.Auth.user-name is not shown properly since 3.3.4

Added by Valeriy Fedyunin over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Benoit Daccache
Target version:
Start date:
04/02/2015
Due date:
% Done:

0%

Estimated time:

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

patch.patch (425 Bytes) patch.patch Sandor Balogh, 04/06/2015 06:56 PM
Actions #1

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.

Actions #2

Updated by Sandor Balogh over 9 years ago

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;
  }
}
Actions #3

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
Actions #4

Updated by Benoit Daccache over 9 years ago

  • Status changed from InProgress to Resolved
Actions #5

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF