Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes kubectl respect the LC_ALL and LC_MESSAGES env vars #69500

Merged
merged 1 commit into from
Oct 12, 2018
Merged

Makes kubectl respect the LC_ALL and LC_MESSAGES env vars #69500

merged 1 commit into from
Oct 12, 2018

Conversation

m1kola
Copy link
Member

@m1kola m1kola commented Oct 7, 2018

What this PR does / why we need it:

The LC_ALL and LC_MESSAGES env vars can now be used to set desired locale for kubectl while keeping LANG unchanged.

Which issue(s) this PR fixes:
Fixes kubernetes/kubectl#476

Special notes for your reviewer:

UPD: This PR now also implements support of LC_ALL (see #69500 (comment))

I'm not sure if we want to support LANGUAGE and LC_ALL to implement the priority order described here. See my question in the original issue.

Release note:

The `LC_ALL` and `LC_MESSAGES` env vars can now be used to set desired locale for `kubectl` while keeping `LANG` unchanged.

/sig cli

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 7, 2018
@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/kubectl labels Oct 7, 2018
@dims
Copy link
Member

dims commented Oct 10, 2018

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 10, 2018
@soltysh
Copy link
Contributor

soltysh commented Oct 11, 2018

I'm not sure if we want to support LANGUAGE and LC_ALL to implement the priority order described here. See my question in the original issue.

While you're at it I guess yeah it would be nice to support LC_ALL per the linked doc.

/kind feature

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Oct 11, 2018
@soltysh soltysh self-assigned this Oct 11, 2018
Implements the following locale lookup priority order: `LC_MESSAGES`, `LC_ALL`, `LANG`.
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 11, 2018
@m1kola m1kola changed the title Makes kubectl respect the LC_MESSAGES env var Makes kubectl respect the LC_ALL and LC_MESSAGES env vars Oct 11, 2018
@m1kola
Copy link
Member Author

m1kola commented Oct 11, 2018

/retest

@m1kola
Copy link
Member Author

m1kola commented Oct 11, 2018

@soltysh I added support for LC_ALL. Could you, please, take another look?

Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 12, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: m1kola, soltysh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 12, 2018
@k8s-ci-robot k8s-ci-robot merged commit 3f102c3 into kubernetes:master Oct 12, 2018
@m1kola m1kola deleted the LC_MESSAGES_support branch October 12, 2018 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubectl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubectl shows localized messages even though LC_MESSAGES=C
4 participants