New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating the help text translations is getting harder with each addition #2005
Comments
Yes, I think you speak about help on commands in particular. This might take some time and could be a progressive work. |
I was also thinking that this would take a great amount of work. Thanks for acknowledging this, it will be a great help to translators! |
I'm starting the work to translate help on command arguments. Unfortunately, I think this will need a complete re-translation of all commands, this can not be easily retrieved automatically (and I'm going to take this opportunity to simplify help on some commands). I'll introduce a new format for argument Using a special marker at the beginning, the help becomes translated line by line, and there are some automatic formatting (like aligning name of arguments to the right). For example such existing translation (command
Would become (one translation per non-empty line, no more newline chars in translations and simplified examples, not translated any more):
And the result displayed with
|
There's still something not easy to translate, and that could become harder when you translate line by line: the arguments that are keywords or not. For example in the hook_command (
NULL, "bar",
N_("manage bars"),
N_("list|listfull|listitems"
" || add <name> <type>[,<conditions>] <position> <size> <separator> <item1>[,<item2>...]"
" || default [input|title|status|nicklist]"
" || rename <name> <new_name>"
" || del <name>|-all"
" || set <name> <option> <value>"
" || hide|show|toggle <name>"
" || scroll <name> <window> <scroll_value>"),
N_(" list: list all bars\n"
" listfull: list all bars (verbose)\n"
" listitems: list all bar items\n"
" add: add a new bar\n"
" name: name of bar (must be unique)\n"
" type: root: outside windows,\n"
" window: inside windows, with optional conditions (see below)\n"
(...)
); The following keywords must be kept as-is and then NOT translated:
But the following arguments must be translated (all words like
Any idea how to make it clear for translators what must be translated or not in description of command arguments? One possible solution would be to never translate arguments, so keep |
Another solution would be to enclose fixed keywords with backquotes, like this:
|
I think instead of putting back ticks for the commands, enclosing the arguments in angular brackets would make it easier to distinguish, and provide a 1-1 listing. I would assume, that any command-line software translator would be aware of the difference between a translatable argument enclosed in angular brackets and an untranslatable command. Rest would be caught during review I think. Depending on the situation, reusable variable placeholders might also help reducing the confusion. Also a short l10n comment for such help text would be a nice addition to guide the new folks. |
So this could be:
Where:
Still not sure if it's clear that the first "list" must not be translated while the second one must be in such line, if you don't have the command context:
(having a translator help on each command argument could be bloated in the gettext file) |
By the way there could be backquotes in translation that are automatically removed on display, eg in French:
displayed as:
|
If the quotes are automatically removed, it should be fine I guess. But it still doesn't tell the translator to leave it as-is. Maybe a comment like:
wouldn't be too distracting. By the way, there is a |
Another proposal: use Example of French translation:
Displayed as this in
Would it then be clear that text between And for the syntax of command, a help text would invite to translate only the text between angle brackets (
|
Looks good to me! |
I agree. This is better to read and to translate. Especially long help text is very difficult to translate when there are changes in one line only (i'll check the git repository to find out what you changed!). |
Only text between angle brackets (eg: "<name>") must be translated.
Hi, I merged the changes to translate commands line by line. The result is that there are now many untranslated or fuzzy strings:
So the raw keyword is this
|
Note: there are some changes in translations as well (to reduce the number of translated messages), so you should not always re-use previous translations. |
Thank you very much @flashcode! |
@bitigchi: you're welcome, I gave you some homework, it's your turn! 😃 |
And for your information I'm currently adding back some descriptions for examples in commands: many of them were not relevant, but I removed too many descriptions. |
Help is updated on these commands: - `/allchan` - `/allpv` - `/allserv`
This made the help text for eval ( |
You're right, I'll add this back, with a more readable format (and with new variables added since it was removed). |
Some of the help text in the standart weechat messages is getting too long, and when these texts become fuzzy, it is really hard to figure out what has changed without extensive drilling.
Ideally, each line of the help texts should have its own line in the po files, and the translator can then deal with the lines on an individual basis. This also removes the risk of possible layout issues, newline problems, and such.
Migrating the existing translations might be cumbersome at first, but once everything has been migrated, this will ease the life of the messages' maintainers very easy.
The text was updated successfully, but these errors were encountered: