3

Recent site build leads to loosing translation in localized sites for string with the post view count. Bug report for ruSO: Перевод счётчика количества просмотров.

I've made new translation in Transifex. But what's curiour for me: why old string $viewsPretty$ times was replaced with **$viewsPretty$ times**? I.e. adding bold markdown here doesn't work due to current style for that block. E.g.

32 times

You can see that in html-source here is <b> tags around 32 times, which became from double stars ** from the new string:

<p class="label-key">
    <b>32 times</b>
</p>
  • 1
    I just checked, the Japanese site still has it in Japanese (either somebody fixed it or it wasn't affected), but the Portuguese site has it in English now, too. I didn't check any other sites. – Jason C Jun 8 '17 at 14:55
3

It does have an effect. That entire pane is styled as a table where both the left column ("asked", "views", etc.) and the right column (the values) are styled the same: As a p class="label-key" inside a td:

<tr>
    <td>
        <p class="label-key">asked</p>
    </td>
    <td style="padding-left: 10px">
        <p class="label-key" title="2017-06-07 06:50:39Z"><b>yesterday</b></p>
    </td>
</tr>

The b styling makes the text darker. With it, the values are black. Without it, they're gray like the left column. For example, here is how it normally appears:

enter image description here

And here is how it appears if you remove all the bold tags from the values on the right:

enter image description here

The relevant styling is in all.css:

.label-key {
    color: #9199a1;
    font-size: 14px
}

.label-key b, .label-key strong {
    color: #3b4045;
    font-weight: normal
}

So, it may be a philosophically odd way to accomplish that goal, but, yes, it has an important effect, and you do need to include the ** bold markdown in your value strings.


As for why it was changed and the localized string loss, not sure, unfortunately. Maybe they did a massive "find/replace" style thing by accident and instead of surrounding the existing localized strings with **, they replaced them all with English.

It doesn't appear that the Russian site was the only one affected. I just checked, the Japanese site still has it in Japanese (either somebody fixed it or it wasn't affected), but the Portuguese site has it in English now, too. I didn't check any other sites.

| improve this answer | |
  • How did it work before? I'm pretty sure that old string hasn't **. Otherwise, the translation would not be reset on ruSO. – αλεχολυτ Jun 8 '17 at 14:35
  • @alexolut Not sure. But I understand your bug report now. Maybe they did a massive "find/replace" style thing by accident and instead of surrounding the existing localized strings with **, they replaced them all with English. – Jason C Jun 8 '17 at 14:49
  • 1
    @JasonC I work with the SO CSS everyday and I'm amazed at some of the decisions made (myself included). Regularly I have moments that make me think, 'What is going on here?' 🤔 – Hynes Jun 8 '17 at 16:02
  • 1
    Seems actual change was **$__count$ times****$viewsPretty$ times**. Not $viewsPretty$ times**$viewsPretty$ times**. I.e. bold remains where it was. – αλεχολυτ Jun 8 '17 at 18:51
  • 1
    I found source of change on MSO: meta.stackoverflow.com/q/251510 – αλεχολυτ Jun 8 '17 at 19:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .