commands/untrack: make strings translatable
This commit is contained in:
parent
4a7beac307
commit
ff0f378778
@ -6,6 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/git-lfs/git-lfs/v3/tr"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,7 +18,7 @@ func untrackCommand(cmd *cobra.Command, args []string) {
|
|||||||
installHooks(false)
|
installHooks(false)
|
||||||
|
|
||||||
if len(args) < 1 {
|
if len(args) < 1 {
|
||||||
Print("git lfs untrack <path> [path]*")
|
Print(tr.Tr.Get("git lfs untrack <path> [path]*"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +31,7 @@ func untrackCommand(cmd *cobra.Command, args []string) {
|
|||||||
|
|
||||||
attributesFile, err := os.Create(".gitattributes")
|
attributesFile, err := os.Create(".gitattributes")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Print("Error opening .gitattributes for writing")
|
Print(tr.Tr.Get("Error opening .gitattributes for writing"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer attributesFile.Close()
|
defer attributesFile.Close()
|
||||||
@ -48,7 +49,7 @@ func untrackCommand(cmd *cobra.Command, args []string) {
|
|||||||
|
|
||||||
path := strings.Fields(line)[0]
|
path := strings.Fields(line)[0]
|
||||||
if removePath(path, args) {
|
if removePath(path, args) {
|
||||||
Print("Untracking %q", unescapeAttrPattern(path))
|
Print(tr.Tr.Get("Untracking %q", unescapeAttrPattern(path)))
|
||||||
} else {
|
} else {
|
||||||
attributesFile.WriteString(line + "\n")
|
attributesFile.WriteString(line + "\n")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user