Skip to content

i18n: add Brazilian Portuguese (pt-BR) translation - #184

Open
marcobabinski wants to merge 5 commits into
eklonofficial:mainfrom
marcobabinski:i18n/pt-BR
Open

marcobabinski wants to merge 5 commits into
eklonofficial:mainfrom
marcobabinski:i18n/pt-BR

Conversation

@marcobabinski

Copy link
Copy Markdown

Hello, I have a few questions/notes before merging:

  1. Gender of "Vice": Portuguese is a gendered language, so assigning a grammatical gender to the app name makes phrasing sound much more natural. I am currently leaning towards masculine (o Vice), as it inherits the gender from "game clip recorder" (o gravador de clipes). Do you have any objections or personal preference regarding this?

  2. Discord Rich Presence string: In settings.discordEnabledHelp, the template "Clipping <Game> with Vice" seems to match what is displayed in Discord's Rich Presence. Since Discord RP status strings are usually kept in English or controlled upstream, I kept this literal quote in English within the description. Is that correct?

  3. "Tap" vs. "Click": Strings like home.tapToCopy use the word "tap". Since Vice is a Linux desktop application, I localized these using mouse-oriented terms like "clique" / "clicar" (to click) instead of touch terms like "toque" / "tocar" (to tap), which can sound unusual to desktop users.

  4. Game title in accents.previewChip: Just to confirm, "Deadlock" here refers to Valve's game Deadlock, right? I ask because the game wasn't the first thing that popped into my head, and it might be the same for other users given that "deadlock" is also a computing term. If that's the case, I'd suggest using a more obvious game title here just to avoid any ambiguity.

  5. Grammar compromise in update.youAreOn: Portuguese requires contractions that combine prepositions with gendered articles (em + a = na / "on the [feminine]"). Because {version} can be either a specific version number or the fallback phrase update.olderRelease ("an older release"), there is no single contraction that fits both perfectly:

Preposition / Contraction Specific version (e.g., v2.9) Generic fallback (update.olderRelease)
em (in / on) "Você está em v2.9" (Works, slightly informal) 🟨 "Você está em uma versão anterior" (Natural) ✅
na (on the [fem.]) "Você está na v2.9" (Natural, sounds best) ✅ "Você está na uma versão anterior" (Grammatically broken) ❌

To prevent broken grammar on the fallback string, I chose em so both cases remain valid and understandable.

  1. Locale tooling & sync: Do you plan to expand the check-locales tooling to help track newly added strings or upstream copy changes across releases? While working on this PR, I added some local helpers to inspect --missing and --untouched keys to distinguish actual untranslated strings from intentional cognates.

That’s all! Thanks for the hard work building and maintaining Vice. I plan to keep checking in periodically to translate new strings as features land.

@eklonofficial

Copy link
Copy Markdown
Owner

This is a really good first translation, and thanks for the questions. They are all worth asking. I checked the file over before answering: 713 of 713 keys present, no stray keys, every {placeholder} matching English, both plural forms on all eight plural keys, and no em-dashes. I also ran it in a real window at 1600x1000 to check the tight spots, because Portuguese runs longer than English and the sidebar has a fixed width. Nothing overflows. "Configurações" lands at exactly 200px in a 200px slot, which is closer than I would like but it fits, and the 44 Settings rows are all clean.

Answers, in order.

1. Gender. Masculine, o Vice. Your reasoning is the same as mine and you have used it consistently, so nothing to change.

2. Discord Rich Presence. You are right to leave it in English. The daemon sends that string literally, vice/main.py builds f"Clipping {game} with Vice" and it never passes through the locale files. The help text is quoting what Discord will actually display, so if it were translated the description would be telling people to expect something they will never see.

3. Tap vs click. Your call, and keep clique. The English says "tap" because that is how I write about pressing a key, but the point of the string is what feels natural to the person reading it, and on a Linux desktop you click a thing with a mouse. On your own language you get the final word over me anyway.

4. Deadlock. Yes, Valve's. And you are right that it is a bad choice, I did not think about the computing term at all and now I cannot unsee it. That is a problem in the English rather than something you should work around, so I will change accents.previewChip to "Elden Ring". It is a proper noun so your file needs no change either way.

5. update.youAreOn. Your compromise is sound and I would have made the same one. But the actual fault is in my English: interpolating a noun phrase into a finished sentence only works because English gets away with having no agreement, and it was going to break for any inflected language, not only Portuguese. Polish would have hit exactly the same wall. I will split it into two keys so neither language has to interpolate a noun phrase, one for a known version and one for the unknown case. That is a new key, so it falls back to English in pt-BR until you get to it. No rush, that is the fallback doing its job.

6. Tooling. Yes, worth having, and it is the right thing to ask for. If you want to open those helpers as their own PR, they are yours and I will take them. If you would rather not, say so and I will add --missing and --untouched myself. Distinguishing a real untranslated string from a deliberate cognate is the part I had no answer for, and 26 of your values are identical to English on purpose, all proper nouns and encoder names, so a plain "same as English" count would just be noise without it.


Two things before I merge, both small.

The bundle is one commit behind the JSON. vice/ui/scripts/app.js still has Duplo clique para renomear where pt-BR.json says Duplo-clique. It looks like you edited the JSON after the last build. One byte, but the bundle is what actually ships, so it needs a rebuild.

Two typos in tutorial.colourBody. Cofigurações should be Configurações, and escolha o que o mais agradar os olhos has a stray o.

So:

npm run build
git add ui-src/locales/pt-BR.json vice/ui/scripts/app.js

Push that to the same branch and I will merge it. Everything else is ready to go.

By the way, the tests will not catch a stale bundle in a non-English locale right now, which is my gap and not yours. test_bundle_carries_the_current_copy checks a fixed list of English phrases, so it had no way to see this. I will widen it to cover every locale so the next translator gets told by CI instead of by me.

Thanks for offering to keep checking in as new strings land. That is genuinely the part that makes a translation worth having.

@eklonofficial eklonofficial added the status: waiting on author PR review found changes that the contributor needs to make. label Sep 5, 2026
@marcobabinski

marcobabinski commented Sep 9, 2026 •

Copy link
Copy Markdown
Author

Sorry for taking so long, it's done.
Since I vibecoded the tools for quick personal use, I'd rather not mess the codebase with them.

I would be very grateful if you made the tooling though. Especially to keep track of the cognates and checking for missing/new entries. I personally don't know how I would handle things like modified entries (which might be the case for update.youAreOn), as they would just be flagged as done by the current i18n scripts.

@eklonofficial eklonofficial added status: unaddressed Actionable work that has not started. and removed status: waiting on author PR review found changes that the contributor needs to make. labels Sep 17, 2026
@eklonofficial

Copy link
Copy Markdown
Owner

Thanks for completing the requested translation and bundle corrections. The PR is now based on the commit before the 2.11.0 release and the installer merge, so GitHub reports a merge conflict. Please update this branch from current main and push the result. I will rerun the focused checks and merge it through this PR once it is clean. I will add your handle to the README credits when it lands.

@eklonofficial eklonofficial added status: waiting on author PR review found changes that the contributor needs to make. and removed status: unaddressed Actionable work that has not started. labels Sep 19, 2026
@eklonofficial

Copy link
Copy Markdown
Owner

Checked the merge result locally: every placeholder matches English, no stray keys, the UI static tests pass, and the coverage check reads 94% with the rest falling back to English, which is exactly how this is meant to work. No need to chase 100%.

One thing left, and it is my fault: I pushed a UI change to main today, so the built bundle conflicts. Nothing in your translation conflicts. Merge main and rebuild:

git merge main
npm run build
git add vice/ui/scripts/app.js vice/ui/styles/app.css && git commit

That change also added a handful of new English strings (a storage readout on Home, a couple of gallery lines). They will fall back to English if you leave them, so translate them only if you feel like it.

Push that and I will approve the CI run and merge. You will be credited in the 2.13.0 notes and the README.

@marcobabinski

Copy link
Copy Markdown
Author

OK, I've included translations for the new strings in the build, although I wasn't able to find some of them in the UI to get the full context. If I stumble across any confusing ones later, I'll update them. Rebuilt on top of 2.14.0.

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

Labels

status: waiting on author PR review found changes that the contributor needs to make.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants