localization-procs.tcl

  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix typo

Doc formatting changes

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.
Address lc_time_fmt shortcomings:

- use clock scan to enforce supported date formats, 'YYYY-MM-DD' (undocumented, but explicitly checked for in the code) and 'YYYY-MM-DD HH:MM:SS'

- leverage clock scan capabilities to correctly handle 'impossible dates' such as 1999-02-29

- leverage clock format to obtain the correct week day

- leverage clock api to correctly handle gregorian/julian dates

- implement documented formats that had an empty entry in format array (%W, u, %U, %j)

  1. … 1 more file in changeset.
Rename clock_to_ansi to lc_clock_to_ansi to comply with naming convention, replace occurrences, create deprecated wrapper

  1. … 5 more files in changeset.
improve spelling

  1. … 11 more files in changeset.
Prefer '==' over 'eq' on numeric comparison

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.
Bring files on oacs-5-10 in sync with HEAD

  1. … 15 more files in changeset.
Fix typo in proc doc

improve spelling

  1. … 15 more files in changeset.
scalability improvement: keep result of lc_time_fmt_compile in (lock-free) per-thread cache rather than in the util_memoize cache

whitespace cleanup

  1. … 9 more files in changeset.
Use "ad_try" instead of "with_catch"

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

  1. … 7834 more files in changeset.
Fix spelling errors

  1. … 8 more files in changeset.
Fix spelling errors

  1. … 48 more files in changeset.
- use util::trim_leading_zeros instead of private function

  1. … 1 more file in changeset.
add function "lc_trim_leading_zeros" to acs-lang localization procs, since date-time procs are not acs-core, such that the function defined there cannot be used in the core

Fix date computation: year of date 07072017 was treated as an octal number. (Example [lc_time_fmt 0708-08-17 %Q])

Remove unneeded test and improve documentation

- 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.
Fix lc_time_fmt_compile

- change 'util_memoize "..."' into 'util_memoize [list ...]' as pointe out by Frank for security reason and correctness

  1. … 6 more files in changeset.
- brace expressions to allow for tcl compilation

- use "in" or not in (ni) operator instead of lsearch (for readability and performance)

  1. … 9 more files in changeset.
- drop function lc_monetary_currency (seems a leftover from long ago; required tables are not part of the datamodel since many years)

  1. … 3 more files in changeset.
- added sanity check: decimal point must be different from the thousands

separators. This test should be really either in regression

testing or be formulated as constraint after changing the

message keys. However, since a violation can lead to incorrect

results, the safety check is here as well.

- get rid of empty_string_p in non-deprecated code

- make use of tcl byte-code compiler

  1. … 42 more files in changeset.