Skip to content

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
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

2 participants