Skip to content

Commit dcf8492

Browse files
committed
Backend changes & some templates' translation
1 parent 43d7825 commit dcf8492

File tree

24 files changed

+1136
-1085
lines changed

24 files changed

+1136
-1085
lines changed

web/edit/cron/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
$v_cmd = $_POST['v_cmd'];
7272
}
7373
if (empty($_SESSION['error_msg'])) {
74-
$_SESSION['ok_msg'] = "OK: changes has been saved.";
74+
$_SESSION['ok_msg'] = _("OK: changes has been saved.");
7575
}
7676
}
7777
}

web/edit/db/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
unset($output);
6666
}
6767
if (empty($_SESSION['error_msg'])) {
68-
$_SESSION['ok_msg'] = "OK: changes has been saved.";
68+
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
6969
}
7070
}
7171
}

web/edit/dns/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
}
138138

139139
if (empty($_SESSION['error_msg'])) {
140-
$_SESSION['ok_msg'] = "OK: changes has been saved.";
140+
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
141141
}
142142

143143
}
@@ -196,7 +196,7 @@
196196
}
197197

198198
if (empty($_SESSION['error_msg'])) {
199-
$_SESSION['ok_msg'] = "OK: changes has been saved.";
199+
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
200200
}
201201

202202
}

web/edit/ip/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
}
106106

107107
if (empty($_SESSION['error_msg'])) {
108-
$_SESSION['ok_msg'] = "OK: changes has been saved.";
108+
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
109109
}
110110
}
111111
}

web/edit/mail/index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
}
101101

102102
if (empty($_SESSION['error_msg'])) {
103-
$_SESSION['ok_msg'] = "OK: changes has been saved.";
103+
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
104104
}
105105

106106
// DKIM
@@ -162,7 +162,7 @@
162162
}
163163

164164
if (empty($_SESSION['error_msg'])) {
165-
$_SESSION['ok_msg'] = "OK: changes has been saved.";
165+
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
166166
}
167167
}
168168
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_mail.html');
@@ -356,7 +356,7 @@
356356

357357

358358
if (empty($_SESSION['error_msg'])) {
359-
$_SESSION['ok_msg'] = "OK: changes has been saved.";
359+
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
360360
}
361361

362362
}

web/edit/package/index.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,22 @@
7070
// Action
7171
if (!empty($_POST['save'])) {
7272
// Check input
73-
if (empty($_POST['v_package'])) $errors[] = 'package';
74-
if (empty($_POST['v_template'])) $errors[] = 'template';
75-
if (empty($_POST['v_shell'])) $errrors[] = 'shell';
76-
if (!isset($_POST['v_web_domains'])) $errors[] = 'web domains';
77-
if (!isset($_POST['v_web_aliases'])) $errors[] = 'web aliases';
78-
if (!isset($_POST['v_dns_domains'])) $errors[] = 'dns domains';
79-
if (!isset($_POST['v_dns_records'])) $errors[] = 'dns records';
80-
if (!isset($_POST['v_mail_domains'])) $errors[] = 'mail domains';
81-
if (!isset($_POST['v_mail_accounts'])) $errors[] = 'mail accounts';
82-
if (!isset($_POST['v_databases'])) $errors[] = 'databases';
83-
if (!isset($_POST['v_cron_jobs'])) $errors[] = 'cron jobs';
84-
if (!isset($_POST['v_backups'])) $errors[] = 'backups';
85-
if (!isset($_POST['v_disk_quota'])) $errors[] = 'quota';
86-
if (!isset($_POST['v_bandwidth'])) $errors[] = 'bandwidth';
87-
if (empty($_POST['v_ns1'])) $errors[] = 'ns1';
88-
if (empty($_POST['v_ns2'])) $errors[] = 'ns2';
73+
if (empty($_POST['v_package'])) $errors[] = _('package');
74+
if (empty($_POST['v_template'])) $errors[] = _('template');
75+
if (empty($_POST['v_shell'])) $errrors[] = _('shell');
76+
if (!isset($_POST['v_web_domains'])) $errors[] = _('web domains');
77+
if (!isset($_POST['v_web_aliases'])) $errors[] = _('web aliases');
78+
if (!isset($_POST['v_dns_domains'])) $errors[] = _('dns domains');
79+
if (!isset($_POST['v_dns_records'])) $errors[] = _('dns records');
80+
if (!isset($_POST['v_mail_domains'])) $errors[] = _('mail domains');
81+
if (!isset($_POST['v_mail_accounts'])) $errors[] = _('mail accounts');
82+
if (!isset($_POST['v_databases'])) $errors[] = _('databases');
83+
if (!isset($_POST['v_cron_jobs'])) $errors[] = _('cron jobs');
84+
if (!isset($_POST['v_backups'])) $errors[] = _('backups');
85+
if (!isset($_POST['v_disk_quota'])) $errors[] = _('quota');
86+
if (!isset($_POST['v_bandwidth'])) $errors[] = _('bandwidth');
87+
if (empty($_POST['v_ns1'])) $errors[] = _('ns1');
88+
if (empty($_POST['v_ns2'])) $errors[] = _('ns2');
8989

9090
// Protect input
9191
$v_package = escapeshellarg($_POST['v_package']);
@@ -175,7 +175,7 @@
175175
}
176176

177177
if (empty($_SESSION['error_msg'])) {
178-
$_SESSION['ok_msg'] = "OK: changes has been saved.";
178+
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
179179
}
180180
}
181181
}

web/edit/user/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
}
171171

172172
if (empty($_SESSION['error_msg'])) {
173-
$_SESSION['ok_msg'] = "OK: changes has been saved.";
173+
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
174174
}
175175
}
176176
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/edit_user.html');
@@ -263,7 +263,7 @@
263263
}
264264

265265
if (empty($_SESSION['error_msg'])) {
266-
$_SESSION['ok_msg'] = "OK: changes has been saved.";
266+
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
267267
}
268268
}
269269
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/edit_user.html');

web/edit/web/index.php

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,8 @@
417417
$v_stats_password = '';
418418
}
419419
if ((empty($v_stats_user)) && (!empty($_POST['v_stats_auth'])) && (empty($_SESSION['error_msg']))) {
420-
if (empty($_POST['v_stats_user'])) $errors[] = 'stats username';
421-
if (empty($_POST['v_stats_password'])) $errors[] = 'stats password';
420+
if (empty($_POST['v_stats_user'])) $errors[] = _('stats username');
421+
if (empty($_POST['v_stats_password'])) $errors[] = _('stats password');
422422
if (!empty($errors[0])) {
423423
foreach ($errors as $i => $error) {
424424
if ( $i == 0 ) {
@@ -442,8 +442,8 @@
442442
}
443443
}
444444
if ((!empty($v_stats_user)) && (!empty($_POST['v_stats_auth'])) && (empty($_SESSION['error_msg']))) {
445-
if (empty($_POST['v_stats_user'])) $errors[] = 'stats user';
446-
if (empty($_POST['v_stats_password'])) $errors[] = 'stats password';
445+
if (empty($_POST['v_stats_user'])) $errors[] = _('stats user');
446+
if (empty($_POST['v_stats_password'])) $errors[] = _('stats password');
447447
if (!empty($errors[0])) {
448448
foreach ($errors as $i => $error) {
449449
if ( $i == 0 ) {
@@ -482,8 +482,8 @@
482482
$v_ftp_password = '';
483483
}
484484
if ((!empty($v_ftp_user)) && (!empty($_POST['v_ftp'])) && (empty($_SESSION['error_msg']))) {
485-
if (empty($_POST['v_ftp_user'])) $errors[] = 'ftp user';
486-
if (empty($_POST['v_ftp_password'])) $errors[] = 'ftp password';
485+
if (empty($_POST['v_ftp_user'])) $errors[] = _('ftp user');
486+
if (empty($_POST['v_ftp_password'])) $errors[] = _('ftp user password');
487487
if (!empty($errors[0])) {
488488
foreach ($errors as $i => $error) {
489489
if ( $i == 0 ) {
@@ -512,8 +512,8 @@
512512

513513
if ((empty($v_ftp_user)) && (!empty($_POST['v_ftp'])) && (empty($_SESSION['error_msg']))) {
514514
if ((!empty($_POST['v_ftp_email'])) && (!filter_var($_POST['v_ftp_email'], FILTER_VALIDATE_EMAIL))) $_SESSION['error_msg'] = _('Please enter valid email address.');
515-
if (empty($_POST['v_ftp_user'])) $errors[] = 'ftp username';
516-
if (empty($_POST['v_ftp_password'])) $errors[] = 'ftp password';
515+
if (empty($_POST['v_ftp_user'])) $errors[] = 'ftp user';
516+
if (empty($_POST['v_ftp_password'])) $errors[] = 'ftp user password';
517517
if (!empty($errors[0])) {
518518
foreach ($errors as $i => $error) {
519519
if ( $i == 0 ) {
@@ -535,14 +535,10 @@
535535
} else {
536536
if (!empty($_POST['v_ftp_email'])) {
537537
$to = $_POST['v_ftp_email'];
538-
$subject = "FTP login credentials";
538+
$subject = _("FTP login credentials");
539539
$hostname = exec('hostname');
540-
$from = "Vesta Control Panel <noreply@".$hostname.">";
541-
$mailtext .= "Your ftp account has been created successfully and is ready to use.\n\n";
542-
$mailtext .= "hostname: ".$_GET['domain']."\n";
543-
$mailtext .= "username: ".$user."_".$_POST['v_ftp_user']."\n";
544-
$mailtext .= "password: ".$_POST['v_ftp_password']."\n\n";
545-
$mailtext .= "--\nVesta Control Panel\n";
540+
$from = _('MAIL_FROM',$hostname);
541+
$mailtext .= _('FTP_ACCOUNT_READY',$_GET['domain'],$user,$_POST['v_ftp_user'],$_POST['v_ftp_password']);
546542
send_email($to, $subject, $mailtext, $from);
547543
unset($v_ftp_email);
548544
}
@@ -574,7 +570,7 @@
574570
}
575571

576572
if (empty($_SESSION['error_msg'])) {
577-
$_SESSION['ok_msg'] = "OK: changes has been saved.";
573+
$_SESSION['ok_msg'] = _('OK: changes has been saved.');
578574
}
579575

580576
}

web/error/index.html

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
3-
<title>505 &mdash; internal error</title>
4-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5-
<meta name="description" content="internal error"/>
6-
<style type="text/css">
7-
body {font-size:14px; color:#777777; font-family:arial; text-align:center; background: black;}
8-
h1 {font-size:180px; color:#99A7AF; margin: 70px 0 0 0;}
9-
h2 {color: #DE6C5D; font-family: arial; font-size: 24px; font-weight: bold; letter-spacing: -1px; padding: 40px 0 0 0;}
10-
p {width:320px; text-align:center; margin-left:auto;margin-right:auto; margin-top: 30px }
11-
div {width:320px; text-align:center; margin-left:auto;margin-right:auto;}
12-
a:link {color: #34536A;}
13-
a:visited {color: #34536A;}
14-
a:active {color: #34536A;}
15-
a:hover {color: #34536A;}
16-
</style>
17-
</head>
18-
19-
<body>
20-
<h2>An internal error occurred</h2>
21-
<img src="/error/vesta.jpg">
22-
<div>
23-
Try start again from <a href="/">home page</a> or go back to <a href="javascript:%20history.go(-1)">previous page</a>.
24-
</div>
25-
</body>
26-
</html>
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
3+
<title><?php print _('505');?></title>
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5+
<meta name="description" content="<?php print _('505');?>"/>
6+
<style type="text/css">
7+
body {font-size:14px; color:#777777; font-family:arial; text-align:center; background: black;}
8+
h1 {font-size:180px; color:#99A7AF; margin: 70px 0 0 0;}
9+
h2 {color: #DE6C5D; font-family: arial; font-size: 24px; font-weight: bold; letter-spacing: -1px; padding: 40px 0 0 0;}
10+
p {width:320px; text-align:center; margin-left:auto;margin-right:auto; margin-top: 30px }
11+
div {width:320px; text-align:center; margin-left:auto;margin-right:auto;}
12+
a:link {color: #34536A;}
13+
a:visited {color: #34536A;}
14+
a:active {color: #34536A;}
15+
a:hover {color: #34536A;}
16+
</style>
17+
</head>
18+
19+
<body>
20+
<h2><?php print _('An internal error occurred');?></h2>
21+
<img src="/error/vesta.jpg">
22+
<div>
23+
<?php print _('GO_BACK_LINK');?>
24+
</div>
25+
</body>
26+
</html>

web/inc/i18n/ru.php

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,78 @@
7272
'ssl certificate'=>'SSL сертификат',
7373
'ssl key'=>'ключ SSL сертификата',
7474
'stats user password'=>'пароль для доступа к статистике',
75+
'stats username'=>'имя пользователя статистики',
76+
'stats password'=>'пароль пользователя статистики',
7577
'ftp user password'=>'пароль для доступа к FTP',
78+
'ftp user'=>'пользователь FTP',
7679
'FTP login credentials'=>'Данные для доступа к FTP',
7780
'FTP_ACCOUNT_READY'=>"Ваш FTP аккаунт успешно создан и готов к использованию.\n\nХост: %s\nИмя пользователя: %s_%s\nПароль: %s\n\n--\nПанель управления Vesta\n",
7881
'HOSTING_DOMAIN_CREATED_OK'=>'Успешно: хостинг для домена <a href="/edit/web/?domain=%s"><b>%s</b></a> был успешно создан.',
79-
80-
82+
'OK: changes has been saved.'=>'Успешно: изменения были сохранены.',
83+
'FTP login credentials'=>'Данные для доступа к FTP',
84+
'505'=>'505 &mdash; внутренняя ошибка',
85+
'An internal error occurred'=>'Произошла внутренняя ошибка',
86+
'GO_BACK_LINK'=>'Попробуйте вернуться на <a href="/">главную страницу</a> или вернитесь на <a href="javascript:history.go(-1)">предыдущую страницу</a>',
87+
'ERROR: Invalid username or password'=>'Ошибка: Неверный логин или пароль',
88+
'ERROR: Invalid username or code'=>'Ошибка: Неверный логин или код сброса пароля',
89+
'MAIL_RESET_SUBJECT'=>'Password Reset at %s',
90+
'PASSWORD_RESET_REQUEST'=>"Вы недавно запросили смену пароля.\nЧтобы произвести смену пароля, пройдите по этой ссылки:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\nВы также можете пойти по ссылке https://%s/reset/?action=code&user=%s и ввести следующий код для сброса пароля:\n%s\n\nЕсли вы не создавали запрос на сброс пароля, пожалуйста проигнорируйте это письмо и примите наши извиниения.\n\n--\nПанель управления Vesta\n",
91+
'ERROR: Passwords not match'=>'Ошибка: Пароли не совпадают',
92+
'Adding Cron Job'=>'Добавление cron задания',
93+
'Minute'=>'Минута',
94+
'Day'=>'День',
95+
'Month'=>'Месяц',
96+
'Day of week'=>'День недели',
97+
'Command'=>'Команда',
98+
'Add'=>'Добавить',
99+
'Back'=>'Назад',
100+
'Adding database'=>'Добавление базы данных',
101+
'DB_PREFIX_WILL_BE_ADDED'=>'Префикс %s будет автоматически добавлен к БД и пользователю БД',
102+
'Database'=>'База данных',
103+
'Username'=>'Имя пользователя',
104+
'Password'=>'Пароль',
105+
'generate'=>'сгенерировать',
106+
'Type'=>'Тип',
107+
'Charset'=>'Кодировка',
108+
'Adding DNS Domain'=>'Добавление доменного имени',
109+
'Domain'=>'Домен',
110+
'IP-Address'=>'IP-адрес',
111+
'Advanced options'=>'Расширенные опции',
112+
'Template'=>'Шаблон',
113+
'Expiration date'=>'Дата окончания делегирования',
114+
'Name servers'=>'Сервера имен',
115+
'Powered by Vesta Control Panel'=>'Работает на Панели Управления Vesta',
116+
'Vesta Control Panel'=>'Панель Управления Vesta',
117+
'Translation by ZonD80'=>'Перевод ZonD80',
118+
'Forgot Password?'=>'Забыли пароль?',
119+
'Log in'=>'Войти',
120+
'Log out'=>'Выйти',
121+
"RESET_NOTICE"=>"Для сброса пароля введите ваше имя пользователя, и мы расскажем, что нужно делать дальше.",
122+
'Submit'=>'Отправить',
123+
'RESET_CODE_SENT'=>'Код сброса пароля выслан на ваш email<br/>Пожалуйста, введите код в располженное ниже поле для продолжения',
124+
'Confirm'=>'Подтвердить',
125+
'New Password'=>'Новый Пароль',
126+
'Confirm Password'=>'Подтверждение Пароля',
127+
'Reset'=>'Сбросить',
128+
'Statistics'=>'Статистика',
129+
'History Log'=>'История изменений',
130+
'Vesta logo'=>'Логотип Vesta',
131+
'USER'=>'ПОЛЬЗОВАТЕЛИ',
132+
'users'=>'пользователи',
133+
'suspended'=>'заблокировано',
134+
'WEB'=>'ХОСТИНГ',
135+
'domains'=>'домены',
136+
'aliases'=>'редиректы',
137+
'DNS'=>'DNS',
138+
'records'=>'записи',
139+
'MAIL'=>'ПОЧТА',
140+
'DB'=>'БД',
141+
'CRON'=>'CRON',
142+
'BACKUP'=>'БЭКАПЫ',
143+
'Packages'=>'Пакеты',
144+
'IP Addresses'=>'IP адреса',
145+
'RRD Graphics'=>'Графики',
146+
'jobs'=>'Задания',
147+
'Reset Code'=>'Код сброса'
81148

82149
);

0 commit comments

Comments
 (0)