Merge pull request #99829 from palnabarun/migrate-to-go-embed
Replace go-bindata with //go:embed Kubernetes-commit: 044fd6fdf6a859683b291898f87433115e1ec3c0
This commit is contained in:
commit
9017859ece
26051
pkg/generated/bindata.go
26051
pkg/generated/bindata.go
File diff suppressed because one or more lines are too long
|
|
@ -19,17 +19,19 @@ package i18n
|
|||
import (
|
||||
"archive/zip"
|
||||
"bytes"
|
||||
"embed"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"k8s.io/kubectl/pkg/generated"
|
||||
|
||||
"github.com/chai2010/gettext-go/gettext"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
//go:embed translations
|
||||
var translations embed.FS
|
||||
|
||||
var knownTranslations = map[string][]string{
|
||||
"kubectl": {
|
||||
"default",
|
||||
|
|
@ -112,7 +114,7 @@ func LoadTranslations(root string, getLanguageFn func() string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
data, err := generated.Asset(filename)
|
||||
data, err := translations.ReadFile(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
# See the OWNERS docs at https://go.k8s.io/owners
|
||||
|
||||
reviewers:
|
||||
- brendandburns
|
||||
approvers:
|
||||
- sig-cli-maintainers
|
||||
- brendandburns
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
# Translations README
|
||||
|
||||
This is a basic sketch of the workflow needed to add translations:
|
||||
|
||||
# Adding/Updating Translations
|
||||
|
||||
## New languages
|
||||
Create `staging/src/k8s.io/kubectl/pkg/util/i18n/translations/kubectl/<language>/LC_MESSAGES/k8s.po`. There's
|
||||
no need to update `translations/test/...` which is only used for unit tests.
|
||||
|
||||
There is an example [PR here](https://github.com/kubernetes/kubernetes/pull/40645) which adds support for French.
|
||||
|
||||
Once you've added a new language, you'll need to register it in
|
||||
`staging/src/k8s.io/kubectl/pkg/util/i18n/i18n.go` by adding it to the `knownTranslations` map.
|
||||
|
||||
## Wrapping strings
|
||||
There is a simple script in `staging/src/k8s.io/kubectl/pkg/util/i18n/translations/extract.py` that performs
|
||||
simple regular expression based wrapping of strings. It can always
|
||||
use improvements to understand additional strings.
|
||||
|
||||
## Extracting strings
|
||||
Once the strings are wrapped, you can extract strings from go files using
|
||||
the `go-xgettext` command which can be installed with:
|
||||
|
||||
```console
|
||||
go get github.com/gosexy/gettext/go-xgettext
|
||||
```
|
||||
|
||||
Once that's installed you can run `./hack/update-translations.sh`, which
|
||||
will extract and sort any new strings.
|
||||
|
||||
## Adding new translations
|
||||
Edit the appropriate `k8s.po` file, `poedit` is a popular open source tool
|
||||
for translations. You can load the `staging/src/k8s.io/kubectl/pkg/util/i18n/translations/kubectl/template.pot` file
|
||||
to find messages that might be missing.
|
||||
|
||||
Once you are done with your `k8s.po` file, generate the corresponding `k8s.mo`
|
||||
file. `poedit` does this automatically on save, but you can also run
|
||||
`./hack/update-translations.sh` to perform the `po` to `mo` translation.
|
||||
|
||||
We use the English translation as the `msgid`.
|
||||
|
||||
## Regenerating the bindata file
|
||||
|
||||
> Note: Regeneration of bindata is no more necessary for Kubernetes 1.22+ as
|
||||
> the translations are now embedded into the binary at compile time.
|
||||
> See: https://github.com/kubernetes/kubernetes/pull/99829
|
||||
|
||||
With the `mo` files up to date, you can now convert the generated files
|
||||
into code using `go-bindata` command which can be installed with:
|
||||
|
||||
```console
|
||||
go get github.com/go-bindata/go-bindata/...
|
||||
```
|
||||
|
||||
Run `./hack/generate-bindata.sh`, this will turn the translation files
|
||||
into generated code which will in turn be packaged into the Kubernetes
|
||||
binaries.
|
||||
|
||||
## Extracting strings
|
||||
|
||||
There is a script in `staging/src/k8s.io/kubectl/pkg/util/i18n/translations/extract.py` that knows how to do some
|
||||
simple extraction. It needs a lot of work.
|
||||
|
||||
# Using translations
|
||||
|
||||
To use translations, you simply need to add:
|
||||
```go
|
||||
import pkg/i18n
|
||||
...
|
||||
// Get a translated string
|
||||
translated := i18n.T("Your message in english here")
|
||||
|
||||
// Get a translated plural string
|
||||
translated := i18n.T("You had % items", items)
|
||||
|
||||
// Translated error
|
||||
return i18n.Error("Something bad happened")
|
||||
|
||||
// Translated plural error
|
||||
return i18n.Error("%d bad things happened")
|
||||
```
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Extract strings from command files and externalize into translation files.
|
||||
Expects to be run from the root directory of the repository.
|
||||
|
||||
Usage:
|
||||
extract.py pkg/kubectl/cmd/apply.go
|
||||
|
||||
"""
|
||||
import fileinput
|
||||
import sys
|
||||
import re
|
||||
|
||||
class MatchHandler(object):
|
||||
""" Simple holder for a regular expression and a function
|
||||
to run if that regular expression matches a line.
|
||||
The function should expect (re.match, file, linenumber) as parameters
|
||||
"""
|
||||
def __init__(self, regex, replace_fn):
|
||||
self.regex = re.compile(regex)
|
||||
self.replace_fn = replace_fn
|
||||
|
||||
def short_replace(match, file, line_number):
|
||||
"""Replace a Short: ... cobra command description with an internationalization
|
||||
"""
|
||||
sys.stdout.write('{}i18n.T({}),\n'.format(match.group(1), match.group(2)))
|
||||
|
||||
SHORT_MATCH = MatchHandler(r'(\s+Short:\s+)("[^"]+"),', short_replace)
|
||||
|
||||
def import_replace(match, file, line_number):
|
||||
"""Add an extra import for the i18n library.
|
||||
Doesn't try to be smart and detect if it's already present, assumes a
|
||||
gofmt round wil fix things.
|
||||
"""
|
||||
sys.stdout.write('{}\n"k8s.io/kubectl/pkg/util/i18n"\n'.format(match.group(1)))
|
||||
|
||||
IMPORT_MATCH = MatchHandler('(.*"k8s.io/kubectl/pkg/cmd/util")', import_replace)
|
||||
|
||||
|
||||
def string_flag_replace(match, file, line_number):
|
||||
"""Replace a cmd.Flags().String("...", "", "...") with an internationalization
|
||||
"""
|
||||
sys.stdout.write('{}i18n.T("{})"))\n'.format(match.group(1), match.group(2)))
|
||||
|
||||
STRING_FLAG_MATCH = MatchHandler('(\s+cmd\.Flags\(\).String\("[^"]*", "[^"]*", )"([^"]*)"\)', string_flag_replace)
|
||||
|
||||
|
||||
def long_string_replace(match, file, line_number):
|
||||
return '{}i18n.T({}){}'.format(match.group(1), match.group(2), match.group(3))
|
||||
|
||||
LONG_DESC_MATCH = MatchHandler('(LongDesc\()(`[^`]+`)([^\n]\n)', long_string_replace)
|
||||
|
||||
EXAMPLE_MATCH = MatchHandler('(Examples\()(`[^`]+`)([^\n]\n)', long_string_replace)
|
||||
|
||||
def replace(filename, matchers, multiline_matchers):
|
||||
"""Given a file and a set of matchers, run those matchers
|
||||
across the file and replace it with the results.
|
||||
"""
|
||||
# Run all the matchers
|
||||
line_number = 0
|
||||
for line in fileinput.input(filename, inplace=True):
|
||||
line_number += 1
|
||||
matched = False
|
||||
for matcher in matchers:
|
||||
match = matcher.regex.match(line)
|
||||
if match:
|
||||
matcher.replace_fn(match, filename, line_number)
|
||||
matched = True
|
||||
break
|
||||
if not matched:
|
||||
sys.stdout.write(line)
|
||||
sys.stdout.flush()
|
||||
with open(filename, 'r') as datafile:
|
||||
content = datafile.read()
|
||||
for matcher in multiline_matchers:
|
||||
match = matcher.regex.search(content)
|
||||
while match:
|
||||
rep = matcher.replace_fn(match, filename, 0)
|
||||
# Escape back references in the replacement string
|
||||
# (And escape for Python)
|
||||
# (And escape for regex)
|
||||
rep = re.sub('\\\\(\\d)', '\\\\\\\\\\1', rep)
|
||||
content = matcher.regex.sub(rep, content, 1)
|
||||
match = matcher.regex.search(content)
|
||||
sys.stdout.write(content)
|
||||
|
||||
# gofmt the file again
|
||||
from subprocess import call
|
||||
call(["goimports", "-w", filename])
|
||||
|
||||
replace(sys.argv[1], [SHORT_MATCH, IMPORT_MATCH, STRING_FLAG_MATCH], [LONG_DESC_MATCH, EXAMPLE_MATCH])
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# See the OWNERS docs at https://go.k8s.io/owners
|
||||
|
||||
approvers:
|
||||
- sig-cli-maintainers
|
||||
reviewers:
|
||||
- sig-cli
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
|
@ -0,0 +1,96 @@
|
|||
# Test translations for unit tests.
|
||||
# Copyright (C) 2016
|
||||
# This file is distributed under the same license as the Kubernetes package.
|
||||
# FIRST AUTHOR brendan.d.burns@gmail.com, 2016.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gettext-go-examples-hello\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-12-12 20:03+0000\n"
|
||||
"PO-Revision-Date: 2017-01-29 22:54-0800\n"
|
||||
"Last-Translator: Brendan Burns <brendan.d.burns@gmail.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.6.10\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"Language-Team: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"Language: fr\n"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/apply.go#L98
|
||||
msgid "Apply a configuration to a resource by filename or stdin"
|
||||
msgstr ""
|
||||
"Appliquer une configuration à une ressource par nom de fichier ou depuis "
|
||||
"stdin"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/delete_cluster.go#L38
|
||||
msgid "Delete the specified cluster from the kubeconfig"
|
||||
msgstr "Supprimer le cluster spécifié du kubeconfig"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/delete_context.go#L38
|
||||
msgid "Delete the specified context from the kubeconfig"
|
||||
msgstr "Supprimer le contexte spécifié du kubeconfig"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/get_contexts.go#L62
|
||||
msgid "Describe one or many contexts"
|
||||
msgstr "Décrire un ou plusieurs contextes"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/get_clusters.go#L40
|
||||
msgid "Display clusters defined in the kubeconfig"
|
||||
msgstr "Afficher les cluster définis dans kubeconfig"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/view.go#L64
|
||||
msgid "Display merged kubeconfig settings or a specified kubeconfig file"
|
||||
msgstr ""
|
||||
"Afficher les paramètres fusionnés de kubeconfig ou d'un fichier kubeconfig "
|
||||
"spécifié"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/current_context.go#L48
|
||||
msgid "Displays the current-context"
|
||||
msgstr "Affiche le contexte actuel"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/config.go#L39
|
||||
msgid "Modify kubeconfig files"
|
||||
msgstr "Modifier des fichiers kubeconfig"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/create_cluster.go#L67
|
||||
msgid "Sets a cluster entry in kubeconfig"
|
||||
msgstr "Définit un cluster dans kubeconfig"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/create_context.go#L57
|
||||
msgid "Sets a context entry in kubeconfig"
|
||||
msgstr "Définit un contexte dans kubeconfig"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/create_authinfo.go#L103
|
||||
msgid "Sets a user entry in kubeconfig"
|
||||
msgstr "Définit un utilisateur dans kubeconfig"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/set.go#L59
|
||||
msgid "Sets an individual value in a kubeconfig file"
|
||||
msgstr "Définit une valeur individuelle dans un fichier kubeconfig"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/use_context.go#L48
|
||||
msgid "Sets the current-context in a kubeconfig file"
|
||||
msgstr "Définit le contexte courant dans un fichier kubeconfig"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/unset.go#L47
|
||||
msgid "Unsets an individual value in a kubeconfig file"
|
||||
msgstr "Supprime une valeur individuelle dans un fichier kubeconfig"
|
||||
|
||||
msgid "Update the annotations on a resource"
|
||||
msgstr "Mettre à jour les annotations d'une ressource"
|
||||
|
||||
msgid ""
|
||||
"watch is only supported on individual resources and resource collections - "
|
||||
"%d resources were found"
|
||||
msgid_plural ""
|
||||
"watch is only supported on individual resources and resource collections - "
|
||||
"%d resources were found"
|
||||
msgstr[0] ""
|
||||
"watch n'est compatible qu'avec les ressources individuelles et les "
|
||||
"collections de ressources. - %d ressource a été trouvée. "
|
||||
msgstr[1] ""
|
||||
"watch n'est compatible qu'avec les ressources individuelles et les "
|
||||
"collections de ressources. - %d ressources ont été trouvées. "
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
|
@ -0,0 +1,89 @@
|
|||
# Test translations for unit tests.
|
||||
# Copyright (C) 2017
|
||||
# This file is distributed under the same license as the Kubernetes package.
|
||||
# FIRST AUTHOR ianyrchoi@gmail.com, 2018.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gettext-go-examples-hello\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-12-12 20:03+0000\n"
|
||||
"PO-Revision-Date: 2018-04-03 06:05+0900\n"
|
||||
"Last-Translator: Ian Y. Choi <ianyrchoi@gmail.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.0.6\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"Language-Team: \n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"Language: ko_KR\n"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/masterpkg/kubectl/cmd/apply.go#L98
|
||||
msgid "Apply a configuration to a resource by filename or stdin"
|
||||
msgstr "구성을 파일 이름 또는 stdin에 의한 자원에 적용합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/delete_cluster.go#L38
|
||||
msgid "Delete the specified cluster from the kubeconfig"
|
||||
msgstr "kubeconfig에서 지정된 클러스터를 삭제합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/delete_context.go#L38
|
||||
msgid "Delete the specified context from the kubeconfig"
|
||||
msgstr "kubeconfig에서 지정된 컨텍스트를 삭제합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/get_contexts.go#L62
|
||||
msgid "Describe one or many contexts"
|
||||
msgstr "하나 또는 여러 컨텍스트를 설명합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/get_clusters.go#L40
|
||||
msgid "Display clusters defined in the kubeconfig"
|
||||
msgstr "kubeconfig에 정의된 클러스터를 표시합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/view.go#L64
|
||||
msgid "Display merged kubeconfig settings or a specified kubeconfig file"
|
||||
msgstr "병합된 kubeconfig 설정 또는 지정된 kubeconfig 파일을 표시합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/current_context.go#L48
|
||||
msgid "Displays the current-context"
|
||||
msgstr "현재-컨텍스트를 표시합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/config.go#L39
|
||||
msgid "Modify kubeconfig files"
|
||||
msgstr "kubeconfig 파일을 수정합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/create_cluster.go#L67
|
||||
msgid "Sets a cluster entry in kubeconfig"
|
||||
msgstr "kubeconfig에서 클러스터 항목을 설정합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/create_context.go#L57
|
||||
msgid "Sets a context entry in kubeconfig"
|
||||
msgstr "kubeconfig에서 컨텍스트 항목을 설정합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/create_authinfo.go#L103
|
||||
msgid "Sets a user entry in kubeconfig"
|
||||
msgstr "kubeconfig에서 사용자 항목을 설정합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/set.go#L59
|
||||
msgid "Sets an individual value in a kubeconfig file"
|
||||
msgstr "kubeconfig 파일에서 단일값을 설정합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/use_context.go#L48
|
||||
msgid "Sets the current-context in a kubeconfig file"
|
||||
msgstr "kubeconfig 파일에서 현재-컨텍스트를 설정합니다"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/config/unset.go#L47
|
||||
msgid "Unsets an individual value in a kubeconfig file"
|
||||
msgstr "kubeconfig 파일에서 단일값 설정을 해제합니다"
|
||||
|
||||
msgid "Update the annotations on a resource"
|
||||
msgstr "자원에 대한 주석을 업데이트합니다"
|
||||
|
||||
msgid ""
|
||||
"watch is only supported on individual resources and resource collections - "
|
||||
"%d resources were found"
|
||||
msgid_plural ""
|
||||
"watch is only supported on individual resources and resource collections - "
|
||||
"%d resources were found"
|
||||
msgstr[0] ""
|
||||
"watch는 단일 리소스와 리소스 모음만을 지원합니다 - %d 개 자원을 발견하였습"
|
||||
"니다"
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
|
@ -0,0 +1,89 @@
|
|||
# Test translations for unit tests.
|
||||
# Copyright (C) 2017
|
||||
# This file is distributed under the same license as the Kubernetes package.
|
||||
# FIRST AUTHOR warmchang@outlook.com, 2017.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: hello-world\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-05-26 08:28+0800\n"
|
||||
"PO-Revision-Date: 2017-06-02 09:13+0800\n"
|
||||
"Last-Translator: William Chang <warmchang@outlook.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.0.2\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"Language-Team: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"Language: zh\n"
|
||||
|
||||
#: pkg/kubectl/cmd/apply.go:104
|
||||
msgid "Apply a configuration to a resource by filename or stdin"
|
||||
msgstr "通過檔案名或標準輸入流(stdin)對資源進行配置"
|
||||
|
||||
#: pkg/kubectl/cmd/config/delete_cluster.go:39
|
||||
msgid "Delete the specified cluster from the kubeconfig"
|
||||
msgstr "刪除 kubeconfig 檔案中指定的叢集(cluster)"
|
||||
|
||||
#: pkg/kubectl/cmd/config/delete_context.go:39
|
||||
msgid "Delete the specified context from the kubeconfig"
|
||||
msgstr "刪除 kubeconfig 檔案中指定的 context"
|
||||
|
||||
#: pkg/kubectl/cmd/config/get_contexts.go:64
|
||||
msgid "Describe one or many contexts"
|
||||
msgstr "描述一個或多個 context"
|
||||
|
||||
#: pkg/kubectl/cmd/config/get_clusters.go:41
|
||||
msgid "Display clusters defined in the kubeconfig"
|
||||
msgstr "顯示 kubeconfig 檔案中定義的叢集(cluster)"
|
||||
|
||||
#: pkg/kubectl/cmd/config/view.go:67
|
||||
msgid "Display merged kubeconfig settings or a specified kubeconfig file"
|
||||
msgstr "顯示合併的 kubeconfig 配置或一個指定的 kubeconfig 檔案"
|
||||
|
||||
#: pkg/kubectl/cmd/config/current_context.go:49
|
||||
msgid "Displays the current-context"
|
||||
msgstr "顯示目前的 context"
|
||||
|
||||
#: pkg/kubectl/cmd/config/config.go:40
|
||||
msgid "Modify kubeconfig files"
|
||||
msgstr "修改 kubeconfig 檔案"
|
||||
|
||||
#: pkg/kubectl/cmd/config/create_cluster.go:68
|
||||
msgid "Sets a cluster entry in kubeconfig"
|
||||
msgstr "設置 kubeconfig 檔案中的一個叢集(cluster)條目"
|
||||
|
||||
#: pkg/kubectl/cmd/config/create_context.go:58
|
||||
msgid "Sets a context entry in kubeconfig"
|
||||
msgstr "設置 kubeconfig 檔案中的一個 context 條目"
|
||||
|
||||
#: pkg/kubectl/cmd/config/create_authinfo.go:104
|
||||
msgid "Sets a user entry in kubeconfig"
|
||||
msgstr "設置 kubeconfig 檔案中的一個使用者條目"
|
||||
|
||||
#: pkg/kubectl/cmd/config/set.go:60
|
||||
msgid "Sets an individual value in a kubeconfig file"
|
||||
msgstr "設置 kubeconfig 檔案中的一個值"
|
||||
|
||||
#: pkg/kubectl/cmd/config/use_context.go:49
|
||||
msgid "Sets the current-context in a kubeconfig file"
|
||||
msgstr "設置 kubeconfig 檔案中的目前 context"
|
||||
|
||||
#: pkg/kubectl/cmd/config/unset.go:48
|
||||
msgid "Unsets an individual value in a kubeconfig file"
|
||||
msgstr "取消設置 kubeconfig 檔案中的一個值"
|
||||
|
||||
#: pkg/kubectl/cmd/annotate.go:116
|
||||
msgid "Update the annotations on a resource"
|
||||
msgstr "更新一個資源的注解(annotations)"
|
||||
|
||||
msgid ""
|
||||
"watch is only supported on individual resources and resource collections - "
|
||||
"%d resources were found"
|
||||
msgid_plural ""
|
||||
"watch is only supported on individual resources and resource collections - "
|
||||
"%d resources were found"
|
||||
msgstr[0] "一次只能 watch 一個資源或資料集合 - 找到了 %d 個資源"
|
||||
msgstr[1] "一次只能 watch 一個資源或資料集合 - 找到了 %d 個資源"
|
||||
Binary file not shown.
|
|
@ -0,0 +1,28 @@
|
|||
# Test translations for unit tests.
|
||||
# Copyright (C) 2016
|
||||
# This file is distributed under the same license as the Kubernetes package.
|
||||
# FIRST AUTHOR brendan.d.burns@gmail.com, 2016.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gettext-go-examples-hello\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-12-12 20:03+0000\n"
|
||||
"PO-Revision-Date: 2016-12-13 21:35-0800\n"
|
||||
"Last-Translator: Brendan Burns <brendan.d.burns@gmail.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.6.10\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"Language-Team: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Language: en\n"
|
||||
|
||||
msgid "test_plural"
|
||||
msgid_plural "test_plural"
|
||||
msgstr[0] "there was %d item"
|
||||
msgstr[1] "there were %d items"
|
||||
|
||||
msgid "test_string"
|
||||
msgstr "foo"
|
||||
Binary file not shown.
|
|
@ -0,0 +1,28 @@
|
|||
# Test translations for unit tests.
|
||||
# Copyright (C) 2016
|
||||
# This file is distributed under the same license as the Kubernetes package.
|
||||
# FIRST AUTHOR brendan.d.burns@gmail.com, 2016.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gettext-go-examples-hello\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-12-12 20:03+0000\n"
|
||||
"PO-Revision-Date: 2016-12-13 22:12-0800\n"
|
||||
"Last-Translator: Brendan Burns <brendan.d.burns@gmail.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.6.10\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"Language-Team: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Language: en\n"
|
||||
|
||||
msgid "test_plural"
|
||||
msgid_plural "test_plural"
|
||||
msgstr[0] "there was %d item"
|
||||
msgstr[1] "there were %d items"
|
||||
|
||||
msgid "test_string"
|
||||
msgstr "baz"
|
||||
Loading…
Reference in New Issue