From d8ec4704e428f1f4cffc988293b374f9d8fe054c Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Mon, 15 Nov 2021 16:52:39 -0800 Subject: [PATCH] support functions with multiple string args --- pkg/minikube/extract/extract.go | 4 +--- pkg/minikube/out/out.go | 2 +- translations/de.json | 4 ++++ translations/es.json | 4 ++++ translations/fr.json | 4 ++++ translations/ja.json | 4 ++++ translations/ko.json | 4 ++++ translations/pl.json | 4 ++++ translations/strings.txt | 4 ++++ translations/zh-CN.json | 4 ++++ 10 files changed, 34 insertions(+), 4 deletions(-) diff --git a/pkg/minikube/extract/extract.go b/pkg/minikube/extract/extract.go index f0807f9dc9..f766917435 100644 --- a/pkg/minikube/extract/extract.go +++ b/pkg/minikube/extract/extract.go @@ -263,7 +263,6 @@ func checkArguments(s *ast.CallExpr, e *state) { if s := checkIdentForStringValue(i); s != "" { e.translations[s] = "" matched = true - break } } @@ -272,12 +271,11 @@ func checkArguments(s *ast.CallExpr, e *state) { if s := checkString(argString.Value); s != "" { e.translations[s] = "" matched = true - break } } } - // No string arguments were found, check everything the calls this function for strings + // No string arguments were found, check everything that calls this function for strings if !matched { addParentFuncToList(e) } diff --git a/pkg/minikube/out/out.go b/pkg/minikube/out/out.go index df5d29b64c..63ccf90614 100644 --- a/pkg/minikube/out/out.go +++ b/pkg/minikube/out/out.go @@ -139,7 +139,7 @@ func BoxedWithConfig(cfg box.Config, st style.Enum, title string, text string, a title = Sprintf(st, title) } // need to make sure no newlines are in the title otherwise box-cli-maker panics - title = strings.ReplaceAll(title, "\n", "") + title = translate.T(strings.ReplaceAll(title, "\n", "")) boxedCommon(String, cfg, title, text, a...) } diff --git a/translations/de.json b/translations/de.json index 9972e0f6db..67cadd47f0 100644 --- a/translations/de.json +++ b/translations/de.json @@ -8,6 +8,9 @@ "'none' driver does not support 'minikube podman-env' command": "", "'none' driver does not support 'minikube ssh' command": "", "'none' driver does not support 'minikube ssh-host' command": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube docker-env\" to point your docker-cli to the docker inside minikube.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube podman-env\" to point your podman-cli to the podman inside minikube.\n- \"minikube image\" to build images without docker.": "", "- Delete and recreate minikube cluster\n\t\tminikube delete\n\t\tminikube start --driver={{.driver_name}}": "", "- Docs https://docs.docker.com/docker-for-mac/#resources": "", "- Docs https://docs.docker.com/docker-for-windows/#resources": "", @@ -125,6 +128,7 @@ "Default group id used for the mount": "", "Default user id used for the mount": "", "Delete an image from the local cache.": "", + "Delete the existing '{{.name}}' cluster using: '{{.delcommand}}', or start the existing '{{.name}}' cluster using: '{{.command}} --driver={{.old}}'": "", "Deletes a local Kubernetes cluster": "", "Deletes a local Kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all associated files.": "Damit wird ein lokaler Kubernetes-Cluster gelöscht. Mit diesem Befehl wird die VM entfernt und alle zugehörigen Dateien gelöscht.", diff --git a/translations/es.json b/translations/es.json index 862d432f83..2692b73538 100644 --- a/translations/es.json +++ b/translations/es.json @@ -9,6 +9,9 @@ "'none' driver does not support 'minikube podman-env' command": "El controlador 'none' no soporta el comando 'minikube podman-env'.", "'none' driver does not support 'minikube ssh' command": "El controlador 'none' no soporta el comando 'minikube ssh'.", "'none' driver does not support 'minikube ssh-host' command": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube docker-env\" to point your docker-cli to the docker inside minikube.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube podman-env\" to point your podman-cli to the podman inside minikube.\n- \"minikube image\" to build images without docker.": "", "- Delete and recreate minikube cluster\n\t\tminikube delete\n\t\tminikube start --driver={{.driver_name}}": "- Eliminando y recreando el cluster minikube\n\t\tminikube delete\n\t\tminikube start --driver={{.driver_name}}", "- Docs https://docs.docker.com/docker-for-mac/#resources": "Documentación https://docs.docker.com/docker-for-mac/#resources", "- Docs https://docs.docker.com/docker-for-windows/#resources": "Documentación https://docs.docker.com/docker-for-windows/#resources", @@ -126,6 +129,7 @@ "Default group id used for the mount": "ID de grupo por defecto usado para el montaje", "Default user id used for the mount": "ID de usuario por defecto usado para el montaje", "Delete an image from the local cache.": "Elimina una imagen del caché local.", + "Delete the existing '{{.name}}' cluster using: '{{.delcommand}}', or start the existing '{{.name}}' cluster using: '{{.command}} --driver={{.old}}'": "", "Deletes a local Kubernetes cluster": "Elimina un cluster de Kubernetes local", "Deletes a local Kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "Elimina un clúster local de Kubernetes. Este comando borra la VM, y todos los\narchivos asociados.", "Deletes a local kubernetes cluster. This command deletes the VM, and removes all associated files.": "Elimina un clúster local de Kubernetes. Este comando borra la VM y todos los archivos asociados.", diff --git a/translations/fr.json b/translations/fr.json index 78e8d21b68..2e2b19cff4 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -8,6 +8,9 @@ "'none' driver does not support 'minikube podman-env' command": "Le pilote 'none' ne prend pas en charge la commande 'minikube podman-env'", "'none' driver does not support 'minikube ssh' command": "Le pilote 'none' ne prend pas en charge la commande 'minikube ssh'", "'none' driver does not support 'minikube ssh-host' command": "Le pilote 'none' ne prend pas en charge la commande 'minikube ssh-host'", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube docker-env\" to point your docker-cli to the docker inside minikube.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube podman-env\" to point your podman-cli to the podman inside minikube.\n- \"minikube image\" to build images without docker.": "", "- Delete and recreate minikube cluster\n\t\tminikube delete\n\t\tminikube start --driver={{.driver_name}}": "- Supprimer et recréer le cluster de minikube\n\t\tminikube delete\n\t\tminikube start --driver={{.driver_name}}", "- Docs https://docs.docker.com/docker-for-mac/#resources": "- Documentation https://docs.docker.com/docker-for-mac/#resources", "- Docs https://docs.docker.com/docker-for-windows/#resources": "- Docs https://docs.docker.com/docker-for-windows/#resources", @@ -122,6 +125,7 @@ "Default group id used for the mount": "ID de groupe par défaut utilisé pour le montage", "Default user id used for the mount": "ID utilisateur par défaut utilisé pour le montage", "Delete an image from the local cache.": "Supprimez une image du cache local.", + "Delete the existing '{{.name}}' cluster using: '{{.delcommand}}', or start the existing '{{.name}}' cluster using: '{{.command}} --driver={{.old}}'": "", "Deletes a local Kubernetes cluster": "Supprime un cluster Kubernetes local", "Deletes a local Kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "Supprime le cluster Kubernetes local. Cette commande supprime la VM ainsi que tous les fichiers associés.", "Deletes a node from a cluster.": "Supprime un nœud d'un cluster.", diff --git a/translations/ja.json b/translations/ja.json index 60ce5e9057..0393fdb0a6 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -10,6 +10,9 @@ "'none' driver does not support 'minikube ssh-host' command": "'none' ドライバーは 'minikube ssh-host' コマンドをサポートしていません", "'{{.driver}}' driver reported a issue that could affect the performance.": "'{{.driver}}' ドライバーが性能に影響しうる問題を報告しました。", "'{{.driver}}' driver reported an issue: {{.error}}": "'{{.driver}}' ドライバーがエラーを報告しました: {{.error}}", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube docker-env\" to point your docker-cli to the docker inside minikube.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube podman-env\" to point your podman-cli to the podman inside minikube.\n- \"minikube image\" to build images without docker.": "", "- Delete and recreate minikube cluster\n\t\tminikube delete\n\t\tminikube start --driver={{.driver_name}}": "- minikube クラスターの削除と再作成をしてください\n\t\tminikube delete\n\t\tminikube start --driver={{.driver_name}}", "- Docs https://docs.docker.com/docker-for-mac/#resources": "- ドキュメント https://docs.docker.com/docker-for-mac/#resources", "- Docs https://docs.docker.com/docker-for-windows/#resources": "- ドキュメント https://docs.docker.com/docker-for-windows/#resources", @@ -125,6 +128,7 @@ "Default group id used for the mount": "マウント時のデフォルトのグループ ID", "Default user id used for the mount": "マウント時のデフォルトのユーザー ID", "Delete an image from the local cache.": "ローカルのキャッシュからイメージを削除します", + "Delete the existing '{{.name}}' cluster using: '{{.delcommand}}', or start the existing '{{.name}}' cluster using: '{{.command}} --driver={{.old}}'": "", "Deletes a local Kubernetes cluster": "ローカルの Kubernetes クラスタを削除します", "Deletes a local Kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "ローカルの Kubernetes クラスタを削除します。このコマンドによって、VM とそれに関連付けられているすべてのファイルが削除されます", "Deletes a node from a cluster.": "ノードをクラスタから削除します", diff --git a/translations/ko.json b/translations/ko.json index e355e0edab..f5feec870a 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -14,6 +14,9 @@ "'none' driver does not support 'minikube ssh-host' command": "'none' 드라이버는 'minikube ssh-host' 명령어를 지원하지 않습니다", "'{{.driver}}' driver reported an issue: {{.error}}": "'{{.driver}}' 드라이버가 다음 이슈를 기록하였습니다: {{.error}}", "'{{.profile}}' is not running": "'{{.profile}}' 이 실행 중이지 않습니다", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube docker-env\" to point your docker-cli to the docker inside minikube.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube podman-env\" to point your podman-cli to the podman inside minikube.\n- \"minikube image\" to build images without docker.": "", "- Delete and recreate minikube cluster\n\t\tminikube delete\n\t\tminikube start --driver={{.driver_name}}": "minikube 클러스터를 삭제하고 재생성합니다.\n\t\tminikube를 삭제합니다.\n\t\tminikube start --driver={{.driver_name}}", "- Docs https://docs.docker.com/docker-for-mac/#resources": "- 문서: https://docs.docker.com/docker-for-mac/#resources", "- Docs https://docs.docker.com/docker-for-windows/#resources": "- 문서: https://docs.docker.com/docker-for-windows/#resources", @@ -134,6 +137,7 @@ "Default group id used for the mount": "마운트를 위한 디폴트 group id", "Default user id used for the mount": "마운트를 위한 디폴트 user id", "Delete an image from the local cache.": "로컬 캐시에서 이미지를 삭제합니다", + "Delete the existing '{{.name}}' cluster using: '{{.delcommand}}', or start the existing '{{.name}}' cluster using: '{{.command}} --driver={{.old}}'": "", "Deletes a local Kubernetes cluster": "로컬 쿠버네티스 클러스터를 삭제합니다", "Deletes a local Kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "로컬 쿠버네티스 클러스터를 삭제합니다. 해당 명령어는 가상 머신을 삭제하고 모든 관련 파일을 삭제합니다", "Deletes a local kubernetes cluster": "로컬 쿠버네티스 클러스터를 삭제합니다", diff --git a/translations/pl.json b/translations/pl.json index 909df8648a..172178b1bb 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -13,6 +13,9 @@ "'none' driver does not support 'minikube podman-env' command": "", "'none' driver does not support 'minikube ssh' command": "sterownik 'none' nie wspiera komendy 'minikube ssh'", "'none' driver does not support 'minikube ssh-host' command": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube docker-env\" to point your docker-cli to the docker inside minikube.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube podman-env\" to point your podman-cli to the podman inside minikube.\n- \"minikube image\" to build images without docker.": "", "- Delete and recreate minikube cluster\n\t\tminikube delete\n\t\tminikube start --driver={{.driver_name}}": "", "- Docs https://docs.docker.com/docker-for-mac/#resources": "", "- Docs https://docs.docker.com/docker-for-windows/#resources": "", @@ -132,6 +135,7 @@ "Default group id used for the mount": "Domyślne id groupy użyte dla montowania", "Default user id used for the mount": "Domyślne id użytkownika użyte dla montowania ", "Delete an image from the local cache.": "Usuń obraz z lokalnego cache'a", + "Delete the existing '{{.name}}' cluster using: '{{.delcommand}}', or start the existing '{{.name}}' cluster using: '{{.command}} --driver={{.old}}'": "", "Deletes a local Kubernetes cluster": "Usuwa lokalny klaster Kubernetesa", "Deletes a local Kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "", "Deletes a local kubernetes cluster": "Usuwa lokalny klaster Kubernetesa", diff --git a/translations/strings.txt b/translations/strings.txt index c11bea0f19..10a60adb7f 100644 --- a/translations/strings.txt +++ b/translations/strings.txt @@ -8,6 +8,9 @@ "'none' driver does not support 'minikube podman-env' command": "", "'none' driver does not support 'minikube ssh' command": "", "'none' driver does not support 'minikube ssh-host' command": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube docker-env\" to point your docker-cli to the docker inside minikube.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube podman-env\" to point your podman-cli to the podman inside minikube.\n- \"minikube image\" to build images without docker.": "", "- Delete and recreate minikube cluster\n\t\tminikube delete\n\t\tminikube start --driver={{.driver_name}}": "", "- Docs https://docs.docker.com/docker-for-mac/#resources": "", "- Docs https://docs.docker.com/docker-for-windows/#resources": "", @@ -121,6 +124,7 @@ "Default group id used for the mount": "", "Default user id used for the mount": "", "Delete an image from the local cache.": "", + "Delete the existing '{{.name}}' cluster using: '{{.delcommand}}', or start the existing '{{.name}}' cluster using: '{{.command}} --driver={{.old}}'": "", "Deletes a local Kubernetes cluster": "", "Deletes a local Kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "", "Deletes a node from a cluster.": "", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index 9b7593d920..5f0207d534 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -15,6 +15,9 @@ "'none' driver does not support 'minikube ssh' command": "'none' 驱动不支持 'minikube ssh' 命令", "'none' driver does not support 'minikube ssh-host' command": "", "'{{.driver}}' driver reported an issue: {{.error}}": "'{{.driver}}' 驱动程序报告了一个问题: {{.error}}", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube docker-env\" to point your docker-cli to the docker inside minikube.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube image\" to build images without docker.": "", + "- \"minikube ssh\" to SSH into minikube's node.\n- \"minikube podman-env\" to point your podman-cli to the podman inside minikube.\n- \"minikube image\" to build images without docker.": "", "- Delete and recreate minikube cluster\n\t\tminikube delete\n\t\tminikube start --driver={{.driver_name}}": "", "- Docs https://docs.docker.com/docker-for-mac/#resources": "", "- Docs https://docs.docker.com/docker-for-windows/#resources": "", @@ -153,6 +156,7 @@ "Default group id used for the mount": "用于挂载默认的 group id", "Default user id used for the mount": "用于挂载默认的 user id", "Delete an image from the local cache.": "从本地缓存中删除 image。", + "Delete the existing '{{.name}}' cluster using: '{{.delcommand}}', or start the existing '{{.name}}' cluster using: '{{.command}} --driver={{.old}}'": "", "Deletes a local Kubernetes cluster": "", "Deletes a local Kubernetes cluster. This command deletes the VM, and removes all\nassociated files.": "", "Deletes a local kubernetes cluster": "删除本地的 kubernetes 集群",