Initial database framework for identifying supported locales.

This commit is contained in:
Andrew McMillan 2006-11-04 12:23:37 +13:00
parent a092387330
commit 9bea26010c
2 changed files with 43 additions and 0 deletions

View File

@ -31,3 +31,13 @@ INSERT INTO relationship_type ( rt_id, rt_name, rt_isgroup, confers, prefix_matc
-- Set the insert sequence to the next number, with a minimum of 1000
SELECT setval('relationship_type_rt_id_seq', (SELECT 10 UNION SELECT rt_id FROM relationship_type ORDER BY 1 DESC LIMIT 1) );
-- I should be able to find people to translate into these base locales
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
VALUES( 'en', 'English', 'English' );
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
VALUES( 'de', 'German', 'Deutsch' );
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
VALUES( 'es', 'Spanish', 'Español' );
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
VALUES( 'fr', 'French', 'Français' );

33
dba/patches/1.1.4.sql Normal file
View File

@ -0,0 +1,33 @@
-- Starting to add internationalisation support
BEGIN;
SELECT check_db_revision(1,1,3);
CREATE TABLE supported_locales (
locale TEXT PRIMARY KEY,
locale_name_en TEXT,
locale_name_locale TEXT
);
GRANT SELECT ON
supported_locales
TO general;
ALTER TABLE usr ADD COLUMN locale TEXT;
-- I should be able to find people to translate into these base locales
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
VALUES( 'en', 'English', 'English' );
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
VALUES( 'de', 'German', 'Deutsch' );
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
VALUES( 'es', 'Spanish', 'Español' );
INSERT INTO supported_locales ( locale, locale_name_en, locale_name_locale )
VALUES( 'fr', 'French', 'Français' );
SELECT new_db_revision(1,1,4, 'April' );
COMMIT;
ROLLBACK;