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

use po4a to make all docs translatable on Weblate and others #61

Merged
merged 1 commit into from Oct 16, 2020

Conversation

eighthave
Copy link
Contributor

This uses po4a to convert Markdown documents into gettext .po files, while adding key metadata and hiding bits that the translators don't need to see.

For the deep dive, see:
https://guardianproject.info/2020/04/23/figuring-out-crowdsourced-translation-of-websites/

fsfe/reuse-website#26

@wetneb
Copy link

wetneb commented Apr 28, 2020

How do you plan to keep the .pot files in sync with the source markdown? As far as I can tell:

  • Either you require people who contribute to this repository to run po4a every time they change things (probably not ideal);
  • Or you set up some sort of GitHub action which updates the .pot and commits it to the repository every time the source changes (better);
  • Or Weblate itself could re-generate these .pot files by running po4a itself (day dreaming).

@eighthave
Copy link
Contributor Author

eighthave commented Apr 28, 2020 via email

@carmenbianca
Copy link
Member

Silly question maybe: Is the presence of en.po necessary? The way I see it, no actual translations happen inside of that file.

I occasionally translate for GNOME, which only has translations for en_GB. The en translations just default to the American English used in the source code.

(Of course, the awkward thing about REUSE is that it uses chiefly British English, but uses the American 'license'. But that's an unrelated detail.)

@eighthave
Copy link
Contributor Author

Good point: I switched the initial translation language to Spanish (es).

@eighthave
Copy link
Contributor Author

What do you need me to do to get this merged? should I implement the GitHub Actions idea?

Copy link
Member

@mxmehl mxmehl left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, it's a great tool!

Some questions regarding specialities of the REUSE website.

po/po4a.conf Outdated Show resolved Hide resolved
po/reuse-docs.pot Outdated Show resolved Hide resolved
po/reuse-docs.pot Show resolved Hide resolved
po/reuse-docs.pot Show resolved Hide resolved
po/reuse-docs.pot Show resolved Hide resolved
po/po4a.conf Show resolved Hide resolved
po/reuse-docs.pot Show resolved Hide resolved
@mxmehl
Copy link
Member

mxmehl commented Jul 24, 2020

Thanks for the clarifications!

I just ran po4a po/po4a.conf and it creates different .pot files.

For instance, -#, markdown-text is removed many times, and in your version there are still mentions of the Changelog and README file. I could generate this after merging your PR, just want to be on the safe side since my knowledge about PO/PO4A is very limited (yet).

@eighthave
Copy link
Contributor Author

eighthave commented Jul 24, 2020 via email

@mxmehl
Copy link
Member

mxmehl commented Jul 24, 2020

Oh thanks, I thought that with Arch I was quite on the edge – this isn't the case here.

May I still ask you to re-run po4a on your side to throw our README and CHANGELOG? But perhaps it would make more sense to do the github-actions thing in the long run.

This uses po4a to convert Markdown documents into gettext .po files, while
adding key metadata and hiding bits that the translators don't need to see.

For the deep dive, see:
https://guardianproject.info/2020/04/23/figuring-out-crowdsourced-translation-of-websites/

fsfe/reuse-website#26
@eighthave
Copy link
Contributor Author

done!

eighthave added a commit to eighthave/reuse-website that referenced this pull request Aug 19, 2020
@eighthave
Copy link
Contributor Author

This was approved and I fixed the issue @mxmehl pointed out. How about merging? Then this can be added to https://hosted.weblate.org/projects/fsfe/

@mxmehl
Copy link
Member

mxmehl commented Oct 16, 2020

Sure, looks good. Will merge and take care that the REUSE check looks a bit better :)

@mxmehl mxmehl merged commit 58530b6 into fsfe:master Oct 16, 2020
mxmehl pushed a commit to fsfe/reuse-website that referenced this pull request Oct 23, 2020
mxmehl pushed a commit to fsfe/reuse-website that referenced this pull request Oct 23, 2020
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.

None yet

4 participants