-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
J - Localelocale related issuelocale related issue
Description
I'm new to localization so I tried weblate. When i was improving the translation for "split", I noticed that english value names were mixed with translated value names in the documentation.
For example :
-l, --lines <NUMBER> mettre NOMBRE lignes/enregistrements par fichier de sortie [default: 1000]
-n, --number <CHUNKS> générer CHUNKS fichiers de sortie ; voir l'explication ci-dessous
After looking around in the source code the culprit seems to be the Arg::value_name() function.
For example, in uu/split/src/split.rs :
pub fn uu_app() -> Command {
Command::new(uucore::util_name())
[...]
.arg(
Arg::new(OPT_LINES)
.short('l')
.long(OPT_LINES)
.allow_hyphen_values(true)
.value_name("NUMBER")
.default_value("1000")
.help(translate!("split-help-lines")),
)
[...]
}There is two ways to deal with that :
- If it's voluntary, then it's necessary to write some specification so that the localization does not switch between two languages too much. Does the value name must stay in english or they can be translated while the value name stays in english as usage.
- Change every
value_name()call to something like that
.value_name(translate!("split-help-lines-value-name"))and update the english locale accordingly.
I would gladly take care of this task but I just need to better understand the code (i'm new to l10n) so i'm not confident if replacing the value name strings with translate!() and updating the en-US.flt files is sufficient/works.
Metadata
Metadata
Assignees
Labels
J - Localelocale related issuelocale related issue