-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
res/values/strings.xml:
<resources>
<string name="library_text_argument">{name, date}</string>
</resources>res/values-es/strings.xml:
<resources>
<string name="library_text_argument">{name, number}</string>
</resources>Currently this produces:
public object FormattedResources {
public fun library_text_argument(name: Instant): FormattedResource {
val arguments = ArrayMap<String, Any>(1)
arguments.put("name", Date.from(name))
return FormattedResource(
id = R.string.library_text_argument,
arguments = arguments
)
}
public fun library_text_argument(name: Number): FormattedResource {
val arguments = ArrayMap<String, Any>(1)
arguments.put("name", name)
return FormattedResource(
id = R.string.library_text_argument,
arguments = arguments
)
}
}I suspect we simply want to enforce the types to match across all configurations and fail the build otherwise.
Are there any cases where you might want to have multiple types for a single token? Solutions to this depend on #29 a bit, since a workaround for that would be to name them differently (provided we allow this with an XML attribute somehow). Then at the callsite you would have to do library_text_argument(nameDate = someInstance, nameNumber = 12).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working