Re: [PATCH v2 02/11] i18n: add--interactive: mark simple here documents for translation
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 29, 2016, 17:05 UTC
- Message-ID
- <xmqqfuoihc1m.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1475159493.2435.7.camel@sapo.pt>
Vasco Almeida <vascomalmeida@sapo.pt> writes:
Show 21 quoted lines
> On the other hand, would it make sense to translate these commands? If
> so, we would mark for translation the commands name of @cmd in
> main_loop().
>
> sub main_loop {
> - my @cmd = ([ 'status', \&status_cmd, ],
> - [ 'update', \&update_cmd, ],
> - [ 'revert', \&revert_cmd, ],
> - [ 'add untracked', \&add_untracked_cmd, ],
> - [ 'patch', \&patch_update_cmd, ],
> - [ 'diff', \&diff_cmd, ],
> - [ 'quit', \&quit_cmd, ],
> - [ 'help', \&help_cmd, ],
> + my @cmd = ([ __('status'), \&status_cmd, ],
> + [ __('update'), \&update_cmd, ],
> + [ __('revert'), \&revert_cmd, ],
> + [ __('add untracked'), \&add_untracked_cmd, ],
> + [ __('patch'), \&patch_update_cmd, ],
> + [ __('diff'), \&diff_cmd, ],
> + [ __('quit'), \&quit_cmd, ],
> + [ __('help'), \&help_cmd, ],I don't know offhand. If the code to prompt and accept the command given by the user can take the translated word (or a prefix of it), theoretically I would say it could be made to work, but to me it is dubious the benefit outweighs its downsides. It would make teaching Git and troubleshooting over the phone harder, I would guess.
A: "Hi, I am in a 'git add -i' session." B: "Give 's' at the prompt." A: "My Git does not seem to take 's' as a valid command." B: "What? I've never seen that problem." ... back and forth wastes 10 minutes ... A: "By the way, I am running Git in Portuguese."
;-)