Skip to content

feat(i18n): add Brazilian Portuguese localization - #142

Open
maylton wants to merge 6 commits into
AxOS-project:mainfrom
maylton:feat/i18n-settings-strings
Open

feat(i18n): add Brazilian Portuguese localization#142
maylton wants to merge 6 commits into
AxOS-project:mainfrom
maylton:feat/i18n-settings-strings

Conversation

@maylton

@maylton maylton commented Jul 24, 2026

Copy link
Copy Markdown

Summary

Adds the initial internationalization infrastructure and Brazilian Portuguese
localization for Sleex.

Changes

  • Add Qt Linguist integration with an embedded translation catalog
  • Load translations automatically from the system locale
  • Add Brazilian Portuguese (pt_BR) translations
  • Localize the settings application and its individual pages
  • Add local Ollama-assisted tools for translating TS catalogs and marking QML strings
  • Preserve placeholders and exclude Material Symbol icon names from translation
  • Ignore generated Python cache files

Testing

  • Built the project successfully with CMake
  • Confirmed that the pt_BR catalog is installed at runtime
  • Tested translation lookup with qsTranslate()
  • Tested the settings application using the local QML entrypoint
  • Verified translated settings pages, sidebar labels, tooltips, Wi-Fi messages,
    privacy options, interface options, sound settings and behavior settings
  • Confirmed there are no unfinished translations
  • Confirmed the Git working tree is clean

Refs #105

@LeVraiArdox LeVraiArdox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hello, thanks for the PR !

Although the translation is a very good improvement for Sleex, I don't think this is the right way to do it.

Firstly, we can't just use AI for this type of task. An 8B LLM is unpredictable and we can't let it rewrite the source code. Also, it's not a clean way to generate translations.

Then, instead of using QTranslator, it would probably be better to write a custom service that search for a string to translate (wrapped in a function, for example Translations.tr("stuff")), and translate it with a translation dictionary. The dictionary can be hand written or AI written if reviewed afterward, but it's on the translator's end. By translator I mean the person that translates.

If you want to take the challenge, go ahead. Else, you can close this PR. Thanks anyway :)

@maylton

maylton commented Jul 25, 2026

Copy link
Copy Markdown
Author

Hi there!

I totally agree with you. Using AI to translate everything isn't the best way neither the safest. It was more of an example of possibility than a real implementation 😅

I liked your idea and I'll try to do it. I'm not so good and coding, that's why I vibe code most of it (you clearly noticed it 🤣). If that's okay, I'll be glad to help.

@LeVraiArdox

Copy link
Copy Markdown
Member

I have no problem with vibe coding, as long as it respects the code style and have a human review behind. Also, AI sometimes makes useless comments, that can be avoided.

Tho, I recommend you to try to understand the code that is generated, AI can be a good learning tool ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants