diff --git a/cmd/minikube/cmd/completion.go b/cmd/minikube/cmd/completion.go index eb697b8834..5d05d3faad 100644 --- a/cmd/minikube/cmd/completion.go +++ b/cmd/minikube/cmd/completion.go @@ -23,6 +23,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" + "k8s.io/minikube/pkg/minikube/console" "k8s.io/minikube/pkg/minikube/exit" ) @@ -69,10 +70,10 @@ var completionCmd = &cobra.Command{ Long: longDescription, Run: func(cmd *cobra.Command, args []string) { if len(args) != 1 { - exit.Usage("Usage: minikube completion SHELL") + exit.UsageT("Usage: minikube completion SHELL") } if args[0] != "bash" && args[0] != "zsh" { - exit.Usage("Sorry, completion support is not yet implemented for %q", args[0]) + exit.UsageT("Sorry, completion support is not yet implemented for {{.name}}", console.Arg{"name": args[0]}) } else if args[0] == "bash" { err := GenerateBashCompletion(os.Stdout, cmd.Parent()) if err != nil { diff --git a/cmd/minikube/cmd/config/enable.go b/cmd/minikube/cmd/config/enable.go index 012bb9a5a1..1896821749 100644 --- a/cmd/minikube/cmd/config/enable.go +++ b/cmd/minikube/cmd/config/enable.go @@ -34,10 +34,9 @@ var addonsEnableCmd = &cobra.Command{ addon := args[0] err := Set(addon, "true") if err != nil { - console.Fatal("enable failed: %v", err) - } else { - console.Success("%s was successfully enabled", addon) + exit.WithError("enable failed", err) } + console.SuccessT("{{.addonName}} was successfully enabled", console.Arg{"addonName": addon}) }, } diff --git a/cmd/minikube/cmd/config/util.go b/cmd/minikube/cmd/config/util.go index 4b082bf2d6..2aa15c7ff3 100644 --- a/cmd/minikube/cmd/config/util.go +++ b/cmd/minikube/cmd/config/util.go @@ -130,7 +130,7 @@ func EnableOrDisableAddon(name string, val string) error { cfg, err := config.Load() if err != nil && !os.IsNotExist(err) { - exit.WithCode(exit.Data, "Unable to load config: %v", err) + exit.WithCodeT(exit.Data, "Unable to load config: {{.error}}", console.Arg{"error": err}) } data := assets.GenerateTemplateData(cfg.KubernetesConfig) @@ -158,7 +158,7 @@ func enableOrDisableAddonInternal(addon *assets.Addon, cmd command.Runner, data var err error // check addon status before enabling/disabling it if err := isAddonAlreadySet(addon, enable); err != nil { - console.ErrStyle(console.Conflict, "%v", err) + console.ErrT(console.Conflict, "{{.error}}", console.Arg{"error": err}) os.Exit(0) } diff --git a/cmd/minikube/cmd/dashboard.go b/cmd/minikube/cmd/dashboard.go index 4d48264108..2a04d8201c 100644 --- a/cmd/minikube/cmd/dashboard.go +++ b/cmd/minikube/cmd/dashboard.go @@ -58,7 +58,7 @@ var dashboardCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { cc, err := pkg_config.Load() if err != nil && !os.IsNotExist(err) { - console.ErrLn("Error loading profile config: %v", err) + exit.WithError("Error loading profile config", err) } api, err := machine.NewAPIClient() @@ -76,8 +76,7 @@ var dashboardCmd = &cobra.Command{ if _, err = api.Load(pkg_config.GetMachineName()); err != nil { switch err := errors.Cause(err).(type) { case mcnerror.ErrHostDoesNotExist: - console.OutStyle(console.Meh, "%q cluster does not exist", pkg_config.GetMachineName()) - os.Exit(exit.Unavailable) + exit.WithCodeT(exit.Unavailable, "{{.name}} cluster does not exist", console.Arg{"name": pkg_config.GetMachineName()}) default: exit.WithError("Error getting cluster", err) } @@ -100,7 +99,7 @@ var dashboardCmd = &cobra.Command{ dashboardStatus, _ := dashboardAddon.IsEnabled() if !dashboardStatus { // Send status messages to stderr for folks re-using this output. - console.ErrStyle(console.Enabling, "Enabling dashboard ...") + console.ErrT(console.Enabling, "Enabling dashboard ...") // Enable the dashboard add-on err = configcmd.Set("dashboard", "true") if err != nil { @@ -110,29 +109,29 @@ var dashboardCmd = &cobra.Command{ ns := "kube-system" svc := "kubernetes-dashboard" - console.ErrStyle(console.Verifying, "Verifying dashboard health ...") + console.ErrT(console.Verifying, "Verifying dashboard health ...") if err = util.RetryAfter(180, func() error { return service.CheckService(ns, svc) }, 1*time.Second); err != nil { - exit.WithCode(exit.Unavailable, "%s:%s is not running: %v", ns, svc, err) + exit.WithCodeT(exit.Unavailable, "dashboard service is not running: {{.error}}", console.Arg{"error": err}) } - console.ErrStyle(console.Launch, "Launching proxy ...") + console.ErrT(console.Launch, "Launching proxy ...") p, hostPort, err := kubectlProxy(kubectl) if err != nil { exit.WithError("kubectl proxy", err) } url := dashboardURL(hostPort, ns, svc) - console.ErrStyle(console.Verifying, "Verifying proxy health ...") + console.ErrT(console.Verifying, "Verifying proxy health ...") if err = util.RetryAfter(60, func() error { return checkURL(url) }, 1*time.Second); err != nil { - exit.WithCode(exit.Unavailable, "%s is not responding properly: %v", url, err) + exit.WithCodeT(exit.Unavailable, "{{.url}} is not accessible: {{.error}}", console.Arg{"url": url, "error": err}) } if dashboardURLMode { console.OutLn(url) } else { - console.ErrStyle(console.Celebrate, "Opening %s in your default browser...", url) + console.ErrT(console.Celebrate, "Opening %s in your default browser...", console.Arg{"url": url}) if err = browser.OpenURL(url); err != nil { - console.Failure("failed to open browser: %v", err) + exit.WithCodeT(exit.Software, "failed to open browser: {{.error}}", console.Arg{"error": err}) } } diff --git a/cmd/minikube/cmd/mount.go b/cmd/minikube/cmd/mount.go index a91d38a266..6135e0ccc4 100644 --- a/cmd/minikube/cmd/mount.go +++ b/cmd/minikube/cmd/mount.go @@ -17,6 +17,7 @@ limitations under the License. package cmd import ( + "fmt" "net" "os" "os/signal" @@ -74,19 +75,19 @@ var mountCmd = &cobra.Command{ mountString := args[0] idx := strings.LastIndex(mountString, ":") if idx == -1 { // no ":" was present - exit.Usage(`mount argument %q must be in form: :`, mountString) + exit.UsageT(`mount argument "{{.value}}" must be in form: :`, console.Arg{"value": mountString}) } hostPath := mountString[:idx] vmPath := mountString[idx+1:] if _, err := os.Stat(hostPath); err != nil { if os.IsNotExist(err) { - exit.WithCode(exit.NoInput, "Cannot find directory %s for mount", hostPath) + exit.WithCodeT(exit.NoInput, "Cannot find directory {{.path}} for mount", console.Arg{"path": hostPath}) } else { exit.WithError("stat failed", err) } } if len(vmPath) == 0 || !strings.HasPrefix(vmPath, "/") { - exit.Usage("Target directory %q must be an absolute path", vmPath) + exit.UsageT("Target directory {{.path}} must be an absolute path", console.Arg{"path": vmPath}) } var debugVal int if glog.V(1) { @@ -142,29 +143,27 @@ var mountCmd = &cobra.Command{ cfg.Options[parts[0]] = parts[1] } - console.OutStyle(console.Mounting, "Mounting host path %s into VM as %s ...", hostPath, vmPath) - console.OutStyle(console.MountOptions, "Mount options:") - console.OutStyle(console.Option, "Type: %s", cfg.Type) - console.OutStyle(console.Option, "UID: %s", cfg.UID) - console.OutStyle(console.Option, "GID: %s", cfg.GID) - console.OutStyle(console.Option, "Version: %s", cfg.Version) - console.OutStyle(console.Option, "MSize: %d", cfg.MSize) - console.OutStyle(console.Option, "Mode: %o (%s)", cfg.Mode, cfg.Mode) - console.OutStyle(console.Option, "Options: %s", cfg.Options) + console.OutT(console.Mounting, "Mounting host path {{.sourcePath}} into VM as {{.destinationPath}} ...", console.Arg{"sourcePath": hostPath, "destinationPath": vmPath}) + console.OutT(console.Option, "Mount type: {{.name}}", console.Arg{"type": cfg.Type}) + console.OutT(console.Option, "User ID: {{.userID}}", console.Arg{"userID": cfg.UID}) + console.OutT(console.Option, "Group ID: {{.groupID}}", console.Arg{"groupID": cfg.GID}) + console.OutT(console.Option, "Version: {{.version}}", console.Arg{"version": cfg.Version}) + console.OutT(console.Option, "Message Size: {{.size}}", console.Arg{"size": cfg.MSize}) + console.OutT(console.Option, "Permissions: {{.octalMode}} ({{.writtenMode}})", console.Arg{"octalMode": fmt.Sprintf("%o", cfg.Mode), "writtenMode": cfg.Mode}) + console.OutT(console.Option, "Options: {{.options}}", console.Arg{"options": cfg.Options}) // An escape valve to allow future hackers to try NFS, VirtFS, or other FS types. if !supportedFilesystems[cfg.Type] { - console.OutLn("") - console.OutStyle(console.WarningType, "%s is not yet a supported filesystem. We will try anyways!", cfg.Type) + console.OutT(console.WarningType, "{{.type}} is not yet a supported filesystem. We will try anyways!", console.Arg{"type": cfg.Type}) } var wg sync.WaitGroup if cfg.Type == nineP { wg.Add(1) go func() { - console.OutStyle(console.Fileserver, "Userspace file server: ") + console.OutT(console.Fileserver, "Userspace file server: ") ufs.StartServer(net.JoinHostPort(ip.String(), strconv.Itoa(port)), debugVal, hostPath) - console.OutStyle(console.Stopped, "Userspace file server is shutdown") + console.OutT(console.Stopped, "Userspace file server is shutdown") wg.Done() }() } @@ -180,12 +179,12 @@ var mountCmd = &cobra.Command{ signal.Notify(c, os.Interrupt, syscall.SIGTERM) go func() { for sig := range c { - console.OutStyle(console.Unmount, "Unmounting %s ...", vmPath) + console.OutT(console.Unmount, "Unmounting {{.path}} ...", console.Arg{"path": vmPath}) err := cluster.Unmount(runner, vmPath) if err != nil { - console.ErrStyle(console.FailureType, "Failed unmount: %v", err) + console.ErrT(console.FailureType, "Failed unmount: {{.error}}", console.Arg{"error": err}) } - exit.WithCode(exit.Interrupted, "Exiting due to %s signal", sig) + exit.WithCodeT(exit.Interrupted, "Received {{.name}} signal", console.Arg{"name": sig}) } }() @@ -193,9 +192,9 @@ var mountCmd = &cobra.Command{ if err != nil { exit.WithError("mount failed", err) } - console.OutStyle(console.SuccessType, "Successfully mounted %s to %s", hostPath, vmPath) + console.OutT(console.SuccessType, "Successfully mounted {{.sourcePath}} to {{.destinationPath}}", console.Arg{"sourcePath": hostPath, "destinationPath": vmPath}) console.OutLn("") - console.OutStyle(console.Notice, "NOTE: This process must stay alive for the mount to be accessible ...") + console.OutT(console.Notice, "NOTE: This process must stay alive for the mount to be accessible ...") wg.Wait() }, } diff --git a/cmd/minikube/cmd/service_list.go b/cmd/minikube/cmd/service_list.go index 9b5376d78d..e1e6a4ed7e 100644 --- a/cmd/minikube/cmd/service_list.go +++ b/cmd/minikube/cmd/service_list.go @@ -43,8 +43,8 @@ var serviceListCmd = &cobra.Command{ defer api.Close() serviceURLs, err := service.GetServiceURLs(api, serviceListNamespace, serviceURLTemplate) if err != nil { - console.Fatal("Failed to get service URL: %v", err) - console.ErrStyle(console.Notice, "Check that minikube is running and that you have specified the correct namespace (-n flag) if required.") + console.FatalT("Failed to get service URL: {{.error}}", console.Arg{"error": err}) + console.ErrT(console.Notice, "Check that minikube is running and that you have specified the correct namespace (-n flag) if required.") os.Exit(exit.Unavailable) } diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go index 5da05cef9a..d804c0f035 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go @@ -305,7 +305,7 @@ func (k *Bootstrapper) WaitCluster(k8s config.KubernetesConfig) error { // by a CNI plugin which is usually started after minikube has been brought // up. Otherwise, minikube won't start, as "k8s-app" pods are not ready. componentsOnly := k8s.NetworkPlugin == "cni" - console.OutStyle(console.WaitingPods, "Verifying:") + console.OutT(console.WaitingPods, "Verifying:") client, err := util.GetClient() if err != nil { return errors.Wrap(err, "k8s client") @@ -483,7 +483,7 @@ func (k *Bootstrapper) UpdateCluster(cfg config.KubernetesConfig) error { _, images := constants.GetKubeadmCachedImages(cfg.ImageRepository, cfg.KubernetesVersion) if cfg.ShouldLoadCachedImages { if err := machine.LoadImages(k.c, images, constants.ImageCacheDir); err != nil { - console.Failure("Unable to load cached images: %v", err) + console.FailureT("Unable to load cached images: {{.error}}", console.Arg{"error": err}) } } r, err := cruntime.New(cruntime.Config{Type: cfg.ContainerRuntime, Socket: cfg.CRISocket}) diff --git a/pkg/minikube/console/style.go b/pkg/minikube/console/style.go index 1a16dc9946..ed95e98aae 100644 --- a/pkg/minikube/console/style.go +++ b/pkg/minikube/console/style.go @@ -78,6 +78,7 @@ var styles = map[StyleEnum]style{ Issues: {Prefix: "⁉️ "}, Issue: {Prefix: " ▪ ", LowPrefix: lowIndent}, // Indented bullet Check: {Prefix: "✔️ "}, + Celebration: {Prefix: "🎉 "}, // Specialized purpose styles ISODownload: {Prefix: "💿 "}, @@ -152,6 +153,9 @@ func applyStyle(style StyleEnum, useColor bool, format string) string { } func applyTemplateFormatting(style StyleEnum, useColor bool, format string, a ...Arg) string { + if a == nil { + a = []Arg{Arg{}} + } format = applyStyle(style, useColor, format) var buf bytes.Buffer @@ -160,9 +164,6 @@ func applyTemplateFormatting(style StyleEnum, useColor bool, format string, a .. glog.Infof("Initializing template failed. Returning raw string.") return format } - if len(a) == 0 { - a[0] = Arg{} - } err = t.Execute(&buf, a[0]) if err != nil { glog.Infof("Executing template failed. Returning raw string.") diff --git a/pkg/minikube/console/style_enum.go b/pkg/minikube/console/style_enum.go index 43f77594d2..08dca7f832 100644 --- a/pkg/minikube/console/style_enum.go +++ b/pkg/minikube/console/style_enum.go @@ -24,6 +24,7 @@ const ( Happy StyleEnum = iota SuccessType FailureType + Celebration Conflict FatalType Notice diff --git a/pkg/minikube/machine/cache_binaries.go b/pkg/minikube/machine/cache_binaries.go index e665f33501..d802c162e6 100644 --- a/pkg/minikube/machine/cache_binaries.go +++ b/pkg/minikube/machine/cache_binaries.go @@ -78,7 +78,7 @@ func CacheBinary(binary, version, osName, archName string) (string, error) { options.Checksum = constants.GetKubernetesReleaseURLSHA1(binary, version, osName, archName) options.ChecksumHash = crypto.SHA1 - console.OutStyle(console.FileDownload, "Downloading %s %s", binary, version) + console.OutT(console.FileDownload, "Downloading {{.name}} {{.version}}", console.Arg{"name": binary, "version": version}) if err := download.ToFile(url, targetFilepath, options); err != nil { return "", errors.Wrapf(err, "Error downloading %s %s", binary, version) } diff --git a/pkg/minikube/machine/client.go b/pkg/minikube/machine/client.go index c622bafe5e..db09752874 100644 --- a/pkg/minikube/machine/client.go +++ b/pkg/minikube/machine/client.go @@ -41,6 +41,7 @@ import ( "github.com/docker/machine/libmachine/version" "github.com/pkg/errors" "k8s.io/minikube/pkg/minikube/command" + "k8s.io/minikube/pkg/minikube/console" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/exit" "k8s.io/minikube/pkg/minikube/registry" @@ -269,7 +270,7 @@ func registerDriver(driverName string) { def, err := registry.Driver(driverName) if err != nil { if err == registry.ErrDriverNotFound { - exit.Usage("unsupported driver: %s", driverName) + exit.UsageT("unsupported driver: {{.name}}", console.Arg{"name": driverName}) } exit.WithError("error getting driver", err) } diff --git a/pkg/minikube/notify/notify.go b/pkg/minikube/notify/notify.go index d657786d60..bd2006f6ed 100644 --- a/pkg/minikube/notify/notify.go +++ b/pkg/minikube/notify/notify.go @@ -66,13 +66,9 @@ func MaybePrintUpdateText(url string, lastUpdatePath string) { if err := writeTimeToFile(lastUpdateCheckFilePath, time.Now().UTC()); err != nil { glog.Errorf("write time failed: %v", err) } - console.ErrStyle(console.WarningType, `There is a newer version of minikube available (%s%s). Download it here: -%s%s - -To disable this notification, run the following: -minikube config set WantUpdateNotification false -`, - version.VersionPrefix, latestVersion, updateLinkPrefix, latestVersion) + url := fmt.Sprintf("%s/%s", updateLinkPrefix, latestVersion) + console.ErrT(console.WarningType, `minikube {{.version}} is available! Download it: {{.url}}`, console.Arg{"version": latestVersion, "url": url}) + console.OutT(console.Tip, "To disable this notice, run: 'minikube config set WantUpdateNotification false'") } } diff --git a/pkg/minikube/problem/problem.go b/pkg/minikube/problem/problem.go index a20e09b121..3f0db8d933 100644 --- a/pkg/minikube/problem/problem.go +++ b/pkg/minikube/problem/problem.go @@ -18,6 +18,7 @@ limitations under the License. package problem import ( + "fmt" "regexp" "k8s.io/minikube/pkg/minikube/console" @@ -52,21 +53,21 @@ type match struct { // Display problem metadata to the console func (p *Problem) Display() { - console.ErrStyle(console.FailureType, "Error: [%s] %v", p.ID, p.Err) - console.ErrStyle(console.Tip, "Advice: %s", translate.T(p.Advice)) + console.ErrT(console.FailureType, "Error: [{{.id}}] {{.error}}", console.Arg{"id": p.ID, "error": p.Err}) + console.ErrT(console.Tip, "Suggestion: {{.advice}}", console.Arg{"advice": translate.T(p.Advice)}) if p.URL != "" { - console.ErrStyle(console.Documentation, "Documentation: %s", p.URL) + console.ErrT(console.Documentation, "Documentation: {{.url}}", console.Arg{"url": p.URL}) } if len(p.Issues) == 0 { return } - console.ErrStyle(console.Issues, "Related issues:") + console.ErrT(console.Issues, "Related issues:") issues := p.Issues if len(issues) > 3 { issues = issues[0:3] } for _, i := range issues { - console.ErrStyle(console.Issue, "%s/%d", issueBase, i) + console.ErrT(console.Issue, "{{.url}}", console.Arg{"url": fmt.Sprintf("%s/%d", issueBase, i)}) } } diff --git a/translations/fr-FR.json b/translations/fr-FR.json index 2ef265dc93..dbb1c26255 100644 --- a/translations/fr-FR.json +++ b/translations/fr-FR.json @@ -1,28 +1,22 @@ { "\"{{.name}}\" cluster does not exist": "", "%q VM does not exist, nothing to stop": "", - "%q cluster does not exist": "", "%q host does not exist, unable to show an IP": "", "%q profile does not exist": "", "%q stopped.": "", "%s IP has been updated to point at %s": "", "%s IP was already correctly configured for %s": "", "%s has no available configuration options": "", - "%s is not responding properly: %v": "", - "%s is not yet a supported filesystem. We will try anyways!": "", "%s was successfully configured": "", "%s was successfully disabled": "", - "%s was successfully enabled": "", - "%s:%s is not running: %v": "", "'none' driver does not support 'minikube docker-env' command": "", "'none' driver does not support 'minikube mount' command": "", "'none' driver does not support 'minikube ssh' command": "", "A firewall is blocking Docker within the minikube VM from reaching the internet. You may need to configure it to use a proxy.": "", "A firewall is interfering with minikube's ability to make outgoing HTTPS requests. You may need to change the value of the HTTPS_PROXY environment variable.": "", "A firewall is likely blocking minikube from reaching the internet. You may need to configure minikube to use a proxy.": "", - "Advice: %s": "", "Alternatively, you may delete the existing VM using `minikube delete -p %s`": "", - "Cannot find directory %s for mount": "", + "Cannot find directory {{.path}} for mount": "", "Check that minikube is running and that you have specified the correct namespace (-n flag) if required.": "", "Check that your --kubernetes-version has a leading 'v'. For example: 'v1.1.14'": "", "Configure an external network switch following the official documentation, then add `--hyperv-virtual-switch=\u003cswitch-name\u003e` to `minikube start`": "", @@ -35,11 +29,11 @@ "Disable dynamic memory in your VM manager, or pass in a larger --memory value": "", "Disable real-time anti-virus software, reboot, and reinstall VirtualBox if the problem continues.": "", "Docker inside the VM is unavailable. Try running 'minikube delete' to reset the VM.": "", - "Documentation: %s": "", + "Documentation: {{.url}}": "", "Done! kubectl is now configured to use {{.name}}": "Fini! kubectl est maintenant configuré pour utiliser {{.name}}.", "Download complete!": "", - "Downloading %s %s": "", "Downloading Minikube ISO ...": "", + "Downloading {{.name}} {{.version}}": "", "ERROR creating `registry-creds-dpr` secret": "", "ERROR creating `registry-creds-ecr` secret: %v": "", "ERROR creating `registry-creds-gcr` secret: %v": "", @@ -71,6 +65,7 @@ "Error host driver ip status": "", "Error killing mount process": "", "Error loading api": "", + "Error loading profile config": "", "Error opening service": "", "Error parsing minukube version: %v": "", "Error parsing vmDriver version: %v": "", @@ -81,8 +76,7 @@ "Error starting mount": "", "Error unsetting shell variables": "", "Error writing mount pid": "", - "Error: [%s] %v": "", - "Exiting due to %s signal": "", + "Error: [{{.id}}] {{.error}}": "", "Failed to cache ISO": "", "Failed to cache and load images": "", "Failed to cache binaries": "", @@ -101,7 +95,7 @@ "Failed to get driver URL": "", "Failed to get image map": "", "Failed to get machine client": "", - "Failed to get service URL: %v": "", + "Failed to get service URL: {{.error}}": "", "Failed to kill mount process: %v": "", "Failed to list cached images": "", "Failed to remove profile": "", @@ -111,11 +105,12 @@ "Failed to setup kubeconfig": "", "Failed to update cluster": "", "Failed to update config": "", - "Failed unmount: %v": "", + "Failed unmount: {{.error}}": "", "Follow": "", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "", "For more information, see:": "", "Found network options:": "", + "Group ID: {{.groupID}}": "", "Have you set up libvirt correctly?": "", "If the above advice does not help, please let us know: ": "", "If using the none driver, ensure that systemctl is installed": "", @@ -129,15 +124,16 @@ "Kubernetes downgrade is not supported, will continue to use {{.version}}": "", "Launching Kubernetes ... ": "Lançant Kubernetes ...", "Launching proxy ...": "", - "Mode: %o (%s)": "", - "Mount options:": "", - "Mounting host path %s into VM as %s ...": "", + "Message Size: {{.size}}": "", + "Mount type: {{.name}}": "", + "Mounting host path {{.sourcePath}} into VM as {{.destinationPath}} ...": "", "NOTE: This process must stay alive for the mount to be accessible ...": "", "None of known repositories in your location is accessible. Use %s as fallback.": "", "None of known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag": "", "Opening %s in your default browser...": "", "Opening kubernetes service %s/%s in default browser...": "", - "Options: %s": "", + "Options: {{.options}}": "", + "Permissions: {{.octalMode}} ({{.writtenMode}})": "", "Please check your BIOS, and ensure that you are running without HyperV or other nested virtualization that may interfere": "", "Please don't run minikube as root or with 'sudo' privileges. It isn't necessary with {{.driver}} driver.": "", "Please enter a value:": "", @@ -155,6 +151,7 @@ "Re-using the currently running %s VM for %q ...": "", "Reboot to complete VirtualBox installation, and verify that VirtualBox is not blocked by your system": "", "Rebuild libvirt with virt-network support": "", + "Received {{.name}} signal": "", "Reinstall VirtualBox and verify that it is not blocked: System Preferences -\u003e Security \u0026 Privacy -\u003e General -\u003e Some system software was blocked from loading": "", "Related issues:": "", "Relaunching Kubernetes {{.version}} using {{.bootstrapper}} ... ": "", @@ -171,14 +168,15 @@ "Setting profile failed": "", "Skipped switching kubectl context for %s , because --keep-context": "", "Sorry that minikube crashed. If this was unexpected, we would love to hear from you:": "", - "Sorry, completion support is not yet implemented for %q": "", + "Sorry, completion support is not yet implemented for {{.name}}": "", "Sorry, the kubeadm.%s parameter is currently not supported by --extra-config": "", "Sorry, url provided with --registry-mirror flag is invalid %q": "", "Specify --kubernetes-version in v\u003cmajor\u003e.\u003cminor.\u003cbuild\u003e form. example: 'v1.1.14'": "", "Specify an alternate --host-only-cidr value, such as 172.16.0.1/24": "", "Stopping %q in %s ...": "", - "Successfully mounted %s to %s": "", - "Target directory %q must be an absolute path": "", + "Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "", + "Suggestion: {{.advice}}": "", + "Target directory {{.path}} must be an absolute path": "", "The %q cluster has been deleted.": "", "The 'docker-machine-driver-kvm2' version is old. Please consider upgrading. %s": "", "The 'none' driver provides limited isolation and may reduce system security and reliability.": "", @@ -190,16 +188,15 @@ "The value passed to --format is invalid": "", "The value passed to --format is invalid: %s": "", "The vmwarefusion driver is deprecated and support for it will be removed in a future release.\n\t\t\tPlease consider switching to the new vmware unified driver, which is intended to replace the vmwarefusion driver.\n\t\t\tSee https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#vmware-unified-driver for more information.\n\t\t\tTo disable this message, run [minikube config set ShowDriverDeprecationNotification false]": "", - "There is a newer version of minikube available (%s%s). Download it here:\n%s%s\n\nTo disable this notification, run the following:\nminikube config set WantUpdateNotification false\n": "", "These changes will take effect upon a minikube delete and then a minikube start": "", "This addon does not have an endpoint defined for the 'addons open' command.\nYou can add one by annotating a service with the label %s:%s": "", "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "", "Tip: Use 'minikube start -p \u003cname\u003e' to create a new cluster, or 'minikube delete' to delete this one.": "", "To connect to this cluster, use: kubectl --context=%s": "", "To connect to this cluster, use: kubectl --context={{.name}}": "", + "To disable this notice, run: 'minikube config set WantUpdateNotification false'": "", "To switch drivers, you may create a new VM using `minikube start -p \u003cname\u003e --vm-driver=%s`": "", "To use kubectl or minikube commands as your own user, you may": "", - "Type: %s": "", "Unable to bind flags": "", "Unable to enable dashboard": "", "Unable to fetch latest version info": "", @@ -207,17 +204,19 @@ "Unable to get runtime": "", "Unable to kill mount process: %s": "", "Unable to load cached images from config file.": "", - "Unable to load cached images: %v": "", + "Unable to load cached images: {{.error}}": "", "Unable to load config: %v": "", + "Unable to load config: {{.error}}": "", "Unable to parse %q: %v": "", "Unable to pull images, which may be OK: {{.error}}": "", "Unable to start VM": "", "Unable to stop VM": "", "Uninstalling Kubernetes %s using %s ...": "", - "Unmounting %s ...": "", + "Unmounting {{.path}} ...": "", "Update server returned an empty list": "", "Upgrade to QEMU v3.1.0+, run 'virt-host-validate', or ensure that you are not running in a nested VM environment.": "", "Usage: minikube completion SHELL": "", + "User ID: {{.userID}}": "", "Userspace file server is shutdown": "", "Userspace file server: ": "", "Using image repository {{.name}}": "", @@ -225,7 +224,7 @@ "Verifying dashboard health ...": "", "Verifying proxy health ...": "", "Verifying:": "Vérifiant:", - "Version: %s": "", + "Version: {{.version}}": "", "Wait failed": "", "Wait failed: %v": "", "Waiting for SSH access ...": "Attendant l'accès SSH ...", @@ -240,14 +239,15 @@ "bash completion failed": "", "command runner": "", "config view failed": "", + "dashboard service is not running: {{.error}}": "", "disable failed": "", - "enable failed: %v": "", + "enable failed": "", "error creating clientset": "", "error creating machine client": "", "error getting driver": "", "error parsing the input ip address for mount": "", "error starting tunnel": "", - "failed to open browser: %v": "", + "failed to open browser: {{.error}}": "", "kubectl and minikube configuration will be stored in %s": "", "kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "", "kubectl proxy": "", @@ -256,8 +256,9 @@ "minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "", "minikube profile was successfully set to %s": "", "minikube will upgrade the local cluster from Kubernetes {{.old}} to {{.new}}": "", + "minikube {{.version}} is available! Download it: {{.url}}": "", "minikube {{.version}} on {{.os}} ({{.arch}})": "minikube {{.version}} sur {{.os}} ({{.arch}})", - "mount argument %q must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "", + "mount argument \"{{.value}}\" must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "", "mount failed": "", "need to relocate them. For example, to overwrite your own settings:": "", "service %s/%s has no node port": "", @@ -266,6 +267,7 @@ "unable to set logtostderr": "", "unset failed": "", "unsupported driver: %s": "", + "unsupported driver: {{.name}}": "", "update config": "", "usage: minikube addons configure ADDON_NAME": "", "usage: minikube addons disable ADDON_NAME": "", @@ -277,5 +279,11 @@ "usage: minikube delete": "", "usage: minikube profile [MINIKUBE_PROFILE_NAME]": "", "zsh completion failed": "", - "{{.msg}}: {{.err}}": "" + "{{.addonName}} was successfully enabled": "", + "{{.error}}": "", + "{{.msg}}: {{.err}}": "", + "{{.name}} cluster does not exist": "", + "{{.type}} is not yet a supported filesystem. We will try anyways!": "", + "{{.url}}": "", + "{{.url}} is not accessible: {{.error}}": "" } \ No newline at end of file diff --git a/translations/zh-CN.json b/translations/zh-CN.json index 37282085d4..294f672ec0 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -1,28 +1,22 @@ { "\"{{.name}}\" cluster does not exist": "", "%q VM does not exist, nothing to stop": "", - "%q cluster does not exist": "", "%q host does not exist, unable to show an IP": "", "%q profile does not exist": "", "%q stopped.": "", "%s IP has been updated to point at %s": "", "%s IP was already correctly configured for %s": "", "%s has no available configuration options": "", - "%s is not responding properly: %v": "", - "%s is not yet a supported filesystem. We will try anyways!": "", "%s was successfully configured": "", "%s was successfully disabled": "", - "%s was successfully enabled": "", - "%s:%s is not running: %v": "", "'none' driver does not support 'minikube docker-env' command": "", "'none' driver does not support 'minikube mount' command": "", "'none' driver does not support 'minikube ssh' command": "", "A firewall is blocking Docker within the minikube VM from reaching the internet. You may need to configure it to use a proxy.": "", "A firewall is interfering with minikube's ability to make outgoing HTTPS requests. You may need to change the value of the HTTPS_PROXY environment variable.": "", "A firewall is likely blocking minikube from reaching the internet. You may need to configure minikube to use a proxy.": "", - "Advice: %s": "", "Alternatively, you may delete the existing VM using `minikube delete -p %s`": "", - "Cannot find directory %s for mount": "", + "Cannot find directory {{.path}} for mount": "", "Check that minikube is running and that you have specified the correct namespace (-n flag) if required.": "", "Check that your --kubernetes-version has a leading 'v'. For example: 'v1.1.14'": "", "Configure an external network switch following the official documentation, then add `--hyperv-virtual-switch=\u003cswitch-name\u003e` to `minikube start`": "", @@ -35,11 +29,11 @@ "Disable dynamic memory in your VM manager, or pass in a larger --memory value": "", "Disable real-time anti-virus software, reboot, and reinstall VirtualBox if the problem continues.": "", "Docker inside the VM is unavailable. Try running 'minikube delete' to reset the VM.": "", - "Documentation: %s": "", + "Documentation: {{.url}}": "", "Done! kubectl is now configured to use {{.name}}": "完成!kubectl已经配置至{{.name}}", "Download complete!": "", - "Downloading %s %s": "", "Downloading Minikube ISO ...": "", + "Downloading {{.name}} {{.version}}": "", "ERROR creating `registry-creds-dpr` secret": "", "ERROR creating `registry-creds-ecr` secret: %v": "", "ERROR creating `registry-creds-gcr` secret: %v": "", @@ -71,6 +65,7 @@ "Error host driver ip status": "", "Error killing mount process": "", "Error loading api": "", + "Error loading profile config": "", "Error opening service": "", "Error parsing minukube version: %v": "", "Error parsing vmDriver version: %v": "", @@ -81,8 +76,7 @@ "Error starting mount": "", "Error unsetting shell variables": "", "Error writing mount pid": "", - "Error: [%s] %v": "", - "Exiting due to %s signal": "", + "Error: [{{.id}}] {{.error}}": "", "Failed to cache ISO": "", "Failed to cache and load images": "", "Failed to cache binaries": "", @@ -101,7 +95,7 @@ "Failed to get driver URL": "", "Failed to get image map": "", "Failed to get machine client": "", - "Failed to get service URL: %v": "", + "Failed to get service URL: {{.error}}": "", "Failed to kill mount process: %v": "", "Failed to list cached images": "", "Failed to remove profile": "", @@ -111,11 +105,12 @@ "Failed to setup kubeconfig": "", "Failed to update cluster": "", "Failed to update config": "", - "Failed unmount: %v": "", + "Failed unmount: {{.error}}": "", "Follow": "", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "", "For more information, see:": "", "Found network options:": "", + "Group ID: {{.groupID}}": "", "Have you set up libvirt correctly?": "", "If the above advice does not help, please let us know: ": "", "If using the none driver, ensure that systemctl is installed": "", @@ -129,15 +124,16 @@ "Kubernetes downgrade is not supported, will continue to use {{.version}}": "", "Launching Kubernetes ... ": "正在启动 Kubernetes ... ", "Launching proxy ...": "", - "Mode: %o (%s)": "", - "Mount options:": "", - "Mounting host path %s into VM as %s ...": "", + "Message Size: {{.size}}": "", + "Mount type: {{.name}}": "", + "Mounting host path {{.sourcePath}} into VM as {{.destinationPath}} ...": "", "NOTE: This process must stay alive for the mount to be accessible ...": "", "None of known repositories in your location is accessible. Use %s as fallback.": "", "None of known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag": "", "Opening %s in your default browser...": "", "Opening kubernetes service %s/%s in default browser...": "", - "Options: %s": "", + "Options: {{.options}}": "", + "Permissions: {{.octalMode}} ({{.writtenMode}})": "", "Please check your BIOS, and ensure that you are running without HyperV or other nested virtualization that may interfere": "", "Please don't run minikube as root or with 'sudo' privileges. It isn't necessary with {{.driver}} driver.": "", "Please enter a value:": "", @@ -155,6 +151,7 @@ "Re-using the currently running %s VM for %q ...": "", "Reboot to complete VirtualBox installation, and verify that VirtualBox is not blocked by your system": "", "Rebuild libvirt with virt-network support": "", + "Received {{.name}} signal": "", "Reinstall VirtualBox and verify that it is not blocked: System Preferences -\u003e Security \u0026 Privacy -\u003e General -\u003e Some system software was blocked from loading": "", "Related issues:": "", "Relaunching Kubernetes {{.version}} using {{.bootstrapper}} ... ": "", @@ -171,14 +168,15 @@ "Setting profile failed": "", "Skipped switching kubectl context for %s , because --keep-context": "", "Sorry that minikube crashed. If this was unexpected, we would love to hear from you:": "", - "Sorry, completion support is not yet implemented for %q": "", + "Sorry, completion support is not yet implemented for {{.name}}": "", "Sorry, the kubeadm.%s parameter is currently not supported by --extra-config": "", "Sorry, url provided with --registry-mirror flag is invalid %q": "", "Specify --kubernetes-version in v\u003cmajor\u003e.\u003cminor.\u003cbuild\u003e form. example: 'v1.1.14'": "", "Specify an alternate --host-only-cidr value, such as 172.16.0.1/24": "", "Stopping %q in %s ...": "", - "Successfully mounted %s to %s": "", - "Target directory %q must be an absolute path": "", + "Successfully mounted {{.sourcePath}} to {{.destinationPath}}": "", + "Suggestion: {{.advice}}": "", + "Target directory {{.path}} must be an absolute path": "", "The %q cluster has been deleted.": "", "The 'docker-machine-driver-kvm2' version is old. Please consider upgrading. %s": "", "The 'none' driver provides limited isolation and may reduce system security and reliability.": "", @@ -190,16 +188,15 @@ "The value passed to --format is invalid": "", "The value passed to --format is invalid: %s": "", "The vmwarefusion driver is deprecated and support for it will be removed in a future release.\n\t\t\tPlease consider switching to the new vmware unified driver, which is intended to replace the vmwarefusion driver.\n\t\t\tSee https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#vmware-unified-driver for more information.\n\t\t\tTo disable this message, run [minikube config set ShowDriverDeprecationNotification false]": "", - "There is a newer version of minikube available (%s%s). Download it here:\n%s%s\n\nTo disable this notification, run the following:\nminikube config set WantUpdateNotification false\n": "", "These changes will take effect upon a minikube delete and then a minikube start": "", "This addon does not have an endpoint defined for the 'addons open' command.\nYou can add one by annotating a service with the label %s:%s": "", "This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true": "", "Tip: Use 'minikube start -p \u003cname\u003e' to create a new cluster, or 'minikube delete' to delete this one.": "", "To connect to this cluster, use: kubectl --context=%s": "", "To connect to this cluster, use: kubectl --context={{.name}}": "", + "To disable this notice, run: 'minikube config set WantUpdateNotification false'": "", "To switch drivers, you may create a new VM using `minikube start -p \u003cname\u003e --vm-driver=%s`": "", "To use kubectl or minikube commands as your own user, you may": "", - "Type: %s": "", "Unable to bind flags": "", "Unable to enable dashboard": "", "Unable to fetch latest version info": "", @@ -207,17 +204,19 @@ "Unable to get runtime": "", "Unable to kill mount process: %s": "", "Unable to load cached images from config file.": "", - "Unable to load cached images: %v": "", + "Unable to load cached images: {{.error}}": "", "Unable to load config: %v": "", + "Unable to load config: {{.error}}": "", "Unable to parse %q: %v": "", "Unable to pull images, which may be OK: {{.error}}": "", "Unable to start VM": "", "Unable to stop VM": "", "Uninstalling Kubernetes %s using %s ...": "", - "Unmounting %s ...": "", + "Unmounting {{.path}} ...": "", "Update server returned an empty list": "", "Upgrade to QEMU v3.1.0+, run 'virt-host-validate', or ensure that you are not running in a nested VM environment.": "", "Usage: minikube completion SHELL": "", + "User ID: {{.userID}}": "", "Userspace file server is shutdown": "", "Userspace file server: ": "", "Using image repository {{.name}}": "", @@ -225,7 +224,7 @@ "Verifying dashboard health ...": "", "Verifying proxy health ...": "", "Verifying:": "正在验证:", - "Version: %s": "", + "Version: {{.version}}": "", "Wait failed": "", "Wait failed: %v": "", "Waiting for SSH access ...": "", @@ -240,14 +239,15 @@ "bash completion failed": "", "command runner": "", "config view failed": "", + "dashboard service is not running: {{.error}}": "", "disable failed": "", - "enable failed: %v": "", + "enable failed": "", "error creating clientset": "", "error creating machine client": "", "error getting driver": "", "error parsing the input ip address for mount": "", "error starting tunnel": "", - "failed to open browser: %v": "", + "failed to open browser: {{.error}}": "", "kubectl and minikube configuration will be stored in %s": "", "kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "", "kubectl proxy": "", @@ -256,8 +256,9 @@ "minikube is unable to access the Google Container Registry. You may need to configure it to use a HTTP proxy.": "", "minikube profile was successfully set to %s": "", "minikube will upgrade the local cluster from Kubernetes {{.old}} to {{.new}}": "", + "minikube {{.version}} is available! Download it: {{.url}}": "", "minikube {{.version}} on {{.os}} ({{.arch}})": "您正在使用minikube {{.version}}, 运行平台:{{.os}} ({{.arch}})", - "mount argument %q must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "", + "mount argument \"{{.value}}\" must be in form: \u003csource directory\u003e:\u003ctarget directory\u003e": "", "mount failed": "", "need to relocate them. For example, to overwrite your own settings:": "", "service %s/%s has no node port": "", @@ -266,6 +267,7 @@ "unable to set logtostderr": "", "unset failed": "", "unsupported driver: %s": "", + "unsupported driver: {{.name}}": "", "update config": "", "usage: minikube addons configure ADDON_NAME": "", "usage: minikube addons disable ADDON_NAME": "", @@ -277,5 +279,11 @@ "usage: minikube delete": "", "usage: minikube profile [MINIKUBE_PROFILE_NAME]": "", "zsh completion failed": "", - "{{.msg}}: {{.err}}": "" + "{{.addonName}} was successfully enabled": "", + "{{.error}}": "", + "{{.msg}}: {{.err}}": "", + "{{.name}} cluster does not exist": "", + "{{.type}} is not yet a supported filesystem. We will try anyways!": "", + "{{.url}}": "", + "{{.url}} is not accessible: {{.error}}": "" } \ No newline at end of file