-
Notifications
You must be signed in to change notification settings - Fork 18
Plan for multilingual / translated errors #47
Comments
I suspect this is well outside of the scope of this project group. But it might be helpful to document some specific challenges (with code) that folks have run into in this space.
To be clear, they can and do. So "cannot" here is too strong of a word. It should probably be replaced with "if possible, and enough resources are available, end user applications should not assume users can read English." |
It would probably require some localization libraries such as Additional thought that occurred to me: Can we just inject message strings in any language, so that Rust prints out translated error messages? One idea is having an external library with all the strings of standard Rust errors/user-facing messages and provide it via special call to the The last thought is probably too far fetched if we don't need the actual Rust language errors/compilation errors to be not in plain English. |
I think this should be out of scope. Internationalization is an extremely nuanced topic and it's one where handing down A Solution to everyone seldom works. Good internationalization frameworks are highly pluggable and customizeable (I'm using This means that it's not that useful to standardize how i18n is done: most people will not use it. We could have a A thing that might be useful would be a way to provide some of the scaffolding that enables applications to plug in their own i18n work. For example, tooling that assigns ids to strings on error types found in dependencies, which makes it easy to reconstruct those error messages in One could imagine something like
Actually, we plan to do this for the compiler: rust-lang/community-localization#4 |
If the error is a programming error, the error would be non sense for the user anyway. If the error is not a programming error, here I think it's make sense to have a translation feature and so it's should be the problem of an application. It's unfortunate but this kind of feature would introduce way too many problem for very little gain. |
End-user-facing applications - e.g. a Windows desktop application - cannot assume that the end user can speak English. Two critical pieces of error reporting functionality are needed:
This is made more complex by error chaining; I'm not aware of any existing programming language that completely solves this problem.
The text was updated successfully, but these errors were encountered: