Closed schildbach closed 8 years ago
@techguy613 You might want to have a look at this.
Any suggestions on how you'd like to handle this instead?
I think I would simply inline all the strings into the source code. If I understand it right, these are all exception messages which should not be translated anyway. So what's the resource bundle indirection good for?
Another idea would be a static setter that could be used by Android apps to set the resource bundle in your R class manually. Because Android actually can read resource bundles, it just doesn't support reading them from the classpath like you do.
Hm, these were meant to be an explanation why a validation failed.
The setter is a good alternative, and as a fallback, returning the key (formatted like in the unit tests: key:param1:...:paramN
)
Ah, that fallback would be perfect. Even without the setter.
Hey all, the setter sounds good to me. Should I take a crack at it or would you (@ibauersachs) like to make the change yourself?
Some help would be very welcome :-)
Dnssecjava pulls strings from a messages.properties. Unfortunately, Android does not have this mechanism. This results in an exception whenever R.get() is called, e.g.: