Currently bitmap images like

https://git.gnome.org/browse/gnome-user-docs/plain/gnome-help/C/figures/top-bar-icons.png?h=master
https://git.gnome.org/browse/gnome-user-docs/plain/gnome-help/C/figures/top-bar-icons-classic.png?h=master

require translators to have basic skills in image manipulation.

We could turn such images into SVG images with an embedded PNG file (either via 
an external URI or via embedding via base64 encoding[1]), and define different 
translations via systemLanguage.

Example of the translation switch (without an embedded PNG file):

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg";
 width="320" height="140" style="border:1px solid black;
 font-family:sans-serif;font-size:30px">
    <text x="30" y="50">systemLanguage:</text>
    <g transform="translate(30,110)" fill="red">
        <switch allowReorder="yes">
            <text systemLanguage="cs">cs</text>
            <text systemLanguage="en">en</text>
            <text fill="red">other</text>
        </switch>
    </g>
</svg>

systemLanguage ("en" or "cs") is picked up (at least in Firefox 26 using Gecko) 
according to the prefered language setting in the browser, and also when 
setting "LANG=cs_CZ.utf8" for Yelp 3.10 using WebKit, so it works for me(TM).

Now translators could use a text editor and edit the SVG file to translate such 
images, instead of having to use an image manipulation application like GIMP.

However, for translators' convenience the string should end up in the .po file, 
so something (gettext? yelp-tools? itstools? As usual I am lost.) would need to 
parse SVG files in /po/figures for a "switch -> text systemLanguage" 
element/parameter in the DOM tree.

Is that somehow possible (which implies: could somebody code this, if it does 
create performance issues), or is this a bad idea?

andre

[1] 
http://stackoverflow.com/questions/6249664/does-svg-support-embedding-of-bitmap-images

-- 
Andre Klapper  |  [email protected]
http://blogs.gnome.org/aklapper/
_______________________________________________
gnome-doc-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gnome-doc-list

Reply via email to