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

Updated Brazilian .po files #6776

Merged
merged 22 commits into from
Feb 18, 2025
Merged

Updated Brazilian .po files #6776

merged 22 commits into from
Feb 18, 2025

Conversation

MichaelChirico
Copy link
Member

Thanks in advance!

@MichaelChirico MichaelChirico added the translation issues/PRs related to message translation projects label Jan 30, 2025
@MichaelChirico MichaelChirico requested a review from a team as a code owner January 30, 2025 07:47
@MichaelChirico MichaelChirico requested a review from a team as a code owner January 30, 2025 07:55
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.64%. Comparing base (ca2c377) to head (ecf6879).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6776   +/-   ##
=======================================
  Coverage   98.64%   98.64%           
=======================================
  Files          79       79           
  Lines       14642    14642           
=======================================
  Hits        14444    14444           
  Misses        198      198           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rffontenelle rffontenelle removed the request for review from a team February 2, 2025 20:08
@rffontenelle
Copy link
Contributor

Hi @MichaelChirico! Can you please remind me how can I update the source strings of a PO file and get the number of chars per line wrapped as is in the data.table repository? The translation editor software re-wrapped so the git diff looks polluted.

@MichaelChirico
Copy link
Member Author

I update the .po files with potools::po_update(), does that help?

@rffontenelle
Copy link
Contributor

Sadly no. I don't exactly how po_update works, but it didn't update R-/pt_BR.po files. I even replaced POT-Creation-Date to some previous date, but it didn't touch them.

@MichaelChirico
Copy link
Member Author

Thanks. Feel free to just leave the .po update in the format your editor has in this PR, and I'll be sure to get it into the nicer format to reduce the diff before squash+merge.

@rffontenelle
Copy link
Contributor

Done, PO file updated. Translation by @leofontenelle, proofread by me.

Chirico, I'd love to know how to adjust the line wrap, if you can check it later and share will me. Thanks in advance!

@MichaelChirico
Copy link
Member Author

Hi @rffontenelle, I ran po_update() again to incorporate the recent changes to .pot (#6793 -- 3e900c9). For some reason your translations weren't copied over well so I tried to manually restore them.

I also made one correction: there are two messages for "too-many" vs. "too-few", I saw "muito poucos" for both in Portuguese, looked wrong. I think the correction is just "muitos" for the "too-many" case.

For the wrapping, AFAICT it's properly wrapped (I looked at the profile of nchar() and it looks similar to the other languages).

PTAL.

@rffontenelle
Copy link
Contributor

I also made one correction: there are two messages for "too-many" vs. "too-few", I saw "muito poucos" for both in Portuguese, looked wrong. I think the correction is just "muitos" for the "too-many" case.

Indeed that's not correct.

I'll take a look a them.

Just for the record:

$ LC_ALL=C msgfmt pt_BR.po 
pt_BR.po:3365: number of format specifications in 'msgid' and 'msgstr' does not match
pt_BR.po:3412: number of format specifications in 'msgid' and 'msgstr' does not match
msgfmt: found 2 fatal errors
647 translated messages, 6 fuzzy translations, 14 untranslated messages.
$ LC_ALL=C msgfmt R-pt_BR.po 
468 translated messages, 1 fuzzy translation, 100 untranslated messages.

@MichaelChirico MichaelChirico added this to the 1.17.0 milestone Feb 7, 2025
@rffontenelle
Copy link
Contributor

@leofontenelle pt_BR.po translated, feel free to review. Now I'm working on R-pt_BR.po

@rffontenelle
Copy link
Contributor

For the wrapping, AFAICT it's properly wrapped (I looked at the profile of nchar() and it looks similar to the other languages).

@MichaelChirico Looks like the line-wrapping problem is not the number of chars, but where to wrap. I'm using Gtranslator and it seems to not break as.name in different lines when line-wrapping: while Gtranslator put them together, potools leaves 'as.' in one line and name in the other.

The resulting string is the same, but the commit diff gets a bit polluted with these different line-wrapping rules.

For the last commit, I manually undid the wrapping-only changes done by my editor.

@rffontenelle
Copy link
Contributor

R-pt_BR translated. 2 strings fuzzy because I was not sure how to translate it. Pending review

Copy link
Contributor

@leofontenelle leofontenelle left a comment

Choose a reason for hiding this comment

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

Pedi dois ou três ajustes nos comentários

@rffontenelle
Copy link
Contributor

@MichaelChirico ready to merge!

@MichaelChirico
Copy link
Member Author

I'm using Gtranslator and it seems to not break as.name in different lines when line-wrapping: while Gtranslator put them together, potools leaves 'as.' in one line and name in the other.

Ah, interesting. Are you aware of a standard on this? Possible I have some wrong logic in {potools}... IIRC I based my own rule on what would leave the r-devel .po files with minimal diff, so that might be something else to check (i.e. does Gtranslator mess extensively with the .po files of r-devel).

@MichaelChirico
Copy link
Member Author

Thanks! I deleted the deprecated (#~) messages and compiled po->mo.

I noticed there are two remaining fuzzy translations reported:

msgfmt -c --statistics -o inst/po/pt_BR/LC_MESSAGES/data.table.mo po/pt_BR.po
# 667 translated messages.
msgfmt -c --statistics -o inst/po/pt_BR/LC_MESSAGES/R-data.table.mo po/R-pt_BR.po
# 567 translated messages, 2 fuzzy translations.

It looks like it's these:

   message_source     type fuzzy                                msgid
           <char>   <char> <int>                               <char>
1:              R singular     1     Optimized subsetting with key %s
2:              R singular     1 Optimized subsetting with index '%s'
                                  msgstr msgid_plural msgstr_plural
                                  <char>       <list>        <list>
1:    Subconjunto otimizado com chave %s       [NULL]        [NULL]
2: Subconjunto otimizado com índice '%s'       [NULL]        [NULL]

Since it's only two I'll go ahead and merge here since I want to be sure this is included in 1.17.0. Feel free to file a quick follow-up & it still might make the release.

@MichaelChirico MichaelChirico merged commit d6ac68a into master Feb 18, 2025
8 checks passed
@MichaelChirico MichaelChirico deleted the new-pt-po branch February 18, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translation issues/PRs related to message translation projects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants