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

Add automatic locale detection #4199

Merged
merged 5 commits into from
May 3, 2019

Conversation

sharifelgamal
Copy link
Collaborator

Fixes #4183

@sharifelgamal sharifelgamal requested a review from tstromberg May 3, 2019 02:06
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 3, 2019
@k8s-ci-robot k8s-ci-robot requested review from balopat and dlorenc May 3, 2019 02:06
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 3, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sharifelgamal

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 May 3, 2019
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@sharifelgamal sharifelgamal added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 3, 2019
@sharifelgamal sharifelgamal removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 3, 2019
@@ -88,14 +89,20 @@ func OutStyle(style, format string, a ...interface{}) error {

// Out writes a basic formatted string to stdout
func Out(format string, a ...interface{}) error {
locale, err := jibber_jabber.DetectIETF()
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mind taking some Go benchmarks to see how if this adversely affects the Out() call performance?

If so, perhaps we should move the preferred language setup to cmd/minikube/main.go.

@@ -691,3 +693,12 @@ func saveConfig(clusterConfig cfg.Config) error {
}
return nil
}

func determineLocale() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be in main.go, so that it affects all commands, rather than just minikube start.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense. done.

@sharifelgamal sharifelgamal merged commit 8afeda2 into kubernetes:master May 3, 2019
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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.

Add code to switch languages appropriately
4 participants