Skip to content

Commit 81f2503

Browse files
committed
Remove internationalization support for consistency
Because Gettext requires you to use generic text as the key of the translations, and the majority of text in this project contains long lines, specially in the templates, I designed a mechanism to allow for the translation of the entire project into different languages using unique identifiers as the key for the POT files. However, after some reports from users in the WordPress forums I found that this approach was conflicting with some popular plugins which were using the unique IDs to generate a new POT file into a different folder in the installation to create new a new translation file. This new file contains the same value as the key, so the interface was impossible to use without the real text for the descriptions and buttons. Also, because the community didn't really contribute to the translation of the plugin during the time the POT files were available, I decided to revert the internationalization support and leave the plugin in English as it was before. This helps us to maintain consistency and reduces the amount of work required to keep the language files updated.
1 parent f52e0c5 commit 81f2503

File tree

74 files changed

+381
-3436
lines changed

Some content is hidden

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

74 files changed

+381
-3436
lines changed

inc/tpl/auditlogs.html.tpl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jQuery(document).ready(function ($) {
88
$('.sucuriscan-auditlogs-sendlogs-response').html('');
99
$('.sucuriscan-sendlogs-panel').addClass('sucuriscan-hidden');
1010
} else {
11-
var msg = '\x20@@SUCURI.AuditLogsQueue@@\x20—\x20';
11+
var msg = '\x20logs in the queue\x20—\x20';
1212
$('.sucuriscan-auditlogs-sendlogs-response').html((queueSize).toString() + msg);
1313
$('.sucuriscan-sendlogs-panel').removeClass('sucuriscan-hidden');
1414
}
@@ -21,9 +21,9 @@ jQuery(document).ready(function ($) {
2121
url += '&paged=' + page;
2222
}
2323
24-
$('.sucuriscan-auditlog-response').html('<em>@@SUCURI.Loading@@</em>');
25-
$('.sucuriscan-auditlog-status').html('@@SUCURI.Loading@@');
26-
$('.sucuriscan-pagination-loading').html('@@SUCURI.Loading@@');
24+
$('.sucuriscan-auditlog-response').html('<em>Loading...</em>');
25+
$('.sucuriscan-auditlog-status').html('Loading...');
26+
$('.sucuriscan-pagination-loading').html('Loading...');
2727
$('.sucuriscan-pagination-panel').addClass('sucuriscan-hidden');
2828
$('.sucuriscan-auditlog-footer').addClass('sucuriscan-hidden');
2929
@@ -72,7 +72,7 @@ jQuery(document).ready(function ($) {
7272
event.preventDefault();
7373
7474
$('.sucuriscan-sendlogs-panel').attr('content', '');
75-
$('.sucuriscan-auditlogs-sendlogs-response').html('@@SUCURI.Loading@@');
75+
$('.sucuriscan-auditlogs-sendlogs-response').html('Loading...');
7676
7777
$.post('%%SUCURI.AjaxURL.Dashboard%%', {
7878
action: 'sucuriscan_ajax',
@@ -104,7 +104,7 @@ jQuery(document).ready(function ($) {
104104

105105
<div class="sucuriscan-auditlog-table">
106106
<div class="sucuriscan-auditlog-response">
107-
<em>@@SUCURI.Loading@@</em>
107+
<em>Loading...</em>
108108
</div>
109109

110110
<div class="sucuriscan-clearfix sucuriscan-pagination-panel">
@@ -121,7 +121,7 @@ jQuery(document).ready(function ($) {
121121
<div class="sucuriscan-pull-left sucuriscan-hidden sucuriscan-tooltip
122122
sucuriscan-sendlogs-panel" tooltip-width="250" tooltip-html="true">
123123
<small class="sucuriscan-auditlogs-sendlogs-response"></small>
124-
<small><a href="#" class="sucuriscan-auditlogs-sendlogs">@@SUCURI.SendLogs@@</a></small>
124+
<small><a href="#" class="sucuriscan-auditlogs-sendlogs">Send Logs</a></small>
125125
</div>
126126

127127
<div class="sucuriscan-pull-right">

inc/tpl/base.html.tpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@
1717

1818
<div class="sucuriscan-pull-right sucuriscan-navbar">
1919
<ul>
20-
<li><a href="https://goo.gl/aByqP5" target="_blank" rel="noopener" class="button button-secondary">@@SUCURI.Review@@</a></li>
20+
<li><a href="https://goo.gl/aByqP5" target="_blank" rel="noopener" class="button button-secondary">Review</a></li>
2121

2222
<li class="sucuriscan-%%SUCURI.GenerateAPIKey.Visibility%%">
2323
<a href="#" class="button button-primary sucuriscan-modal-button sucuriscan-register-site-button"
24-
data-modalid="sucuriscan-register-site">@@SUCURI.GenerateAPIKey@@</a>
24+
data-modalid="sucuriscan-register-site">Generate API Key</a>
2525
</li>
2626

27-
<li><a href="%%SUCURI.URL.Dashboard%%" class="button button-primary">@@SUCURI.Dashboard@@</a></li>
27+
<li><a href="%%SUCURI.URL.Dashboard%%" class="button button-primary">Dashboard</a></li>
2828

29-
<li><a href="%%SUCURI.URL.Firewall%%" class="button button-primary">@@SUCURI.Firewall@@</a></li>
29+
<li><a href="%%SUCURI.URL.Firewall%%" class="button button-primary">Firewall (WAF)</a></li>
3030

31-
<li><a href="%%SUCURI.URL.Settings%%" class="button button-primary">@@SUCURI.Settings@@</a></li>
31+
<li><a href="%%SUCURI.URL.Settings%%" class="button button-primary">Settings</a></li>
3232
</ul>
3333
</div>
3434
</div>
@@ -38,6 +38,6 @@
3838
</div>
3939

4040
<div class="sucuriscan-clearfix sucuriscan-footer">
41-
<div>@@SUCURI.Copyright@@</div>
41+
<div>Copyright &copy; %%SUCURI.Year%% Sucuri Inc. All Rights Reserved.</div>
4242
</div>
4343
</div>

inc/tpl/dashboard.html.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
jQuery(document).ready(function ($) {
88
var sucuriscanSiteCheckLinks = function (target, links) {
99
if (links.length === 0) {
10-
$(target).html('<div><em>@@SUCURI.NoData@@</em></div>');
10+
$(target).html('<div><em>no data available</em></div>');
1111
return;
1212
}
1313
@@ -50,7 +50,7 @@ jQuery(document).ready(function ($) {
5050
<div class="sucuriscan-panel">
5151
<div class="sucuriscan-tabs">
5252
<ul class="sucuriscan-clearfix sucuriscan-tabs-buttons">
53-
<li><a href="%%SUCURI.URL.Dashboard%%#auditlogs">@@SUCURI.AuditLogs@@</a></li>
53+
<li><a href="%%SUCURI.URL.Dashboard%%#auditlogs">Audit Logs</a></li>
5454
<li><a href="%%SUCURI.URL.Dashboard%%#iframes" id="sucuriscan-title-iframes">%%SUCURI.SiteCheck.iFramesTitle%%</a></li>
5555
<li><a href="%%SUCURI.URL.Dashboard%%#links" id="sucuriscan-title-links">%%SUCURI.SiteCheck.LinksTitle%%</a></li>
5656
<li><a href="%%SUCURI.URL.Dashboard%%#scripts" id="sucuriscan-title-scripts">%%SUCURI.SiteCheck.ScriptsTitle%%</a></li>

inc/tpl/firewall-auditlogs.html.tpl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
<div class="sucuriscan-panel">
3-
<h3 class="sucuriscan-title">@@SUCURI.FirewallLogsTitle@@</h3>
3+
<h3 class="sucuriscan-title">Firewall Audit Logs</h3>
44

55
<div class="inside">
6-
<p>@@SUCURI.FirewallLogsInfo@@</p>
6+
<p>The firewall logs every request involved in an attack and separates them from the legitimate requests. You can analyze the data from the latest entries in the logs using this tool and take action either enabling the advanced features of the IDS <em>(Intrusion Detection System)</em> from the <a href="https://waf.sucuri.net/?settings" target="_blank" rel="noopener">Firewall Dashboard</a> and/or blocking IP addresses and URL paths directly from the <a href="https://waf.sucuri.net/?audit" target="_blank" rel="noopener">Firewall Audit Trails</a> page.</p>
77

88
<div class="sucuriscan-inline-alert-info">
9-
<p>@@SUCURI.FirewallLogsNote@@</p>
9+
<p>Non-blocked requests are hidden from the logs, this is intentional.</p>
1010
</div>
1111

1212
<script type="text/javascript">
@@ -19,7 +19,7 @@
1919
var params = {};
2020

2121
$('.sucuriscan-firewall-auditlogs tbody')
22-
.html('<tr><td><em>@@SUCURI.Loading@@</em></td></tr>');
22+
.html('<tr><td><em>Loading...</em></td></tr>');
2323

2424
params.action = 'sucuriscan_ajax';
2525
params.form_action = 'get_firewall_logs';
@@ -44,24 +44,24 @@
4444

4545
<form action="%%SUCURI.URL.Firewall%%#auditlogs" method="post">
4646
<fieldset class="sucuriscan-clearfix">
47-
<label>@@SUCURI.Search@@:</label>
47+
<label>Search:</label>
4848
<input type="text" id="sucuriscan_firewall_query" />
4949
<select id="sucuriscan_firewall_day">%%%SUCURI.AuditLogs.DateDays%%%</select>
5050
<select id="sucuriscan_firewall_month">%%%SUCURI.AuditLogs.DateMonths%%%</select>
5151
<select id="sucuriscan_firewall_year">%%%SUCURI.AuditLogs.DateYears%%%</select>
52-
<button id="sucuriscan-firewall-auditlogs-button" class="button button-primary">@@SUCURI.Submit@@</button>
52+
<button id="sucuriscan-firewall-auditlogs-button" class="button button-primary">Submit</button>
5353
</fieldset>
5454

5555
<table class="wp-list-table widefat sucuriscan-table sucuriscan-firewall-auditlogs">
5656
<thead>
5757
<tr>
58-
<th>@@SUCURI.FirewallLogsTitle@@</th>
58+
<th>Firewall Audit Logs</th>
5959
</tr>
6060
</thead>
6161

6262
<tbody>
6363
<tr>
64-
<td><em>@@SUCURI.Loading@@</em></td>
64+
<td><em>Loading...</em></td>
6565
</tr>
6666
</tbody>
6767
</table>

inc/tpl/firewall-clearcache.html.tpl

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jQuery(document).ready(function ($) {
88

99
var button = $(this);
1010
button.attr('disabled', true);
11-
button.html('@@SUCURI.Loading@@');
11+
button.html('Loading...');
1212
$('#firewall-clear-cache-response').html('');
1313

1414
$.post('%%SUCURI.AjaxURL.Firewall%%', {
@@ -24,42 +24,40 @@ jQuery(document).ready(function ($) {
2424
$('#firewall-clear-cache-auto').on('change', 'input:checkbox', function () {
2525
var checked = $(this).is(':checked');
2626

27-
$('#firewall-clear-cache-auto span').html(
28-
'@@SUCURI.FirewallAutoClearCache@@ (@@SUCURI.Loading@@)');
27+
$('#firewall-clear-cache-auto span').html('Clear cache when a post or page is updated (Loading...)');
2928

3029
$.post('%%SUCURI.AjaxURL.Firewall%%', {
3130
action: 'sucuriscan_ajax',
3231
sucuriscan_page_nonce: '%%SUCURI.PageNonce%%',
3332
form_action: 'firewall_auto_clear_cache',
3433
auto_clear_cache: (checked?'enable':'disable'),
3534
}, function () {
36-
$('#firewall-clear-cache-auto span')
37-
.html('@@SUCURI.FirewallAutoClearCache@@');
35+
$('#firewall-clear-cache-auto span').html('Clear cache when a post or page is updated');
3836
});
3937
});
4038
});
4139
</script>
4240

4341
<div class="sucuriscan-panel">
44-
<h3 class="sucuriscan-title">@@SUCURI.FirewallCacheTitle@@</h3>
42+
<h3 class="sucuriscan-title">Clear Cache</h3>
4543

4644
<div class="inside">
47-
<p>@@SUCURI.FirewallCacheInfo@@</p>
45+
<p>The firewall offers multiple options to configure the cache level applied to your website. You can either enable the full cache which is the recommended setting, or you can set the cache level to minimal which will keep the pages static for a couple of minutes, or force the usage of the website headers <em>(only for advanced users)</em>, or in extreme cases where you do not need the cache you can simply disable it. Find more information about it in the <a href="https://kb.sucuri.net/firewall/Performance/caching-options" target="_blank" rel="noopener">Sucuri Knowledge Base</a> website.</p>
4846

4947
<div class="sucuriscan-inline-alert-info">
50-
<p>@@SUCURI.FirewallCacheNote@@</p>
48+
<p>Note that the firewall has <a href="https://kb.sucuri.net/firewall/Performance/cache-exceptions" target="_blank" rel="noopener">special caching rules</a> for Images, CSS, PDF, TXT, JavaScript, media files and a few more extensions that are stored on our <a href="https://en.wikipedia.org/wiki/Edge_device" target="_blank" rel="noopener">edge</a>. The only way to flush the cache for these files is by clearing the firewall's cache completely <em>(for the whole website)</em>. Due to our caching of JavaScript and CSS files, often, as is best practice, the use of versioning during development will ensure updates going live as expected. This is done by adding a query string such as <code>?ver=1.2.3</code> and incrementing on each update.</p>
5149
</div>
5250

53-
<p>@@SUCURI.FirewallCacheWiki@@</p>
51+
<p>A web cache (or HTTP cache) is an information technology for the temporary storage (caching) of web documents, such as HTML pages and images, to reduce bandwidth usage, server load, and perceived lag. A web cache system stores copies of documents passing through it; subsequent requests may be satisfied from the cache if certain conditions are met. A web cache system can refer either to an appliance, or to a computer program. &mdash; <a href="https://en.wikipedia.org/wiki/Web_cache" target="_blank" rel="noopener">WikiPedia - Web Cache</a></p>
5452

5553
<div id="firewall-clear-cache-auto">
5654
<label>
5755
<input type="checkbox" name="sucuriscan_auto_clear_cache" value="true" %%SUCURI.FirewallAutoClearCache%% />
58-
<span>@@SUCURI.FirewallAutoClearCache@@</span>
56+
<span>Clear cache when a post or page is updated</span>
5957
</label>
6058
</div>
6159

6260
<div id="firewall-clear-cache-response"></div>
63-
<button id="firewall-clear-cache-button" class="button button-primary">@@SUCURI.FirewallCacheButton@@</button>
61+
<button id="firewall-clear-cache-button" class="button button-primary">Clear Cache</button>
6462
</div>
6563
</div>

inc/tpl/firewall-ipaccess.html.tpl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
jQuery(document).ready(function ($) {
77
var sucuriscanLoadIPAccess = function () {
88
// $('.sucuriscan-ipaccess-table tbody').html('<tr>' +
9-
// '<td colspan="2">@@SUCURI.Loading@@</td></tr>');
9+
// '<td colspan="2">Loading...</td></tr>');
1010

1111
$.post('%%SUCURI.AjaxURL.Firewall%%', {
1212
action: 'sucuriscan_ajax',
@@ -19,15 +19,15 @@ jQuery(document).ready(function ($) {
1919
$('.sucuriscan-ipaccess-table tbody').append('<tr>' +
2020
'<td><span class="sucuriscan-monospace">' + data.blacklist[i] + '</span></td>' +
2121
'<td><button class="button button-primary sucuriscan-deblacklist" ' +
22-
'ip="' + data.blacklist[i] + '">@@SUCURI.Delete@@</button></td>' +
22+
'ip="' + data.blacklist[i] + '">Delete</button></td>' +
2323
'</tr>');
2424
}
2525
});
2626
};
2727

2828
var sucuriscanPrintStatus = function (button, data) {
2929
button.attr('disabled', false);
30-
button.html('@@SUCURI.Submit@@');
30+
button.html('Submit');
3131

3232
if (data.ok) {
3333
sucuriscanLoadIPAccess();
@@ -49,7 +49,7 @@ jQuery(document).ready(function ($) {
4949
var ip = $('.sucuriscan-ipaccess-form input[name=sucuriscan_ip]').val();
5050

5151
button.attr('disabled', true);
52-
button.html('@@SUCURI.Loading@@');
52+
button.html('Loading...');
5353
$('#sucuriscan-ipaccess-response').html('');
5454

5555
$.post('%%SUCURI.AjaxURL.Firewall%%', {
@@ -68,7 +68,7 @@ jQuery(document).ready(function ($) {
6868
var button = $(this);
6969

7070
button.attr('disabled', true);
71-
button.html('@@SUCURI.Loading@@');
71+
button.html('Loading...');
7272
$('#sucuriscan-ipaccess-response').html('');
7373

7474
$.post('%%SUCURI.AjaxURL.Firewall%%', {
@@ -86,32 +86,32 @@ jQuery(document).ready(function ($) {
8686
</script>
8787

8888
<div class="sucuriscan-panel">
89-
<h3 class="sucuriscan-title">@@SUCURI.FirewallIPAccessTitle@@</h3>
89+
<h3 class="sucuriscan-title">IP Address Access</h3>
9090

9191
<div class="inside">
92-
<p>@@SUCURI.FirewallIPAccessInfo@@</p>
92+
<p>This tool allows you to whitleist and blacklist one or more IP addresses from accessing your website. You can also configure the plugin to automatically blacklist any IP address involved in a password guessing brute-force attack. If a legitimate user fails to submit the correct credentials of their account they will have to log into the Firewall dashboard in order to delete their IP address from the blacklist, or try to login once again through a VPN.</p>
9393

9494
<div id="sucuriscan-ipaccess-response"></div>
9595

9696
<form action="%%SUCURI.URL.Firewall%%#ipaccess" method="post" class="sucuriscan-ipaccess-form">
9797
<input type="hidden" name="sucuriscan_blacklist_ip" value="true" />
9898
<fieldset class="sucuriscan-clearfix">
99-
<label>@@SUCURI.BlacklistIP@@:</label>
99+
<label>Blacklist IP:</label>
100100
<input type="text" name="sucuriscan_ip" placeholder="e.g. 192.168.1.54" />
101-
<button class="button button-primary sucuriscan-ipaccess-button">@@SUCURI.Submit@@</button>
101+
<button class="button button-primary sucuriscan-ipaccess-button">Submit</button>
102102
</fieldset>
103103
</form>
104104

105105
<table class="wp-list-table widefat sucuriscan-table sucuriscan-ipaccess-table">
106106
<thead>
107107
<tr>
108-
<th>@@SUCURI.RemoteAddr@@</th>
108+
<th>IP Address</th>
109109
<th>&nbsp;</th>
110110
</tr>
111111
</thead>
112112

113113
<tbody>
114-
<tr><td colspan="2">@@SUCURI.Loading@@</td></tr>
114+
<tr><td colspan="2">Loading...</td></tr>
115115
</tbody>
116116
</table>
117117
</div>

inc/tpl/firewall-settings.html.tpl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,47 +31,47 @@ jQuery(document).ready(function ($) {
3131
</script>
3232

3333
<div class="sucuriscan-panel">
34-
<h3 class="sucuriscan-title">@@SUCURI.FirewallSettingsTitle@@</h3>
34+
<h3 class="sucuriscan-title">Firewall Settings</h3>
3535

3636
<div class="inside">
37-
<p>@@SUCURI.FirewallSettingsInfo@@</p>
37+
<p>A powerful Web Application Firewall and <b>Intrusion Detection System</b> for any WordPress user and many other platforms. This page will help you to configure and monitor your site through the <b>Sucuri Firewall</b>. Once enabled, our firewall will act as a shield, protecting your site from attacks and preventing malware infections and reinfections. It will block SQL injection attempts, brute force attacks, XSS, RFI, backdoors and many other threats against your site.</p>
3838

3939
<div class="sucuriscan-inline-alert-info sucuriscan-%%SUCURI.Firewall.APIKeyFormVisibility%%">
40-
<p>@@SUCURI.FirewallAddKey@@</p>
40+
<p>Add your <a href="https://waf.sucuri.net/?settings&panel=api" target="_blank" rel="noopener">Firewall API key</a> in the form below to start communicating with the firewall API service.</p>
4141
</div>
4242

4343
<div class="sucuriscan-hstatus sucuriscan-hstatus-2 sucuriscan-firewall-apikey sucuriscan-%%SUCURI.Firewall.APIKeyVisibility%%">
44-
<strong>@@SUCURI.FirewallKey@@:</strong>
44+
<strong>Firewall API Key:</strong>
4545
<span class="sucuriscan-monospace">%%SUCURI.Firewall.APIKey%%</span>
4646
<form action="%%SUCURI.URL.Firewall%%" method="post">
4747
<input type="hidden" name="sucuriscan_page_nonce" value="%%SUCURI.PageNonce%%" />
48-
<button type="submit" name="sucuriscan_delete_wafkey" class="button button-primary">@@SUCURI.Delete@@</button>
48+
<button type="submit" name="sucuriscan_delete_wafkey" class="button button-primary">Delete</button>
4949
</form>
5050
</div>
5151

5252
<form action="%%SUCURI.URL.Firewall%%" method="post" class="sucuriscan-%%SUCURI.Firewall.APIKeyFormVisibility%%">
5353
<input type="hidden" name="sucuriscan_page_nonce" value="%%SUCURI.PageNonce%%" />
5454
<fieldset class="sucuriscan-clearfix">
55-
<label>@@SUCURI.FirewallKey@@:</label>
55+
<label>Firewall API Key:</label>
5656
<input type="text" name="sucuriscan_cloudproxy_apikey" />
57-
<button type="submit" class="button button-primary">@@SUCURI.Save@@</button>
57+
<button type="submit" class="button button-primary">Save</button>
5858
</fieldset>
5959
<br>
6060
</form>
6161

6262
<table class="wp-list-table widefat sucuriscan-table" id="firewall-settings-table">
6363
<thead>
6464
<tr>
65-
<th>@@SUCURI.Name@@</th>
66-
<th>@@SUCURI.Value@@</th>
65+
<th>Name</th>
66+
<th>Value</th>
6767
</tr>
6868
</thead>
6969

7070
<tbody>
71-
<tr><td colspan="2">@@SUCURI.Loading@@</td></tr>
71+
<tr><td colspan="2">Loading...</td></tr>
7272
</tbody>
7373
</table>
7474

75-
<p>@@SUCURI.FirewallFootNote@@</p>
75+
<p><em>[1]</em> More information about the <a href="https://sucuri.net/website-firewall/" target="_blank" rel="noopener">Sucuri Firewall</a>, features and pricing.<br><em>[2]</em> Instructions and videos in the official <a href="https://kb.sucuri.net/firewall" target="_blank" rel="noopener">Knowledge Base</a> site.<br><em>[3]</em> <a href="https://login.sucuri.net/signup2/create?CloudProxy" target="_blank" rel="noopener">Sign up</a> for a new account and start protecting your site.</p>
7676
</div>
7777
</div>

0 commit comments

Comments
 (0)