Re: [PATCH] git-gui: add some strings to translation

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

 



Michele Ballabio <barra_cuda@xxxxxxxxxxxx> wrote:
> I've added to translation some strings of the blame module,
> and I've changed this string:
> 
> -		"Loading$cur_s annotations..." \
> +		[mc "Loading annotations:%s..." $cur_s] \
> 
> The purpose is to make translator's life easier, but
> if I'm completely wrong, well, you know what to do.
> 
> Anyway, this patch should be read by an actual tcl speaker
> before applying. :)

Thanks.  A couple of items that I think should be changed before
this is applied to master:j
 
> diff --git a/lib/blame.tcl b/lib/blame.tcl
> index 352aa19..d3581ac 100644
> --- a/lib/blame.tcl
> +++ b/lib/blame.tcl
> @@ -470,7 +470,7 @@ method _read_file {fd jump} {
>  
>  		_exec_blame $this $w_asim @asim_data \
>  			[list] \
> -			{ copy/move tracking}
> +			[mc " copy/move tracking"]
>  	}
>  } ifdeleted { catch {close $fd} }
>  
> @@ -489,8 +489,8 @@ method _exec_blame {cur_w cur_d options cur_s} {
>  	set blame_lines 0
>  
>  	$status start \
> -		"Loading$cur_s annotations..." \
> -		{lines annotated}
> +		[mc "Loading annotations:%s..." $cur_s] \
> +		[mc "lines annotated"]
>  }
>  method _read_blame {fd cur_w cur_d} {
> @@ -671,10 +671,10 @@ method _read_blame {fd cur_w cur_d} {
>  		if {$cur_w eq $w_asim} {
>  			_exec_blame $this $w_amov @amov_data \
>  				$original_options \
> -				{ original location}
> +				[mc " original location"]
>  		} else {
>  			set current_fd {}
> -			$status stop {Annotation complete.}
> +			$status stop [mc "Annotation complete."]
>  		}
>  	} else {
>  		$status update $blame_lines $total_lines

The way these three hunks work is they create two different messages
that are supposed to say:

	Loading copy/move tracking annotations...
	Loading original location annotations...

With your changes above they now read:

	Loading annotations: copy/move tracking...
	Loading annotations: original location...

I think this doesn't read very well in English and I would not be
surprised if translators found it also awkward to read in other
languages.  We probably should just break down and make these two
completely different strings so they can be translated independently
of each other.
  
> @@ -784,16 +784,16 @@ method _showcommit {cur_w lno} {
>  		}
>  
>  		$w_cviewer insert end "commit $cmit\n" header_key
> -		$w_cviewer insert end "Author:\t" header_key
> +		$w_cviewer insert end [mc "Author:\t"] header_key
>  		$w_cviewer insert end "$author_name $author_email" header_val
>  		$w_cviewer insert end "  $author_time\n" header_val

The formatting character of \t (and \n in a few other hunks later
on in the file) shouldn't be part of the translation.  The fact
that git-gui uses a tab or an LF here to position text for display
is not of concern to the translator when they are supplying their
translation.

So the change here probably should be more like:

-		$w_cviewer insert end "Author:\t" header_key
+		$w_cviewer insert end [append [mc "Author:"] "\t"] header_key

> -			$tooltip_t insert end "In File: " section_header
> +			$tooltip_t insert end [mc "In File: "] section_header

Likewise I don't think the trailing space should be of concern to
the translator.

The rest of the patch looks good.

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

  Powered by Linux