Add a github workflow for updating language data#1439
Conversation
6e826fd to
2bc85b8
Compare
65d445d to
21b7b39
Compare
|
A sample of the resulting PR from executing this action can be viewed here: #1444 |
imnasnainaec
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 4 unresolved discussions (waiting on @jasonleenaylor)
.github/workflows/update-language-data.yml line 32 at r3 (raw file):
update-langtags: runs-on: windows-latest
Many of the empty lines in this file are space-indented.
.github/workflows/update-language-data.yml line 74 at r3 (raw file):
# Validate JSON format if ! jq empty "langtags.json.new" 2>/dev/null; then
Validating the wrong file here.
.github/workflows/update-language-data.yml line 152 at r3 (raw file):
**Files Updated:** - langtags.json: ${{ github.event.inputs.update_langtags == 'true' && format('✅ Updated from {0}', steps.langtags.outputs.url) || '⏭️ Skipped' }} - ianaSubtagRegistry.txt: ${{ github.event.inputs.update_iana == 'true' && '✅ Updated from https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry' || '⏭️ Skipped' }}
Can you use the IANA_URL env variable here?
17dae22 to
7844ad3
Compare
imnasnainaec
left a comment
There was a problem hiding this comment.
Reviewed all commit messages.
Reviewable status: 0 of 2 files reviewed, 7 unresolved discussions (waiting on @jasonleenaylor)
.github/workflows/update-language-data.yml line 74 at r3 (raw file):
Previously, imnasnainaec (D. Ror.) wrote…
Validating the wrong file here.
Oh, ianaSubtagRegistry.txt.new isn't even a JSON file, so this step doesn't need the JSON validation (and the final echo of this step will need updating).
.github/workflows/update-language-data.yml line 9 at r4 (raw file):
inputs: use_staging: description: 'Use SLDR staging data for testing'
Mix of single quotes and double quotes in the file.
.github/workflows/update-language-data.yml line 84 at r4 (raw file):
shell: bash run: | if ! cmp -s "SIL.WritingSystems/Resources/langtags.json" "langtags.json.new"; then
It seems "SIL.WritingSystems/Resources/", "langtags.json", and "ianaSubtagRegistry.txt" could also be added to env, with how often they show up.
SIL.WritingSystems/Readme.md line 7 at r4 (raw file):
## SIL Locale Data Repository Much of the writing system data that this library provides comes from the [SIL Locale Data repository (SLDR)](https://github.com/silnrsi/sldr?tab=readme-ov-file#sil-locale-data-repository-sldr)
repository -> Repository
Missing period at end of this sentence.
SIL.WritingSystems/Readme.md line 22 at r4 (raw file):
This library is used as the final fallback in case of problems with the data served from https://ldml.api.sil.org/langtags.json To manually update langtags.json to the latest follow the following steps:
Comma between "latest" and "follow".
aded1ec to
a456bed
Compare
a456bed to
9114006
Compare
f109784 to
272bf5c
Compare
* Also update the Readme
272bf5c to
f893a6f
Compare
imnasnainaec
left a comment
There was a problem hiding this comment.
Reviewed 1 of 2 files at r7, 2 of 3 files at r8, all commit messages.
Reviewable status: 2 of 3 files reviewed, 6 unresolved discussions (waiting on @jasonleenaylor)
jasonleenaylor
left a comment
There was a problem hiding this comment.
Reviewable status: 2 of 3 files reviewed, all discussions resolved (waiting on @imnasnainaec)
.github/workflows/update-language-data.yml line 74 at r3 (raw file):
Previously, imnasnainaec (D. Ror.) wrote…
Oh,
ianaSubtagRegistry.txt.newisn't even a JSON file, so this step doesn't need the JSON validation (and the final echo of this step will need updating).
Done.
.github/workflows/update-language-data.yml line 84 at r4 (raw file):
Previously, imnasnainaec (D. Ror.) wrote…
It seems "SIL.WritingSystems/Resources/", "langtags.json", and "ianaSubtagRegistry.txt" could also be added to env, with how often they show up.
We can leave that for a future enhancement I think.
tombogle
left a comment
There was a problem hiding this comment.
Reviewed 1 of 3 files at r8, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)
imnasnainaec
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @jasonleenaylor)
This change is