Open anthonyfok opened 2 years ago
@anthonyfok @DamonU2 I am prototyping the bilingual README files in the national-human-settlement repo. Feedback welcomed.
I like it. I think that's a very clear way to implement it, and it should keep things simple for imports.
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! :-)
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.
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?
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...
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?
Open an issue would be ideal.
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
andLISEZMOI.md
LICENSE
for single-language license like the MITLICENCE-en.txt
andLICENCE-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: