Hi, is there a way to get a StringResource from a ...
# moko
m
Hi, is there a way to get a StringResource from a string id in common code ? Something similar to this which gives and int id
Copy code
context.resources.getIdentifier(
    "hellow_message_$1",
    "string",
    context.packageName
)
d
I made some wrappers that I shared in https://github.com/icerockdev/moko-resources/discussions/393 Works great, the only issue I've had is what I brought up in the discussion; the android unit tests need a workaround when testing common strings.
m
I tried instead of:
Copy code
MR.strings().app_name.desc().localized()
I want something like:
Copy code
StringResource(resourceId: "app_name", bundle: Bundle.main).desc().localized()
but the second one is returning the string id instead of the corresponding string