From fa1f49d99a30a029d1a4e09b820c639d639f6283 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Mon, 9 Feb 2009 07:29:24 +0000 Subject: Adding translation UI. Not backed by any model yet (submissions are ignored). The code is based on the l10n_client module from Drupal 6, by Gabor Hojtsy (http://drupal.org/user/4166). --- core/tests/I18n_Test.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'core/tests') diff --git a/core/tests/I18n_Test.php b/core/tests/I18n_Test.php index 20f65528..df139f04 100644 --- a/core/tests/I18n_Test.php +++ b/core/tests/I18n_Test.php @@ -32,7 +32,7 @@ class I18n_Test extends Unit_Test_Case { ->where("locale", "te_ST") ->delete_all(); - $messages_de_DE = array( + $messages_te_ST = array( array('Hello world', 'Hallo Welt'), array(array('one' => 'One item has been added', 'other' => '%count elements have been added'), @@ -40,12 +40,11 @@ class I18n_Test extends Unit_Test_Case { 'other' => '%count Elemente wurden hinzugefuegt.')), array('Hello %name, how are you today?', 'Hallo %name, wie geht es Dir heute?')); - foreach ($messages_de_DE as $data) { + foreach ($messages_te_ST as $data) { list ($message, $translation) = $data; $key = $message; - $key = is_array($key) ? array_shift($key) : $key; $entry = ORM::factory("incoming_translation"); - $entry->key = md5($key, true); + $entry->key = I18n::getMessageKey($message); $entry->message = serialize($message); $entry->translation = serialize($translation); $entry->locale = 'te_ST'; -- cgit v1.2.3