summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-10-14 09:37:47 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-10-14 09:37:59 +0200
commit1a31d82d61304db501cea5bb08e1724f81cfbdf3 (patch)
tree1873dfe04f1577bbfb392e49a1477aaa7df56c89
parent0424f1be57b3e6b658a8ee3de454c3aad7fbb50b (diff)
fix #634
-rw-r--r--CHANGELOG.md3
-rw-r--r--appinfo/application.php1
-rw-r--r--config/appconfig.php8
-rw-r--r--tests/unit/config/AppConfigTest.php18
4 files changed, 7 insertions, 23 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a024070c7..ff2bce0e0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+owncloud-news (3.402)
+* **Bugfix**: Use **News** as the app navigation entry name across all languages
+
owncloud-news (3.401)
* **New dependency**: SimpleXML
* **Enhancement**: Added Slashdot.org enhancer to get rid of tons of advertising that create a lot of whitespace when using adblock
diff --git a/appinfo/application.php b/appinfo/application.php
index ad15dac84..5d27fe5dd 100644
--- a/appinfo/application.php
+++ b/appinfo/application.php
@@ -269,7 +269,6 @@ class Application extends App {
$config = new AppConfig(
$c->query('ServerContainer')->getNavigationManager(),
- $c->query('L10N'),
$c->query('URLGenerator'),
phpversion(),
implode('.', Util::getVersion()),
diff --git a/config/appconfig.php b/config/appconfig.php
index 3729e56b2..0c59ba005 100644
--- a/config/appconfig.php
+++ b/config/appconfig.php
@@ -14,7 +14,6 @@
namespace OCA\News\Config;
use OCP\INavigationManager;
-use OCP\IL10N;
use OCP\IURLGenerator;
use \OCP\Backgroundjob;
use \OCP\Util;
@@ -30,7 +29,6 @@ class AppConfig {
private $ownCloudVersion;
private $installedExtensions;
private $databaseType;
- private $l10n;
/**
* TODO: External deps that are needed:
@@ -38,14 +36,12 @@ class AppConfig {
* - connect to hooks
*/
public function __construct(INavigationManager $navigationManager,
- IL10N $l10n,
IURLGenerator $urlGenerator,
$phpVersion,
$ownCloudVersion,
$installedExtensions,
$databaseType) {
$this->navigationManager = $navigationManager;
- $this->l10n = $l10n;
$this->urlGenerator = $urlGenerator;
$this->ownCloudVersion = $ownCloudVersion;
$this->phpVersion = $phpVersion;
@@ -111,10 +107,10 @@ class AppConfig {
$navConfig = [
'id' => $nav['id'],
- 'order' => $nav['order']
+ 'order' => $nav['order'],
+ 'name' => $nav['name']
];
- $navConfig['name'] = $this->l10n->t($nav['name']);
$navConfig['href'] = $this->urlGenerator->linkToRoute($nav['route']);
$navConfig['icon'] = $this->urlGenerator->imagePath($nav['id'],
$nav['icon']);
diff --git a/tests/unit/config/AppConfigTest.php b/tests/unit/config/AppConfigTest.php
index 95fbbd1fd..8d1b0daf9 100644
--- a/tests/unit/config/AppConfigTest.php
+++ b/tests/unit/config/AppConfigTest.php
@@ -24,9 +24,6 @@ class AppConfigTest extends \PHPUnit_Framework_TestCase {
$this->nav = $this->getMockBuilder('\OCP\INavigationManager')
->disableOriginalConstructor()
->getMock();
- $this->l10n = $this->getMockBuilder('\OCP\IL10N')
- ->disableOriginalConstructor()
- ->getMock();
$this->url = $this->getMockBuilder('\OCP\IURLGenerator')
->disableOriginalConstructor()
->getMock();
@@ -35,9 +32,8 @@ class AppConfigTest extends \PHPUnit_Framework_TestCase {
$installedExtensions = ['curl' => '4.3'];
$databaseType = 'oracle';
- $this->config = new AppConfig($this->nav, $this->l10n,
- $this->url, $phpVersion, $ownCloudVersion,
- $installedExtensions, $databaseType);
+ $this->config = new AppConfig($this->nav, $this->url, $phpVersion,
+ $ownCloudVersion, $installedExtensions, $databaseType);
}
public function testGetId() {
@@ -78,11 +74,6 @@ class AppConfigTest extends \PHPUnit_Framework_TestCase {
'name' => 'News'
];
- $this->l10n->expects($this->once())
- ->method('t')
- ->with($this->equalTo('News'))
- ->will($this->returnValue('News'));
-
$this->url->expects($this->once())
->method('linkToRoute')
->with($this->equalTo('news.page.index'))
@@ -116,11 +107,6 @@ class AppConfigTest extends \PHPUnit_Framework_TestCase {
'name' => 'haha'
];
- $this->l10n->expects($this->once())
- ->method('t')
- ->with($this->equalTo('haha'))
- ->will($this->returnValue('haha'));
-
$this->url->expects($this->once())
->method('linkToRoute')
->with($this->equalTo('abc.page.index'))