From: "Shawn O. Pearce" <spearce@spearce•org>
To: Christian Stimming <stimming@tuhh•de>
Cc: Brett Schwarz <brett_schwarz@yahoo•com>,
git@vger•kernel.org, Paul Mackerras <paulus@samba•org>
Subject: Re: [PATCH 2/5] Internationalization of git-gui
Date: Sun, 22 Jul 2007 03:45:25 -0400 [thread overview]
Message-ID: <20070722074525.GX32566@spearce.org> (raw)
In-Reply-To: <200707211434.56622.stimming@tuhh.de>
Christian Stimming <stimming@tuhh•de> wrote:
> Subject: [PATCH] Mark strings for translation.
>
> The procedure [mc ...] will translate the strings through msgcat.
...
> Here I marked much more strings than in the previous patch, and as discussed
> the procedure [mc ...] is used for translation. Actually I think this pretty much
> caught all occurrences of user-visible strings in *this* file; there will be many
> more strings in all the other files, of course.
Almost. I noticed two that you did miss, and its because they are
totally weird. We may want to rewrite this block of code first...
> @@ -1673,7 +1673,7 @@ if {[is_enabled transport]} {
> menu .mbar.repository
>
> .mbar.repository add command \
> - -label {Browse Current Branch's Files} \
> + -label [mc "Browse Current Branch's Files"] \
> -command {browser::new $current_branch}
> trace add variable current_branch write ".mbar.repository entryconf [.mbar.repository index last] -label \"Browse \$current_branch's Files\" ;#"
> .mbar.repository add command \
> @@ -1682,69 +1682,69 @@ trace add variable current_branch write ".mbar.repository entryconf [.mbar.repos
> .mbar.repository add separator
>
> .mbar.repository add command \
> - -label {Visualize Current Branch's History} \
> + -label [mc "Visualize Current Branch's History"] \
> -command {do_gitk $current_branch}
> trace add variable current_branch write ".mbar.repository entryconf [.mbar.repository index last] -label \"Visualize \$current_branch's History\" ;#"
> .mbar.repository add command \
See those two trace lines? These things are setting up hooks to
change the menu item's label on the fly, so that the current branch
name is shown in the item label. These will also need to use mc to
translate the string. But they are in a double quoted string and will
be eval'd later by Tcl, so we actually need something like:
- trace add variable current_branch write ".mbar.repository entryconf [.mbar.repository index last] -label \"Visualize \$current_branch's History\" ;#"
+ trace add variable current_branch write ".mbar.repository entryconf [.mbar.repository index last] -label \[mc \"Visualize \$current_branch's History\"\] ;#"
These are (I think) the only two places in all of git-gui where
this wierdness happens. Converting this trace pair to a normal
procedure may make it easier to manage for translation.
> - .mbar.apple add command -label "About [appname]" \
> + .mbar.apple add command -label [mc "About %s" appname] \
Bug. This needs to be:
+ .mbar.apple add command -label [mc "About %s" [appname]] \
You lost one level of [] there when you did the replacement.
I only noticed this during a fast scan through while deleting text.
I'll have to reread this patch more carefully later, before I apply
(or merge) it, to make sure we don't have more such cases.
--
Shawn.
next prev parent reply other threads:[~2007-07-22 7:45 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-19 17:33 [PATCH] Internationalization of git-gui Brett Schwarz
2007-07-20 5:04 ` Shawn O. Pearce
2007-07-20 8:56 ` Christian Stimming
2007-07-21 2:17 ` Shawn O. Pearce
2007-07-21 7:50 ` Christian Stimming
2007-07-21 8:03 ` Shawn O. Pearce
2007-07-21 12:33 ` [PATCH 1/5] " Christian Stimming
2007-07-21 12:34 ` [PATCH 2/5] " Christian Stimming
2007-07-21 12:36 ` [PATCH 3/5] " Christian Stimming
2007-07-21 12:37 ` Christian Stimming
2007-07-21 12:41 ` [PATCH 5/5] " Christian Stimming
2007-07-21 13:46 ` [PATCH 3/5] " David Kastrup
2007-07-21 16:27 ` Simon 'corecode' Schubert
2007-07-21 17:41 ` David Kastrup
2007-07-21 18:50 ` Translation process (was: [PATCH 3/5] Internationalization of git-gui) Christian Stimming
2007-07-21 19:27 ` German translations " Christian Stimming
2007-07-21 19:57 ` German translations David Kastrup
2007-07-22 13:16 ` Christian Stimming
2007-07-22 14:52 ` Edgar Toernig
2007-07-23 19:20 ` Christian Stimming
2007-07-21 20:09 ` David Kastrup
2007-07-22 7:47 ` [PATCH 3/5] Internationalization of git-gui Shawn O. Pearce
2007-07-22 8:05 ` Junio C Hamano
2007-07-22 12:16 ` Christian Stimming
2007-07-22 12:44 ` Johannes Schindelin
2007-07-22 12:57 ` Christian Stimming
2007-07-22 13:06 ` Johannes Schindelin
2007-07-22 7:45 ` Shawn O. Pearce [this message]
2007-07-22 12:24 ` [PATCH 2/5] " Christian Stimming
2007-07-21 14:22 ` [PATCH 1/5] " Johannes Schindelin
2007-07-21 19:41 ` Junio C Hamano
2007-07-21 19:50 ` Christian Stimming
2007-07-21 21:20 ` Johannes Schindelin
2007-07-21 21:28 ` Junio C Hamano
2007-07-21 21:35 ` Johannes Schindelin
2007-07-22 13:35 ` Christian Stimming
2007-07-22 14:29 ` Johannes Schindelin
2007-07-23 20:16 ` [PATCH] Add glossary that can be converted into a po file for each language Christian Stimming
2007-07-24 1:48 ` Junio C Hamano
2007-07-24 6:56 ` Junio C Hamano
2007-07-24 9:34 ` Christian Stimming
2007-07-21 21:12 ` [PATCH 1/5] Internationalization of git-gui Johannes Schindelin
2007-07-21 22:36 ` Junio C Hamano
2007-07-21 23:01 ` Johannes Schindelin
2007-07-22 7:38 ` Shawn O. Pearce
2007-07-23 19:23 ` Christian Stimming
2007-07-24 14:57 ` Shawn O. Pearce
2007-07-20 9:03 ` [PATCH] " Christian Stimming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070722074525.GX32566@spearce.org \
--to=spearce@spearce$(echo .)org \
--cc=brett_schwarz@yahoo$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=paulus@samba$(echo .)org \
--cc=stimming@tuhh$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox