You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
t.Fatalf("could not unmarshal file %s: %v", filename, err)
128
+
}
129
+
130
+
// for each line
131
+
fork, v:=rangeentries {
132
+
// if no translation, skip
133
+
ifv=="" {
134
+
continue
135
+
}
136
+
137
+
// get all variables (ex. {{.name}})
138
+
keyVariables:=distinctVariables(k)
139
+
valueVariables:=distinctVariables(v)
140
+
141
+
// check if number of original string and translated variables match
142
+
iflen(keyVariables) !=len(valueVariables) {
143
+
t.Errorf("line %q: %q has mismatching number of variables\noriginal string variables: %s; translated variables: %s", k, v, keyVariables, valueVariables)
144
+
continue
145
+
}
146
+
147
+
// for each variable in the original string
148
+
fori, keyVar:=rangekeyVariables {
149
+
// check if translated string has same variable
150
+
ifkeyVar!=valueVariables[i] {
151
+
t.Errorf("line %q: %q has mismatching variables\noriginal string variables: %s do not match translated variables: %s", k, v, keyVariables, valueVariables)
152
+
break
153
+
}
154
+
}
155
+
}
156
+
})
157
+
}
158
+
}
159
+
160
+
funcdistinctVariables(linestring) []string {
161
+
re:=regexp.MustCompile(`{{\..+?}}`)
162
+
163
+
// get all the variables from the string (possiible duplicates)
164
+
variables:=re.FindAllString(line, -1)
165
+
distinctMap:=make(map[string]bool)
166
+
167
+
// add them to a map to get distinct list of variables
Copy file name to clipboardExpand all lines: translations/de.json
+4-4
Original file line number
Diff line number
Diff line change
@@ -252,7 +252,7 @@
252
252
"Failed to save config {{.profile}}": "",
253
253
"Failed to save dir": "",
254
254
"Failed to save stdin": "",
255
-
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}": "NO_PROXY Env konnte nicht festgelegt werden. Benutzen Sie `export NO_PROXY = $ NO_PROXY, {{. Ip}}",
255
+
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}": "NO_PROXY Env konnte nicht festgelegt werden. Benutzen Sie `export NO_PROXY = $ NO_PROXY, {{.ip}}",
256
256
"Failed to set NO_PROXY Env. Please use `export NO_PROXY=$NO_PROXY,{{.ip}}`.": "",
257
257
"Failed to setup certs": "",
258
258
"Failed to start container runtime": "",
@@ -576,7 +576,7 @@
576
576
"Target directory {{.path}} must be an absolute path": "",
577
577
"Target {{.path}} can not be empty": "",
578
578
"Test docs have been saved at - {{.path}}": "",
579
-
"The \"{{.driver_name}}\" driver requires root privileges. Please run minikube using 'sudo minikube --vm-driver={{.driver_name}}": "Der Treiber \"{{.driver_name}}\" benötigt Root-Rechte. Führen Sie minikube aus mit 'sudo minikube --vm-driver = {{. Driver_name}}.",
579
+
"The \"{{.driver_name}}\" driver requires root privileges. Please run minikube using 'sudo minikube --vm-driver={{.driver_name}}": "Der Treiber \"{{.driver_name}}\" benötigt Root-Rechte. Führen Sie minikube aus mit 'sudo minikube --vm-driver = {{.driver_name}}.",
580
580
"The \"{{.driver_name}}\" driver should not be used with root privileges.": "",
581
581
"The \"{{.name}}\" cluster has been deleted.": "Der Cluster \"{{.name}}\" wurde gelöscht.",
582
582
"The \"{{.name}}\" cluster has been deleted.__1": "Der Cluster \"{{.name}}\" wurde gelöscht.",
@@ -714,7 +714,7 @@
714
714
"Unable to load config: {{.error}}": "Konfig kann nicht geladen werden: {{.error}}",
715
715
"Unable to load host": "",
716
716
"Unable to load profile: {{.error}}": "",
717
-
"Unable to parse \"{{.kubernetes_version}}\": {{.error}}": "\"{{.Kubernetes_version}}\" kann nicht geparst werden: {{.error}}",
717
+
"Unable to parse \"{{.kubernetes_version}}\": {{.error}}": "\"{{.kubernetes_version}}\" kann nicht geparst werden: {{.error}}",
718
718
"Unable to parse default Kubernetes version from constants: {{.error}}": "",
719
719
"Unable to parse memory '{{.memory}}': {{.error}}": "",
720
720
"Unable to parse oldest Kubernetes version from constants: {{.error}}": "",
@@ -943,4 +943,4 @@
943
943
"{{.profile}} profile is not valid: {{.err}}": "",
944
944
"{{.type}} is not yet a supported filesystem. We will try anyways!": "",
Copy file name to clipboardExpand all lines: translations/es.json
+3-3
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
"\"{{.context}}\" context has been updated to point to {{.hostname}}:{{.port}}": "El contexto \"{{.context}}\" ha sido actualizado para apuntar a {{.hostname}}:{{.port}}",
4
4
"\"{{.machineName}}\" does not exist, nothing to stop": "\"{{.machineName}}\" no existe, nada para detener.",
5
5
"\"{{.name}}\" profile does not exist": "El perfil \"{{.name}}\" no existe.",
6
-
"\"{{.name}}\" profile does not exist, trying anyways.": "El perfil \"{.name}\" no existe, intentando de todas formas.",
6
+
"\"{{.name}}\" profile does not exist, trying anyways.": "El perfil \"{{.name}}\" no existe, intentando de todas formas.",
7
7
"'none' driver does not support 'minikube docker-env' command": "El controlador 'none' no soporta el comando 'minikube docker-env'.",
8
8
"'none' driver does not support 'minikube mount' command": "El driver 'none' no soporta el comando 'minikube mount'.",
9
9
"'none' driver does not support 'minikube podman-env' command": "El controlador 'none' no soporta el comando 'minikube podman-env'.",
@@ -40,7 +40,7 @@
40
40
"Add machine IP to NO_PROXY environment variable": "Agregar una IP de máquina a la variable de entorno NO_PROXY",
41
41
"Add, delete, or push a local image into minikube": "Agrega, elimina, o empuja una imagen local dentro de minikube, haciendo (add, delete, push) respectivamente.",
42
42
"Add, remove, or list additional nodes": "Usa (add, remove, list) para agregar, eliminar o listar nodos adicionales.",
43
-
"Adding node {{.name}} to cluster {{.cluster}}": "Agregando el nodo {{.name}} al cluster.",
43
+
"Adding node {{.name}} to cluster {{.cluster}}": "Agregando el nodo {{.name}} al cluster {{.cluster}}.",
44
44
"Additional help topics": "Temas de ayuda adicionales",
45
45
"Additional mount options, such as cache=fscache": "Opciones de montaje adicionales, por ejemplo cache=fscache",
46
46
"Adds a node to the given cluster config, and starts it.": "Agrega un nodo a la configuración de cluster dada e iniciarlo.",
@@ -947,4 +947,4 @@
947
947
"{{.profile}} profile is not valid: {{.err}}": "",
948
948
"{{.type}} is not yet a supported filesystem. We will try anyways!": "",
0 commit comments