Index: openacs-4/packages/acs-lang/sql/oracle/acs-lang-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/sql/oracle/acs-lang-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-lang/sql/oracle/acs-lang-create.sql 21 Oct 2001 18:57:15 -0000 1.1 @@ -0,0 +1,21 @@ +-- Data model to support i18n of the ArsDigita Community +-- System + +-- Copyright (C) 1999-2000 ArsDigita Corporation +-- Author: Henry Minsky (hqm@arsdigita.com) + +-- $Id: acs-lang-create.sql,v 1.1 2001/10/21 18:57:15 donb Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License. Full text of the license is available from the GNU Project: +-- http://www.fsf.org/copyleft/gpl.html + +prompt ** Creating locales table ... +@@ ad-locales.sql + +prompt ** Creating translation catalog tables ... +@@ message-catalog.sql + +prompt ** Creatng currency codes +@@ currency.sql + Index: openacs-4/packages/acs-lang/sql/oracle/ad-locales-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/sql/oracle/ad-locales-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-lang/sql/oracle/ad-locales-drop.sql 21 Oct 2001 18:57:15 -0000 1.1 @@ -0,0 +1,17 @@ +-- +-- packages/language/sql/language-create.sql +-- +-- @author Jeff Davis (davis@arsdigita.com) +-- @creation-date 2000-09-10 +-- @cvs-id $Id: ad-locales-drop.sql,v 1.1 2001/10/21 18:57:15 donb Exp $ +-- + +-- **************************************************************************** +-- * The lang_messages table holds the message catalog. +-- * It is populated by ad_lang_message_register. +-- * The registered_p flag denotes that a message exists in a file +-- * that gets loaded on server startup, and hence should not get updated. +-- **************************************************************************** + +drop table ad_locales; + Index: openacs-4/packages/acs-lang/sql/oracle/ad-locales.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/sql/oracle/ad-locales.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-lang/sql/oracle/ad-locales.sql 21 Oct 2001 18:57:15 -0000 1.1 @@ -0,0 +1,97 @@ +-- +-- packages/language/sql/language-create.sql +-- +-- @author Jeff Davis (davis@arsdigita.com) +-- @creation-date 2000-09-10 +-- @cvs-id $Id: ad-locales.sql,v 1.1 2001/10/21 18:57:15 donb Exp $ +-- + +-- **************************************************************************** +-- * The lang_messages table holds the message catalog. +-- * It is populated by ad_lang_message_register. +-- * The registered_p flag denotes that a message exists in a file +-- * that gets loaded on server startup, and hence should not get updated. +-- **************************************************************************** + +create table ad_locales ( + locale varchar2(30) + constraint ad_locale_abbrev_pk + primary key, + language char(2) constraint ad_language_name_nil + not null, + country char(2) constraint ad_country_name_nil + not null, + variant varchar2(30), + label varchar2(200) + constraint ad_locale_name_nil + not null + constraint ad_locale_name_unq + unique, + nls_language varchar2(30) + constraint ad_locale_nls_lang_nil + not null, + nls_territory varchar2(30), + nls_charset varchar2(30), + mime_charset varchar2(30), + -- is this the default locale for its language + default_p char(1) default 'f' + constraint ad_locale_defp_tf check(default_p in ('t','f')) +); + +comment on table ad_locales is ' + An ACS locale is identified by a language and country. + Locale definitions in Oracle consist of a language, and optionally + territory and character set. (Languages are associated with default + territories and character sets when not defined). The formats + for numbers, currency, dates, etc. are determined by the territory. + language is two letter abbrev is ISO 639 language code + country is two letter abbrev is ISO 3166 country code + mime_charset is IANA charset name + nls_charset is Oracle charset name +'; + +insert into ad_locales ( + locale, label, language, country, + nls_language, nls_territory, nls_charset, mime_charset, default_p +) values ( + 'en_US', 'American', 'en', 'US', + 'AMERICAN', 'AMERICA', 'WE8ISO8859P1', 'ISO-8859-1', 't' +); + + +insert into ad_locales ( + locale, label, language, country, + nls_language, nls_territory, nls_charset, mime_charset, default_p +) values ( + 'de_DE', 'German', 'de', 'DE', + 'GERMAN', 'GERMANY', 'WE8ISO8859P1', 'ISO-8859-1', 't' +); + + +insert into ad_locales ( + locale, label, language, country, + nls_language, nls_territory, nls_charset, mime_charset, default_p +) values ( + 'es_ES', 'Spain', 'es', 'ES', + 'SPANISH', 'SPAIN', 'WE8ISO8859P1', 'ISO-8859-1', 't' +); + + +insert into ad_locales ( + locale, label, language, country, + nls_language, nls_territory, nls_charset, mime_charset, default_p +) values ( + 'fr_FR', 'French', 'fr', 'FR', + 'FRENCH', 'France', 'WE8ISO8859P1', 'ISO-8859-1', 't' +); + + +insert into ad_locales ( + locale, label, language, country, + nls_language, nls_territory, nls_charset, mime_charset, default_p +) values ( + 'ja_JP', 'Japanese', 'ja', 'JP', + 'JAPANESE', 'JAPAN', 'JA16SJIS', 'Shift_JIS', 't' +); + +commit; Index: openacs-4/packages/acs-lang/sql/oracle/message-catalog-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/sql/oracle/message-catalog-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-lang/sql/oracle/message-catalog-drop.sql 21 Oct 2001 18:57:15 -0000 1.1 @@ -0,0 +1,24 @@ +-- +-- packages/language/sql/language-drop.sql +-- +-- @author davis@arsdigita.com +-- @creation-date 2000-09-10 +-- @cvs-id $Id: message-catalog-drop.sql,v 1.1 2001/10/21 18:57:15 donb Exp $ +-- + +-- drop the timezone stuff +drop index tz_data_idx2; +drop index tz_data_idx1; +drop table tz_data; +drop function lc_time_utc_to_local; +drop function lc_time_local_to_utc; + +-- drop the lang stuff +drop table lang_translation_registry; +drop table lang_translate_columns; +drop table lang_messages; + +-- This might fail if the data model includes other multilingual tables +-- that reference ad_locales. Really need to cascade here to ensure +-- it goes away, but that is dangerous. +drop table ad_locales; Index: openacs-4/packages/acs-lang/sql/oracle/message-catalog.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/sql/oracle/message-catalog.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-lang/sql/oracle/message-catalog.sql 21 Oct 2001 18:57:15 -0000 1.1 @@ -0,0 +1,68 @@ +-- +-- packages/acs-i18n/sql/language-create.sql +-- +-- @author Jeff Davis (davis@arsdigita.com) +-- @creation-date 2000-09-10 +-- @cvs-id $Id: message-catalog.sql,v 1.1 2001/10/21 18:57:15 donb Exp $ +-- + +create table lang_messages ( + key varchar2(200), + lang char(2) not null, + message clob, + registered_p char(1) + constraint lm_tranlated_p_tf check(registered_p in ('t','f')), + constraint lang_messages_pk primary key (key, lang) +); + + +-- **************************************************************************** +-- * The lang_translate_columns table holds the columns that require translation. +-- * It is needed to generate the user interface for translating the web site. +-- * Note that we register on_what_column itself for translation. +-- **************************************************************************** + +create table lang_translate_columns ( + column_id integer primary key, + -- cant do references on user_tables cause oracle sucks + on_which_table varchar2(50), + on_what_column varchar2(50), + -- + -- whether all entries in a column must be translated for the + -- site to function. + -- + -- probably ultimately need something more sophisticated than + -- simply required_p + -- + required_p char(1) + constraint ltc_required_p_tf check(required_p in ('t','f')), + -- + -- flag for whether to use the lang_translations table for content + -- or add a row in the on_which_table table with the translated content. + -- + short_p char(1) + constraint ltc_short_p_tf check(short_p in ('t','f')), + constraint ltc_u unique (on_which_table, on_what_column) +); + + +-- **************************************************************************** +-- * The lang_translation_registry table identifies a row as requiring translation +-- * to a given language. This should identify the parent table not the broken-apart +-- * child table. +-- **************************************************************************** + +create table lang_translation_registry ( + on_which_table varchar(50), + on_what_id integer not null, + locale constraint ltr_locale_ref + references ad_locales(locale), + -- + -- should have dependency info here + -- + constraint lang_translation_registry_pk primary key(on_what_id, on_which_table, locale) +); + + + + Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-lang/sql/postgresql/currency.sql'. Fisheye: No comparison available. Pass `N' to diff?