Skip to content

Adds Portuguese translations #1493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

luandro
Copy link

@luandro luandro commented Oct 17, 2021

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?

@luandro luandro changed the title Added Portuguese translations Adds Portuguese translations Oct 19, 2021
Copy link
Member

@jc21 jc21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Just one comment as to the failure.

"name": "Nome",
"email": "O email",
"roles": "Papéis",
"created-on": "Data de criação}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is the cause of the failure. The messageformat parser uses the brackets for special reasons, so you can't use them in this way unfortunately.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for locating the error.

@luandro
Copy link
Author

luandro commented Oct 25, 2021

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.

@jc21
Copy link
Member

jc21 commented Aug 23, 2022

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.

Copy link

github-actions bot commented Mar 3, 2024

PR is now considered stale. If you want to keep it open, please comment 👍

@github-actions github-actions bot added the stale label Mar 3, 2024
@nginxproxymanagerci
Copy link

CI Error:

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
certbot-node: Pulling from nginxproxymanager/nginx-full
Digest: sha256:eaa2ebcb50dd87557c9a8f95a3230128d94cac1ea17800261c036e59378e7d49
Status: Image is up to date for nginxproxymanager/nginx-full:certbot-node
docker.io/nginxproxymanager/nginx-full:certbot-node
�[1;34m❯ �[1;36mBuilding Frontend ...�[0m
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > marionette.templatecache@1.0.0" has incorrect peer dependency "backbone@~1.3.3".
warning " > marionette.templatecache@1.0.0" has incorrect peer dependency "underscore@~1.8.3".
warning "marionette.templatecache > backbone.marionette@4.0.0-beta.1" has incorrect peer dependency "backbone@~1.3.3".
warning "marionette.templatecache > backbone.marionette@4.0.0-beta.1" has incorrect peer dependency "underscore@>= 1.8.3 <= 1.9.x".
warning "tabler-ui > bootstrap@4.5.1" has unmet peer dependency "popper.js@^1.16.1".
[4/4] Building fresh packages...
Done in 90.75s.
yarn run v1.22.22
$ webpack --mode production
(node:99) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
(Use `node --trace-deprecation ...` to show where the warning was created)
Hash: bff770a228225876adf1
Version: webpack 4.44.1
Time: 5563ms
Built at: 10/17/2024 1:57:33 AM
 424 assets
Entrypoint main = css/main.css js/main.bundle.js?v=2.12.1
Entrypoint login = js/login.bundle.js?v=2.12.1
  [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 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.48 KiB {0} [built]
    [1] ./node_modules/ejs-webpack-loader!./html/login.ejs 6.64 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
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.

@github-actions github-actions bot removed the stale label Dec 6, 2024
Copy link

PR is now considered stale. If you want to keep it open, please comment 👍

@github-actions github-actions bot added the stale label Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants