Oracle Magazine, July/August 2019
Mobile APPLICATION DEVELOPER 19 Click the Reset button at the top right 20 Close the skill tester by clicking the Close icon X located next to the Reset button What happened The travel bot validated your input against a custom entity for destinations and the DATE system entity When you provided an invalid user input the dialog box asked for a valid entry using the same message displayed before In a human conversation this would not be the case Also in a human conversation the response of the person you talk to would not be the same each time you say Hi Note A previous Oracle Magazine article explained how to handle input validation errors gracefully The focus of this article is on alternating prompts BEFORE YOU START Using references to resource bundles is common practice in software development for displaying labels prompts and similar messages Resource bundles not only make it easy for you to maintain strings but they also allow you to build translatable user interfaces The starter skill that you imported includes a resource bundle created for English Before you can start building alternating bot responses take a look at the strings and their keys 21 Click the Resource Bundles icon in the menu on the left 22 In the upper right corner select Language from the View By list This lists all ORACLE MAGAZINE JULY AUGUST 2019 44 keys and their string values in a tabular layout 23 Note that several keys have the same name and differ only by a consecutive number 24 Also note that the message for each of those keys is related but different 25 Create a new key by clicking the Key button
You must have JavaScript enabled to view digital editions.