mirror of
https://github.com/dducret/kopano-webapp-passwd
synced 2026-07-27 18:42:47 +02:00
commit
c8b27fe56a
7 changed files with 103 additions and 20 deletions
|
|
@ -47,7 +47,7 @@ Zarafa.plugins.passwd.PasswdPlugin = Ext.extend(Zarafa.core.Plugin, {
|
|||
Zarafa.onReady(function() {
|
||||
container.registerPlugin(new Zarafa.core.PluginMetaData({
|
||||
name : 'passwd',
|
||||
displayName : _('Password Change Plugin'),
|
||||
displayName : dgettext("plugin_passwd", 'Password Change Plugin'),
|
||||
about : Zarafa.plugins.passwd.ABOUT,
|
||||
pluginConstructor : Zarafa.plugins.passwd.PasswdPlugin
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ Zarafa.plugins.passwd.data.PasswdResponseHandler = Ext.extend(Zarafa.core.data.A
|
|||
*/
|
||||
doError : function(response)
|
||||
{
|
||||
var displayMessage = _('An unknown error occurred while changing password.');
|
||||
var displayMessage = dgettext("plugin_passwd", 'An unknown error occurred while changing password.');
|
||||
|
||||
if(response.info) {
|
||||
displayMessage = response.info.display_message;
|
||||
}
|
||||
|
||||
Ext.MessageBox.alert(_('Error'), displayMessage);
|
||||
Ext.MessageBox.alert(dgettext("plugin_passwd", 'Error'), displayMessage);
|
||||
|
||||
this.callbackFn.apply(this.scope || this, [ false, response ]);
|
||||
},
|
||||
|
|
@ -41,14 +41,14 @@ Zarafa.plugins.passwd.data.PasswdResponseHandler = Ext.extend(Zarafa.core.data.A
|
|||
*/
|
||||
doSuccess : function(response)
|
||||
{
|
||||
var displayMessage = _('Password is changed successfully.');
|
||||
var displayMessage = dgettext("plugin_passwd", 'Password is changed successfully.');
|
||||
|
||||
if(response.info) {
|
||||
displayMessage = response.info.display_message;
|
||||
}
|
||||
|
||||
Ext.MessageBox.alert(_('Success'), displayMessage);
|
||||
Ext.MessageBox.alert(dgettext("plugin_passwd", 'Success'), displayMessage);
|
||||
|
||||
this.callbackFn.apply(this.scope || this, [ true, response ]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Zarafa.plugins.passwd.settings.SettingsPasswdCategory = Ext.extend(Zarafa.settin
|
|||
config = config || {};
|
||||
|
||||
Ext.applyIf(config, {
|
||||
title : _('Change Password'),
|
||||
title : dgettext("plugin_passwd", 'Change Password'),
|
||||
categoryIndex : 9997,
|
||||
xtype : 'zarafa.settingspasswdcategory',
|
||||
items : [{
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Zarafa.plugins.passwd.settings.SettingsPasswdWidget = Ext.extend(Zarafa.settings
|
|||
Ext.applyIf(config, {
|
||||
height : 175,
|
||||
width : 400,
|
||||
title : _('Change Password'),
|
||||
title : dgettext("plugin_passwd", 'Change Password'),
|
||||
xtype : 'zarafa.settingspasswdwidget',
|
||||
layout : {
|
||||
// override from SettingsWidget
|
||||
|
|
|
|||
78
languages/nl_NL.UTF-8/LC_MESSAGES/plugin_passwd.po
Normal file
78
languages/nl_NL.UTF-8/LC_MESSAGES/plugin_passwd.po
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zarafa-webap-plugin-passwd\n"
|
||||
"POT-Creation-Date: 2014-03-04 13:53+0100\n"
|
||||
"PO-Revision-Date: 2014-03-04 14:34+0100\n"
|
||||
"Last-Translator: Sander Hoentjen <sander@hoentjen.eu>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.5.4\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Language: nl\n"
|
||||
|
||||
# php/class.passwdmodule.php:44:
|
||||
msgid "No data received."
|
||||
msgstr "Geen data ontvangen."
|
||||
|
||||
# php/class.passwdmodule.php:48:
|
||||
msgid "User name is empty."
|
||||
msgstr "Gebruikersnaam is leeg."
|
||||
|
||||
# php/class.passwdmodule.php:52:
|
||||
msgid "Current password is empty."
|
||||
msgstr "Huidig wachtwoord is leeg."
|
||||
|
||||
# php/class.passwdmodule.php:56:
|
||||
msgid "New password is empty."
|
||||
msgstr "Nieuw wachtwoord is leeg."
|
||||
|
||||
# php/class.passwdmodule.php:60:
|
||||
msgid "New passwords do not match."
|
||||
msgstr "Nieuwe wachtwoorden zijn niet gelijk."
|
||||
|
||||
# php/class.passwdmodule.php:137:
|
||||
# php/class.passwdmodule.php:196:
|
||||
# js/data/PasswdResponseHandler.js:44:
|
||||
msgid "Password is changed successfully."
|
||||
msgstr "Wachtwoord succesvol gewijzigd."
|
||||
|
||||
# php/class.passwdmodule.php:141:
|
||||
# php/class.passwdmodule.php:200:
|
||||
msgid "Password is not changed."
|
||||
msgstr "Wachtwoord is niet aangepast."
|
||||
|
||||
# php/class.passwdmodule.php:144:
|
||||
# php/class.passwdmodule.php:203:
|
||||
msgid ""
|
||||
"Password is weak. Password should contain capital, non capital letters and "
|
||||
"numbers. Password shuold have 8 to 20 characters."
|
||||
msgstr ""
|
||||
"Wachtwoord is zwak. Een wachtwoord moet hoofdletters, kleine letters en "
|
||||
"cijfers bevatten. Een wachtwoord moet 8 tot 20 karakters bevatten."
|
||||
|
||||
# php/class.passwdmodule.php:147:
|
||||
msgid "Current password does not match."
|
||||
msgstr "Huidig wachtwoord klopt niet."
|
||||
|
||||
# js/data/PasswdResponseHandler.js:27:
|
||||
msgid "An unknown error occurred while changing password."
|
||||
msgstr "Er is een onbekende fout opgetreden tijdens de wachtwoord wijziging."
|
||||
|
||||
# js/data/PasswdResponseHandler.js:33:
|
||||
msgid "Error"
|
||||
msgstr "Fout"
|
||||
|
||||
# js/data/PasswdResponseHandler.js:50:
|
||||
msgid "Success"
|
||||
msgstr "Succes"
|
||||
|
||||
# js/settings/SettingsPasswdWidget.js:24:
|
||||
# js/settings/SettingsPasswdCategory.js:20:
|
||||
msgid "Change Password"
|
||||
msgstr "Wijzig wachtwoord"
|
||||
|
||||
# js/PasswdPlugin.js:50:
|
||||
msgid "Password Change Plugin"
|
||||
msgstr "Wachtwoord wijzigen plugin"
|
||||
|
|
@ -12,6 +12,11 @@
|
|||
<config>
|
||||
<configfile>config.php</configfile>
|
||||
</config>
|
||||
<translations>
|
||||
<translationsdir>languages</translationsdir>
|
||||
</translations>
|
||||
|
||||
|
||||
<components>
|
||||
<!-- <component>
|
||||
<info>
|
||||
|
|
|
|||
|
|
@ -41,23 +41,23 @@ class PasswdModule extends Module
|
|||
|
||||
// some sanity checks
|
||||
if(empty($data)) {
|
||||
$errorMessage = _('No data received.');
|
||||
$errorMessage = dgettext("plugin_passwd", 'No data received.');
|
||||
}
|
||||
|
||||
if(empty($data['username'])) {
|
||||
$errorMessage = _('User name is empty.');
|
||||
$errorMessage = dgettext("plugin_passwd", 'User name is empty.');
|
||||
}
|
||||
|
||||
if(empty($data['current_password'])) {
|
||||
$errorMessage = _('Current password is empty.');
|
||||
$errorMessage = dgettext("plugin_passwd", 'Current password is empty.');
|
||||
}
|
||||
|
||||
if(empty($data['new_password']) || empty($data['new_password_repeat'])) {
|
||||
$errorMessage = _('New password is empty.');
|
||||
$errorMessage = dgettext("plugin_passwd", 'New password is empty.');
|
||||
}
|
||||
|
||||
if($data['new_password'] !== $data['new_password_repeat']) {
|
||||
$errorMessage = _('New passwords does not match.');
|
||||
$errorMessage = dgettext("plugin_passwd", 'New passwords does not match.');
|
||||
}
|
||||
|
||||
if(empty($errorMessage)) {
|
||||
|
|
@ -134,17 +134,17 @@ class PasswdModule extends Module
|
|||
// send feedback to client
|
||||
$this->sendFeedback(true, array(
|
||||
'info' => array(
|
||||
'display_message' => _('Password is changed successfully.')
|
||||
'display_message' => dgettext("plugin_passwd", 'Password is changed successfully.')
|
||||
)
|
||||
));
|
||||
} else {
|
||||
$errorMessage = _('Password is not changed.');
|
||||
$errorMessage = dgettext("plugin_passwd", 'Password is not changed.');
|
||||
}
|
||||
} else {
|
||||
$errorMessage = _('Password is weak. Password should contain capital, non capital letters and numbers. Password shuold have 8 to 20 characters.');
|
||||
$errorMessage = dgettext("plugin_passwd", 'Password is weak. Password should contain capital, non capital letters and numbers. Password shuold have 8 to 20 characters.');
|
||||
}
|
||||
} else {
|
||||
$errorMessage = _('Current password does not match.');
|
||||
$errorMessage = dgettext("plugin_passwd", 'Current password does not match.');
|
||||
}
|
||||
|
||||
// release ldap-bind
|
||||
|
|
@ -193,14 +193,14 @@ class PasswdModule extends Module
|
|||
// send feedback to client
|
||||
$this->sendFeedback(true, array(
|
||||
'info' => array(
|
||||
'display_message' => _('Password is changed successfully.')
|
||||
'display_message' => dgettext("plugin_passwd", 'Password is changed successfully.')
|
||||
)
|
||||
));
|
||||
} else {
|
||||
$errorMessage = _('Password is not changed.');
|
||||
$errorMessage = dgettext("plugin_passwd", 'Password is not changed.');
|
||||
}
|
||||
} else {
|
||||
$errorMessage = _('Password is weak. Password should contain capital, non capital letters and numbers. Password shuold have 8 to 20 characters.');
|
||||
$errorMessage = dgettext("plugin_passwd", 'Password is weak. Password should contain capital, non capital letters and numbers. Password shuold have 8 to 20 characters.');
|
||||
}
|
||||
|
||||
if(!empty($errorMessage)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue