Hi,
I have a resource string in src/remoting/resources/remoting_strings.grd:
<message desc="Description of why host is offline, when client gets a host-offline-reason it doesn't recognize."
name="IDS_OFFLINE_REASON_UNKNOWN" formatter_data="android_java">
Unrecognized host error: <ph name="HOST_OFFLINE_REASON">$1<ex>EXIT_CODE_FROM_HOST_NEWER_THAN_CLIENT</ex></ph>.
</message>
The string contains "$1" as a placeholder. The placeholder works fine in javascript. The problem is that this placeholder
won't be recognized as-is by Java/Android.
It seems to me that I can get away with "%s" as a placeholder (i.e. it seems to me that such placeholder would work both in Android/Java as well as in Javascript/
chrome.i18n [which seems to accept any unique string as a placeholder?]). Before I try this out to see if works in practice - QUESTION: Does this seem like a reasonable approach? Any comments on going down this route?
FWIW, I tried finding already existing strings with placeholders, but most of them are used from C++, not from Java (there are some resources targeting Android in chrome/app/generated_resources.grd, but when searching for some of them [i.e. IDS_PROMPT_DANGEROUS_DOWNLOAD] I am finding them dereferenced only from C++, not from Java).
Thanks,
Lukasz