Skip to content
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

Adds Portuguese translation #697

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open

Conversation

SrNetoChan
Copy link

Here's the translation file for European Portuguese.

@volterra79 volterra79 added the i18n Edit or add translations label Jan 17, 2025
@volterra79 volterra79 self-requested a review January 17, 2025 15:54
@volterra79 volterra79 added this to the v3.11 milestone Jan 17, 2025
@volterra79 volterra79 requested a review from Raruto January 17, 2025 15:54
@volterra79
Copy link
Member

@SrNetoChan please update https://github.com/SrNetoChan/g3w-client/blob/dev/src/locales/index.js adding pt.js module as other languages. Thanks

@SrNetoChan
Copy link
Author

Do we need to add a portuguese flag somewhere?

@volterra79
Copy link
Member

Do we need to add a portuguese flag somewhere?

We need to add it to admin.

src/locales/index.js Outdated Show resolved Hide resolved
@Raruto
Copy link
Collaborator

Raruto commented Jan 20, 2025

Do we need to add a portuguese flag somewhere?

@SrNetoChan If you don't want to wait for ages, I would recommend you try to submit a PR for the admin side too.

You can take this one as inspiration: g3w-suite/g3w-admin#775

@SrNetoChan
Copy link
Author

@Raruto is there a correct way to create the po files, or a simple copy past from polish will do?

@Raruto
Copy link
Collaborator

Raruto commented Jan 20, 2025

@SrNetoChan I'm not very knowledgeable about django.

Probably something like the following:

# 1. generate .po files

python3 g3w-admin/manage.py makemessages -l pt

# 2. edit .po files (translations)

# eg: locale/pt/LC_MESSAGES/django.po
# > msgid "Welcome to my portfolio"
# > msgstr "Willkommen auf meiner Portfolio Webseite"

# 3. generate .mo files (compile translations)

python3 g3w-admin/manage.py compilemessages

You can also run this command to list all available django commands:

python3 g3w-admin/manage.py

image

Rif:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport to v3.11.x i18n Edit or add translations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants