pop-os / desktop-widget

Pop Desktop Settings Widget
GNU Lesser General Public License v3.0
43 stars 35 forks source link

i18n(pt-BR): Add new translations for gtk widget and desktop files #65

Closed cappp closed 2 years ago

cappp commented 2 years ago

Explanation

I tested the translations by installing Rust v1.55.0 and using cargo run with some dependencies (running Pop!_OS 21.04) in the project to make it work:

libgtk-3-dev
libgstreamer1.0-dev
libhandy-1-dev

Preview:

https://user-images.githubusercontent.com/48036034/137049234-d8535e3c-b623-4cb6-a71a-08863908bd7a.mp4

https://user-images.githubusercontent.com/48036034/137049247-edbd03f6-dfa1-4eb6-a793-6cd73cafb339.mp4

I hope everything is correct. 😅

jacobgkau commented 2 years ago

Thank you for the translation updates! This is displaying properly in a user account set to Portuguese (Brazil). The description for the .desktop entries in the Launcher are now localized for this language.

The only thing I noticed is that after this change, searching for Portuguese keywords in an English user account returns results, as does searching for English keywords in a Portuguese user account. For just the five keywords being added here, I don't think this would cause any confusion, but I could see it causing some unexpected search results as more translations are added.

It looks like some other apps (at least Firefox, GParted, and the Pop!_Shop) use Keywords[lang] entries, like Keywords[pt_BR], for language-specific/non-native keywords. Looking at the .desktop file specification, Keywords is of type localestring, so this is valid syntax. Can you break the new keywords out into new Keywords[pt_BR] lines in the .desktop files?

cappp commented 2 years ago

Thank you for the translation updates! This is displaying properly in a user account set to Portuguese (Brazil). The description for the .desktop entries in the Launcher are now localized for this language.

The only thing I noticed is that after this change, searching for Portuguese keywords in an English user account returns results, as does searching for English keywords in a Portuguese user account. For just the five keywords being added here, I don't think this would cause any confusion, but I could see it causing some unexpected search results as more translations are added.

It looks like some other apps (at least Firefox, GParted, and the Pop!_Shop) use Keywords[lang] entries, like Keywords[pt_BR], for language-specific/non-native keywords. Looking at the .desktop file specification, Keywords is of type localestring, so this is valid syntax. Can you break the new keywords out into new Keywords[pt_BR] lines in the .desktop files?

For sure!

cappp commented 2 years ago

Done @jacobgkau.

13r0ck commented 2 years ago

Looks good to me! @cappp while checking the changes I noticed a few missing translations in #69. If you are willing, we would love your help translating those too!