lang-catalog-procs.tcl

  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Adding support for I18N message catalog upgrades. Any import of

messages from catalog files that is done after the initial import is

considered an upgrade. The message import and upgrade logic is

encapsulated in the proc lang::catalog::import_messages (invoked

through lang::catalog::import).

acs-lang package

- Bumping version of package to 5.0.0b5

- Changes to datamodel:

- Adding columns deleted_p, conflict_p, and sync_time to lang_messages table.

- Removed column upgrade_status from lang_message_keys table

- Adding columns deleted_p, sync_time, conflict_p, upgrade_status to lang_messages_audit table

- Changes to lang::catalog Tcl API:

- Added proc lang::catalog::import_messages that encapsulates the logic for import and upgrade of

messages from catalog files to database.

- Changed the lang::catalog::import_from_file and lang::catalog:import procs to use the new import_messages proc.

- Added the upgrade Tcl API test cases that extensively tests through the import_messages proc with both

en_US and de_DE locales.

- Changes to lang::message Tcl API:

- Changed lang::message::register to take new switches upgrade_sync, upgrade_status, and conlfict. Cleaned up the

proc a little and made it construct SQL dynamically.

- Added procs delete, get, and get_element.

- Added the edit proc that is used when editing attributes of a message other than the message text itself. This

proc will not create a new message revision. It is invoked for example by the delete proc.

- Added the count_conflicts proc.

- Changes to admin UI

- New canonical pages for import/export of catalog files that check for site-wide-admin priv

- Made the message delete page use appropriate Tcl API

- Added the message-conflicts page that shows conflicting messages. Linking to this page from

index page, locale-, and package index pages.

acs-admin package

- Removed the import/export messages pages and using the ones in acs-lang package instead.

  1. … 44 more files in changeset.
fixing bug 1019 by making sure message keys are deleted and removed from the cache on package deletion. Moving all package deletion logic into proc. Adding an instruction on the package delete page that the server should be restarted after deletion

  1. … 3 more files in changeset.
make some Notices either warnings or debug and made them more descriptive by generally including the proc name as well bug #1032

  1. … 74 more files in changeset.
changing proc import_from_file so that failing to register one message does not cause the whole file import to fail

re-adding the loading of message catalog files on server startup. Since loading is only done at package install if acs-lang is already installed and this is not necessarily always the case

  1. … 2 more files in changeset.
fixing bug introduced on last API cleanup commit

cleanup and renaming of import/export procs in lang::catalog namespace. Now there are really only two public procs to know about: lang::catalog::import and lang::catalog::export. Updating all invocations of the procs and test cases. Adding proc lang::message::unregister for deleting message keys - used in test case teardown.

  1. … 10 more files in changeset.
Because of problem exporting digits in arabic locale (AR_LB with ISO-8859-6) we have now changed to export all catalog files in utf-8 except when ISO-8859-1 can be used. Easiest would be to export all catalog files in utf-8, however, out of fear of hand editing of catalog files messing with the utf-8 encoding we don't. Adding encoding attribute to xml tag of message catalog files. Removing redundant file name prefixing of log statements.

  1. … 1 more file in changeset.
removing print statement that seemed superfluous

bugfix in xml catalog import proc, variable named charset should have been named mime_charset

adding the lang::catalog::export_to_files proc for exporting all messages in a list of locales. Making import_from_files always import the en_US locale messages first.

making sure import_from_files proc does not produce error messages trying to find correct charsets for a locale if there are no files for that locale anyway

adding check in import_from_files so that we don't attempt to find catalog files if there isn't even a catalog directory

To speed up package installation we made en_US be the only enabled locale by default. Changed catalog loading to only load files for enabled locales. Added a link in UI so that catalog files can be loaded for a certain enabled locale after installation

  1. … 6 more files in changeset.
removing annoying "not upgrading" message when importing catalog files

Kill the timestamp on the catalog files, it only causes confusion by CVS

removing debug printouts

Commenting in check to make sure lang::catalog::import_from_all_files_and_cache is only run once

Fixing charsets for message catalog files ; import/export descriptions

  1. … 1 more file in changeset.
Do the database-to-memory caching on startup without serving pages until that's done. Syncing from message catalog files can be done later

  1. … 2 more files in changeset.
1. Added search for words in messages feature.

2. Added locale enable/disable feature

3. Cleaned up translation UI

4. Improved batch message edit

  1. … 41 more files in changeset.
1. removed some errant log statemets previously inserted when debugging

2. sql/common/*sql files weren't being displayed by the APM, are now

3. added index on start_date in timespan-create after user reported

very slow calendar queries in .LRN

  1. … 7 more files in changeset.
Fixed some minor acs-lang stuff and a few noquote things.

  1. … 6 more files in changeset.
1. Added some more Tcl API to notifications

2. Fixed lang-catalog-procs.tcl (tested) and acs-bootstrap-installer (not tested

yet) to work with tDOM.

  1. … 5 more files in changeset.
Fixed a typo most likely caused when Bart switched to tDOM

-Replaced nsxml with tDOM (http://tdom.org), a much faster & richer XML parser, and XSLT and XPath processor.

  1. … 3 more files in changeset.

Migrated over changes to move some GIF resources into a common subdirectory

in the subsite package, so anyone who can read the main site can read

the images (previously you had to grant read privs to "/doc" explicitly

to get the graphics stored by acs-datetime to show up.

  1. … 38 more files in changeset.
chaing catalog import proc so that import for uninstalled packages is not an upgrade, also if the version number in the catalog file is lower than that of the package it's not an upgrade

Switched to "file copy" ...

  1. … 7 more files in changeset.
setting upgrade status for a message key to deleted if the en_US message is deleted. This is unfortunately another example in the I18N code where we are assuming the presence of the en_US locale and that translation is done from this locale.

  1. … 1 more file in changeset.