Remove almost all pseudo-localization strings

This commit is contained in:
Dmitriy Simushev 2014-09-25 11:51:04 +00:00
parent 022fe7d6f4
commit 6e6920851d
3 changed files with 5 additions and 17 deletions

View File

@ -63,24 +63,24 @@
// Check email
if (typeof attributes.email != 'undefined') {
if (! attributes.email) {
return l.trans('leavemessage.error.email.required');
return l.trans('Please fill "{0}".', l.trans('Your email'));
}
if(! Mibew.Utils.checkEmail(attributes.email)) {
return l.trans('leavemessage.error.wrong.email');
return l.trans('Please fill "{0}" correctly.', l.trans('Your email'));
}
}
// Check name
if (typeof attributes.name != 'undefined') {
if (! attributes.name) {
return l.trans('leavemessage.error.name.required');
return l.trans('Please fill "{0}".', l.trans('Your name'));
}
}
// Check message
if (typeof attributes.message != 'undefined') {
if (! attributes.message) {
return l.trans('leavemessage.error.message.required');
return l.trans('Please fill "{0}".', l.trans('Message'));
}
}

View File

@ -255,14 +255,6 @@ function prepare_chat_app_data()
// Set refresh frequency
$data['frequency'] = Settings::get('updatefrequency_chat');
// Set some localized strings
$data['localized'] = array(
'email.required' => no_field("Your email"),
'name.required' => no_field("Your name"),
'message.required' => no_field("Message"),
'wrong.email' => wrong_field("Your email"),
);
return $data;
}

View File

@ -33,11 +33,7 @@
<script type="text/javascript"><!--
// Localized strings for the core
Mibew.Localization.set({
'chat.window.send_message_short_and_shortcut': '{{#jsString}}{{l10n "Send ({0})" send_shortcut}}{{/jsString}}',
'leavemessage.error.email.required': '{{#jsString}}{{localized.[email.required]}}{{/jsString}}',
'leavemessage.error.name.required': '{{#jsString}}{{localized.[name.required]}}{{/jsString}}',
'leavemessage.error.message.required': '{{#jsString}}{{localized.[message.required]}}{{/jsString}}',
'leavemessage.error.wrong.email': '{{#jsString}}{{localized.[wrong.email]}}{{/jsString}}',
'chat.window.send_message_short_and_shortcut': '{{#jsString}}{{l10n "Send ({0})" send_shortcut}}{{/jsString}}'
});
// Plugins localization
Mibew.Localization.set({{{additional_localized_strings}}});