Re: Markup in messages



On 7/25/06, Christian Rose <menthos gnome org> wrote:
> Of course in most cases the proper 'fix' is to have a boldtype
> font. But creating a boldface font is not always that easy,
> when one is talking about complex scripts that consists of
> at least hundreds or thousands of glyphs; and it needs quite
> some human horsepower as well, which may not be available for
> newly available languages in F/OSS world.

I understand that problem, but I for sure don't agree that this is the
proper way to fix it, as this hack, that is, gratiously including
surrounding markup inside the translateable message content, causes a
lot of problems for all translators. As a translator you want to
translate the *content*, not the surrounding presentation. I don't
care whether the words will be written on a billboard, a folder, or
on-screen, the words will be the same. As Clytie explained:
[......]

I didn't say my mind clearly. What I want to say is, I don't
like such kind of hack either, but it has really existed
before. Right now such workaround is no more needed.

Abel

Here are some ways to solve the problem of bad rendering:

1) Fix the fonts. Agreed, not an easy task.
2) Solve the problem at the Pango level. Instead of encouraging the
use of <b> and <i> tags, add abstract <strong>, <em> tags/attributes
or some such, allowing for different interpretations for different
scripts. If we know that boldface fonts for Persian always suck,
<strong> can have a different representation for Persian script.
Then the HIG and other such specifications can specify these
attributes instead of a particular font style.


And here's how to solve the (ab)use of using surrounding PangoMarkup
inside translateable messages:

3) Make gtk+/Pango have support for *attributes* instead of forcing
everyone to use PangoMarkup. If I want a label to be bold, italic,
smaller, or larger, I as a developer should be able to simply set
attributes to that effect. Right now, it's too common to see something
like this:

msgid "<span size=\"xx-large\">Bug Buddy</span>"
msgstr "<span size=\"xx-large\">Bug Buddy</span>"

msgid "<span weight=\"bold\">Date & Time</span>"
msgstr "<span weight=\"bold\">Datum och tid</span>"

msgid "<b>Date & Time</b>"
msgstr "<b>Datum och tid</b>"

msgid "<span size=\"medium\"><b>No file</b></span>"
msgstr "<span size=\"medium\"><b>Ingen fil</b></span>"

msgid "No file"
msgstr "Ingen fil"

Often, you will have duplicated messages in the same file, just with
different markup!

If gtk+/Pango and libglade would make it possible for application
writers to set *attributes* for these things instead of having to
resort to PangoMarkup, all problems would be solved.


Christian



--
Abel Cheung   (GPG Key: 0xC67186FF)
Key fingerprint: 671C C7AE EFB5 110C D6D1  41EE 4152 E1F1 C671 86FF
--------------------------------------------------------------------
* GNOME Hong Kong - http://www.gnome.hk/
* Opensource Application Knowledge Assoc. - http://oaka.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]