uibuilder: commit of i18n support and bug #116 fixed

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

uibuilder: commit of i18n support and bug #116 fixed

Patrick-146
Hello JGRASS hackers,

I committed a new revision of the uibuilder package into the jgrass
repository.


Main features and changes applied:

1.) i18n support

The user editing the xml file to define the UI for a specific command
can now add i18n nodes which define translations.

The i18n node has a key attribute. The key defines the string for which
translations will be provided.

Other attributes are the ISO language codes indicating for which
language destination the attribute holds the translated text.

Let's assume we have a label with the text "Netnumber" and we want to
provide a german translation. In this case we just have to add the
following node to the XML file:

<i18n key="Netnumber" de="Netzwerknummer" />

When the application starts in a german environment, the UI will
automatically look for a i18n node with the key corrisponding to the
label text and if it can find a node in which a translation for de is
provided, the text of the de attribute will be used instead of the
original label text.

To provide more translations there are 2 possibilities:

We can add more nodes for the same key

<i18n key="Netnumber" de="Netzwerknummer" />
<i18n key="Netnumber" it="Netnumber in Italiano" />

Or we can use more attributes in the same node

<i18n key="Netnumber" de="Netzwerknummer" it="Netnumber in Italiano" />

Another important feature is the awareness of the scope. In the
following extract you can find two fields with the same label "Free".
The default translation of "Free" in Italian is set to "Libero", because
the context is speaking about freedom as in speech not as in beer. But
there is one field in the whole UI which represents the possibility to
indicate a value for free as in beer. In English there is no specific
word to use to distinguish Free as in free speech from Free as in free
beer, but in Italian this possibility exists and it is important to have
the possibility to selectively overwrite translations like in the
following example:

<command>

  <i18n key="Free" de="Frei" />
  <i18n key="Free" it="Libero" />

  <exclusiveOption>

    <option>

      <field type="string" name="Free" desc="Free">

        <!-- overwrite translation only in the scope of this field -->

        <i18n key="Free" it="Gratuito" />

      </field>

      ...

  </exclusiveOption>

  <field type="string" name="Free" desc="Free" />

</command>



2.) fixed bug #116

https://dev.fsc.bz.it/bugs/?116


Improvements on my actual list of todos are:

1. SpreadSheetLayout error when empty rows or cols

2. build script for compiling, testing and deploying (maven seems the
right tool to use)

3. title attribute for dialog box


Ideas for the future:

1. create a UI editor for the uibuilder architecture

This would allow the user of JGRASS to open an editor view while using
JGRASS and adding and modifying custom commands without leafing JGRASS.
And without editing the XML file directly, but using an editor frontend.

2. create a JSP renderer channel

This would allow JGRASS to deliver it's functionality through the web,
bringing JGRASS into the domain of a SaaS solution. HydroloGIS could
provide JGRASS as a service.

3. finalize the Swing renderer channel

This would be interesting for the diffusion of UIBuilder as a framework,
which could attract more developers using and contributing the framework.

4. introduce data binding concept into jgrass

This in combination with the JSP renderer channel will bring the whole
JGRASS application into the web means opens the door fully to the SaaS
strategy.

For now that's all. Feedback is very welcome!!!

Happy hacking!
Patrick
_______________________________________________
JGrass-devel mailing list
[hidden email]
https://dev.fsc.bz.it/cgi-bin/mailman/listinfo/jgrass-devel
Reply | Threaded
Open this post in threaded view
|

Re: uibuilder: title attribute for dialog box

Patrick-146
Patrick schrieb:
> Improvements on my actual list of todos are:
>
> 1. SpreadSheetLayout error when empty rows or cols
>
> 2. build script for compiling, testing and deploying (maven seems the
> right tool to use)
>
> 3. title attribute for dialog box

committed: description attribute of command node gets now used as title
for the dialog box.

Happy hacking!
Patrick
_______________________________________________
JGrass-devel mailing list
[hidden email]
https://dev.fsc.bz.it/cgi-bin/mailman/listinfo/jgrass-devel