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

Re: [GIT GUI l18n 1/2] git-gui: Mark 'All' in remote.tcl for translation

From
Pat Thoyts <patthoyts@users.sourceforge.net>
Date
Oct 14, 2016, 00:46 UTC
Message-ID
<87a8e73ggb.fsf@red.patthoyts.tk>
In-Reply-To
<20161013184349.42950-1-ash@kambanaria.org>
Alexander Shopov <ash@kambanaria.org> writes:
Show 24 quoted lines
>Signed-off-by: Alexander Shopov <ash@kambanaria.org>
>---
> lib/remote.tcl | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/lib/remote.tcl b/lib/remote.tcl
>index 4e5c784..26af8ae 100644
>--- a/lib/remote.tcl
>+++ b/lib/remote.tcl
>@@ -250,12 +250,12 @@ proc update_all_remotes_menu_entry {} {
> 
> 			$fetch_m insert end separator
> 			$fetch_m insert end command \
>-				-label "All" \
>+			    -label [mc "All"] \
> 				-command fetch_from_all
> 
> 			$prune_m insert end separator
> 			$prune_m insert end command \
>-				-label "All" \
>+			    -label [mc "All" ]\
> 				-command prune_from_all
> 		}
> 	} else {

OK - this looks fine except the line just above compares the text of this entry so also needs [mc] adding. I've applied it as:

-- a/lib/remote.tcl
+++ b/lib/remote.tcl
@@ -246,22 +246,22 @@ proc update_all_remotes_menu_entry {} {
        if {$have_remote > 1} {
                make_sure_remote_submenues_exist $remote_m
                if {[$fetch_m type end] eq "command" \
-                       && [$fetch_m entrycget end -label] ne "All"} {
+                               && [$fetch_m entrycget end -label] ne [mc "All"]} {
 
                        $fetch_m insert end separator
                        $fetch_m insert end command \
-                               -label "All" \
+                               -label [mc "All"] \
                                -command fetch_from_all
 
                        $prune_m insert end separator
                        $prune_m insert end command \
-                               -label "All" \
+                               -label [mc "All"] \
                                -command prune_from_all
                }
        } else {
                if {[winfo exists $fetch_m]} {
                        if {[$fetch_m type end] eq "command" \
-                               && [$fetch_m entrycget end -label] eq "All"} {
+                                       && [$fetch_m entrycget end -label] eq [mc "All"]} {
 
                                delete_from_menu $fetch_m end
                                delete_from_menu $fetch_m end
-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
Previous: Alexander Shopov
Message 2 of 2 in “[GIT GUI l18n 1/2] git-gui: Mark 'All' in remote.tcl for translation”
  1. Alexander ShopovOct 13, 2016
  2. Pat ThoytsOct 14, 2016

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.