cvs: pear /Translation2 Container.php package.xml /Translation2/tests admin_db_test_base.php db_test_base.php
| From: | Lorenzo Alberton | Date: | Wed, 19 Sep 2007 21:38:50 +0000 |
| Subject: | cvs: pear /Translation2 Container.php package.xml /Translation2/tests admin_db_test_base.php db_test_base.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-48634@lists.php.net to get a copy of this message | ||
quipo Wed Sep 19 21:38:50 2007 UTC
Modified files:
/pear/Translation2 Container.php package.xml
/pear/Translation2/tests admin_db_test_base.php db_test_base.php
Log:
request #11881: getLang(...,'array') now returns a 'lang_id' alias to
'id'
http://cvs.php.net/viewvc.cgi/pear/Translation2/Container.php?r1=1.18&r2=1.19&diff_format=u
Index: pear/Translation2/Container.php
diff -u pear/Translation2/Container.php:1.18 pear/Translation2/Container.php:1.19
--- pear/Translation2/Container.php:1.18 Sun Jul 29 15:18:47 2007
+++ pear/Translation2/Container.php Wed Sep 19 21:38:50 2007
@@ -32,7 +32,7 @@
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @copyright 2004-2005 Lorenzo Alberton
* @license http://www.debian.org/misc/bsd.license BSD
License (3 Clause)
- * @version CVS: $Id: Container.php,v 1.18 2007/07/29 15:18:47 quipo Exp $
+ * @version CVS: $Id: Container.php,v 1.19 2007/09/19 21:38:50 quipo Exp $
* @link http://pear.php.net/package/Translation2
*/
@@ -209,6 +209,7 @@
switch ($format) {
case 'array':
foreach ($this->langs as $aLang) {
+ $aLang['lang_id'] = $aLang['id'];
$tmp[$aLang['id']] = $aLang;
}
break;
http://cvs.php.net/viewvc.cgi/pear/Translation2/package.xml?r1=1.113&r2=1.114&diff_format=u
Index: pear/Translation2/package.xml
diff -u pear/Translation2/package.xml:1.113 pear/Translation2/package.xml:1.114
--- pear/Translation2/package.xml:1.113 Wed Sep 12 20:40:53 2007
+++ pear/Translation2/package.xml Wed Sep 19 21:38:50 2007
@@ -45,8 +45,8 @@
<email>mike@php.net</email>
<active>yes</active>
</developer>
- <date>2007-09-12</date>
- <time>22:59:30</time>
+ <date>2007-09-19</date>
+ <time>23:58:30</time>
<version>
<release>2.0.0RC2</release>
<api>2.0.0RC2</api>
@@ -58,6 +58,8 @@
<license uri="http://www.debian.org/misc/bsd.license">BSD</license>
<notes>- request #11711: added setCharset() method in the DB container
- bug #11880: [XML driver] removing one language removes all strings for all languages
+- request #11881: getLang(...,'array') now returns a 'lang_id' alias to
'id'
+
</notes>
<contents>
<dir name="/">
@@ -203,10 +205,11 @@
<release>beta</release>
<api>beta</api>
</stability>
- <date>2007-09-12</date>
+ <date>2007-09-19</date>
<license uri="http://www.debian.org/misc/bsd.license">BSD</license>
<notes>- request #11711: added setCharset() method in the DB container
- bug #11880: [XML driver] removing one language removes all strings for all languages
+- request #11881: getLang(...,'array') now returns a 'lang_id' alias to
'id'
</notes>
</release>
<release>
http://cvs.php.net/viewvc.cgi/pear/Translation2/tests/admin_db_test_base.php?r1=1.1&r2=1.2&diff_format=u
Index: pear/Translation2/tests/admin_db_test_base.php
diff -u pear/Translation2/tests/admin_db_test_base.php:1.1
pear/Translation2/tests/admin_db_test_base.php:1.2
--- pear/Translation2/tests/admin_db_test_base.php:1.1 Tue Aug 29 09:54:36 2006
+++ pear/Translation2/tests/admin_db_test_base.php Wed Sep 19 21:38:50 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: admin_db_test_base.php,v 1.1 2006/08/29 09:54:36 quipo Exp $
+// $Id: admin_db_test_base.php,v 1.2 2007/09/19 21:38:50 quipo Exp $
require_once 'simple_include.php';
require_once 'translation2_admin_include.php';
@@ -41,6 +41,7 @@
$post = $this->tr->getLangs('array');
$expected = array(
'id' => 'fr',
+ 'lang_id' => 'fr',
'name' => 'français',
'meta' => '123 abc',
'error_text' => 'non disponible',
@@ -54,6 +55,7 @@
function testUpdateLang() {
$original = array(
'id' => 'en',
+ 'lang_id' => 'en',
'name' => 'english',
'meta' => 'my meta info',
'error_text' => 'not available in English',
@@ -77,6 +79,7 @@
);
$expected = array(
'id' => 'en',
+ 'lang_id' => 'en',
'name' => 'english2',
'meta' => 'my other meta info',
'error_text' => 'not available in English2',
http://cvs.php.net/viewvc.cgi/pear/Translation2/tests/db_test_base.php?r1=1.2&r2=1.3&diff_format=u
Index: pear/Translation2/tests/db_test_base.php
diff -u pear/Translation2/tests/db_test_base.php:1.2 pear/Translation2/tests/db_test_base.php:1.3
--- pear/Translation2/tests/db_test_base.php:1.2 Wed Dec 6 11:47:44 2006
+++ pear/Translation2/tests/db_test_base.php Wed Sep 19 21:38:50 2007
@@ -1,5 +1,5 @@
<?php
-// $Id: db_test_base.php,v 1.2 2006/12/06 11:47:44 quipo Exp $
+// $Id: db_test_base.php,v 1.3 2007/09/19 21:38:50 quipo Exp $
require_once 'simple_include.php';
@@ -123,6 +123,7 @@
$this->assertEqual('my meta info', $this->tr->getLang('en',
'meta'));
$expected = array(
'id' => 'it',
+ 'lang_id' => 'it',
'name' => 'italiano',
'meta' => 'charset: iso-8859-1',
'error_text' => 'non disponibile in Italiano',
@@ -146,6 +147,7 @@
$expected = array(
'it' => array(
'id' => 'it',
+ 'lang_id' => 'it',
'name' => 'italiano',
'meta' => 'charset: iso-8859-1',
'error_text' => 'non disponibile in Italiano',
@@ -153,6 +155,7 @@
),
'en' => array(
'id' => 'en',
+ 'lang_id' => 'en',
'name' => 'english',
'meta' => 'my meta info',
'error_text' => 'not available in English',
@@ -160,6 +163,7 @@
),
'de' => array(
'id' => 'de',
+ 'lang_id' => 'de',
'name' => 'deutsch',
'meta' => 'charset: iso-8859-1',
'error_text' => 'kein Text auf Deutsch verfügbar',
@@ -195,7 +199,7 @@
'Entirely new string' => 'Entirely new string',
);
$this->assertEqual($expected, $this->tr->getPage());
-
+
//parameter replacement
$this->tr->setParams(array('foo' => 'bar'));
$this->assertEqual('String bar not in DB', $this->tr->get('String
&&foo&& not in DB'));