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

Fix brazilian portuguese translations #2803

Merged
merged 6 commits into from
Oct 27, 2023
Merged

Conversation

lucasmoura
Copy link
Contributor

@lucasmoura lucasmoura commented Oct 20, 2023

Why is this needed?

Some brazilian portuguese translations are incorrect. This PR fix those issues

Test Steps

Check the modified translation matches the english string

Checklist

  • I have updated or added any unit tests accordingly
  • I have updated or added any integration tests accordingly
  • Changes here need to be documented, and this was done in:

Does this PR require extra reviews?

  • Yes
  • No

@panlinux
Copy link
Contributor

Consider adding --check-format to the msgfmt call in debian/po/Makefile, as it seems to catch the class of errors where format strings or python {} vars in the original string are missing from the translated one:

$ make
mkdir -p usr/share/locale/pt_BR/LC_MESSAGES
msgfmt -f --check-format pt_BR.po -o usr/share/locale/pt_BR/LC_MESSAGES/ubuntu-pro.mo
pt_BR.po:204: number of format specifications in 'msgid' and 'msgstr' does not match
pt_BR.po:214: number of format specifications in 'msgid' and 'msgstr' does not match
pt_BR.po:1319: a format specification for argument 'date' doesn't exist in 'msgstr'
msgfmt: found 3 fatal errors
make: *** [Makefile:8: pt_BR.mo] Error 1

@lucasmoura
Copy link
Contributor Author

@panlinux I have applied the suggestion to the Makefile command

@@ -493,7 +490,7 @@ msgstr[1] ""
"Renove sua assinatura em {url}"
Copy link
Contributor

Choose a reason for hiding this comment

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

ubuntu Pro is lowercase in the translation, but Ubuntu Pro in the original text. Also, wasn't this translation meant to support singular and plural texts? Just wondering because both in the original string and in the translated one, it's plural (or at least using (s)).

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, sorry, just saw it now, but the translated string is using PRO instead of Pro.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, I have solved the issue

Some brazilian portuguese translations are marked as fuzzy.
We are removing the tag from the ones we believe are correct
This flag will allow us to more easily catch possible mismatched
translations on the po files
@lucasmoura lucasmoura force-pushed the fix-translations branch 2 times, most recently from 739a4f0 to 60b9eba Compare October 25, 2023 18:53
We need to increase the width of the status column to better
address the column placement when the portuguese translations
are used. Note that this is a temporary solution, as we should
dynamically compute those column values.
debian/po/pt_BR.po Outdated Show resolved Hide resolved
@@ -2554,7 +2557,7 @@ msgstr ""

#: ../../uaclient/messages/__init__.py:1463
msgid "All Updates for the Robot Operating System"
msgstr ""
msgstr "Todas as Atualizações para o Robot Operating System"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

s/Atualizações/atualizações

Copy link
Member

Choose a reason for hiding this comment

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

I kept the uppercase to match the uppercase in All Updates.
I think we must have a policy for this, because it is not consistent across messages

@renanrodrigo renanrodrigo merged commit 919c28a into release Oct 27, 2023
10 checks passed
@renanrodrigo renanrodrigo deleted the fix-translations branch October 27, 2023 14:52
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.

3 participants