bug-gettext
[Top][All Lists]
Advanced

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

[bug-gettext] picking strings to translate from a program's output


From: Bruno Haible
Subject: [bug-gettext] picking strings to translate from a program's output
Date: Wed, 01 May 2019 13:36:28 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )

Hi, dear Egmont,

The "hyperlinks in terminal emulators" [1] idea that you have started opens up
a new, alternative way of doing translations.

Currently the translators go through a PO file linearly and translate the
strings from English to their language linearly, without much context.

The alternative way is that translators run the program, just like normal users,
and when they spot a string in English, they translate it. When they do this,
they have all the context: under which conditions it occurs, what it is about,
and which other strings appear nearby.

In the past, this approach would
  - only have worked in programs with a GUI (not for programs with terminal
    output),
  - have required the program's developer to change many occurrences of the
    type String to TranslatableString.

With the idea of conveying a user action through a URL, embedded in the string
through an escape sequence, it will be possible to implement this approach
  - for programs with text output as well,
  - without pervasive changes to the program's code.

The way it will work is like this:
1. The gettext() function is overridden/modified to produce a string with
   an escape sequence that contains an URL that specifies the PO file and
   msgid.
2. The terminal emulator (or GUI toolkit, in the case of GUI programs) presents
   an action (such as "Open Link") that accesses the link or opens it in a
   browser.
3. A server exists on the translator's machine that opens up a PO editor for
   the particular string to be translated.

This way, a good portion of the strings of a program can be translated with
context, and the "linear" approach without context is limited to messages which
are hard to produce.

I really have been waiting for a practical way to implement this approach
for 20 years.

Maybe you can mention this in the section "A few use cases" of [1]?

Best regards, and congratulation to the innovation of the decade!

       Bruno

[1] https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda




reply via email to

[Prev in Thread] Current Thread [Next in Thread]