[PATCH v22 0/9] Support translated long option names in getopt and argp
Vivien Kraus
vivien@planete-kraus.eu
Mon Jun 29 07:23:53 GMT 2026
Hello Florian,
Thank you for your answer. I collected few nontechnical opinions for
this contribution ([1] is public). I do wish I had more, but I also
suspect the target people (beginner computer users who struggle with
English) to be underrepresented here ;)
Le mercredi 17 juin 2026 à 12:16 +0200, Florian Weimer a écrit :
> I still have concerns regarding script portability. (I worked with
> localized interfaces in the 90s, like many spreadsheet users outside the
> U.S..) But I don't want to block its integration.
I remember this concern being raised early in the review.
Le mercredi 04 juin 2025 à 10:37 +0200, Florian Weimer a écrit :
> It can make cross-cultural
> collaboration more difficult. Office applications (particularly
> spreadsheets) already use translated names for their programming
> languages. It makes it more difficult to find appropriate guides and
> apply them to your own environment. The proposed approach for
> getopt_long mitigates some of the problems because the untranslated
> option names always work, but there will be considerable friction once
> this feature gets significant traction.
I have little experience with international spreadsheet programming,
but I considered this risk: a user writes a script calling a program
with a mixture of translated and untranslated option names. It works in
their locale. But then someone uses it with another locale. It could
break (“unknown option --toto“) [A], or worse, do something unintended
[B], because “toto” means something different in both locales.
Is this what you mean?
[B]: I tried to limit the opportunities for collisions between
translated and untranslated option names, both for the maintainer (with
a script to statically check PO files) and translator (every pair of
names---untranslated and translated---is checked for collisions on the
first call to getopt_long, if translations are enabled). I think I
could extend the static check to also check for false friends between
different locales. Would it help?
[A]: The script fails with “unknown option --toto”: using argp’s help
output, the untranslated name for “--toto” is always written right next
to it, to help the developer use the untranslated name.
Would you prefer an extra warning in the getopt_long manual to only
activate translations if the program is typically used interactively,
or something like this?
Best regards,
Vivien
[1] https://sourceware.org/pipermail/libc-alpha/2025-May/167042.html
More information about the Libc-alpha
mailing list