microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.66k stars 8.32k forks source link

Terminal might use i18n strings from multiple languages, if the preferred lang is not one WT is fully localized into #15596

Open mataha opened 1 year ago

mataha commented 1 year ago

[!IMPORTANT]
📌 Plan of record: https://github.com/microsoft/terminal/issues/15596#issuecomment-1612163250 We should try to avoid using resources from languages we're only partially localized into (if that's even possible)


Windows Terminal version

1.17.11461.0

Windows build number

10.0.19045.3086

Other Software

N/A

Steps to reproduce

Open Windows Terminal. That's it.

System languages installed (in order of preference):

Expected Behavior

Windows Terminal opens in my preferred system language (Polish), falling back to English (as it is the de facto lingua franca) if that's not possible.

Actual Behavior

I'd like to provide more details, but I can't stop laughing.

image

lhecker commented 1 year ago

I honestly don't even know how to begin working on this. 😄 We don't really control this - we just tell WinUI our set of localized strings and it picks the right one based on language preference. It seems to usually work, given that this is (unless I'm mistaken) the first time we've seen such a bug report. I also can't find anything like that over at https://github.com/microsoft/microsoft-ui-xaml.

DHowett commented 1 year ago

LOL. Thanks for filing! I think I know how to approach this one.

If your list of preferred languages is:

  • Polish (display)
  • Japanese
  • Korean
  • Russian

We are not going to choose English under those circumstances. English is not one of your preferred languages!

For a quick fix, you can override the display language of Windows Terminal's UI with a setting on the Appearance page. :smile:

The main issue is that Terminal isn't localized in Polish... but some of its components are, Ugh.

The secondary issue is that MRT (the modern resource "thing" (not its official name)) doesn't do whole-application language selection; it actually does per-resource language selection.

The tertiary issue is that we do mark our package as supporting Polish, for this darn thing:

image

(That menu item gets localized into 88 languages, where the rest of Terminal only gets 13. Yeah. Not great.)

I'd like to provide more details, but I can't stop laughing.

(Do you mind if I share this with the i18n team? They'll get a kick out of it :D)

zadjii commented 1 year ago

This is a good sign that partial localizations work though, for #10667

carlos-zamora commented 1 year ago

We should see if we can configure language fallback with MRT

mataha commented 1 year ago

I honestly don't even know how to begin working on this. 😄 We don't really control this - we just tell WinUI our set of localized strings and it picks the right one based on language preference. It seems to usually work, given that this is (unless I'm mistaken) the first time we've seen such a bug report. I also can't find anything like that over at https://github.com/microsoft/microsoft-ui-xaml.

I don't think there are many users with three - or even two - preferred system languages. Even less that would file a bug report here.

The secondary issue is that MRT (the modern resource "thing" (not its official name)) doesn't do whole-application language selection; it actually does per-resource language selection.

That's what I thought - buttons are in Polish, most of the translated resources are in Japanese (with leftovers in Korean) and the rest is in English...

(Do you mind if I share this with the i18n team? They'll get a kick out of it :D)

Feel free to do so, by all means!

VectorBCO commented 11 months ago

i have a similar issue when terminal chose russian for some reason https://github.com/microsoft/terminal/issues/16395