git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Internationalization and yes/no prompts

From
PVPierre-Olivier Vares <pierre-olivier.vares@fingerprint.fr>
Date
Feb 23, 2015, 15:46 UTC
Message-ID
<54EB4B3F.6080706@fingerprint.fr>
In-Reply-To
<20150212085211.9112780692@smtp-out.fingerprint.fr>
Hi,
I just fell in a little trap, in which you may find interest.

I'm using git on the command line (on an Elementary OS system : Linux 3.2.0-76-generic #111-Ubuntu SMP Tue Jan 13 22:16:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux). git version : 2.3.0

My system is configured in french.
That's said :
I run a git clean -i, and select option 4 (ask each).
     (By the fact, messages are translated, but options of the 
'interactive' menu aren't)
So I get, for each file, the question :
/Supprimer //premier_fichier ? [Remove first_file ?]/
Natural answer to this question is 'Oui' [Yes], so I type 'o', rather 
than 'y'.
Once finished, I see no file has been removed (since 'o' has been 
considered as 'different than yes')
Whereas it's not an end-of-the-world thing*, it's annoying as at first 
sight I didn't understand why it has 'not worked'.
I thought of a few possibilities (some easy to implement, others more 
complex; some are stricter for the user) :
- explicitly put "y/n" in the message. Translaters should be warned to 
let "y/n",
- only allow y and n answers (and variants : yes, no), and reject 
everything else with a message
- use as 'n', but echoes a message : 'Answer considered as /no/'
- accept answers depending on the language used to echo the prompt (y/n 
for english, o/n for french, j/n for german, ...)
What do you think about that ?
* but just imagine how worst it could be if you're configured in a 
language where 'No' is said using a word beginning by 'Y'...

Cheers, Pierre-Olivier Vares

Next: Junio C Hamano
Message 1 of 9 in “Internationalization and yes/no prompts”
  1. Pierre-Olivier VaresFeb 23, 2015
  2. Junio C HamanoFeb 24, 2015
  3. Jean-Noël AvilaFeb 25, 2015
  4. Add hint for translators for y/n reply.Jean-Noel Avila, Feb 28, 2015
  5. Jiang XinMar 1, 2015
  6. Jiang XinMar 1, 2015
  7. Junio C HamanoMar 1, 2015
  8. [PATCHv2] Add hint interactive cleaningJean-Noel Avila, Mar 1, 2015
  9. Junio C HamanoMar 2, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.