lbalazscs / Pixelitor

A desktop image editor
https://pixelitor.sourceforge.io/
GNU General Public License v3.0
181 stars 70 forks source link

Add pt-BR translation #328

Closed angalq closed 10 months ago

angalq commented 10 months ago

This is an initial pt-BR translation. How can I contribute with improvements to minimize hard coded messages?

lbalazscs commented 10 months ago

Great, thanks!

If you'd like to contribute code changes to make the GUI strings sourced from properties files instead of being hardcoded, that's fantastic! I appreciate code contributions, and I see that you already have experience with Java. I recommend starting with the pixelitor.menus.MenuBar class. Here, you have a direct ResourceBundle reference, and you can easily call getString on it. Remember to add the original English value to the English-language properties file.

In other parts of the code, you can use the static i18n method of the pixelitor.utils.Texts class if you don't have a direct ResourceBundle reference. If you have a more specific question, let me know! (open an issue, start a discussion, comment on this PR, send an email, as you like)

I'll merge this PR, and then I'll commit a small change so that Portuguese can be selected in the settings. After that, you can continue the translation of these two files and also add more keys in separate pull request(s). Don't forget to rebase your version on my newest master version after I make the changes (I'll also fix a small error in the tips file where a "tip.5.description=" string is missing).

lbalazscs commented 10 months ago

I added the commit that I mentioned earlier (c6a36761bc89bc87f7d66f10b893bc6a6a2bc6d5), you can continue.