10
Display Text SDD 1.1 Topic

Display Text SDD 1.1 Topic. Current Situation COSMOS team is implementing a CLI for user interaction Need the ability to specify strings for display to

Embed Size (px)

Citation preview

Page 1: Display Text SDD 1.1 Topic. Current Situation COSMOS team is implementing a CLI for user interaction Need the ability to specify strings for display to

Display Text

SDD 1.1 Topic

Page 2: Display Text SDD 1.1 Topic. Current Situation COSMOS team is implementing a CLI for user interaction Need the ability to specify strings for display to

Current Situation

• COSMOS team is implementing a CLI for user interaction

• Need the ability to specify strings for display to the user

• This exists in the schema and spec, but proper usage is unclear

Page 3: Display Text SDD 1.1 Topic. Current Situation COSMOS team is implementing a CLI for user interaction Need the ability to specify strings for display to

Current Situation

• SDD producer wants to define a parameter

• Prompting for user interaction should be done in the native language for that user

• Strings are externalized into resource bundles for localization teams to translate

• Those strings are referenced via “translationKey” in “DisplayTextType”

Page 4: Display Text SDD 1.1 Topic. Current Situation COSMOS team is implementing a CLI for user interaction Need the ability to specify strings for display to

Current Situation

• This is where the spec and schema become unclear

• JRE example highlights this<sdd-pd:PackageIdentity softwareID="2000-123" packageType="update">

<sdd-common:Description translationKey="DESC">Lets you develop and deploy Java(TM) applications on desktops and servers, as well as today's Embedded and Realtime environments. Java SE includes classes that support the development of Java Web Services and provides the foundation for Java Platform, Enterprise Edition (Java EE).</sdd-common:Description>

<sdd-common:ShortDescription translationKey="SHORT_DESC">Java(TM) Platform for software development</sdd-common:ShortDescription>

<sdd-common:Name translationKey="PKG_DISPNAME">Java(TM) Platform, Standard Edition Runtime Environment</sdd-common:Name>

….

Page 5: Display Text SDD 1.1 Topic. Current Situation COSMOS team is implementing a CLI for user interaction Need the ability to specify strings for display to

Current Situation

• Note usage of translationKey and the “hard coded string”

• Leaves it unclear as to which the runtime should display

• Need to update examples and the spec to provide more guidance

Page 6: Display Text SDD 1.1 Topic. Current Situation COSMOS team is implementing a CLI for user interaction Need the ability to specify strings for display to

Current Situation

• Package descriptor needs some additional guidance as well

<sdd-pd:Contents>

<sdd-pd:Content pathname="jre-1_5_0_09-AIX-rpm.bin" id="JRE_RPM" purpose="content"/>

<sdd-pd:Content pathname="logging.properties" id="LoggingProperties" purpose="content"/>

<sdd-pd:Content pathname="jre_update.xml" id="DD" purpose="deploymentDescriptor"/>

<sdd-pd:Content pathname="com/sun/java/jre_en.properties" id="EN_Bundle" purpose=“descriptorLanguageBundle"/>

</sdd-pd:Contents>

• Should each bundle be enumerated in content? Implication is that SDD must be modified as languages are added.

Page 7: Display Text SDD 1.1 Topic. Current Situation COSMOS team is implementing a CLI for user interaction Need the ability to specify strings for display to

Current Situation

• Alternatively the content ref could be

<sdd-pd:Contents>

<sdd-pd:Content pathname="jre-1_5_0_09-AIX-rpm.bin" id="JRE_RPM" purpose="content"/>

<sdd-pd:Content pathname="logging.properties" id="LoggingProperties" purpose="content"/>

<sdd-pd:Content pathname="jre_update.xml" id="DD" purpose="deploymentDescriptor"/>

<sdd-pd:Content pathname="com/sun/java/jre.properties" id=“ResourceBundle" purpose=“descriptorLanguageBundle"/>

</sdd-pd:Contents>

• Note removal of country and locale code. Implication is that runtime figures out the resource bundle to load based on deployment environment

Page 8: Display Text SDD 1.1 Topic. Current Situation COSMOS team is implementing a CLI for user interaction Need the ability to specify strings for display to

Current Situation

• If no properties file exists for the country and locale of the environment, use the “base” properties bundle – i.e. the one w/o country and locale

• SDD producers determine defaults by populating the “base” properties bundle w/ default strings of desired translation

• Also gives the runtime a way to look for strings not defined in the localized bundle

Page 9: Display Text SDD 1.1 Topic. Current Situation COSMOS team is implementing a CLI for user interaction Need the ability to specify strings for display to

Current Situation

• For example, if strings are never translated put those in the “base”– Can also be hard coded in string element in

the SDD• Runtime looks for translationKey index in

country and locale bundle and if not found then looks in the “base”

• If found in the “base” display that text otherwise issue warning or error

Page 10: Display Text SDD 1.1 Topic. Current Situation COSMOS team is implementing a CLI for user interaction Need the ability to specify strings for display to

Proposal

• No schema change• Update to the spec only