Re: [PATCH v2 02/11] i18n: add--interactive: mark simple here documents for translation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A Dom, 25-09-2016 às 15:54 -0700, Junio C Hamano escreveu:
> >  sub status_cmd {
> > @@ -1573,14 +1573,14 @@ sub quit_cmd {
> >  }
> >  
> >  sub help_cmd {
> > -     print colored $help_color, <<\EOF ;
> > -status        - show paths with changes
> > +     print colored $help_color, __(
> > +"status        - show paths with changes
> >  update        - add working tree state to the staged set of
> changes
> >  revert        - revert staged set of changes back to the HEAD
> version
> >  patch         - pick hunks and update selectively
> >  diff       - view diff between HEAD and index
> > -add untracked - add contents of untracked files to the staged set
> of changes
> > -EOF
> > +add untracked - add contents of untracked files to the staged set
> of changes"),
> > +"\n";
> >  }
> 
> Do we need TRANSLATORS: comment to all of the above not to touch the
> command words that are explained and translate only the explanation?

Yes, it is better to have that comment.

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, ],



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]