Tapestry
  1. Tapestry
  2. TAPESTRY-2617

DateField component should localize the month names and day name abbreviations shown in the client web browser

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.14
    • Fix Version/s: 5.0.15
    • Component/s: None
    • Labels:
      None
    • Environment:
      All

      Description

      Datefield is almost localized as TAPESTRY-1856 is closed, but still the UI of the date selector is hard coded to use english day and month names. Please fix this too.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        10d 14h 46m 1 Howard M. Lewis Ship 04/Sep/08 22:18
        In Progress In Progress Closed Closed
        1h 6m 1 Howard M. Lewis Ship 04/Sep/08 23:25
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12567668 ] jira [ 12590799 ]
        Mark Thomas made changes -
        Workflow jira [ 12440679 ] Default workflow, editable Closed status [ 12567668 ]
        Howard M. Lewis Ship made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        Howard M. Lewis Ship made changes -
        Summary Localize datefield DateField component should localize the month names and day name abbreviations shown in the client web browser
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Hide
        Ville Virtanen added a comment -

        So if I understand correctly the first datefield to get localized date names would trigger AJAX call to the server and then the result would be cached to client side if there are more datefields in the page?

        Either that approach or then supply the names as parameters in DateField.java

        setup.put("field", clientId);
        setup.put("parseURL", resources.createEventLink("parse").toAbsoluteURI());
        setup.put("formatURL", resources.createEventLink("format").toAbsoluteURI());

        support.addInit("dateField", setup);

        This would add the size of the original response, but would save one round trip to server. (Which approach is more efficient depends on the number of datefields in the page)

        I would like to see the no-server-round-trip approach, as usually there are max 2 datefields in one page.

        Show
        Ville Virtanen added a comment - So if I understand correctly the first datefield to get localized date names would trigger AJAX call to the server and then the result would be cached to client side if there are more datefields in the page? Either that approach or then supply the names as parameters in DateField.java setup.put("field", clientId); setup.put("parseURL", resources.createEventLink("parse").toAbsoluteURI()); setup.put("formatURL", resources.createEventLink("format").toAbsoluteURI()); support.addInit("dateField", setup); This would add the size of the original response, but would save one round trip to server. (Which approach is more efficient depends on the number of datefields in the page) I would like to see the no-server-round-trip approach, as usually there are max 2 datefields in one page.
        Hide
        Howard M. Lewis Ship added a comment -

        Seems like this could be a one-time JavaScript invocation to move the month and days names and the start day of the week as a JSON object and use that data to reconfigure the DatePicker. Another option, one I like less, is to split datepicker.js into two parts: datepicker_main.js and datepicker_config.js, with localizations of the latter for different locales (and bit of a maintenance issue). A third option is for the DatePicker to send a subsequent initialization request to the server to collect the localization data.

        Show
        Howard M. Lewis Ship added a comment - Seems like this could be a one-time JavaScript invocation to move the month and days names and the start day of the week as a JSON object and use that data to reconfigure the DatePicker. Another option, one I like less, is to split datepicker.js into two parts: datepicker_main.js and datepicker_config.js, with localizations of the latter for different locales (and bit of a maintenance issue). A third option is for the DatePicker to send a subsequent initialization request to the server to collect the localization data.
        Ville Virtanen made changes -
        Field Original Value New Value
        Description Datefield is almost localized as TAPESTRY-1856 is closed, but still the UI of the date selector is hard coded to use english date and month names. Please fix this too. Datefield is almost localized as TAPESTRY-1856 is closed, but still the UI of the date selector is hard coded to use english day and month names. Please fix this too.
        Ville Virtanen created issue -

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Ville Virtanen
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development