diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-01-13 01:05:11 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-01-13 01:05:11 +0000 |
commit | ff6791f57652aecfe5d3b43848b0a63f4307fa35 (patch) | |
tree | 8f398dc77052dd0cbcbd056a34a9c0bc7cd3d10e | |
parent | 4adff591692247debc4089e3a2f1e8fda735d502 (diff) |
Models should be named in adjective_noun form to make pluralizatoin
more intuitive.
Renamed Translations_Incoming to Incoming_Translation to suit.
-rw-r--r-- | core/helpers/core_installer.php | 4 | ||||
-rw-r--r-- | core/libraries/I18n.php | 2 | ||||
-rw-r--r-- | core/models/incoming_translation.php (renamed from core/models/translations_incoming.php) | 2 | ||||
-rw-r--r-- | core/tests/I18n_Test.php | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index ff5def5f..c45c497c 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -128,7 +128,7 @@ class core_installer { UNIQUE KEY(`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - $db->query("CREATE TABLE `translations_incomings` ( + $db->query("CREATE TABLE `incoming_translations` ( `id` int(9) NOT NULL auto_increment, `key` binary(16) NOT NULL, `locale` char(10) NOT NULL, @@ -256,7 +256,7 @@ class core_installer { $db->query("DROP TABLE IF EXISTS `messages`;"); $db->query("DROP TABLE IF EXISTS `modules`;"); $db->query("DROP TABLE IF EXISTS `themes`;"); - $db->query("DROP TABLE IF EXISTS `translations_incoming`;"); + $db->query("DROP TABLE IF EXISTS `incoming_translations`;"); $db->query("DROP TABLE IF EXISTS `permissions`;"); $db->query("DROP TABLE IF EXISTS `sessions`;"); $db->query("DROP TABLE IF EXISTS `tasks`;"); diff --git a/core/libraries/I18n.php b/core/libraries/I18n.php index 6a8bf3ed..2007bb07 100644 --- a/core/libraries/I18n.php +++ b/core/libraries/I18n.php @@ -80,7 +80,7 @@ class I18n_Core { $key = is_array($message) ? array_shift($message) : $message; $entry = Database::instance() ->select("translation") - ->from("translations_incomings") + ->from("incoming_translations") ->where(array("key" => md5($key, true), "locale" => $locale)) ->limit(1) diff --git a/core/models/translations_incoming.php b/core/models/incoming_translation.php index f4b0a9ac..fcd79cd4 100644 --- a/core/models/translations_incoming.php +++ b/core/models/incoming_translation.php @@ -17,5 +17,5 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class Translations_Incoming_Model extends ORM { +class Incoming_Translation_Model extends ORM { } diff --git a/core/tests/I18n_Test.php b/core/tests/I18n_Test.php index 5d505eb1..f99dd9c1 100644 --- a/core/tests/I18n_Test.php +++ b/core/tests/I18n_Test.php @@ -29,7 +29,7 @@ class I18n_Test extends Unit_Test_Case { $this->i18n = I18n::instance($config); $db = Database::instance(); - $db->query("DELETE FROM `translations_incomings` WHERE `locale` = 'te_ST'"); + $db->query("DELETE FROM `incoming_translations` WHERE `locale` = 'te_ST'"); $messages_de_DE = array( array('Hello world', 'Hallo Welt'), @@ -43,7 +43,7 @@ class I18n_Test extends Unit_Test_Case { list ($message, $translation) = $data; $key = $message; $key = is_array($key) ? array_shift($key) : $key; - $entry = ORM::factory("translations_incoming"); + $entry = ORM::factory("incoming_translation"); $entry->key = md5($key, true); $entry->message = serialize($message); $entry->translation = serialize($translation); |