[open-ils-commits] r10079 - trunk/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Jul 19 20:39:45 EDT 2008
Author: miker
Date: 2008-07-19 20:39:44 -0400 (Sat, 19 Jul 2008)
New Revision: 10079
Modified:
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
adding in-database supported locale, um, support
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2008-07-19 00:58:02 UTC (rev 10078)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2008-07-20 00:39:44 UTC (rev 10079)
@@ -46,16 +46,6 @@
*/
$$;
-CREATE TABLE config.i18n_core (
- id BIGSERIAL PRIMARY KEY,
- fq_field TEXT NOT NULL,
- identity_value TEXT NOT NULL,
- translation TEXT NOT NULL,
- string TEXT NOT NULL
-);
-
-CREATE UNIQUE INDEX i18n_identity ON config.i18n_core (fq_field,identity_value,translation);
-
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
quality INT CHECK ( quality BETWEEN 0 AND 100 ),
@@ -453,5 +443,22 @@
value TEXT NOT NULL
);
+CREATE TABLE config.i18n_locale (
+ code TEXT PRIMARY KEY,
+ marc_code TEXT NOT NULL REFERENCES config.language_map (code),
+ name TEXT UNIQUE NOT NULL,
+ description TEXT
+);
+
+CREATE TABLE config.i18n_core (
+ id BIGSERIAL PRIMARY KEY,
+ fq_field TEXT NOT NULL,
+ identity_value TEXT NOT NULL,
+ translation TEXT NOT NULL REFERENCES config.i18n_locale (code),
+ string TEXT NOT NULL
+);
+
+CREATE UNIQUE INDEX i18n_identity ON config.i18n_core (fq_field,identity_value,translation);
+
COMMIT;
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2008-07-19 00:58:02 UTC (rev 10078)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2008-07-20 00:39:44 UTC (rev 10079)
@@ -173,6 +173,7 @@
('u', oils_i18n_gettext('Unknown'), oils_i18n_gettext('The literary form of the item is unknown.'));
-- TO-DO: Auto-generate these values from CLDR
+-- XXX These are the values used in MARC records ... does that match CLDR, including deprecated languages?
INSERT INTO config.language_map (code, value) VALUES ('aar', oils_i18n_gettext('Afar'));
INSERT INTO config.language_map (code, value) VALUES ('abk', oils_i18n_gettext('Abkhaz'));
INSERT INTO config.language_map (code, value) VALUES ('ace', oils_i18n_gettext('Achinese'));
@@ -691,6 +692,20 @@
INSERT INTO config.bib_level_map (code, value) VALUES ('m', oils_i18n_gettext('Monograph/Item'));
INSERT INTO config.bib_level_map (code, value) VALUES ('s', oils_i18n_gettext('Serial'));
+
+-- available locales
+INSERT INTO config.i18n_locale (code,marc_code,name,description)
+ VALUES ('en_us','eng',oils_i18n_gettext('American English'),oils_i18n_gettext('American English'));
+INSERT INTO config.i18n_locale (code,marc_code,name,description)
+ VALUES ('en_ca','eng',oils_i18n_gettext('Canadian English'),oils_i18n_gettext('Canadian English'));
+INSERT INTO config.i18n_locale (code,marc_code,name,description)
+ VALUES ('fr_ca','fre',oils_i18n_gettext('Canadian Fench'),oils_i18n_gettext('Canadian French'));
+INSERT INTO config.i18n_locale (code,marc_code,name,description)
+ VALUES ('es_us','spa',oils_i18n_gettext('American Spanish'),oils_i18n_gettext('American Spanish'));
+INSERT INTO config.i18n_locale (code,marc_code,name,description)
+ VALUES ('es_mx','spa',oils_i18n_gettext('Mexican Spanish'),oils_i18n_gettext('Mexican Spanish'));
+
+
--005.schema.actors.sql:
-- The PINES levels
More information about the open-ils-commits
mailing list