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

Set the lang env by using os-locale #2913

Merged
merged 1 commit into from
Apr 27, 2018
Merged

Conversation

Stanzilla
Copy link
Collaborator

@Stanzilla Stanzilla commented Apr 23, 2018

This is #605 rebased and @leo's comment addressed.

I tested that it still works correctly on en_US

Copy link
Contributor

@albinekb albinekb left a comment

Choose a reason for hiding this comment

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

I think this is ready to merge, we had LGTM in the old PR, same code just the dep added.

@Stanzilla Stanzilla added the 🎨 Type: Enhancement Issue or PR is an enhancement request/proposal for Hyper label Apr 24, 2018
@Stanzilla Stanzilla requested a review from chabou April 24, 2018 12:33
@chabou
Copy link
Collaborator

chabou commented Apr 27, 2018

Works great
Before:
image

After:
image

@chabou chabou merged commit 9a53672 into vercel:canary Apr 27, 2018
@Stanzilla Stanzilla deleted the 605_rebase branch April 27, 2018 14:03
@chabou chabou mentioned this pull request May 18, 2018
2 tasks
@chabou chabou mentioned this pull request Jun 17, 2018
2 tasks
chabou pushed a commit that referenced this pull request Dec 15, 2018
@pi0
Copy link
Contributor

pi0 commented Dec 16, 2018

This is causing warns when my locale is not en_US:

MacOS Mojave 10.14.2 (18C54) / Hyper 2.1.0 stable

image

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LC_ALL = (unset),
        LC_CTYPE = "en_IR.UTF-8",
        LANG = "en_IR.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LC_ALL = (unset),
        LC_CTYPE = "en_IR.UTF-8",
        LANG = "en_IR.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

The current workaround is manually set env in ~/.hyper.js:

{
    env: {
     LANGUAGE: 'en_US.UTF-8',
     LC_ALL: 'en_US.UTF-8',
     LANG: 'en_US.UTF-8',
     LC_TYPE: 'en_US.UTF-8',
    },
}

@pi0
Copy link
Contributor

pi0 commented Dec 16, 2018

More investigations: os-locale will use defaults read -g AppleLocale command to compute locale which resolves to en_IR which is an invalid (at least perl) locale. We may need a validation mecanism over it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 Type: Enhancement Issue or PR is an enhancement request/proposal for Hyper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants