Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
eecfcfb3
Commit
eecfcfb3
authored
Jan 25, 2017
by
Brendan Burns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract strings for the 'kubectl set' family of commands.
parent
a3f8ee65
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
51 additions
and
6 deletions
+51
-6
BUILD
pkg/kubectl/cmd/set/BUILD
+1
-0
set.go
pkg/kubectl/cmd/set/set.go
+2
-1
set_image.go
pkg/kubectl/cmd/set/set_image.go
+2
-1
set_resources.go
pkg/kubectl/cmd/set/set_resources.go
+2
-1
set_selector.go
pkg/kubectl/cmd/set/set_selector.go
+2
-1
k8s.mo
translations/kubectl/default/LC_MESSAGES/k8s.mo
+0
-0
k8s.po
translations/kubectl/default/LC_MESSAGES/k8s.po
+21
-1
k8s.mo
translations/kubectl/en_US/LC_MESSAGES/k8s.mo
+0
-0
k8s.po
translations/kubectl/en_US/LC_MESSAGES/k8s.po
+21
-1
No files found.
pkg/kubectl/cmd/set/BUILD
View file @
eecfcfb3
...
...
@@ -24,6 +24,7 @@ go_library(
"//pkg/kubectl/cmd/templates:go_default_library",
"//pkg/kubectl/cmd/util:go_default_library",
"//pkg/kubectl/resource:go_default_library",
"//pkg/util/i18n:go_default_library",
"//vendor:github.com/spf13/cobra",
"//vendor:k8s.io/apimachinery/pkg/api/errors",
"//vendor:k8s.io/apimachinery/pkg/api/meta",
...
...
pkg/kubectl/cmd/set/set.go
View file @
eecfcfb3
...
...
@@ -22,6 +22,7 @@ import (
"github.com/spf13/cobra"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
cmdutil
"k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/util/i18n"
)
var
(
...
...
@@ -34,7 +35,7 @@ var (
func
NewCmdSet
(
f
cmdutil
.
Factory
,
out
,
err
io
.
Writer
)
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"set SUBCOMMAND"
,
Short
:
"Set specific features on objects"
,
Short
:
i18n
.
T
(
"Set specific features on objects"
)
,
Long
:
set_long
,
Run
:
cmdutil
.
DefaultSubCommandRun
(
err
),
}
...
...
pkg/kubectl/cmd/set/set_image.go
View file @
eecfcfb3
...
...
@@ -29,6 +29,7 @@ import (
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
cmdutil
"k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/resource"
"k8s.io/kubernetes/pkg/util/i18n"
)
// ImageOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of
...
...
@@ -91,7 +92,7 @@ func NewCmdImage(f cmdutil.Factory, out, err io.Writer) *cobra.Command {
cmd
:=
&
cobra
.
Command
{
Use
:
"image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N"
,
Short
:
"Update image of a pod template"
,
Short
:
i18n
.
T
(
"Update image of a pod template"
)
,
Long
:
image_long
,
Example
:
image_example
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
...
...
pkg/kubectl/cmd/set/set_resources.go
View file @
eecfcfb3
...
...
@@ -32,6 +32,7 @@ import (
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
cmdutil
"k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/resource"
"k8s.io/kubernetes/pkg/util/i18n"
)
var
(
...
...
@@ -98,7 +99,7 @@ func NewCmdResources(f cmdutil.Factory, out io.Writer, errOut io.Writer) *cobra.
cmd
:=
&
cobra
.
Command
{
Use
:
"resources (-f FILENAME | TYPE NAME) ([--limits=LIMITS & --requests=REQUESTS]"
,
Short
:
"Update resource requests/limits on objects with pod templates"
,
Short
:
i18n
.
T
(
"Update resource requests/limits on objects with pod templates"
)
,
Long
:
fmt
.
Sprintf
(
resources_long
,
strings
.
Join
(
resourceTypesWithPodTemplate
,
", "
)),
Example
:
resources_example
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
...
...
pkg/kubectl/cmd/set/set_selector.go
View file @
eecfcfb3
...
...
@@ -31,6 +31,7 @@ import (
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
cmdutil
"k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/resource"
"k8s.io/kubernetes/pkg/util/i18n"
)
// SelectorOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of
...
...
@@ -78,7 +79,7 @@ func NewCmdSelector(f cmdutil.Factory, out io.Writer) *cobra.Command {
cmd
:=
&
cobra
.
Command
{
Use
:
"selector (-f FILENAME | TYPE NAME) EXPRESSIONS [--resource-version=version]"
,
Short
:
"Set the selector on a resource"
,
Short
:
i18n
.
T
(
"Set the selector on a resource"
)
,
Long
:
fmt
.
Sprintf
(
selectorLong
,
validation
.
LabelValueMaxLength
),
Example
:
selectorExample
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
...
...
translations/kubectl/default/LC_MESSAGES/k8s.mo
View file @
eecfcfb3
No preview for this file type
translations/kubectl/default/LC_MESSAGES/k8s.po
View file @
eecfcfb3
...
...
@@ -8,7 +8,7 @@ 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-2
7 20:30
-0800\n"
"PO-Revision-Date: 2017-01-2
9 14:45
-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"
...
...
@@ -108,3 +108,23 @@ msgstr "Sets the current-context in a kubeconfig file"
msgctxt "Display merged kubeconfig settings or a specified kubeconfig file"
msgid "Display merged kubeconfig settings or a specified kubeconfig file"
msgstr "Display merged kubeconfig settings or a specified kubeconfig file"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set.go#L37
msgctxt "Set specific features on objects"
msgid "Set specific features on objects"
msgstr "Set specific features on objects"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set_image.go#L94
msgctxt "Update image of a pod template"
msgid "Update image of a pod template"
msgstr "Update image of a pod template"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set_resources.go#L101
msgctxt "Update resource requests/limits on objects with pod templates"
msgid "Update resource requests/limits on objects with pod templates"
msgstr "Update resource requests/limits on objects with pod templates"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set_selector.go#L81
msgctxt "Set the selector on a resource"
msgid "Set the selector on a resource"
msgstr "Set the selector on a resource"
translations/kubectl/en_US/LC_MESSAGES/k8s.mo
View file @
eecfcfb3
No preview for this file type
translations/kubectl/en_US/LC_MESSAGES/k8s.po
View file @
eecfcfb3
...
...
@@ -8,7 +8,7 @@ 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-2
7 20:30
-0800\n"
"PO-Revision-Date: 2017-01-2
9 14:45
-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"
...
...
@@ -108,3 +108,23 @@ msgstr "Sets the current-context in a kubeconfig file"
msgctxt "Display merged kubeconfig settings or a specified kubeconfig file"
msgid "Display merged kubeconfig settings or a specified kubeconfig file"
msgstr "Display merged kubeconfig settings or a specified kubeconfig file"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set.go#L37
msgctxt "Set specific features on objects"
msgid "Set specific features on objects"
msgstr "Set specific features on objects"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set_image.go#L94
msgctxt "Update image of a pod template"
msgid "Update image of a pod template"
msgstr "Update image of a pod template"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set_resources.go#L101
msgctxt "Update resource requests/limits on objects with pod templates"
msgid "Update resource requests/limits on objects with pod templates"
msgstr "Update resource requests/limits on objects with pod templates"
# https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/set/set_selector.go#L81
msgctxt "Set the selector on a resource"
msgid "Set the selector on a resource"
msgstr "Set the selector on a resource"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment