Closed esbenam closed 4 years ago
I'm merging this one because I agree that we shouldn't be throwing an error here. I would be more confident about throwing an error if the code base had better testing. Adding an issue #284 for this missing translation key.
This is a suggestion
If an error is thrown the whole program breaks. This combined with the fact that some keys are missing across different translations makes it a fairly inconvenient issue.
With this in place the program would finish with logs warning about the missing keys.
Right now I think the only key missing in
translation.en
is4_1_2_attribute
. If that is added this implementation could fallback to using the english translation as default (so it would still give somewhat valuable information to the user). It could also just return the key that was passed togetTranslation
- that way the user would always get some useful information no matter what. That could easily be included in this pull request.I don't know what the text for
4_1_2_attribute
should be but would be happy to include that as well.