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

Format all PO files with dprint #1359

Merged
merged 1 commit into from
Oct 14, 2023
Merged

Format all PO files with dprint #1359

merged 1 commit into from
Oct 14, 2023

Conversation

mgeisler
Copy link
Collaborator

This enforces a consistent formatting for the PO files. The goal of this is to avoid large diffs due to random and unnecessary reformatting.

We use the format of msgcat: this is also waht msgmerge produces and it’s easy to replicate for people by installing Gettext and running dprint fmt.

This is a follow-up to #1351 which started enforcing that the msgid fields don’t change due to reformatting in a PR.

If this turns out to be cumbersome, then we can disable it again.

dprint.json Show resolved Hide resolved
@mgeisler
Copy link
Collaborator Author

Note that this will require translators to install the Gettext tools and dprint so they can run dprint fmt before sending out a file for review. I've tried to avoid this until now since I wanted to make it as easy as possible to contribute to a translation. But when the Poeditors don't format things consistently, we end up with a mess.

@henrif75
Copy link
Collaborator

Note that this will require translators to install the Gettext tools and dprint so they can run dprint fmt before sending out a file for review. I've tried to avoid this until now since I wanted to make it as easy as possible to contribute to a translation. But when the Poeditors don't format things consistently, we end up with a mess.

We'll probably need to update the instructions in TRANSLATE.md, right?

@mgeisler
Copy link
Collaborator Author

We'll probably need to update the instructions in TRANSLATE.md, right?

Yes! Thanks, that's a great point!

@mgeisler
Copy link
Collaborator Author

@henrif75 what do you think of the update to TRANSLATIONS?

@henrif75
Copy link
Collaborator

@henrif75 what do you think of the update to TRANSLATIONS?

They're great, thanks!

This enforces a consistent formatting for the PO files. The goal of
this is to avoid large diffs due to random and unnecessary
reformatting.

We use the format of `msgcat`: this is also waht `msgmerge` produces
and it’s easy to replicate for people by installing Gettext and
running `dprint fmt`.

The existing files were updated to match: 15 out of 18 translations
already followed the new format! I incremented the POT-Creation-Date
fields by one day: the precise date does not matter much since the
translations in question are incomplete and not yet published.

This is a follow-up to #1351 which started enforcing that the `msgid`
fields don’t change due to reformatting in a PR.

If this turns out to be cumbersome, then we can disable it again.
@mgeisler mgeisler merged commit 4560ee8 into main Oct 14, 2023
34 checks passed
@mgeisler mgeisler deleted the dprint-po branch October 14, 2023 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants