Felix
  1. Felix
  2. FELIX-2277

Allow the user to select display language

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: webconsole-3.0.0
    • Fix Version/s: webconsole-3.1.2
    • Component/s: Web Console
    • Labels:
      None
    1. locale-select.patch
      8 kB
      Valentin Valchev
    2. ASF.LICENSE.NOT.GRANTED--langselect.zip
      141 kB
      Valentin Valchev

      Issue Links

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        119d 22h 34m 1 Valentin Valchev 11/Aug/10 08:27
        Resolved Resolved Closed Closed
        5d 4h 45m 1 Felix Meschberger 16/Aug/10 13:13
        Felix Meschberger made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Felix Meschberger added a comment -

        Apache Felix Web Console 3.1.2 has been released. The issues are now closed.

        Show
        Felix Meschberger added a comment - Apache Felix Web Console 3.1.2 has been released. The issues are now closed.
        Valentin Valchev made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Valentin Valchev added a comment -

        Fixed in rev. 984311 with !isEmpty() remark applied and caching of the language map.

        Show
        Valentin Valchev added a comment - Fixed in rev. 984311 with !isEmpty() remark applied and caching of the language map.
        Felix Meschberger made changes -
        Fix Version/s webconsole-3.1.2 [ 12315140 ]
        Hide
        Felix Meschberger added a comment -

        I would like to include this with the next release.

        Show
        Felix Meschberger added a comment - I would like to include this with the next release.
        Hide
        Felix Meschberger added a comment -

        Looks good with the following comments:

        (1) I would change line 626 of the patched AbstractWebConsolePlugin file to
        if (null != langMap && !langMap.isEmpty())
        thus to not render the flag "button" if there is no flag to render

        (2) How about caching the flags map in the OsgiManager class. The contents of the map is rendered on each request, thus the entries scanned on each request. On the other hand the entries only change when the bundle is resolved and the OsgiManager class recreated any way. WDYT ?

        Other than that,I am all for applying the patch. Thanks.

        Show
        Felix Meschberger added a comment - Looks good with the following comments: (1) I would change line 626 of the patched AbstractWebConsolePlugin file to if (null != langMap && !langMap.isEmpty()) thus to not render the flag "button" if there is no flag to render (2) How about caching the flags map in the OsgiManager class. The contents of the map is rendered on each request, thus the entries scanned on each request. On the other hand the entries only change when the bundle is resolved and the OsgiManager class recreated any way. WDYT ? Other than that,I am all for applying the patch. Thanks.
        Valentin Valchev made changes -
        Assignee Valentin Valchev [ v_valchev ]
        Valentin Valchev made changes -
        Attachment locale-select.patch [ 12448690 ]
        Hide
        Valentin Valchev added a comment -

        Provided patch against HEAD

        Please note, that binary files (flag images are not included in the patch). If you want to test it you should manually install them in webconsole\src\main\resources\res\flags\

        I've just placed bg.gif, de.gif and en.gif from the previously attached zip file.

        For more information about how the languages are detected see the WebConsoleConstants.ATTR_LANG_MAP javadoc.

        Show
        Valentin Valchev added a comment - Provided patch against HEAD Please note, that binary files (flag images are not included in the patch). If you want to test it you should manually install them in webconsole\src\main\resources\res\flags\ I've just placed bg.gif, de.gif and en.gif from the previously attached zip file. For more information about how the languages are detected see the WebConsoleConstants.ATTR_LANG_MAP javadoc.
        Valentin Valchev made changes -
        Attachment langselect.zip [ 12441945 ]
        Hide
        Valentin Valchev added a comment -

        I've created a small prototype that adds a little icon on the top/right corner of the page.

        When you move the mouse over it, few flags for selecting the language are shown.

        Clicking on the flag sets the cookie and reloads the page.

        The code is rather simple. To add new language just need a new image like this:
        <img src="de.gif" alt="de" title="Deutsch"/>

        'alt' attribute is actually used as value for the cookie. Title is the language name. It is shown as tooltip by the browser.

        The icons are free and taken from http://famfamfam.com/lab/icons/flags/

        So, WDYT?

        Show
        Valentin Valchev added a comment - I've created a small prototype that adds a little icon on the top/right corner of the page. When you move the mouse over it, few flags for selecting the language are shown. Clicking on the flag sets the cookie and reloads the page. The code is rather simple. To add new language just need a new image like this: <img src="de.gif" alt="de" title="Deutsch"/> 'alt' attribute is actually used as value for the cookie. Title is the language name. It is shown as tooltip by the browser. The icons are free and taken from http://famfamfam.com/lab/icons/flags/ So, WDYT?
        Hide
        Valentin Valchev added a comment -

        The user interface change can be quite small.

        We can crate a small flag icon, that float at the top-right corner of the browser. When clicked, a dialog is opened, where:
        1. the user can type down the locale, as example "en" or "fr_CA"
        2. there is a country flag for the build-in supported languages

        While the first variant is more complete and will work without need of modifications, even when new languages are added, the second is more user friendly.

        The drawback of the second variant, is that when new language is added, a new flag should be added too.

        Show
        Valentin Valchev added a comment - The user interface change can be quite small. We can crate a small flag icon, that float at the top-right corner of the browser. When clicked, a dialog is opened, where: 1. the user can type down the locale, as example "en" or "fr_CA" 2. there is a country flag for the build-in supported languages While the first variant is more complete and will work without need of modifications, even when new languages are added, the second is more user friendly. The drawback of the second variant, is that when new language is added, a new flag should be added too.
        Valentin Valchev made changes -
        Field Original Value New Value
        Link This issue is related to FELIX-2267 [ FELIX-2267 ]
        Valentin Valchev created issue -

          People

          • Assignee:
            Valentin Valchev
            Reporter:
            Valentin Valchev
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development