Skip to content

Commit 25c2b5c

Browse files
committed
changed tranlsate function name from _() to __()
1 parent 83673da commit 25c2b5c

File tree

104 files changed

+1277
-1277
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+1277
-1277
lines changed

web/add/cron/index.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
//if ($_SESSION['user'] == 'admin') {
1717
if (!empty($_POST['ok'])) {
1818
// Check input
19-
if (empty($_POST['v_min'])) $errors[] = _('minute');
20-
if (empty($_POST['v_hour'])) $errors[] = _('hour');
21-
if (empty($_POST['v_day'])) $errors[] = _('day');
22-
if (empty($_POST['v_month'])) $errors[] = _('month');
23-
if (empty($_POST['v_wday'])) $errors[] = _('day of week');
24-
if (empty($_POST['v_cmd'])) $errors[] = _('cmd');
19+
if (empty($_POST['v_min'])) $errors[] = __('minute');
20+
if (empty($_POST['v_hour'])) $errors[] = __('hour');
21+
if (empty($_POST['v_day'])) $errors[] = __('day');
22+
if (empty($_POST['v_month'])) $errors[] = __('month');
23+
if (empty($_POST['v_wday'])) $errors[] = __('day of week');
24+
if (empty($_POST['v_cmd'])) $errors[] = __('cmd');
2525

2626
// Protect input
2727
$v_min = escapeshellarg($_POST['v_min']);
@@ -40,20 +40,20 @@
4040
$error_msg = $error_msg.", ".$error;
4141
}
4242
}
43-
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
43+
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
4444
} else {
4545
// Add Cron Job
4646
exec (VESTA_CMD."v-add-cron-job ".$user." ".$v_min." ".$v_hour." ".$v_day." ".$v_month." ".$v_wday." ".$v_cmd, $output, $return_var);
4747
$v_type = $_POST['v_type'];
4848
$v_charset = $_POST['v_charset'];
4949
if ($return_var != 0) {
5050
$error = implode('<br>', $output);
51-
if (empty($error)) $error = _('Error code:',$return_var);
51+
if (empty($error)) $error = __('Error code:',$return_var);
5252
$_SESSION['error_msg'] = $error;
5353
unset($v_password);
5454
unset($output);
5555
} else {
56-
$_SESSION['ok_msg'] = _('CRON_CREATED_OK');
56+
$_SESSION['ok_msg'] = __('CRON_CREATED_OK');
5757
unset($v_min);
5858
unset($v_hour);
5959
unset($v_day);

web/add/db/index.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616

1717
if (!empty($_POST['ok'])) {
1818
// Check input
19-
if (empty($_POST['v_database'])) $errors[] = _('database');
20-
if (empty($_POST['v_dbuser'])) $errors[] = _('username');
21-
if (empty($_POST['v_password'])) $errors[] = _('password');
22-
if (empty($_POST['v_type'])) $errors[] = _('type');
23-
if (empty($_POST['v_charset'])) $errors[] = _('charset');
19+
if (empty($_POST['v_database'])) $errors[] = __('database');
20+
if (empty($_POST['v_dbuser'])) $errors[] = __('username');
21+
if (empty($_POST['v_password'])) $errors[] = __('password');
22+
if (empty($_POST['v_type'])) $errors[] = __('type');
23+
if (empty($_POST['v_charset'])) $errors[] = __('charset');
2424

2525
// Check for errors
2626
if (!empty($errors[0])) {
@@ -31,13 +31,13 @@
3131
$error_msg = $error_msg.", ".$error;
3232
}
3333
}
34-
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
34+
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
3535
}
3636

3737
// Validate email
3838
if (!empty($_POST['v_db_email'])) {
3939
if (!filter_var($_POST['v_db_email'], FILTER_VALIDATE_EMAIL)) {
40-
$_SESSION['error_msg'] = _('Please enter valid email address.');
40+
$_SESSION['error_msg'] = __('Please enter valid email address.');
4141
}
4242
}
4343

@@ -52,7 +52,7 @@
5252
// Check password length
5353
if (empty($_SESSION['error_msg'])) {
5454
$pw_len = strlen($_POST['v_password']);
55-
if ($pw_len < 6 ) $_SESSION['error_msg'] = _('Password is too short.',$error_msg);
55+
if ($pw_len < 6 ) $_SESSION['error_msg'] = __('Password is too short.',$error_msg);
5656
}
5757

5858
if (empty($_SESSION['error_msg'])) {
@@ -64,7 +64,7 @@
6464
$v_charset = $_POST['v_charset'];
6565
if ($return_var != 0) {
6666
$error = implode('<br>', $output);
67-
if (empty($error)) $error = _('Error code:',$return_var);
67+
if (empty($error)) $error = __('Error code:',$return_var);
6868
$_SESSION['error_msg'] = $error;
6969
unset($v_password);
7070
unset($output);
@@ -74,13 +74,13 @@
7474
if ($_POST['v_type'] == 'mysql') $db_admin_link = "http://".$http_host."/phpMyAdmin/";
7575
if ($_POST['v_type'] == 'pgsql') $db_admin_link = "http://".$http_host."/phpPgAdmin/";
7676
$to = $v_db_email;
77-
$subject = _("Database Credentials");
77+
$subject = __("Database Credentials");
7878
$hostname = exec('hostname');
79-
$from = _('MAIL_FROM',$hostname);
80-
$mailtext = _('DATABASE_READY',$user."_".$_POST['v_database'],$user."_".$_POST['v_dbuser'],$_POST['v_password'],$db_admin_link);
79+
$from = __('MAIL_FROM',$hostname);
80+
$mailtext = __('DATABASE_READY',$user."_".$_POST['v_database'],$user."_".$_POST['v_dbuser'],$_POST['v_password'],$db_admin_link);
8181
send_email($to, $subject, $mailtext, $from);
8282
}
83-
$_SESSION['ok_msg'] = _('DATABASE_CREATED_OK',$user."_".$_POST['v_database'],$user."_".$_POST['v_database']);
83+
$_SESSION['ok_msg'] = __('DATABASE_CREATED_OK',$user."_".$_POST['v_database'],$user."_".$_POST['v_database']);
8484
unset($v_database);
8585
unset($v_dbuser);
8686
unset($v_password);

web/add/dns/index.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
if (!empty($_POST['ok'])) {
1616
// Check input
17-
if (empty($_POST['v_domain'])) $errors[] = _('domain');
18-
if (empty($_POST['v_ip'])) $errors[] = _('ip');
17+
if (empty($_POST['v_domain'])) $errors[] = __('domain');
18+
if (empty($_POST['v_ip'])) $errors[] = __('ip');
1919

2020
// Protect input
2121
$v_domain = preg_replace("/^www./i", "", $_POST['v_domain']);
@@ -41,13 +41,13 @@
4141
$error_msg = $error_msg.", ".$error;
4242
}
4343
}
44-
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
44+
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
4545
} else {
4646
// Add DNS
4747
exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$v_ip." ".$v_template." ".$v_ns1." ".$v_ns2." ".$v_ns3." ".$ns4, $output, $return_var);
4848
if ($return_var != 0) {
4949
$error = implode('<br>', $output);
50-
if (empty($error)) $error = _('Error code:',$return_var);
50+
if (empty($error)) $error = __('Error code:',$return_var);
5151
$_SESSION['error_msg'] = $error;
5252
}
5353
unset($output);
@@ -58,7 +58,7 @@
5858
exec (VESTA_CMD."v-change-dns-domain-exp ".$user." ".$v_domain." ".$v_exp, $output, $return_var);
5959
if ($return_var != 0) {
6060
$error = implode('<br>', $output);
61-
if (empty($error)) $error = _('Error code:',$return_var);
61+
if (empty($error)) $error = __('Error code:',$return_var);
6262
$_SESSION['error_msg'] = $error;
6363
}
6464
unset($output);
@@ -70,14 +70,14 @@
7070
exec (VESTA_CMD."v-change-dns-domain-ttl ".$user." ".$v_domain." ".$v_ttl, $output, $return_var);
7171
if ($return_var != 0) {
7272
$error = implode('<br>', $output);
73-
if (empty($error)) $error = _('Error code:',$return_var);
73+
if (empty($error)) $error = __('Error code:',$return_var);
7474
$_SESSION['error_msg'] = $error;
7575
}
7676
unset($output);
7777
}
7878

7979
if (empty($_SESSION['error_msg'])) {
80-
$_SESSION['ok_msg'] = _('DNS_DOMAIN_CREATED_OK',$_POST[v_domain],$_POST[v_domain]);
80+
$_SESSION['ok_msg'] = __('DNS_DOMAIN_CREATED_OK',$_POST[v_domain],$_POST[v_domain]);
8181
unset($v_domain);
8282
}
8383
}
@@ -107,19 +107,19 @@
107107
$error_msg = $error_msg.", ".$error;
108108
}
109109
}
110-
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
110+
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
111111
} else {
112112
// Add DNS Record
113113
exec (VESTA_CMD."v-add-dns-domain-record ".$user." ".$v_domain." ".$v_rec." ".$v_type." ".$v_val." ".$v_priority, $output, $return_var);
114114
$v_type = $_POST['v_type'];
115115
if ($return_var != 0) {
116116
$error = implode('<br>', $output);
117-
if (empty($error)) $error = _('Error code:',$return_var);
117+
if (empty($error)) $error = __('Error code:',$return_var);
118118
$_SESSION['error_msg'] = $error;
119119
}
120120
unset($output);
121121
if (empty($_SESSION['error_msg'])) {
122-
$_SESSION['ok_msg'] = _('DNS_RECORD_CREATED_OK',$_POST[v_rec],$_POST[v_domain]);
122+
$_SESSION['ok_msg'] = __('DNS_RECORD_CREATED_OK',$_POST[v_rec],$_POST[v_domain]);
123123
unset($v_domain);
124124
unset($v_rec);
125125
unset($v_val);

web/add/ip/index.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
if ($_SESSION['user'] == 'admin') {
1717
if (!empty($_POST['ok'])) {
1818
// Check input
19-
if (empty($_POST['v_ip'])) $errors[] = _('ip address');
20-
if (empty($_POST['v_netmask'])) $errors[] = _('netmask');
21-
if (empty($_POST['v_interface'])) $errors[] = _('interface');
22-
if (empty($_POST['v_owner'])) $errors[] = _('assigned user');
19+
if (empty($_POST['v_ip'])) $errors[] = __('ip address');
20+
if (empty($_POST['v_netmask'])) $errors[] = __('netmask');
21+
if (empty($_POST['v_interface'])) $errors[] = __('interface');
22+
if (empty($_POST['v_owner'])) $errors[] = __('assigned user');
2323

2424
// Protect input
2525
$v_ip = escapeshellarg($_POST['v_ip']);
@@ -47,7 +47,7 @@
4747
$error_msg = $error_msg.", ".$error;
4848
}
4949
}
50-
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
50+
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
5151
} else {
5252
// Add IP
5353
$v_interface = escapeshellarg($_POST['v_interface']);
@@ -57,12 +57,12 @@
5757
$v_interface = $_POST['v_interface'];
5858
if ($return_var != 0) {
5959
$error = implode('<br>', $output);
60-
if (empty($error)) $error = _('Error code:',$return_var);
60+
if (empty($error)) $error = __('Error code:',$return_var);
6161
$_SESSION['error_msg'] = $error;
6262
unset($v_password);
6363
unset($output);
6464
} else {
65-
$_SESSION['ok_msg'] = _('IP_CREATED_OK',$_POST['v_ip'],$_POST['v_ip']);
65+
$_SESSION['ok_msg'] = __('IP_CREATED_OK',$_POST['v_ip'],$_POST['v_ip']);
6666
unset($v_ip);
6767
unset($v_netmask);
6868
unset($v_name);

web/add/mail/index.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//if ($_SESSION['user'] == 'admin') {
1717
// Mail Domain
1818
if (!empty($_POST['ok'])) {
19-
if (empty($_POST['v_domain'])) $errors[] = _('domain');
19+
if (empty($_POST['v_domain'])) $errors[] = __('domain');
2020
if (!empty($_POST['v_antispam'])) {
2121
$v_antispam = 'yes';
2222
} else {
@@ -48,20 +48,20 @@
4848
$error_msg = $error_msg.", ".$error;
4949
}
5050
}
51-
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
51+
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
5252
} else {
5353

5454
// Add mail domain
5555
exec (VESTA_CMD."v-add-mail-domain ".$user." ".$v_domain." ".$v_antispam." ".$v_antivirus." ".$v_dkim, $output, $return_var);
5656
if ($return_var != 0) {
5757
$error = implode('<br>', $output);
58-
if (empty($error)) $error = _('Error code:',$return_var);
58+
if (empty($error)) $error = __('Error code:',$return_var);
5959
$_SESSION['error_msg'] = $error;
6060
}
6161
unset($output);
6262

6363
if (empty($_SESSION['error_msg'])) {
64-
$_SESSION['ok_msg'] = _('MAIL_DOMAIN_CREATED_OK',$_POST['v_domain'],$_POST['v_domain']);
64+
$_SESSION['ok_msg'] = __('MAIL_DOMAIN_CREATED_OK',$_POST['v_domain'],$_POST['v_domain']);
6565
unset($v_domain);
6666
}
6767
}
@@ -71,9 +71,9 @@
7171
// Mail Account
7272
if (!empty($_POST['ok_acc'])) {
7373
// Check input
74-
if (empty($_POST['v_domain'])) $errors[] = _('domain');
75-
if (empty($_POST['v_account'])) $errors[] = _('account');
76-
if (empty($_POST['v_password'])) $errors[] = _('password');
74+
if (empty($_POST['v_domain'])) $errors[] = __('domain');
75+
if (empty($_POST['v_account'])) $errors[] = __('account');
76+
if (empty($_POST['v_password'])) $errors[] = __('password');
7777

7878
// Protect input
7979
$v_domain = escapeshellarg($_POST['v_domain']);
@@ -95,13 +95,13 @@
9595
$error_msg = $error_msg.", ".$error;
9696
}
9797
}
98-
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
98+
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
9999
} else {
100100
// Add Mail Account
101101
exec (VESTA_CMD."v-add-mail-account ".$user." ".$v_domain." ".$v_account." ".$v_password." ".$v_quota, $output, $return_var);
102102
if ($return_var != 0) {
103103
$error = implode('<br>', $output);
104-
if (empty($error)) $error = _('Error code:',$return_var);
104+
if (empty($error)) $error = __('Error code:',$return_var);
105105
$_SESSION['error_msg'] = $error;
106106
}
107107

@@ -118,7 +118,7 @@
118118
exec (VESTA_CMD."v-add-mail-account-alias ".$user." ".$v_domain." ".$v_account." ".$alias, $output, $return_var);
119119
if ($return_var != 0) {
120120
$error = implode('<br>', $output);
121-
if (empty($error)) $error = _('Error: vesta did not return any output.');
121+
if (empty($error)) $error = __('Error: vesta did not return any output.');
122122
$_SESSION['error_msg'] = $error;
123123
}
124124
}
@@ -139,7 +139,7 @@
139139
exec (VESTA_CMD."v-add-mail-account-forward ".$user." ".$v_domain." ".$v_account." ".$forward, $output, $return_var);
140140
if ($return_var != 0) {
141141
$error = implode('<br>', $output);
142-
if (empty($error)) $error = _('Error: vesta did not return any output.');
142+
if (empty($error)) $error = __('Error: vesta did not return any output.');
143143
$_SESSION['error_msg'] = $error;
144144
}
145145
}
@@ -149,7 +149,7 @@
149149

150150
unset($output);
151151
if (empty($_SESSION['error_msg'])) {
152-
$_SESSION['ok_msg'] = _('MAIL_ACCOUNT_CREATED_OK',$_POST['v_account'],$_POST[v_domain],$_POST['v_account'],$_POST[v_domain]);
152+
$_SESSION['ok_msg'] = __('MAIL_ACCOUNT_CREATED_OK',$_POST['v_account'],$_POST[v_domain],$_POST['v_account'],$_POST[v_domain]);
153153
unset($v_account);
154154
unset($v_password);
155155
unset($v_password);

web/add/package/index.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@
2020
if ($_SESSION['user'] == 'admin') {
2121
if (!empty($_POST['ok'])) {
2222
// Check input
23-
if (empty($_POST['v_package'])) $errors[] = _('package');
24-
if (empty($_POST['v_template'])) $errors[] = _('template');
25-
if (empty($_POST['v_shell'])) $errrors[] = _('shell');
26-
if (!isset($_POST['v_web_domains'])) $errors[] = _('web domains');
27-
if (!isset($_POST['v_web_aliases'])) $errors[] = _('web aliases');
28-
if (!isset($_POST['v_dns_domains'])) $errors[] = _('dns domains');
29-
if (!isset($_POST['v_dns_records'])) $errors[] = _('dns records');
30-
if (!isset($_POST['v_mail_domains'])) $errors[] = _('mail domains');
31-
if (!isset($_POST['v_mail_accounts'])) $errors[] = _('mail accounts');
32-
if (!isset($_POST['v_databases'])) $errors[] = _('databases');
33-
if (!isset($_POST['v_cron_jobs'])) $errors[] = _('cron jobs');
34-
if (!isset($_POST['v_backups'])) $errors[] = _('backups');
35-
if (!isset($_POST['v_disk_quota'])) $errors[] = _('quota');
36-
if (!isset($_POST['v_bandwidth'])) $errors[] = _('bandwidth');
37-
if (empty($_POST['v_ns1'])) $errors[] = _('ns1');
38-
if (empty($_POST['v_ns2'])) $errors[] = _('ns2');
23+
if (empty($_POST['v_package'])) $errors[] = __('package');
24+
if (empty($_POST['v_template'])) $errors[] = __('template');
25+
if (empty($_POST['v_shell'])) $errrors[] = __('shell');
26+
if (!isset($_POST['v_web_domains'])) $errors[] = __('web domains');
27+
if (!isset($_POST['v_web_aliases'])) $errors[] = __('web aliases');
28+
if (!isset($_POST['v_dns_domains'])) $errors[] = __('dns domains');
29+
if (!isset($_POST['v_dns_records'])) $errors[] = __('dns records');
30+
if (!isset($_POST['v_mail_domains'])) $errors[] = __('mail domains');
31+
if (!isset($_POST['v_mail_accounts'])) $errors[] = __('mail accounts');
32+
if (!isset($_POST['v_databases'])) $errors[] = __('databases');
33+
if (!isset($_POST['v_cron_jobs'])) $errors[] = __('cron jobs');
34+
if (!isset($_POST['v_backups'])) $errors[] = __('backups');
35+
if (!isset($_POST['v_disk_quota'])) $errors[] = __('quota');
36+
if (!isset($_POST['v_bandwidth'])) $errors[] = __('bandwidth');
37+
if (empty($_POST['v_ns1'])) $errors[] = __('ns1');
38+
if (empty($_POST['v_ns2'])) $errors[] = __('ns2');
3939

4040

4141
// Protect input
@@ -73,7 +73,7 @@
7373
$error_msg = $error_msg.", ".$error;
7474
}
7575
}
76-
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
76+
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
7777
} else {
7878
exec ('mktemp -d', $output, $return_var);
7979
$tmpdir = $output[0];
@@ -107,7 +107,7 @@
107107
exec (VESTA_CMD."v-add-user-package ".$tmpdir." ".$v_package, $output, $return_var);
108108
if ($return_var != 0) {
109109
$error = implode('<br>', $output);
110-
if (empty($error)) $error = _('Error code:',$return_var);
110+
if (empty($error)) $error = __('Error code:',$return_var);
111111
$_SESSION['error_msg'] = $error;
112112
}
113113
unset($output);
@@ -119,7 +119,7 @@
119119

120120
// Check output
121121
if (empty($_SESSION['error_msg'])) {
122-
$_SESSION['ok_msg'] = _('PACKAGE_CREATED_OK',$_POST['v_package'],$_POST['v_package']);
122+
$_SESSION['ok_msg'] = __('PACKAGE_CREATED_OK',$_POST['v_package'],$_POST['v_package']);
123123
unset($v_package);
124124
}
125125

0 commit comments

Comments
 (0)