-
-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
codegen: android-xmlCodegen from Android String Resources conversion issueCodegen from Android String Resources conversion issue
Description
When specifying printf format strings you can include a parameter index to refer to which of the arguments you are referring to. For example this would include the first parameter followed by the second parameter
<string name="foo">%1$d - %2$s</string>
This is important because not all translations will use the paramters in the same order and in some cases may use a paramter more than once. A particular translation is allowed to do something like:
<string name="foo">%2$s - %1$d - %2$s</string>
The XML processor simply throws away the index and assumes that all translations use the parameters only once and in the same order. For the first one it will generate a function with Int and String parameters. The second one will generate parameters of String, Int, String
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
codegen: android-xmlCodegen from Android String Resources conversion issueCodegen from Android String Resources conversion issue