-
Notifications
You must be signed in to change notification settings - Fork 20
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
Initial localization support #37
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think we should localise error messages like this
It makes it harder to search for solutions, harder for people trying to provide support, and doesn't really benefit users. We dont localise error messages in other projects, especially none user facing ones like this.
01c0576
to
7386425
Compare
We could maybe introduce error codes that make it accessible for replacement on the embedding application side? |
That's the goal, having a central But as mentioned above, that's going to be a separate PR (probably after #94 is merged) |
@@ -0,0 +1,14 @@ | |||
format.tiny_file = Tiny File |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this shouldnt even be translated, other than maybe "File". Im not really sure this should be handled in mapping-io.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some languages will need to hyphenate individual words, switch their order around, or even outright translate the format names. For example in German, you'd have Tiny-v2-Datei
and IntelliJ-Migrationszuordnungsdatei
(at least when going with the German language pack's translation).
I think this makes sense being part of Mapping-IO natively, as I don't want to duplicate the translation files across a dozen different applications like Enigma, Matcher and JADX, just to name a few. And you're not forced to use MIO's translations either, you can always delegate to a custom localization system via Translatable#translationKey()
. Not to mention that these facilities are required for #88 and #94 to provide user-friendly warnings and error messages e.g. in Enigma.
Inspired by Enigma's and JADX's equivalents, but heavily stripped down. Only supports mapping format names for now, exception messages are going to be tackled in a separate PR.