mirror of
https://github.com/Mibew/mibew.git
synced 2024-11-15 16:44:11 +03:00
Remove almost all pseudo-localization strings
This commit is contained in:
parent
022fe7d6f4
commit
6e6920851d
@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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}}});
|
||||
|
Loading…
Reference in New Issue
Block a user