summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-10-23 12:20:13 +0200
committerArthur Schiwon <blizzz@owncloud.com>2013-10-23 12:20:13 +0200
commit30c0f5dee602e8b09963f2be5234eeff04193eb5 (patch)
treeaa5474a1bf96c155441e6c93f856253516d51426 /apps/user_ldap
parentd78a80a6892bdf47388329d7d426ccab6a36cf20 (diff)
downloadnextcloud-server-30c0f5dee602e8b09963f2be5234eeff04193eb5.tar.gz
nextcloud-server-30c0f5dee602e8b09963f2be5234eeff04193eb5.zip
LDAP Wizard: proper strings and translations for user and group count text
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/wizard.php12
-rw-r--r--apps/user_ldap/templates/part.wizard-groupfilter.php2
-rw-r--r--apps/user_ldap/templates/part.wizard-userfilter.php2
3 files changed, 11 insertions, 5 deletions
diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php
index 7b7ef45af47..9b84c3d5a44 100644
--- a/apps/user_ldap/lib/wizard.php
+++ b/apps/user_ldap/lib/wizard.php
@@ -73,8 +73,10 @@ class Wizard extends LDAPUtility {
$base = $this->configuration->ldapBase[0];
$filter = $this->configuration->ldapGroupFilter;
\OCP\Util::writeLog('user_ldap', 'Wiz: g filter '. print_r($filter, true), \OCP\Util::DEBUG);
+ $l = \OC_L10N::get('user_ldap');
if(empty($filter)) {
- $this->result->addChange('ldap_group_count', 0);
+ $output = $l->n('%s group found', '%s groups found', 0, array(0));
+ $this->result->addChange('ldap_group_count', $output);
return $this->result;
}
$cr = $this->getConnection();
@@ -87,7 +89,8 @@ class Wizard extends LDAPUtility {
}
$entries = $this->ldap->countEntries($cr, $rr);
$entries = ($entries !== false) ? $entries : 0;
- $this->result->addChange('ldap_group_count', $entries);
+ $output = $l->n('%s group found', '%s groups found', $entries, $entries);
+ $this->result->addChange('ldap_group_count', $output);
return $this->result;
}
@@ -116,11 +119,14 @@ class Wizard extends LDAPUtility {
}
$entries = $this->ldap->countEntries($cr, $rr);
$entries = ($entries !== false) ? $entries : 0;
- $this->result->addChange('ldap_user_count', $entries);
+ $l = \OC_L10N::get('user_ldap');
+ $output = $l->n('%s user found', '%s users found', $entries, $entries);
+ $this->result->addChange('ldap_user_count', $output);
return $this->result;
}
+
public function determineAttributes() {
if(!$this->checkRequirements(array('ldapHost',
'ldapPort',
diff --git a/apps/user_ldap/templates/part.wizard-groupfilter.php b/apps/user_ldap/templates/part.wizard-groupfilter.php
index 17ce815589a..0cc4dfa572a 100644
--- a/apps/user_ldap/templates/part.wizard-groupfilter.php
+++ b/apps/user_ldap/templates/part.wizard-groupfilter.php
@@ -35,7 +35,7 @@
<div class="ldapWizardInfo invisible">&nbsp;</div>
</p>
<p>
- <span id="ldap_group_count">0</span> <span><?php p($l->t('group(s) found'));?></span>
+ <span id="ldap_group_count">0 <?php p($l->t('groups found'));?></span>
</p>
<?php print_unescaped($_['wizardControls']); ?>
</div>
diff --git a/apps/user_ldap/templates/part.wizard-userfilter.php b/apps/user_ldap/templates/part.wizard-userfilter.php
index 146e6bb739a..c1d522ce2a6 100644
--- a/apps/user_ldap/templates/part.wizard-userfilter.php
+++ b/apps/user_ldap/templates/part.wizard-userfilter.php
@@ -35,7 +35,7 @@
<div class="ldapWizardInfo invisible">&nbsp;</div>
</p>
<p>
- <span id="ldap_user_count">0</span> <span><?php p($l->t('user(s) found'));?></span>
+ <span id="ldap_user_count">0 <?php p($l->t('users found'));?></span>
</p>
<?php print_unescaped($_['wizardControls']); ?>
</div>