From dce6548431c4d61ab6c532375a0f030d8de72fd1 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Mon, 9 Feb 2009 08:42:13 +0000 Subject: Add local localization functionality. Local = no means to upload / download translations to a translation server yet. - Added an outgoing_translations table to store translations from the local translation UI. - I18n class is checking incoming_ and outgoing_translations for translations, giving the latter priority. - Not handling plural strings in the translations UI yet. --- core/helpers/core_installer.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'core/helpers') diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index 24b9e993..7a83ec8f 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -140,6 +140,18 @@ class core_installer { KEY `locale_key` (`locale`, `key`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + $db->query("CREATE TABLE `outgoing_translations` ( + `id` int(9) NOT NULL auto_increment, + `key` binary(16) NOT NULL, + `locale` char(10) NOT NULL, + `message` text NOT NULL, + `translation` text, + `base_revision` int(9) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY(`key`, `locale`), + KEY `locale_key` (`locale`, `key`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + $db->query("CREATE TABLE `sessions` ( `session_id` varchar(127) NOT NULL, `last_activity` int(10) UNSIGNED NOT NULL, @@ -258,6 +270,7 @@ class core_installer { $db->query("DROP TABLE IF EXISTS `modules`;"); $db->query("DROP TABLE IF EXISTS `themes`;"); $db->query("DROP TABLE IF EXISTS `incoming_translations`;"); + $db->query("DROP TABLE IF EXISTS `outgoing_translations`;"); $db->query("DROP TABLE IF EXISTS `permissions`;"); $db->query("DROP TABLE IF EXISTS `sessions`;"); $db->query("DROP TABLE IF EXISTS `tasks`;"); -- cgit v1.2.3