On Sun, 18 Dec 2016, Henrique Andrade wrote:
Em 18 de dezembro de 2016, Allin escreveu:
(...)
>
> Our mechanism for actually showing translations to the user depends on
> "translations" of the names of the generated help files, to be found (or
> not) in the relevant .po files. The full set of English help files (for
> both commands and functions, and for both the GUI and CLI programs) is as
> follows:
>
> gretlcli.hlp
> gretlcmd.hlp
> gretlgui.hlp
> genrcli.hlp
> genrgui.hlp
>
> To activate translations these entries in gretl.pot should be "translated"
> as in, for example,
>
> gretlcli.hlp -> gretlcli.hlp.it
> gretlcmd.hlp -> gretlcmd.hlp.pt
>
> (that is, add the appropriate two-letter extension).
>
> In current git, I've ensured that these filenames are translated for the
> pt files. But if a translator wants to "mask" a translated helpfile
("not
> really ready yet") it should be enough to enter a null translation in the
> .po file, e.g.,
>
> genrgui.hlp -> genrgui.hlp
>
> and users will be shown the English-language version.
Dear Allin, thanks for your explanation! But I would like to ask you two
questions:
(1) If "genr_funcs_pt.xml" and "gretl_commands_pt.xml" are
completely
translated can't we use the preliminary translations?
Yes, of course. You just need to ensure that the filenames shown above
are "translated" in the relevant .po file(s).
To be explicit, translations of gretlcli.hlp, gretlcmd.hlp and
gretlgui.hlp are generated from the translation of gretl_commands.xml,
while translations of genrcli.hlp and genrgui.hlp are generated from
the translation of genr_funcs.xml.
So if both of the XML files are translated to your satisfaction, then
by all means add translations of all five of the .hlp filenames. (As I
mentioned, I've done that in pt.po; feel free to do it in pt_BR.po.)
(By the way, when editing the XML translations, please use an editor
that catches syntax errors in the XML.)
(2) What will happen when you add new functions/commands to
"genr_funcs.xml" and "gretl_commands.xml"? Gretl will use the
English files?
If the user performs an action that requests help on a specific
command or function (such as using the Help button in the script
editor, or the Help button in a dialog box, or typing "help <word>" in
the console) we first look up the translated help, but if no help for
that command or function is found we try falling back on the English
help files.
If the user just selects the Command or Function reference from the
main-window Help menu, then she'll see the translation by default
(even if it's incomplete), but the help window will contain an
"English" button to open the corresponding English help file.
I've just today done some fixing-up of these mechanisms, so you should
use git or a current snapshot to see what I'm talking about.
Allin