summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTorsten Grote <grote@kolabsys.com>2012-09-19 17:47:50 +0200
committerTorsten Grote <grote@kolabsys.com>2012-09-19 17:48:32 +0200
commit0f1ce83b5a06c0789456d35eafd561535acf0fee (patch)
tree06312f44759112857ed18c6c2eb258eea9c73c17 /lib
parentd6fea9e91c96a1e481a91bb10fcfcd775c530f37 (diff)
downloadwebadmin-0f1ce83b5a06c0789456d35eafd561535acf0fee.tar.gz
localized hosted signup
Diffstat (limited to 'lib')
-rw-r--r--lib/hosted/kolab_client_task_signup.php24
-rw-r--r--lib/locale/de.php16
-rw-r--r--lib/locale/en.php16
3 files changed, 42 insertions, 14 deletions
diff --git a/lib/hosted/kolab_client_task_signup.php b/lib/hosted/kolab_client_task_signup.php
index 4bcc194..b1dbe6d 100644
--- a/lib/hosted/kolab_client_task_signup.php
+++ b/lib/hosted/kolab_client_task_signup.php
@@ -87,7 +87,7 @@ class kolab_client_task_signup extends kolab_client_task
if (!empty($publickey)) {
// TODO find a less dirty way to add captcha into form
- $form = preg_replace('/<\/tbody>/', '<tr><td class="label">Captcha</td><td class="value"><div id="recaptcha_div"></div></td></tr></tbody>', $form);
+ $form = preg_replace('/<\/tbody>/', '<tr><td class="label">'.$this->translate('signup.captcha').'</td><td class="value"><div id="recaptcha_div"></div></td></tr></tbody>', $form);
// load captcha
$form .= '
@@ -113,8 +113,7 @@ class kolab_client_task_signup extends kolab_client_task
$result = $this->api->post('users.list', null, $post);
if($result->get('count') > 0) {
- // TODO make this message translatable
- $this->output->command('update_user_info("User already exists!", "uid")');
+ $this->output->command('update_user_info("signup.userexists", "uid")');
return false;
}
@@ -163,12 +162,10 @@ class kolab_client_task_signup extends kolab_client_task
$result = $this->api->post('user.add', null, $data);
if (array_key_exists('error_code', $result)) {
- // TODO make this message translatable
- $this->output->command('display_message', 'An Error occured. You could not be signed up. Please try again.', 'error');
+ $this->output->command('display_message', 'internalerror', 'error');
return;
} else {
- // TODO make this message translatable
- $this->output->set_object('taskcontent', '<h3>Your account has been successfully added!</h3>Congratulations, you now have your own Kolab account.');
+ $this->output->set_object('taskcontent', 'signup.usercreated');
}
}
@@ -248,18 +245,17 @@ class kolab_client_task_signup extends kolab_client_task
}
// Change field labels for hosted case
- // TODO make translatable
- $fields['uid']['label'] = "Username";
- $fields['mail']['label'] = "Your Future Email Address";
- if(isset($fields['mailalternateaddress'])) $fields['mailalternateaddress']['label'] = "Your Current Email Address";
- $fields['domain']['label'] = "Domain";
+ $fields['uid']['label'] = 'signup.username';
+ $fields['mail']['label'] = 'signup.futuremail';
+ if(isset($fields['mailalternateaddress'])) $fields['mailalternateaddress']['label'] = 'signup.mailalternateaddress';
+ $fields['domain']['label'] = 'signup.domain';
// Create form object and populate with fields
$form = $this->form_create('user', $attribs, array('other'), $fields, $fields_map, $data, true);
- $form->set_title(kolab_html::escape('Sign up'));
+ $form->set_title($this->translate('signup.formtitle'));
- $this->output->add_translation('user.password.mismatch', 'user.add.success');
+ $this->output->add_translation('user.password.mismatch', 'user.add.success', 'signup.wronguid');
return $form->output();
}
diff --git a/lib/locale/de.php b/lib/locale/de.php
index de118f5..1429a4b 100644
--- a/lib/locale/de.php
+++ b/lib/locale/de.php
@@ -115,6 +115,22 @@ $LANG['servererror'] = 'Server Fehler!';
$LANG['session.expired'] = 'Die Sitzung ist ausgelaufen. Bitte wieder Anmelden';
+$LANG['signup.headline'] = 'Anmeldung für ein Kolab Konto';
+$LANG['signup.intro1'] = 'Ein Kolab E-Mail Adresse ist viel besser als eine normale E-Mail. Denn mit ihr kommen Möglichkeiten zur Syncronisation und der gemeinsamen Nutzung von Adressbüchern, Kalendern, Aufgaben, Notizen und vielem mehr.';
+$LANG['signup.intro2'] = 'Sie können sich hier eine E-Mail Adresse registrieren.';
+$LANG['signup.formtitle'] = 'Anmelden';
+$LANG['signup.username'] = 'Benutzername';
+$LANG['signup.domain'] = 'Domain';
+$LANG['signup.mailalternateaddress'] = 'Aktuelle E-Mail Adresse';
+$LANG['signup.futuremail'] = 'Zukünftige E-Mail Adresse';
+$LANG['signup.company'] = 'Firma';
+$LANG['signup.captcha'] = 'CAPTCHA';
+$LANG['signup.userexists'] = 'Benutzer existiert bereits!';
+$LANG['signup.usercreated'] = '<h3>Ihre E-Mail Adresse wurde erfolgreich angelegt!</h3>Sie haben jetzt ein eigenes Kolab-Konto.';
+$LANG['signup.wronguid'] = 'Ungültiger Benutzername!';
+$LANG['signup.wrongmailalternateaddress'] = 'Bitte geben Sie eine gültige E-Mail Adresse an!';
+$LANG['signup.footer'] = 'Dieser Dienst wird von <a href="http://kolabsys.com">Kolab Systems</a> angeboten.';
+
$LANG['submit.button'] = 'Abschicken';
$LANG['user.add'] = 'Benutzer hinzufügen';
diff --git a/lib/locale/en.php b/lib/locale/en.php
index 0da1aa0..75d1f6d 100644
--- a/lib/locale/en.php
+++ b/lib/locale/en.php
@@ -119,6 +119,22 @@ $LANG['servererror'] = 'Server Error!';
$LANG['session.expired'] = 'Session has expired. Login again, please';
+$LANG['signup.headline'] = 'Sign Up for Hosted Kolab';
+$LANG['signup.intro1'] = 'Having an account on a Kolab server is way better than just simple Email. It also provides you with full groupware functionality including synchronization for shared addressbooks, calendars, tasks, journal and more.';
+$LANG['signup.intro2'] = 'You can sign up here now for an account.';
+$LANG['signup.formtitle'] = 'Sign Up';
+$LANG['signup.username'] = 'Username';
+$LANG['signup.domain'] = 'Domain';
+$LANG['signup.mailalternateaddress'] = 'Current Email Address';
+$LANG['signup.futuremail'] = 'Future Email Address';
+$LANG['signup.company'] = 'Company';
+$LANG['signup.captcha'] = 'CAPTCHA';
+$LANG['signup.userexists'] = 'User already exists!';
+$LANG['signup.usercreated'] = '<h3>Your account has been successfully added!</h3>Congratulations, you now have your own Kolab account.';
+$LANG['signup.wronguid'] = 'Invalid Username!';
+$LANG['signup.wrongmailalternateaddress'] = 'Please provide a valid Email Address!';
+$LANG['signup.footer'] = 'This is a service offered by <a href="http://kolabsys.com">Kolab Systems</a>.';
+
$LANG['submit.button'] = 'Submit';
$LANG['user.add'] = 'Add User';