Enhance time formats

Declined
#227 · Created  · Last updated

Declined pull request

Merged from upstream.

Closed by: ·2017-01-17

Description

  • [UsageConfig.py] Add date and time formatting options

    Include time / date configs to support the ClockToText converter

    Include translation hints for new date and time options

  • [setup.xml] Add date and time formatting options

    Include "*" flag to indicate a GUI Restart is required for all changes to be made on resident / preloaded screens

  • The latest commit includes the latest version of the code being proposed to and work shopped with the OE-Alliance.

    • This version of the code now has more date formats to suit more markets.

    • The settings in setup.xml now appear conditionally. The skin in use must support the new formats before the user will be offered an opportunity to select from the various formats available.

    • A new <parameter> has been added to the skin to control if the new formats are to be made available to a user. To see the changes edit your skin and add the following <parameter> tag to the <parameters> section of skin.xml:

      <parameter name="AllowUserDatesAndTimes" value="x,y" />

      The setting is granular so that independent control of both the date and time formatting options is available.

      • If x = 0 then the new date settings will be hidden.

      • If x = 1 then the new date settings will become available.

      • If y = 0 then the new time settings will be hidden.

      • If y = 1 then the new time settings will become available.

      Given that most skins do not support the AM/PM times but the new dates appear to work you can start of with:

      <parameter name="AllowUserDatesAndTimes" value="1,0" />

      If no "AllowUserDatesAndTimes" parameter is found then both the date and time formats will be disabled and the default / classic values enforced.

    • A new Boolean config variable has been added to ease the detection of AM/PM am/pm time formats so that code can determine when more space should be allocated for time display. The config variable is called "config.usage.time.wide".

  • [UsageConfig.py] Optimise setting of config.usage.time.wide

    Implement the optimisation suggested by PeterU.

With these changes in place this pull request should be safe to merge into the code base. Nothing should change until the skins are modified and the other date and time related pull requests are accepted.

0 attachments

0 comments

Loading commits...