Skip to content

Commit

Permalink
add it-lang/add missing translation fields
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Macaro <[email protected]>
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Infiniteez authored and Zoey2936 committed Jan 23, 2025
1 parent 17916f2 commit 6348cc7
Show file tree
Hide file tree
Showing 10 changed files with 315 additions and 23 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
version="$(cat .version)+$(git rev-parse --short HEAD)"
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/js/i18n/en-lang.json
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/js/i18n/de-lang.json
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/js/i18n/it-lang.json
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/package.json
sed -i "s|\"0.0.0\"|\"$version\"|g" backend/package.json
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
with:
check_filenames: true
check_hidden: true
skip: .git,.gitignore,de-lang.json,showdown.min.js,jquery.min.js,xregexp-all.js
skip: .git,.gitignore,de-lang.json,it-lang.json,showdown.min.js,jquery.min.js,xregexp-all.js
2 changes: 1 addition & 1 deletion backend/internal/certificate.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ const internalCertificate = {
logger.info('Revoking Certbot certificates for Cert #' + certificate.id + ': ' + certificate.domain_names.join(', '));

return utils
.execFile(certbotCommand, [...certbotArgs, 'revoke', '--cert-name', `npm-${certificate.id}`, '--no-delete-after-revoke'])
.execFile(certbotCommand, [...certbotArgs, 'revoke', '--cert-name', `npm-${certificate.id}`, '--delete-after-revoke'])
.then(async (result) => {
logger.info(result);
return result;
Expand Down
4 changes: 4 additions & 0 deletions frontend/js/app/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ module.exports = function (namespace, key, data) {
messages = { ...messages, ...require('../i18n/de-lang.json') };
}

if (locale.includes('it')) {
messages = { ...messages, ...require('../i18n/it-lang.json') };
}

if (typeof messages[namespace] !== 'undefined' && typeof messages[namespace][key] !== 'undefined') {
return messages[namespace][key](data);
} else {
Expand Down
14 changes: 2 additions & 12 deletions frontend/js/app/nginx/access/form.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,7 @@

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

<!-- Access -->
<div class="tab-pane" id="access">
<p>
IP Address Whitelist/Blacklist via
<a target="_blank" href="https://nginx.org/en/docs/http/ngx_http_access_module.html">
Nginx HTTP Access
</a>
</p>
<p><%= i18n('access-lists', 'access-ip', {url: 'https://nginx.org/en/docs/http/ngx_http_access_module.html'}) %></p>
<div class="clients"><!-- clients --></div>
<div class="row">
<div class="col-sm-3 col-md-3">
Expand Down
6 changes: 0 additions & 6 deletions frontend/js/app/nginx/proxy/form.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,6 @@
<div role="tabpanel" class="tab-pane" id="advanced">
<div class="row">
<div class="col-md-12">
<p><%- i18n('all-hosts', 'advanced-config-var-headline') %></p>
<ul class="text-monospace">
<li><code>$server</code> <%- i18n('proxy-hosts', 'forward-host') %></li>
<li><code>$port</code> <%- i18n('proxy-hosts', 'forward-port') %></li>
<li><code>$forward_scheme</code> <%- i18n('proxy-hosts', 'forward-scheme') %></li>
</ul>
<div class="form-group mb-0">
<label class="form-label"><%- i18n('all-hosts', 'advanced-config') %></label>
<textarea name="advanced_config" rows="8" class="form-control text-monospace" placeholder="# <%- i18n('all-hosts', 'advanced-warning') %>"><%- advanced_config %></textarea>
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/app/ui/footer/main.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="row align-items-center">
<div class="col-auto">
<ul class="list-inline list-inline-dots mb-0">
<li class="list-inline-item"><a href="#" onclick="toggleDarkMode()">Toggle Dark Mode</a></li>
<li class="list-inline-item"><a href="#" onclick="toggleDarkMode()"><%- i18n('footer', 'toggle-dark') %></a></li>
<li class="list-inline-item"><a href="https://github.com/ZoeyVid/NPMplus" target="_blank"><%- i18n('footer', 'repo') %></a></li>
</ul>
</div>
Expand Down
5 changes: 4 additions & 1 deletion frontend/js/i18n/de-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"access-lists": {
"access": "Zugang",
"access-add": "Hinzufügen",
"access-basic": "Basic Authorization via <a href=\"{url}\" target=\"_blank\">Nginx HTTP Basic Authentication</a>",
"access-ip": "IP Adressen Whitelist/Blacklist via <a href=\"{url}\" target=\"_blank\">Nginx HTTP Access</a>",
"add": "Zugangsliste hinzufügen",
"auth-add": "Hinzufügen",
"authorization": "Autorisierung",
Expand Down Expand Up @@ -115,7 +117,8 @@
"copy-npmplus": " - und &copy; 2024 <a href=\"{url}\" target=\"_blank\">ZoeyVid</a> NPMplus",
"license": " - MIT-Lizenz",
"repo": "Repository auf GitHub",
"theme": " - Thema von <a href=\"{url}\" target=\"_blank\">Tabler v0.0.31</a>"
"theme": " - Thema von <a href=\"{url}\" target=\"_blank\">Tabler v0.0.31</a>",
"toggle-dark": "Dark Modus ein-/ausschalten"
},
"locations": {
"delete": "Löschen",
Expand Down
5 changes: 4 additions & 1 deletion frontend/js/i18n/en-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"access-lists": {
"access": "Access",
"access-add": "Add",
"access-basic": "Basic Authorization via <a href=\"{url}\" target=\"_blank\">Nginx HTTP Basic Authentication</a>",
"access-ip": "IP Address Whitelist/Blacklist via <a href=\"{url}\" target=\"_blank\">Nginx HTTP Access</a>",
"add": "Add Access List",
"auth-add": "Add",
"authorization": "Authorization",
Expand Down Expand Up @@ -115,7 +117,8 @@
"copy-npmplus": " - and &copy; 2024 <a href=\"{url}\" target=\"_blank\">ZoeyVid</a> NPMplus",
"license": " - MIT-License",
"repo": "Repository on GitHub",
"theme": " - Theme by <a href=\"{url}\" target=\"_blank\">Tabler v0.0.31</a>"
"theme": " - Theme by <a href=\"{url}\" target=\"_blank\">Tabler v0.0.31</a>",
"toggle-dark": "Toggle Dark Mode"
},
"locations": {
"delete": "Delete",
Expand Down
Loading

0 comments on commit 6348cc7

Please sign in to comment.