After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754044 - Don't use pango markup in strings
Don't use pango markup in strings
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
3.17.x
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-08-24 20:26 UTC by Alexandre Franke
Modified: 2016-09-20 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexandre Franke 2015-08-24 20:26:40 UTC
https://wiki.gnome.org/TranslationProject/DevGuidelines/Avoid%20markup%20wherever%20possible

"<small>%s (maximum)</small>" should be changed.
Comment 1 Alexandre Franke 2015-08-24 20:33:48 UTC
"<small>%s (recommended)</small>" too.
Comment 2 Zeeshan Ali 2015-08-25 12:22:58 UTC
Good catch. I have one question though: How do i deal with translations from .ui files?

                <property name="label" translatable="yes">&lt;b&gt;&lt;span size=&quot;large&quot;&gt;State of the art virtualization&lt;/span&gt;&lt;/b&gt;</property>

How do I divide the translated and non translated part there?
Comment 3 Zeeshan Ali 2015-08-25 12:30:03 UTC
That's an important question for me actually, since I'm always looking for ways to move UI setup/initialization to .ui files so if there is no way to avoid this in .ui files, I'd rather want to keep it consistent so that I don't break strings when moving them to .ui files.
Comment 4 Alexandre Franke 2015-08-26 23:12:00 UTC
How about that?

<object>
<property name="label" translatable="yes">State of the art virtualization</property>
<attributes>
<attribute name="size" value="small"/>
</attributes>
</object>
Comment 5 Zeeshan Ali 2015-08-27 14:26:31 UTC
(In reply to Alexandre Franke from comment #4)
> How about that?
> 
> <object>
> <property name="label" translatable="yes">State of the art
> virtualization</property>
> <attributes>
> <attribute name="size" value="small"/>
> </attributes>
> </object>

Ah yes, forgot about attributes. :)
Comment 6 Alexandre Franke 2015-08-30 10:41:49 UTC
Any chance you get this fixed quickly? String freeze is coming very soon.
Comment 7 Zeeshan Ali 2015-09-01 11:42:28 UTC
(In reply to Alexandre Franke from comment #6)
> Any chance you get this fixed quickly? String freeze is coming very soon.

on it, now!
Comment 8 Zeeshan Ali 2015-09-01 12:31:30 UTC
commit: 27bc483e3e5c6559aa3c0b40b42af45c30292f4c

    wizard-source: Use CSS for coloring label
    
    Instead of using pango markup for coloring labels, we should use the
    theme. This also reduces pango markup translators are exposed to.
    
commit: 3d084511802e5383dfa6cbfbc229db56d7bfae20

    empty-boxes: Make use of pango attributes
    
    Instead of inserting pango markup in strings, use pango attributes. This
    reduces pango markup translators are exposed to.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754044

commit: fbce1df0054bd6022e9d912d088fb175759da275

    i-props-provider: Avoid markup in translatable strings
    
    This reduces pango markup translators are exposed to.