Microsoft-ui-xaml: Discussion: Should we localize all error messages?

Created on 16 Apr 2020  ·  3Comments  ·  Source: microsoft/microsoft-ui-xaml

Discussion: Should we localize all error messages?


As a former Spanish-speaking student of computer science, I find that when learning a new technology and you don't speak the language, having errors and documentation in your native language is incredible useful, I think we have an opportunity here for improvement here.

Related Links

discussion

Most helpful comment

WinUI is implemented as WinRT, and WinRT doesn't have a way to set an Exception.Message. So the error messages that WinUI generates are visible in the debugger, but should never be showing up to an end user like they do with WPF/WinForms. (WinUI generates errors using RoOriginateError, which is designed so that the message can only be retrieved by a debugger.)

All 3 comments

I am not sure, if it is really useful.

  1. Most important fact, that it's a way more easier to find errors on English.
  2. Services like AppCenter or HockeyApp group errors by exception messages. And sometimes we can see same error, but duplicated with translation on user PC language.
  3. Usually error messages written with easy to understand English.
    And more important fact, that it's a way more easier to find error on English.
  4. Am not sure, if it's good practice to show Exception.Message to user in some kind of error dialogs, but it should be stored in logs. And again - if you receive logs on unknown for you language, it isn't really useful.

By the way, while it could be disabled for application, it's fine for me. However, I am not sure, if it worth time.

P.S. I am native Russian speaker. It was pain for me to find some errors on Russian)

Considering .NET Core recently switched back to localizing exception messages it would be weird if WinUI wouldn't be following. [edit] I forgot that WinUI is not pure .NET, but uses HRESULT error codes instead of Exception objects.

Am not sure, if it's good practice to show Exception.Message to user in some kind of error dialogs

I don't know how its done in UWP/WinUI databinding, but WPF and WinForms databinding expose any error message happening during the databinding to the user. This means any exception that can reasonably be thrown in databinding writeback scenarios must be localized.

If WinUI catches exceptions during databinding (instead of terminating the process) then it probably will have to do the same, unless it replaces the exception message with a generic localized message.

(And yeah, having to search for foreign-language errors is a pain, but I don't see any way around it when databinding exposes these errors to the end user, who definitely is expecting localized error messages.)

WinUI is implemented as WinRT, and WinRT doesn't have a way to set an Exception.Message. So the error messages that WinUI generates are visible in the debugger, but should never be showing up to an end user like they do with WPF/WinForms. (WinUI generates errors using RoOriginateError, which is designed so that the message can only be retrieved by a debugger.)

Was this page helpful?
0 / 5 - 0 ratings