Skip to content

locale: Restore translations lost in 357467022 #2967

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

Merged
merged 2 commits into from
May 28, 2020

Conversation

jepler
Copy link

@jepler jepler commented May 28, 2020

"Merge pull request #2005 931 from tannewt/esp32s2_digitalio"

I noticed that instead of being quasi-complete as they were a few days ago, these translations were back in the range of 2/3 complete.

Inspecting the git history, I saw that they were unexpectedly changed in the merge commit 3574670. This is easiest to see if you git diff 357467022^ 357467022 -- locale, you can see that e.g., this message translation is removed accidentally:

 #: shared-bindings/rgbmatrix/RGBMatrix.c
 #, c-format
 msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
-msgstr "%d Adress-Pins und %d rgb-Pins zeigen eine Höhe von %d, nicht von %d"
+msgstr ""

We may also want to examine our processes to see if there's a way to avoid this. Changing what "make translate" does (so that it only updates the .pot file, not the .po files) may help. I hope to have a concrete proposal soon.

@jepler jepler requested a review from tannewt May 28, 2020 01:32
@jepler
Copy link
Author

jepler commented May 28, 2020

@tannewt can you take a look please?

jepler added a commit to jepler/circuitpython that referenced this pull request May 28, 2020
Length was stored as a 16-bit number always.  Most translations have
a max length far less.  For example, US English translation lengths
always fit in just 8 bits.  probably all languages fit in 9 bits.

This also has the side effect of reducing the alignment of
compressed_string_t from 2 bytes to 1.

testing performed: ran in german and english on pyruler, printed messages
looked right.

Firmware size, en_US
Before: 3044 bytes free in flash
After: 3408 bytes free in flash

Firmware size, de_DE (with adafruit#2967 merged to restore translations)
Before: 1236 bytes free in flash
After: 1600 bytes free in flash
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Sorry about that! Could you check make merge-translate? I may have it's functionality backwards.

@tannewt tannewt merged commit b901def into adafruit:master May 28, 2020
@jepler jepler deleted the fix-translation-merge-error branch November 3, 2021 21:09
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.

2 participants