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

Check for bilingual README and LICENSE; generate PR if necessary #125

Open
anthonyfok opened this issue Jul 23, 2021 · 8 comments · May be fixed by #138
Open

Check for bilingual README and LICENSE; generate PR if necessary #125

anthonyfok opened this issue Jul 23, 2021 · 8 comments · May be fixed by #138
Assignees
Labels

Comments

@anthonyfok
Copy link
Member

anthonyfok commented Jul 23, 2021

Use GitHub actions for checking the existence of README.md and LICENSE in all OpenDRR repos, and otherwise create a PR with French translation too, e.g. via API calls to DeepL.com.

Special thanks to Joost (@jvanulde) for the idea!

See the test at

Naming conventions:

  • README.md and LISEZMOI.md
  • LICENSE for single-language license like the MIT
  • LICENCE-en.txt and LICENCE-fr.txt for bilingual licence such as "Open Government Licence - Canada -- Licence du gouvernement ouvert – Canada" (GitHub does recognize both BrE and AmE spellings)

Suggested starting points:

@jvanulde
Copy link
Contributor

@anthonyfok @DamonU2 I am prototyping the bilingual README files in the national-human-settlement repo. Feedback welcomed.

@DamonU2
Copy link

DamonU2 commented Sep 14, 2021

I like it. I think that's a very clear way to implement it, and it should keep things simple for imports.

@anthonyfok
Copy link
Member Author

I'd like to echo what @DamonU2 said about the bilingual README files in the OpenDRR/national-human-settlement, i.e. the naming of README.md and LISEZMOI.md, which is very clear and very fair to both languages.

For MIT License, since there is no official French translation, leaving it as a single file named LICENSE is ideal.

Regarding bilingual licence files such as the "Open Government Licence - Licence du gouvernement ouvert – Canada
Canada", I experimented over at OpenDRR/pathways-paper and settled on the names LICENCE-en.txt and LICENCE-fr.txt for the time being, and fortunately, GitHub does recognize these as licence files with the Canadian-British spelling and the ISO 639-1 two-letter language code as suffix and all. (What did not work were LICENCE.en.txt and LICENCE.fr.txt with the period instead of hyphen.)

As for LICENCE-en.txt vs LICENSE-en.txt, the latter seems more common due to the prevalence of American English, though the former is more Canadian and is used in the Open Government Licence name itself, though I suspect lots of Canadians often use American spelling too. I personally am fine with either spelling. Feedback welcomed too! :-)

@jvanulde
Copy link
Contributor

So how can we enforce this? A template repo perhaps but ideally we would be able to run a script to at least report on which repos don't have a README in both official languages.

@DamonU2
Copy link

DamonU2 commented Jan 26, 2022

We can get a list of all of the repos from the github api. I'm not sure what the best way to check for a readme would be. We could do this in a github action, checkout each repo, and check for the files, but there is probably a better way. Maybe try to access the file and use error handling?

@jvanulde
Copy link
Contributor

We can get a list of all of the repos from the github api. I'm not sure what the best way to check for a readme would be. We could do this in a github action, checkout each repo, and check for the files, but there is probably a better way. Maybe try to access the file and use error handling?

Not a bad idea. I guess we could loop through the repos and check for a LISEZMOI.md file, if not create an issue...

@DamonU2
Copy link

DamonU2 commented Feb 4, 2022

So far the action is checking for README.md and LISEZMOI.md, I had to remove the LICENSE check, as it was exceeding the max API calls allowed. Results are here: https://github.com/DamonU2/DamonU2.github.io/runs/5058092220?check_suite_focus=true
English response followed by French. It is only working for public repos, I think I could check the private ones with a PAT, but it doesn't seem worth it.
Do we want to just open an issue for missing files, or work on translating if there is a README.md?

@jvanulde
Copy link
Contributor

jvanulde commented Feb 4, 2022

Open an issue would be ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants