Skip to content

Implementation of Kazakh translation #33

Implementation of Kazakh translation

Implementation of Kazakh translation #33

Workflow file for this run

name: Check README Suffixes
on:
pull_request:
paths:
- 'README-*'
jobs:
check-readme-suffixes:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- name: Install dependencies
run: |
gem install nokogiri
- name: Check README suffixes
run: |
# Scrape ISO 639 language codes from the Wiki page
wget -qO- https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes | \
nokogiri -e 'puts $_.css(".wikitable td:nth-child(2)").map(&:text)' | \
sed -nr '/^.{0,2}$/p' | tr '[:lower:]' '[:upper:]' > iso639.txt # Grab only two letter values
# Debug statement
echo "Show the information of iso639.txt:"
cat iso639.txt
# Get list of README file names
readme_suffixes=$(ls README-* | sed 's/README-//g; s/.md//g')
# Debug statement
echo "List of README suffixes:"
echo "$readme_suffixes"
# Check if README suffixes are valid ISO 639 language codes
for suffix in $readme_suffixes; do
if ! grep -qw "$suffix" iso639.txt; then
echo "Error: Invalid README suffix found: $suffix"
exit 1
fi
done
echo "All README suffixes are valid ISO 639 language codes."
# Add more steps for your existing workflow, e.g., running tests or other checks