diff --git a/lib/classes/API/V1/adapter.php b/lib/classes/API/V1/adapter.php index 516077ca59..87bdae0ebc 100644 --- a/lib/classes/API/V1/adapter.php +++ b/lib/classes/API/V1/adapter.php @@ -2026,7 +2026,13 @@ class API_V1_adapter extends API_V1_Abstract $ret = array( 'base_id' => $collection->get_base_id(), 'collection_id' => $collection->get_coll_id(), - 'name' => $collection->get_label($this->app['locale.I18n']), + 'name' => $collection->get_name(), + 'labels' => array( + 'fr' => $collection->get_label('fr'), + 'en' => $collection->get_label('en'), + 'de' => $collection->get_label('de'), + 'nl' => $collection->get_label('nl'), + ), 'record_amount' => $collection->get_record_amount(), ); diff --git a/tests/Alchemy/Tests/Phrasea/Application/ApiAbstract.php b/tests/Alchemy/Tests/Phrasea/Application/ApiAbstract.php index a995e020a5..08012b2350 100644 --- a/tests/Alchemy/Tests/Phrasea/Application/ApiAbstract.php +++ b/tests/Alchemy/Tests/Phrasea/Application/ApiAbstract.php @@ -637,6 +637,11 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract $this->assertArrayHasKey('base_id', $collection); $this->assertArrayHasKey('collection_id', $collection); $this->assertArrayHasKey('name', $collection); + $this->assertArrayHasKey('labels', $collection); + $this->assertArrayHasKey('fr', $collection['labels']); + $this->assertArrayHasKey('en', $collection['labels']); + $this->assertArrayHasKey('de', $collection['labels']); + $this->assertArrayHasKey('nl', $collection['labels']); $this->assertArrayHasKey('record_amount', $collection); $this->assertTrue(is_int($collection['base_id'])); $this->assertGreaterThan(0, $collection['base_id']);