-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* git://repo.or.cz/git-gui: git-gui: incremental goto line in blame view git-gui: clear the goto line input when hiding git-gui: only accept numbers in the goto-line input git-gui: search and linenumber input are mutual exclusive in the blame view git-gui: deal with unknown files when pressing the "Stage Changed" button git-gui: drop the 'n' and 'Shift-n' bindings from the last patch. git-gui: Add keyboard shortcuts for search and goto commands in blame view. git-gui: Enable jumping to a specific line number in blame view. Fix tooltip display with multiple monitors on windows. Fix typo: existant->existent git-gui: updated translator README for current procedures. git-gui: warn when trying to commit on a detached head git-gui: Corrected a typo in the Swedish translation of 'Continue'
- Loading branch information
Showing
9 changed files
with
159 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# goto line number | ||
# based on code from gitk, Copyright (C) Paul Mackerras | ||
|
||
class linebar { | ||
|
||
field w | ||
field ctext | ||
|
||
field linenum {} | ||
|
||
constructor new {i_w i_text args} { | ||
global use_ttk NS | ||
set w $i_w | ||
set ctext $i_text | ||
|
||
${NS}::frame $w | ||
${NS}::label $w.l -text [mc "Goto Line:"] | ||
entry $w.ent \ | ||
-textvariable ${__this}::linenum \ | ||
-background lightgreen \ | ||
-validate key \ | ||
-validatecommand [cb _validate %P] | ||
${NS}::button $w.bn -text [mc Go] -command [cb _goto] | ||
|
||
pack $w.l -side left | ||
pack $w.bn -side right | ||
pack $w.ent -side left -expand 1 -fill x | ||
|
||
eval grid conf $w -sticky we $args | ||
grid remove $w | ||
|
||
trace add variable linenum write [cb _goto_cb] | ||
bind $w.ent <Return> [cb _goto] | ||
bind $w.ent <Escape> [cb hide] | ||
|
||
bind $w <Destroy> [list delete_this $this] | ||
return $this | ||
} | ||
|
||
method show {} { | ||
if {![visible $this]} { | ||
grid $w | ||
} | ||
focus -force $w.ent | ||
} | ||
|
||
method hide {} { | ||
if {[visible $this]} { | ||
$w.ent delete 0 end | ||
focus $ctext | ||
grid remove $w | ||
} | ||
} | ||
|
||
method visible {} { | ||
return [winfo ismapped $w] | ||
} | ||
|
||
method editor {} { | ||
return $w.ent | ||
} | ||
|
||
method _validate {P} { | ||
# only accept numbers as input | ||
string is integer $P | ||
} | ||
|
||
method _goto_cb {name ix op} { | ||
after idle [cb _goto 1] | ||
} | ||
|
||
method _goto {{nohide {0}}} { | ||
if {$linenum ne {}} { | ||
$ctext see $linenum.0 | ||
if {!$nohide} { | ||
hide $this | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,28 +18,23 @@ specialized so-called "po file editors" (e.g. emacs po-mode, KBabel, | |
poedit, GTranslator --- any of them would work well). Please install | ||
them. | ||
|
||
You would then need to clone the git-gui internationalization project | ||
repository, so that you can work on it: | ||
You would then need to clone the git-gui project repository and create | ||
a feature branch to begin working: | ||
|
||
$ git clone [email protected]:/srv/git/git-gui/git-gui-i18n.git/ | ||
$ cd git-gui-i18n | ||
$ git checkout --track -b mob origin/mob | ||
$ git config remote.origin.push mob | ||
$ git clone git://repo.or.cz/git-gui.git | ||
$ cd git-gui.git | ||
$ git checkout -b my-translation | ||
|
||
The "git checkout" command creates a 'mob' branch from upstream's | ||
corresponding branch and makes it your current branch. You will be | ||
working on this branch. | ||
|
||
The "git config" command records in your repository configuration file | ||
that you would push "mob" branch to the upstream when you say "git | ||
push". | ||
The "git checkout" command creates a new branch to keep your work | ||
isolated and to make it simple to post your patch series when | ||
completed. You will be working on this branch. | ||
|
||
|
||
2. Starting a new language. | ||
|
||
In the git-gui-i18n directory is a po/ subdirectory. It has a | ||
handful files whose names end with ".po". Is there a file that has | ||
messages in your language? | ||
In the git-gui directory is a po/ subdirectory. It has a handful of | ||
files whose names end with ".po". Is there a file that has messages | ||
in your language? | ||
|
||
If you do not know what your language should be named, you need to find | ||
it. This currently follows ISO 639-1 two letter codes: | ||
|
@@ -149,15 +144,18 @@ There is a trick to test your translation without first installing: | |
$ make | ||
$ LANG=af ./git-gui.sh | ||
|
||
When you are satisfied with your translation, commit your changes, and | ||
push it back to the 'mob' branch: | ||
When you are satisfied with your translation, commit your changes then submit | ||
your patch series to the maintainer and the Git mailing list: | ||
|
||
$ edit po/af.po | ||
... be sure to update Last-Translator: and | ||
... PO-Revision-Date: lines. | ||
$ git add po/af.po | ||
$ git commit -m 'Started Afrikaans translation.' | ||
$ git push | ||
$ git commit -s -m 'git-gui: added Afrikaans translation.' | ||
$ git send-email --to '[email protected]' \ | ||
--cc 'Pat Thoyts <[email protected]>' \ | ||
--subject 'git-gui: Afrikaans translation' \ | ||
master.. | ||
|
||
|
||
3. Updating your translation. | ||
|
@@ -169,6 +167,7 @@ itself was updated and there are new messages that need translation. | |
|
||
In any case, make sure you are up-to-date before starting your work: | ||
|
||
$ git checkout master | ||
$ git pull | ||
|
||
In the former case, you will edit po/af.po (again, replace "af" with | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters