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

Locale must be of the form <language> or <language>-<territory> #16492

Closed
mersadk opened this issue Jun 13, 2017 · 7 comments
Closed

Locale must be of the form <language> or <language>-<territory> #16492

mersadk opened this issue Jun 13, 2017 · 7 comments
Assignees
Labels
Bug A bug in TypeScript Needs More Info The issue still hasn't been fully clarified Visual Studio Integration with Visual Studio

Comments

@mersadk
Copy link

mersadk commented Jun 13, 2017

TypeScript Version: 2.3

When I try to publish web site from VS2017 I get following error:

Locale must be of the form <language> or <language>-<territory>. For example 'en' or 'ja-jp'.

In output window there is this line:

C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.3\tsc.exe --project "C:\VS_Projects\MyWebProject\tsconfig.json" --listEmittedFiles --locale bs-Latn-BA

I didn't set --locale anywhere, it was set either by operating system or visual studio.

Edit: Probably not important for this, but if I publish to folder, instead of web deploy, VS2017 will publish it with locale en-US.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 13, 2017

As a workaround, set the PreferedUILang in your project to a different language, e.g. en-us

  <PropertyGroup>
    <PreferredUILang>en-us</PreferredUILang>
  </PropertyGroup>

@mhegazy mhegazy added the Bug A bug in TypeScript label Jun 13, 2017
@mhegazy mhegazy added this to the TypeScript 2.5 milestone Jun 13, 2017
@yuit yuit added the Visual Studio Integration with Visual Studio label Jul 10, 2017
@hmendozap
Copy link

hmendozap commented Jul 28, 2017

Can confirm also happens when using TypeScript 2.2

@DanielRosenwasser DanielRosenwasser added the Needs More Info The issue still hasn't been fully clarified label Aug 3, 2017
@DanielRosenwasser DanielRosenwasser assigned amcasey and unassigned yuit Aug 3, 2017
@DanielRosenwasser
Copy link
Member

What OS and VS versions are you using? Have you customized your language settings somehow?

@hmendozap
Copy link

Win 10 Creators Update with VS2017 (15.2 - 26430.16) Release.

Customized language settings? That's the weird part, I work in latin america, but all my dev is in english, my keyboard is dvorak-spanish, does that count?

@minestarks
Copy link
Member

minestarks commented Aug 4, 2017

bs-Latn-BA = Bosnian (Bosnia and Herzegovina, Latin) (Bosnian in the Latin alphabet as opposed to Cyrillic) for what it's worth

we should be able to parse locales like this.

@minestarks
Copy link
Member

@hmendozap Are you still running into this? Do you have a build log you can share?

@minestarks
Copy link
Member

I don't have enough details to make progress on this. As far as I can tell the locale passed into tsc.exe has to be one of the supported VS display languages, which this isn't one of. Without a project file / build log I'm not going to be able to understand where this string came from. Closing the issue.

@microsoft microsoft locked and limited conversation to collaborators Aug 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Needs More Info The issue still hasn't been fully clarified Visual Studio Integration with Visual Studio
Projects
None yet
Development

No branches or pull requests

7 participants