acs-lang-localization-procs.tcl

  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
removed the previous half finished change, the update of the timezone data helps

fix regression test to cope with time zone

Since OpenACS timezone data is now newer as in many tcl versions, some time zones

might not be available in tcl. Therefore, tcl-based conversions with these

time zones will fail.

This change skips these timezones (on my system, 2 cases). But this

is just a part of the fix. The "DB-based conversion" in "lc_time_tz_convert"

seems to be broken for these cases as well, otherwise the regression

test would not have stopped working.

Adapt test to current timezones

Extend test suite to check that also dates in the "short" time format are supported

This test will fail

Improve test for lc_time_local_to_utc, showing that its behavior is inconsitent with respect to invalid input

Cleanup leftover, fix typos

Introduce a thorough test of the lc_time_tz_convert api checking:

- dates in the distant past

- dates in the distant future

- daylight saving for different times of the year across the two timezones

- historical circumstances (e.g. Pre-timezones US)

- Invalid input

The test shows that the current api does not behave consistently in certain circumstances:

- the same time_value is sometimes returned with invalid input

- the empty string is sometimes returned with valid input

- for dates where the ref-timezones package does not provide information, no result is returned

    • -0
    • +118
    ./acs-lang-localization-procs.tcl
improve spelling

  1. … 9 more files in changeset.
Return 0 when looking up the existance of a message key in an unsupported locale instead of failing, test the behavior

  1. … 1 more file in changeset.
bring test coverage to >50% by adding test cases and marking only locally called functions as private

  1. … 2 more files in changeset.
make listing of tested procs more complete

  1. … 6 more files in changeset.
Improve sql portability

    • -22
    • +22
    ./acs-lang-localization-procs.tcl
  1. … 6 more files in changeset.
Improve test

New test for lang::util::convert_to_i18n pinpointing some expected behaviors of this proc

Keep supporting previously undocumented use cases for lc_time_fmt:

- database timestamps e.g. "2019-12-16 12:58:10.370124+01"

- short timestamps without seconds e.g. "2019-12-16 12:58"

Improved documentation and extended test cases

  1. … 1 more file in changeset.
lc_content_size_pretty: go the extra mile and return a localized 'byte' when the result is just 1 byte. Bump acs-lang version to reload message keys.

  1. … 34 more files in changeset.
Move 'util::content_size_pretty' into 'acs-lang' and rename it to 'lc_content_size_pretty', localicing 'bytes' and adapting automated tests. Bump 'acs-lang' version.

  1. … 41 more files in changeset.
rework test cases, make tested procs explicit

  1. … 2 more files in changeset.
merged changes from the oacs-5-9 branch and resolved conflicts

  1. … 7834 more files in changeset.
- add editor hints to keep spaces/tabs in the furture more consistent

  1. … 754 more files in changeset.
Merging back to HEAD branch oacs-5-8 (using tag vg-merge-oacs-5-8-from-20141027).

  1. … 2547 more files in changeset.
- extend localization test

- add test cases for lc_*

file acs-lang-localization-procs.tcl was initially added on branch oacs-5-8.

    • -0
    • +0
    ./acs-lang-localization-procs.tcl