Skip to content

Commit bb34770

Browse files
InfiniteezZoey2936
authored andcommitted
add it-lang/add missing translation fields
Signed-off-by: Andrea Macaro <[email protected]> Signed-off-by: Zoey <[email protected]>
1 parent 7f54701 commit bb34770

File tree

10 files changed

+315
-23
lines changed

10 files changed

+315
-23
lines changed

.github/workflows/docker.yml

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
version="$(cat .version)+$(git rev-parse --short HEAD)"
6565
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/js/i18n/en-lang.json
6666
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/js/i18n/de-lang.json
67+
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/js/i18n/it-lang.json
6768
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/package.json
6869
sed -i "s|\"0.0.0\"|\"$version\"|g" backend/package.json
6970
- name: Build

.github/workflows/spellcheck.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
with:
1616
check_filenames: true
1717
check_hidden: true
18-
skip: .git,.gitignore,de-lang.json,showdown.min.js,jquery.min.js,xregexp-all.js
18+
skip: .git,.gitignore,de-lang.json,it-lang.json,showdown.min.js,jquery.min.js,xregexp-all.js

backend/internal/certificate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ const internalCertificate = {
897897
logger.info('Revoking Certbot certificates for Cert #' + certificate.id + ': ' + certificate.domain_names.join(', '));
898898

899899
return utils
900-
.execFile(certbotCommand, [...certbotArgs, 'revoke', '--cert-name', `npm-${certificate.id}`, '--no-delete-after-revoke'])
900+
.execFile(certbotCommand, [...certbotArgs, 'revoke', '--cert-name', `npm-${certificate.id}`, '--delete-after-revoke'])
901901
.then(async (result) => {
902902
logger.info(result);
903903
return result;

frontend/js/app/i18n.js

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ module.exports = function (namespace, key, data) {
1313
messages = { ...messages, ...require('../i18n/de-lang.json') };
1414
}
1515

16+
if (locale.includes('it')) {
17+
messages = { ...messages, ...require('../i18n/it-lang.json') };
18+
}
19+
1620
if (typeof messages[namespace] !== 'undefined' && typeof messages[namespace][key] !== 'undefined') {
1721
return messages[namespace][key](data);
1822
} else {

frontend/js/app/nginx/access/form.ejs

+2-12
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,7 @@
4646

4747
<!-- Authorization -->
4848
<div class="tab-pane" id="auth">
49-
<p>
50-
Basic Authorization via
51-
<a target="_blank" href="https://nginx.org/en/docs/http/ngx_http_auth_basic_module.html">
52-
Nginx HTTP Basic Authentication
53-
</a>
54-
</p>
49+
<p><%= i18n('access-lists', 'access-basic', {url: 'https://nginx.org/en/docs/http/ngx_http_auth_basic_module.html'}) %></p>
5550
<div class="row">
5651
<div class="col-sm-6 col-md-6">
5752
<div class="form-group">
@@ -73,12 +68,7 @@
7368

7469
<!-- Access -->
7570
<div class="tab-pane" id="access">
76-
<p>
77-
IP Address Whitelist/Blacklist via
78-
<a target="_blank" href="https://nginx.org/en/docs/http/ngx_http_access_module.html">
79-
Nginx HTTP Access
80-
</a>
81-
</p>
71+
<p><%= i18n('access-lists', 'access-ip', {url: 'https://nginx.org/en/docs/http/ngx_http_access_module.html'}) %></p>
8272
<div class="clients"><!-- clients --></div>
8373
<div class="row">
8474
<div class="col-sm-3 col-md-3">

frontend/js/app/nginx/proxy/form.ejs

-6
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,6 @@
259259
<div role="tabpanel" class="tab-pane" id="advanced">
260260
<div class="row">
261261
<div class="col-md-12">
262-
<p><%- i18n('all-hosts', 'advanced-config-var-headline') %></p>
263-
<ul class="text-monospace">
264-
<li><code>$server</code> <%- i18n('proxy-hosts', 'forward-host') %></li>
265-
<li><code>$port</code> <%- i18n('proxy-hosts', 'forward-port') %></li>
266-
<li><code>$forward_scheme</code> <%- i18n('proxy-hosts', 'forward-scheme') %></li>
267-
</ul>
268262
<div class="form-group mb-0">
269263
<label class="form-label"><%- i18n('all-hosts', 'advanced-config') %></label>
270264
<textarea name="advanced_config" rows="8" class="form-control text-monospace" placeholder="# <%- i18n('all-hosts', 'advanced-warning') %>"><%- advanced_config %></textarea>

frontend/js/app/ui/footer/main.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="row align-items-center">
44
<div class="col-auto">
55
<ul class="list-inline list-inline-dots mb-0">
6-
<li class="list-inline-item"><a href="#" onclick="toggleDarkMode()">Toggle Dark Mode</a></li>
6+
<li class="list-inline-item"><a href="#" onclick="toggleDarkMode()"><%- i18n('footer', 'toggle-dark') %></a></li>
77
<li class="list-inline-item"><a href="https://github.com/ZoeyVid/NPMplus" target="_blank"><%- i18n('footer', 'repo') %></a></li>
88
</ul>
99
</div>

frontend/js/i18n/de-lang.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"access-lists": {
33
"access": "Zugang",
44
"access-add": "Hinzufügen",
5+
"access-basic": "Basic Authorization via <a href=\"{url}\" target=\"_blank\">Nginx HTTP Basic Authentication</a>",
6+
"access-ip": "IP Adressen Whitelist/Blacklist via <a href=\"{url}\" target=\"_blank\">Nginx HTTP Access</a>",
57
"add": "Zugangsliste hinzufügen",
68
"auth-add": "Hinzufügen",
79
"authorization": "Autorisierung",
@@ -115,7 +117,8 @@
115117
"copy-npmplus": " - und &copy; 2024 <a href=\"{url}\" target=\"_blank\">ZoeyVid</a> NPMplus",
116118
"license": " - MIT-Lizenz",
117119
"repo": "Repository auf GitHub",
118-
"theme": " - Thema von <a href=\"{url}\" target=\"_blank\">Tabler v0.0.31</a>"
120+
"theme": " - Thema von <a href=\"{url}\" target=\"_blank\">Tabler v0.0.31</a>",
121+
"toggle-dark": "Dark Modus ein-/ausschalten"
119122
},
120123
"locations": {
121124
"delete": "Löschen",

frontend/js/i18n/en-lang.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"access-lists": {
33
"access": "Access",
44
"access-add": "Add",
5+
"access-basic": "Basic Authorization via <a href=\"{url}\" target=\"_blank\">Nginx HTTP Basic Authentication</a>",
6+
"access-ip": "IP Address Whitelist/Blacklist via <a href=\"{url}\" target=\"_blank\">Nginx HTTP Access</a>",
57
"add": "Add Access List",
68
"auth-add": "Add",
79
"authorization": "Authorization",
@@ -115,7 +117,8 @@
115117
"copy-npmplus": " - and &copy; 2024 <a href=\"{url}\" target=\"_blank\">ZoeyVid</a> NPMplus",
116118
"license": " - MIT-License",
117119
"repo": "Repository on GitHub",
118-
"theme": " - Theme by <a href=\"{url}\" target=\"_blank\">Tabler v0.0.31</a>"
120+
"theme": " - Theme by <a href=\"{url}\" target=\"_blank\">Tabler v0.0.31</a>",
121+
"toggle-dark": "Toggle Dark Mode"
119122
},
120123
"locations": {
121124
"delete": "Delete",

0 commit comments

Comments
 (0)