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

The current UI culture isn't respected - messages continue to be displayed in English #10679

Closed
mklement0 opened this issue Oct 2, 2019 · 5 comments

Comments

@mklement0
Copy link
Contributor

commented Oct 2, 2019

Steps to reproduce

  • Run on Windows.
  • Make sure that Deutsch (Deutschland) (German (Germany) is installed as a Windows UI (display) language via the Windows 10 Settings application.
[cultureinfo]::CurrentUICulture = 'de-DE'; Get-Item nosuch 2>&1 | Should -match 'nicht gefunden'

Expected behavior

The test should succeed.

Actual behavior

The test fails:

Expected regular expression 'nicht gefunden' to match Cannot find path 'C:\Users\User\nosuch' because it does not exist., but it did not match.

That is, the error message was still emitted in English.

This is a regression of sorts from Windows PowerShell, where the above test succeeds.
However, Windows PowerShell's problem is that [cultureinfo]::CurrentUICulture is reset after each command line.

Environment data

PowerShell Core 7.0.0-preview.4
@iSazonov

This comment has been minimized.

Copy link
Collaborator

commented Oct 2, 2019

I am not sure that localized help was published. Debug shows internall exception and fallback to en-US.

@mklement0

This comment has been minimized.

Copy link
Contributor Author

commented Oct 2, 2019

The test actually tests error messages, not help content.

I naively assumed that since localized DLLs are present in $PSHOME (although on Unix platforms there are only 2) that at least startup messages, error messages, ... would already be localized.

Is this being tracked somewhere? Is there a roadmap?

@vexx32

This comment has been minimized.

Copy link
Collaborator

commented Oct 2, 2019

/cc @SteveL-MSFT? 🙂

@iSazonov

This comment has been minimized.

Copy link
Collaborator

commented Oct 2, 2019

The localized dlls come only from .Net Core, no PowerShell dlls.
It is tracked in #666 (sorry for the number :-) )

@mklement0

This comment has been minimized.

Copy link
Contributor Author

commented Oct 2, 2019

:) Thanks, @iSazonov - I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.