From c5964c74cdea739b4a4abcff46b0308f3fd13a48 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Tue, 24 Feb 2009 06:10:40 +0000 Subject: Fix i18n create table sql (forgot to change core_install.php) --- core/helpers/core_installer.php | 4 ++-- core/tests/I18n_Test.php | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index e0747d46..68b03a30 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -130,7 +130,7 @@ class core_installer { $db->query("CREATE TABLE `incoming_translations` ( `id` int(9) NOT NULL auto_increment, - `key` binary(16) NOT NULL, + `key` char(32) NOT NULL, `locale` char(10) NOT NULL, `message` text NOT NULL, `translation` text, @@ -142,7 +142,7 @@ class core_installer { $db->query("CREATE TABLE `outgoing_translations` ( `id` int(9) NOT NULL auto_increment, - `key` binary(16) NOT NULL, + `key` char(32) NOT NULL, `locale` char(10) NOT NULL, `message` text NOT NULL, `translation` text, diff --git a/core/tests/I18n_Test.php b/core/tests/I18n_Test.php index 75170a1d..f0ed827d 100644 --- a/core/tests/I18n_Test.php +++ b/core/tests/I18n_Test.php @@ -52,6 +52,17 @@ class I18n_Test extends Unit_Test_Case { } } + public function get_locale_test() { + $locale = $this->i18n->locale(); + $this->assert_equal("te_ST", $locale); + } + + public function set_locale_test() { + $this->i18n->locale("de_DE"); + $locale = $this->i18n->locale(); + $this->assert_equal("de_DE", $locale); + } + public function translate_simple_test() { $result = $this->i18n->translate('Hello world'); $this->assert_equal('Hallo Welt', $result); -- cgit v1.2.3