nginx-proxy-manager
nginx-proxy-manager copied to clipboard
Adds Portuguese translations
We have a big need for this to be translated to Portuguese, as we intend various rural communities, with users new to the digital world, to be able to use this on their local networks.
I've started by adding translations to the "i18n/messages.json" file. But there's nowhere in the UI for language to be changed, and I didn't find in any part of the code translations to be changed based on browser language.
How can we start the process of adding other languages to the project?
Thanks for the review. I'll still be doing some revision of the translation before moving this out of draft. Would be great to know what would be needed besides the translation itself for this to be incorporated to the project.
FWIW this is the error CI is reporting:
07:57:55 ERROR in ./js/i18n/messages.json
07:57:55 Module build failed (from ./node_modules/messageformat-loader/index.js):
07:57:55 SyntaxError: Expected "#", "{", doubled apostrophe, end of input, escaped string, or plain char but "}" found.
However, adding translations to v2 isn't really practical since there's no UI switcher for languages and it's hard coded to english, despite the underlying support for language files.
CI Error:
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
certbot-node: Pulling from jc21/nginx-full
Digest: sha256:f1026c745de39103f0b9ef04a3db74b46bf581d992dec0ad23771dd60ad19f38
Status: Image is up to date for jc21/nginx-full:certbot-node
docker.io/jc21/nginx-full:certbot-node
[1;34m❯ [1;36mBuilding Frontend ...[0m
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "backbone@~1.3.3".
warning " > [email protected]" has incorrect peer dependency "underscore@~1.8.3".
warning "marionette.templatecache > [email protected]" has incorrect peer dependency "backbone@~1.3.3".
warning "marionette.templatecache > [email protected]" has incorrect peer dependency "underscore@>= 1.8.3 <= 1.9.x".
warning "tabler-ui > [email protected]" has unmet peer dependency "popper.js@^1.16.1".
[4/4] Building fresh packages...
Done in 32.44s.
yarn run v1.22.19
$ webpack --mode production
(node:98) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
(Use `node --trace-deprecation ...` to show where the warning was created)
Hash: ce282f6dc870ecab52af
Version: webpack 4.44.1
Time: 5774ms
Built at: 03/30/2023 11:51:29 PM
424 assets
Entrypoint main = css/main.css js/main.bundle.js?v=2.10.2
Entrypoint login = js/login.bundle.js?v=2.10.2
[2] ./js/app/main.js 3.81 KiB {2} [built]
[3] ./node_modules/underscore/modules/index-all.js + 159 modules 80.9 KiB {1} {2} [built]
| 160 modules
[7] ./js/app/cache.js 149 bytes {2} [built]
[8] ./js/app/tokens.js 2.27 KiB {1} {2} [built]
[10] ./js/app/i18n.js 774 bytes {1} {2} [built]
[11] ./js/app/controller.js 10.9 KiB {2} [built]
[12] ./js/app/api.js 18 KiB {1} {2} [built]
[152] ./js/index.js 3.29 KiB {2} [built]
[153] ./scss/styles.scss 39 bytes {2} [built]
[156] ./js/lib/marionette.js 448 bytes {2} [built]
[161] ./js/app/router.js 581 bytes {2} [built]
[163] ./js/app/ui/main.js 2.21 KiB {2} [built]
[171] ./js/login.js 82 bytes {1} [built]
[172] ./js/login/main.js 296 bytes {1} [built]
[173] ./js/login/ui/login.js 1020 bytes {1} [built]
+ 286 hidden modules
ERROR in ./js/i18n/messages.json
Module build failed (from ./node_modules/messageformat-loader/index.js):
SyntaxError: Expected "#", "{", doubled apostrophe, end of input, escaped string, or plain char but "}" found.
at peg$buildStructuredError (/app/frontend/node_modules/messageformat-parser/parser.js:407:12)
at peg$parse (/app/frontend/node_modules/messageformat-parser/parser.js:1978:11)
at Compiler.compile (/app/frontend/node_modules/messageformat/lib/compiler.js:51:48)
at Compiler.compile (/app/frontend/node_modules/messageformat/lib/compiler.js:59:28)
at Compiler.compile (/app/frontend/node_modules/messageformat/lib/compiler.js:59:28)
at Compiler.compile (/app/frontend/node_modules/messageformat/lib/compiler.js:59:28)
at MessageFormat.compile (/app/frontend/node_modules/messageformat/lib/messageformat.js:418:26)
at Object.module.exports (/app/frontend/node_modules/messageformat-loader/index.js:35:40)
@ ./js/app/i18n.js 3:17-49
@ ./js/app/main.js
@ ./js/index.js
Child HtmlWebpackCompiler:
2 assets
Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
Entrypoint HtmlWebpackPlugin_1 = __child-HtmlWebpackPlugin_1
[0] ./node_modules/ejs-webpack-loader!./html/index.ejs 6.39 KiB {0} [built]
[1] ./node_modules/ejs-webpack-loader!./html/login.ejs 6.56 KiB {1} [built]
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/sass-loader/dist/cjs.js!scss/styles.scss:
Entrypoint mini-css-extract-plugin = *
[0] ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./scss/styles.scss 368 KiB {0} [built]
[388] ./fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-regular.woff2 100 bytes {0} [built]
[389] ./fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-regular.woff 99 bytes {0} [built]
[390] ./fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-italic.woff2 99 bytes {0} [built]
[391] ./fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-italic.woff 98 bytes {0} [built]
[392] ./fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-700italic.woff2 102 bytes {0} [built]
[393] ./fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-700italic.woff 101 bytes {0} [built]
[394] ./fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-700.woff2 96 bytes {0} [built]
[395] ./fonts/source-sans-pro/source-sans-pro-v14-latin-ext_latin-700.woff 95 bytes {0} [built]
+ 387 hidden modules
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PR is now considered stale. If you want to keep it open, please comment :+1: