ibrigadir / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 0 forks source link

Field references not resolved in localized hints #969

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a hint to some UI field.
2. Localize the hint so that it's available in multiple languages.
3. Put a field reference in the hint.

What is the expected output? What do you see instead?

Expect the field reference to be resolved. Instead, it shows as ${0}, ${1}, etc.

Please use labels and text to provide additional information.

Following is the fix.

In core/src/org/javarosa/form/api/FormEntryPrompt.java's getHelpText():

        try{
            if (textID != null) {
-               helpText=localizer().getLocalizedText(textID);
+               helpText=substituteStringArgs(localizer().getLocalizedText(textID));
            } else {
-               
helpText=substituteStringArgs(((QuestionDef)element).getHelpInnerText());
+             helpText=substituteStringArgs(((QuestionDef)element).getHelpInnerText());
            }
        }catch(NoLocalizedTextException nlt){

Original issue reported on code.google.com by chrislro...@gmail.com on 30 Jan 2014 at 1:25

GoogleCodeExporter commented 9 years ago
Will be in next JR update.

Original comment by mitchellsundt@gmail.com on 12 Mar 2014 at 12:22

GoogleCodeExporter commented 9 years ago
In 1.4.3 build

Original comment by mitchellsundt@gmail.com on 19 May 2014 at 5:00