• last updated 11 hours ago
Constraints: committers
Constraints: files
Constraints: dates
Fallback here as well to en_US when no supported locale is found

use cookie namespace also for stored locales

  1. … 1 more file in changeset.
Constrain the language we return for the connection to the ones we support: could happen on system that have supposted a language in the past and still have users set it as their preferred language

Reuse computation of lang::conn::locale when invoked again in the same request

This reduces stress on the util_memoize cache for those installation that invoke this api often.

use per_thread_cache for flusing rather than raw variables

Keep using ad_conn in lang::conn::timezone as set_get_timezone needs to simulate lack of connection and ad_conn allows to override the "real" value

prefer "ns_conn isconnected" over "ad_conn isconnected", since the latter might not notice changes in the connect state

  1. … 18 more files in changeset.
use dot instead of colon as separator between package name and cache key to ease readability

  1. … 10 more files in changeset.
acs::per_thread_cache: standardize per-thread caching

- added per-thread cache based on namespaced Tcl variables.

- use per-thread-cache on several occasions

- bump version number of acs-tcl to 5.10.0d34

  1. … 14 more files in changeset.
Fix typo

make lang::conn::language able to run running disconnected; improve documentation

make lang::conn::locale more robust when running disconnected

improve handling of invalid (hacked) ad_locale cookies.

Previously, invalid ad_locale cookies lead to an error, which in turn

prevented all communication with OpenACS. So, a user had to delete the

cookie manually. Now, we just produce a warning, ignore and delete such

broken cookies.

  1. … 1 more file in changeset.
Fix for issue #3409

Tolerate wrong locales from browsers by assuming our default one

Remove deprecated proc 'ad_locale_get_label', scheduled to be removed in 5.3, and used nowhere.

Whitespace changes

  1. … 1 more file in changeset.
Harmonize parameter names in proc documentation removing unexistent ones

Delete thread cache variable as well when setting a new locale and use this corrected api to repair broken test

  1. … 1 more file in changeset.
set lang::system::get_locales to per-thead cache as indicated

cache system locales in a per-thread cache

Revert massive replacement of empty list creation sentences. The use of '[list]' instead of '{}' adds semantics that could be used for performance improvements in the future, such as using a different internal representation. There is already work in this direction, avoiding the generation of the string representation during comparison of empty strings (huge thanks to Stefan Sobernig for the pointer: https://core.tcl.tk/tcl/info/44527c632ed609c2).

  1. … 475 more files in changeset.
Prefer '{}' to '[list]' when creating empty lists

  1. … 71 more files in changeset.
remove conditions, which are always true

remove parens

  1. … 5 more files in changeset.
Reduce stress on util_memoize_cache by removing the - by far - most often reused

item in the cache (apm_package_installed_p_not_cached ref-timezones). Instead,

we fall back to the (per-thread) caching of apm_package_id_from_key.

merged changes from the oacs-5-9 branch and resolved conflicts

  1. … 7834 more files in changeset.
- fix spelling of variable name

- Make parsing of "Accept-Language" header fields more robust:

ignore spaces after the comma, ignore wildcard value "*"

- Accept locales as syntactically correct when these contain numeric values (such as e.g. "es_419" for “Latin American Spanish”).

Since lang::conn::valid_locale_p is used in lang::conn::get_accept_language_header, OpenACS throws exceptions

on invalid locales, these caused problem even when these are low on the preference list of the Accept-Language header field.

- allow empty locale cookie