-
Notifications
You must be signed in to change notification settings - Fork 79
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
refactor: Add TranslationFacility for decoupling from HOVerwaltung #2143
refactor: Add TranslationFacility for decoupling from HOVerwaltung #2143
Conversation
873d28f
to
35b1976
Compare
5d9229a
to
25d23e0
Compare
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.
Thanks! Some minor changes and comments, but definitely a change that improves testability. Also, please keep in mind that one of the project goals is to migrate to Kotlin.
56adb8b
to
b145d74
Compare
6967f3d
to
c2d5c14
Compare
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.
Thanks for the work!
HumanDuration
class that could also produce a human readable string from itself.That needed translations, and when I wrote tests, I noticed that I needed an instance of
HOVerwaltung
, which is a singleton. I got a strange error message that the DB is working and the reason is the singleton.Those are the facts.
The idea is to have a holder of the globally used instance of the translator:
TranslationFacility
The main advantage is that it is possible to change the translator of the application during the tests (e.g., the
LANGUAGE_NO_TRANSLATION
orLANGUAGE_DEFAULT
) without doing anything else by accident.src/main/resources/release_notes.md
...