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: fix metadata for Polish TL #371

Merged
merged 1 commit into from
Sep 23, 2024
Merged

fix: fix metadata for Polish TL #371

merged 1 commit into from
Sep 23, 2024

Conversation

Leleat
Copy link
Owner

@Leleat Leleat commented Sep 18, 2024

Fixes #370

@Leleat
Copy link
Owner Author

Leleat commented Sep 23, 2024

In the issue I wrote:

Weird, I do have a CI workflow that runs the build script and it did get the error of

translations/pl.po: warning: Charset "CHARSET" is not a portable encoding name.
                             Message conversion to user's charset might not work.
translations/pl.po:8: warning: header field 'Project-Id-Version' still has the initial default value
translations/pl.po:8: warning: header field 'Content-Type' still has the initial default value

Alright, there was no actual error in the CI. These were only warnings, which you'd also get when running the build script locally. But there was an actual error when runng the script locally:

msgfmt: present charset "CHARSET" is not a portable encoding name

The cause for the CI passing with the build script while local builds may fail, is that the CI uses an older version of gettext/msgfmt (0.21). Current Fedora for instance ships with 0.22.5. gettext 0.22 added the following feature, which triggers the error when using an invalid charset. See https://savannah.gnu.org/news/?id=10378.

On systems with musl libc, the *gettext() functions in libc now work with MO files generated from PO files with an encoding other than UTF-8. To this effect, the msgfmt program now converts the messages to UTF-8 encoding before storing them in a MO file. You can prevent this byusing the msgfmt --no-convert option

So I don't know how I could workaround this in the CI... guess I just need to be more careful when reviewing new translations and wait for a newer gettext in the runner...

@Leleat Leleat merged commit 458740b into main Sep 23, 2024
3 checks passed
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.

Invalid metadata in Polish translation
1 participant