more translation formatting
parent
7b219ebb46
commit
97ba8854a6
|
@ -28,7 +28,7 @@ var addonsDisableCmd = &cobra.Command{
|
|||
Long: "Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list ",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if len(args) != 1 {
|
||||
exit.Usage("usage: minikube addons disable ADDON_NAME")
|
||||
exit.UsageT("usage: minikube addons disable ADDON_NAME")
|
||||
}
|
||||
|
||||
addon := args[0]
|
||||
|
|
|
@ -36,12 +36,12 @@ var ProfileCmd = &cobra.Command{
|
|||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if len(args) == 0 {
|
||||
profile := viper.GetString(pkgConfig.MachineProfile)
|
||||
console.OutLn(profile)
|
||||
console.OutT(console.Empty, profile)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if len(args) > 1 {
|
||||
exit.Usage("usage: minikube profile [MINIKUBE_PROFILE_NAME]")
|
||||
exit.UsageT("usage: minikube profile [MINIKUBE_PROFILE_NAME]")
|
||||
}
|
||||
|
||||
profile := args[0]
|
||||
|
|
|
@ -47,7 +47,7 @@ associated files.`,
|
|||
// runDelete handles the executes the flow of "minikube delete"
|
||||
func runDelete(cmd *cobra.Command, args []string) {
|
||||
if len(args) > 0 {
|
||||
exit.Usage("usage: minikube delete")
|
||||
exit.UsageT("usage: minikube delete")
|
||||
}
|
||||
profile := viper.GetString(pkg_config.MachineProfile)
|
||||
api, err := machine.NewAPIClient()
|
||||
|
@ -76,7 +76,7 @@ func runDelete(cmd *cobra.Command, args []string) {
|
|||
}
|
||||
|
||||
if err := cmdUtil.KillMountProcess(); err != nil {
|
||||
console.Fatal("Failed to kill mount process: %v", err)
|
||||
console.FatalT("Failed to kill mount process: {{.error}}", console.Arg{"error": err})
|
||||
}
|
||||
|
||||
if err := os.RemoveAll(constants.GetProfilePath(viper.GetString(pkg_config.MachineProfile))); err != nil {
|
||||
|
|
|
@ -51,7 +51,7 @@ var ipCmd = &cobra.Command{
|
|||
if err != nil {
|
||||
exit.WithError("Error getting IP", err)
|
||||
}
|
||||
console.OutLn(ip)
|
||||
console.OutT(console.Empty, ip)
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ func runStart(cmd *cobra.Command, args []string) {
|
|||
bootstrapCluster(bs, cr, mRunner, config.KubernetesConfig, preExists, isUpgrade)
|
||||
configureMounts()
|
||||
if err = loadCachedImagesInConfigFile(); err != nil {
|
||||
console.Failure("Unable to load cached images from config file.")
|
||||
console.OutT(console.FailureType, "Unable to load cached images from config file.")
|
||||
}
|
||||
// special ops for none driver, like change minikube directory.
|
||||
prepareNone(viper.GetString(vmDriver))
|
||||
|
@ -275,7 +275,7 @@ func handleDownloadOnly(cacheGroup *errgroup.Group, k8sVersion string) {
|
|||
if err := CacheImagesInConfigFile(); err != nil {
|
||||
exit.WithError("Failed to cache images", err)
|
||||
}
|
||||
console.OutStyle(console.Check, "Download complete!")
|
||||
console.OutT(console.Check, "Download complete!")
|
||||
os.Exit(0)
|
||||
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ func showKubectlConnectInfo(kubeconfig *pkgutil.KubeConfigSetup) {
|
|||
}
|
||||
_, err := exec.LookPath("kubectl")
|
||||
if err != nil {
|
||||
console.OutStyle(console.Tip, "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/")
|
||||
console.OutT(console.Tip, "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -465,7 +465,7 @@ func validateRegistryMirror() {
|
|||
glog.Errorln("Error Parsing URL: ", err)
|
||||
}
|
||||
if (URL.Scheme != "http" && URL.Scheme != "https") || URL.Path != "" {
|
||||
exit.Usage("Sorry, url provided with --registry-mirror flag is invalid {{.url}}", console.Arg{"url": loc})
|
||||
exit.UsageT("Sorry, url provided with --registry-mirror flag is invalid {{.url}}", console.Arg{"url": loc})
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -620,25 +620,25 @@ func prepareNone(vmDriver string) {
|
|||
if vmDriver != constants.DriverNone {
|
||||
return
|
||||
}
|
||||
console.OutStyle(console.StartingNone, "Configuring local host environment ...")
|
||||
console.OutT(console.StartingNone, "Configuring local host environment ...")
|
||||
if viper.GetBool(cfg.WantNoneDriverWarning) {
|
||||
console.OutLn("")
|
||||
console.Warning("The 'none' driver provides limited isolation and may reduce system security and reliability.")
|
||||
console.Warning("For more information, see:")
|
||||
console.OutStyle(console.URL, "https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md")
|
||||
console.OutLn("")
|
||||
console.OutT(console.Empty, "")
|
||||
console.WarningT("The 'none' driver provides limited isolation and may reduce system security and reliability.")
|
||||
console.WarningT("For more information, see:")
|
||||
console.OutT(console.URL, "https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md")
|
||||
console.OutT(console.Empty, "")
|
||||
}
|
||||
|
||||
if os.Getenv("CHANGE_MINIKUBE_NONE_USER") == "" {
|
||||
home := os.Getenv("HOME")
|
||||
console.WarningT("kubectl and minikube configuration will be stored in {{.home_folder}}", console.Arg{"home_folder": home})
|
||||
console.Warning("To use kubectl or minikube commands as your own user, you may")
|
||||
console.Warning("need to relocate them. For example, to overwrite your own settings:")
|
||||
console.WarningT("To use kubectl or minikube commands as your own user, you may")
|
||||
console.WarningT("need to relocate them. For example, to overwrite your own settings:")
|
||||
|
||||
console.OutLn("")
|
||||
console.OutT(console.Empty, "")
|
||||
console.OutT(console.Command, "sudo mv {{.home_folder}}/.kube {{.home_folder}}/.minikube $HOME", console.Arg{"home_folder": home})
|
||||
console.OutT(console.Command, "sudo chown -R $USER $HOME/.kube $HOME/.minikube")
|
||||
console.OutLn("")
|
||||
console.OutT(console.Empty, "")
|
||||
|
||||
console.OutT(console.Tip, "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true")
|
||||
}
|
||||
|
@ -806,7 +806,7 @@ func bootstrapCluster(bs bootstrapper.Bootstrapper, r cruntime.Manager, runner c
|
|||
bsName := viper.GetString(cmdcfg.Bootstrapper)
|
||||
|
||||
if isUpgrade || !preexisting {
|
||||
console.OutStyle(console.Pulling, "Pulling images ...")
|
||||
console.OutT(console.Pulling, "Pulling images ...")
|
||||
if err := bs.PullImages(kc); err != nil {
|
||||
console.OutT(console.FailureType, "Unable to pull images, which may be OK: {{.error}}", console.Arg{"error": err})
|
||||
}
|
||||
|
@ -820,7 +820,7 @@ func bootstrapCluster(bs bootstrapper.Bootstrapper, r cruntime.Manager, runner c
|
|||
return
|
||||
}
|
||||
|
||||
console.OutStyle(console.Launch, "Launching Kubernetes ... ")
|
||||
console.OutT(console.Launch, "Launching Kubernetes ... ")
|
||||
if err := bs.StartCluster(kc); err != nil {
|
||||
exit.WithLogEntries("Error starting cluster", err, logs.FindProblems(r, bs, runner))
|
||||
}
|
||||
|
|
|
@ -103,12 +103,12 @@ func StartHost(api libmachine.API, config cfg.MachineConfig) (*host.Host, error)
|
|||
}
|
||||
|
||||
if h.Driver.DriverName() != config.VMDriver {
|
||||
console.Out("\n")
|
||||
console.OutT(console.Empty, "\n")
|
||||
console.WarningT(`Ignoring --vm-driver={{.driver_name}}, as the existing "{{.profile_name}}" VM was created using the {{.driver_name2}} driver.`,
|
||||
console.Arg{"driver_name": config.VMDriver, "profile_name": cfg.GetMachineName(), "driver_name2": h.Driver.DriverName()})
|
||||
console.WarningT("To switch drivers, you may create a new VM using `minikube start -p <name> --vm-driver={{.driver_name}}`", console.Arg{"driver_name": config.VMDriver})
|
||||
console.WarningT("Alternatively, you may delete the existing VM using `minikube delete -p {{.profile_name}}`", console.Arg{"profile_name": cfg.GetMachineName()})
|
||||
console.Out("\n")
|
||||
console.OutT(console.Empty, "\n")
|
||||
} else if exists && cfg.GetMachineName() == constants.DefaultMachineName {
|
||||
console.OutT(console.Tip, "Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.")
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ func StartHost(api libmachine.API, config cfg.MachineConfig) (*host.Host, error)
|
|||
// configureHost handles any post-powerup configuration required
|
||||
func configureHost(h *host.Host, e *engine.Options) error {
|
||||
// Slightly counter-intuitive, but this is what DetectProvisioner & ConfigureAuth block on.
|
||||
console.OutT(console.Waiting, "Waiting for SSH access ...")
|
||||
console.OutT(console.Waiting, "Waiting for SSH access ...", console.Arg{})
|
||||
|
||||
if len(e.Env) > 0 {
|
||||
h.HostOptions.EngineOptions.Env = e.Env
|
||||
|
@ -535,6 +535,6 @@ func EnsureMinikubeRunningOrExit(api libmachine.API, exitStatus int) {
|
|||
exit.WithError("Error getting machine status", err)
|
||||
}
|
||||
if s != state.Running.String() {
|
||||
exit.WithCode(exit.Unavailable, "minikube is not running, so the service cannot be accessed")
|
||||
exit.WithCodeT(exit.Unavailable, "minikube is not running, so the service cannot be accessed")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -292,7 +292,7 @@ func WaitAndMaybeOpenService(api libmachine.API, namespace string, service strin
|
|||
urlString, isHTTPSchemedURL := OptionallyHTTPSFormattedURLString(bareURLString, https)
|
||||
|
||||
if urlMode || !isHTTPSchemedURL {
|
||||
console.OutLn(urlString)
|
||||
console.OutT(console.Empty, urlString)
|
||||
} else {
|
||||
console.OutT(console.Celebrate, "Opening kubernetes service {{.namespace_name}}/{{.service_name}} in default browser...", console.Arg{"namespace_name": namespace, "service_name": service})
|
||||
if err := browser.OpenURL(urlString); err != nil {
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
"Failed to get image map": "",
|
||||
"Failed to get machine client": "",
|
||||
"Failed to get service URL: %v": "",
|
||||
"Failed to kill mount process: %v": "",
|
||||
"Failed to kill mount process: {{.error}}": "",
|
||||
"Failed to list cached images": "",
|
||||
"Failed to remove profile": "",
|
||||
"Failed to save config": "",
|
||||
|
@ -240,6 +240,7 @@
|
|||
"You must specify a service name": "",
|
||||
"Your host does not support KVM virtualization. Ensure that qemu-kvm is installed, and run 'virt-host-validate' to debug the problem": "",
|
||||
"Your host is failing to route packets to the minikube VM. If you have VPN software, try turning it off or configuring it so that it does not re-route traffic to the VM IP. If not, check your VM environment routing options.": "",
|
||||
"\\n": "",
|
||||
"addon '%s' is currently not enabled.\nTo enable this addon run:\nminikube addons enable %s": "",
|
||||
"addon '%s' is not a valid addon packaged with minikube.\nTo see the list of available addons run:\nminikube addons list": "",
|
||||
"addon list failed": "",
|
||||
|
@ -257,6 +258,7 @@
|
|||
"error parsing the input ip address for mount": "",
|
||||
"error starting tunnel": "",
|
||||
"failed to open browser: %v": "",
|
||||
"kube-system": "",
|
||||
"kubectl and minikube configuration will be stored in {{.home_folder}}": "",
|
||||
"kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "",
|
||||
"kubectl proxy": "",
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
"Failed to get image map": "",
|
||||
"Failed to get machine client": "",
|
||||
"Failed to get service URL: %v": "",
|
||||
"Failed to kill mount process: %v": "",
|
||||
"Failed to kill mount process: {{.error}}": "",
|
||||
"Failed to list cached images": "",
|
||||
"Failed to remove profile": "",
|
||||
"Failed to save config": "",
|
||||
|
@ -240,6 +240,7 @@
|
|||
"You must specify a service name": "",
|
||||
"Your host does not support KVM virtualization. Ensure that qemu-kvm is installed, and run 'virt-host-validate' to debug the problem": "",
|
||||
"Your host is failing to route packets to the minikube VM. If you have VPN software, try turning it off or configuring it so that it does not re-route traffic to the VM IP. If not, check your VM environment routing options.": "",
|
||||
"\\n": "",
|
||||
"addon '%s' is currently not enabled.\nTo enable this addon run:\nminikube addons enable %s": "",
|
||||
"addon '%s' is not a valid addon packaged with minikube.\nTo see the list of available addons run:\nminikube addons list": "",
|
||||
"addon list failed": "",
|
||||
|
@ -257,6 +258,7 @@
|
|||
"error parsing the input ip address for mount": "",
|
||||
"error starting tunnel": "",
|
||||
"failed to open browser: %v": "",
|
||||
"kube-system": "",
|
||||
"kubectl and minikube configuration will be stored in {{.home_folder}}": "",
|
||||
"kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "",
|
||||
"kubectl proxy": "",
|
||||
|
|
Loading…
Reference in New Issue