mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-27 02:54:27 +00:00
Initial database framework for identifying supported locales.
This commit is contained in:
parent
a092387330
commit
9bea26010c
@ -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
33
dba/patches/1.1.4.sql
Normal 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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user