Skip to content

Add a github workflow for updating language data#1439

Merged
jasonleenaylor merged 1 commit intomasterfrom
add-update-langtags-action
Jul 10, 2025
Merged

Add a github workflow for updating language data#1439
jasonleenaylor merged 1 commit intomasterfrom
add-update-langtags-action

Conversation

@jasonleenaylor
Copy link
Contributor

@jasonleenaylor jasonleenaylor commented Jun 17, 2025

  • Also update the Readme

This change is Reviewable

@jasonleenaylor jasonleenaylor force-pushed the add-update-langtags-action branch 6 times, most recently from 6e826fd to 2bc85b8 Compare June 17, 2025 19:12
@github-actions
Copy link

github-actions bot commented Jun 17, 2025

Palaso Tests

     4 files  ±0       4 suites  ±0   9m 33s ⏱️ -4s
 4 978 tests ±0   4 744 ✅ ±0  234 💤 ±0  0 ❌ ±0 
16 186 runs  ±0  15 484 ✅ ±0  702 💤 ±0  0 ❌ ±0 

Results for commit f893a6f. ± Comparison against base commit 8cefa89.

♻️ This comment has been updated with latest results.

@jasonleenaylor jasonleenaylor force-pushed the add-update-langtags-action branch 13 times, most recently from 65d445d to 21b7b39 Compare June 18, 2025 18:47
@jasonleenaylor jasonleenaylor marked this pull request as ready for review June 18, 2025 18:48
@jasonleenaylor
Copy link
Contributor Author

jasonleenaylor commented Jun 18, 2025

A sample of the resulting PR from executing this action can be viewed here: #1444

Copy link
Contributor

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

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?

@jasonleenaylor jasonleenaylor force-pushed the add-update-langtags-action branch 3 times, most recently from 17dae22 to 7844ad3 Compare June 18, 2025 22:08
Copy link
Contributor

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

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".

@jasonleenaylor jasonleenaylor force-pushed the add-update-langtags-action branch from aded1ec to a456bed Compare June 20, 2025 19:36
@jasonleenaylor jasonleenaylor force-pushed the add-update-langtags-action branch from a456bed to 9114006 Compare June 20, 2025 19:54
@jasonleenaylor jasonleenaylor force-pushed the add-update-langtags-action branch 3 times, most recently from f109784 to 272bf5c Compare June 26, 2025 16:19
@jasonleenaylor jasonleenaylor force-pushed the add-update-langtags-action branch from 272bf5c to f893a6f Compare June 26, 2025 17:55
Copy link
Contributor

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

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)

Copy link
Contributor Author

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

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.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).

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.

Copy link
Contributor

@tombogle tombogle left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 3 files at r8, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

Copy link
Contributor

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jasonleenaylor)

@jasonleenaylor jasonleenaylor merged commit 74fdfc1 into master Jul 10, 2025
12 checks passed
@jasonleenaylor jasonleenaylor deleted the add-update-langtags-action branch July 10, 2025 14:55
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.

3 participants