Skip to content

Commit

Permalink
Merge pull request #1498 from Jacob953/dev-zh
Browse files Browse the repository at this point in the history
[zh] Update dev-zh with main
  • Loading branch information
seokho-son authored Nov 29, 2022
2 parents bc7a41f + 7a1b9cd commit 1003a9e
Show file tree
Hide file tree
Showing 164 changed files with 1,948 additions and 205 deletions.
26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/new-term-lang.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/new-term.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ body:
required: true
- label: There is no existing issue yet. [(shift+click to check existing issues)](https://github.com/cncf/glossary/issues?q=label%3A%22new+term%22)
required: true
- label: The term has not already been declined in the past. [(shift+click to check)](https://github.com/cncf/glossary/issues?q=is%3Aissue+is%3Aclosed+label%3A%22triage%2Fnot+accepted%22)
required: false
- label: The term does not already exist in the [glossary](https://glossary.cncf.io).
required: true
- label: I understand that maintainers will assess if the term should be part of the Glossary. (Please be patient)
required: true
- label: I want to work on this term. (If not checked, maintainers will assign another volunteer)
Expand Down
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### Describe your changes


### Related issue number or link (ex: `resolves #issue-number`)


### Checklist before opening this PR (put `x` in the checkboxes)
- [ ] This PR does not contain plagiarism
- don’t copy other people’s work unless you are quoting and contributing it to them.
- [ ] I have signed off on all commits
- [signing off](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) (ex: `git commit -s`) is to affirm that commits comply [DCO](https://wiki.linuxfoundation.org/dco). If you are working locally, you could add an alias to your `gitconfig` by running `git config --global alias.ci "commit -s"`.

48 changes: 42 additions & 6 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository:
name: glossary

# A short description of the repository that will show up on GitHub
description: Cloud Native Glossary
description: The CNCF Cloud Native Glossary Project aims to define cloud native concepts in clear and simple language, making them accessible to anyone — whether they have a technical background or not (https://glossary.cncf.io).

# A URL with more information about the repository
homepage: https://glossary.cncf.io/
Expand Down Expand Up @@ -43,7 +43,7 @@ collaborators:
# Localization approvers
# l10n ko approvers
# Note: seokho-son is both Maintainer (maintain) and Korean approver (push)
# Note: jihoon-seo is both English approver (push) and Korean approver (push)
# Note: jihoon-seo is both Maintainer (maintain) and Korean approver (push)
- username: Eviekim
permission: push

Expand All @@ -60,6 +60,9 @@ collaborators:
- username: jessicalins
permission: push

- username: MrErlison
permission: push

# l10n hi approvers
- username: Garima-Negi
permission: push
Expand All @@ -75,15 +78,18 @@ collaborators:

# l10n de approvers
# Note: CathPag is both Maintainer (maintain) and de approver (push)
# Note: iamNoah1 is both English approver (push) and de approver (push)
# Note: iamNoah1 is both Maintainer (maintain) and de approver (push)
- username: DaveVentura
permission: push

- username: bcubk
permission: push

# l10n it approvers
- username: fsbaraglia
permission: push

- username: meryem-ldn
- username: ugho16
permission: push

- username: annalisag-spark
Expand Down Expand Up @@ -118,7 +124,6 @@ collaborators:
- username: Imtiaz1234
permission: push


# l10n es approvers
- username: raelga
permission: push
Expand All @@ -129,6 +134,9 @@ collaborators:
- username: krol3
permission: push

- username: 92nqb
permission: push

# l10n zh approvers
- username: hanyuancheung
permission: push
Expand All @@ -152,6 +160,14 @@ collaborators:
- username: Krast76
permission: push

# l10n ur approvers
- username: Saim-Safdar
permission: push

- username: waleed318
permission: push


branches:

# Default branch of this repository for configurations and English contents
Expand Down Expand Up @@ -208,6 +224,7 @@ branches:
- edsoncelio
- brunoguidone
- jessicalins
- MrErlison
teams: []
enforce_admins: null
required_linear_history: null
Expand Down Expand Up @@ -244,6 +261,7 @@ branches:
users:
- iamNoah1
- DaveVentura
- bcubk
teams: []
enforce_admins: null
required_linear_history: null
Expand All @@ -260,7 +278,7 @@ branches:
# it approvers
users:
- fsbaraglia
- meryem-ldn
- ugho16
- annalisag-spark
- sistella
teams: []
Expand Down Expand Up @@ -319,6 +337,7 @@ branches:
- raelga
- electrocucaracha
- krol3
- 92nqb
teams: []
enforce_admins: null
required_linear_history: null
Expand Down Expand Up @@ -359,3 +378,20 @@ branches:
teams: []
enforce_admins: null
required_linear_history: null

# l10n branch for ur contents only
- name: dev-ur
protection:
required_pull_request_reviews:
required_approving_review_count: 2
require_code_owner_reviews: true
required_status_checks: null
restrictions:
apps: []
# ur approvers
users:
- Saim-Safdar
- waleed318
teams: []
enforce_admins: null
required_linear_history: null
131 changes: 131 additions & 0 deletions .github/workflows/check-outdated-terms.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# This workflow will check if localized terms are outdated or not
# by comparing English terms in the old branch and the latest branch.
name: Check outdated terms
on:
pull_request:
paths:
- 'content/en/**.md'
branches:
- 'dev-ko' # add other branches or use wildcard 'dev-**'

jobs:
check-outdated-terms:
name: Check outdated terms

# Condition to run this workflow on the upstream repository
#if: github.repository == 'cncf/glossary'

runs-on: ubuntu-latest
# permissions:
# issues: write

# NOTE - In this workflow, "github.base_ref" refers to the old upstream/dev-xx.
# NOTE - In this workflow, "github.head_ref" refers to the latest forked/dev-xx or the latest upstream/main.
steps:
- name: Set up environment variables for the target L10n team
shell: bash
run: |
# Set L10n branch
L10N_BRANCH="${{github.base_ref}}"
echo "(DEBUG) L10N Branch: ${L10N_BRANCH}"
# Set L10n directory and code
case "${L10N_BRANCH}" in
dev-ko)
L10N_DIR="./content/ko/"
L10N_CODE="ko"
;;
#dev-pt)
#L10N_DIR="./content/pt-br/"
#L10N_CODE="pt"
#;;
esac
echo "(DEBUG) L10N Directory: ${L10N_DIR}"
echo "(DEBUG) L10N Code: ${L10N_CODE}"
# Set L10N_DIR and L10N_CODE as environment variables
# Ref: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
echo "L10N_DIR=${L10N_DIR}" >> $GITHUB_ENV
echo "L10N_CODE=${L10N_CODE}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch all history for all tags and branches

- name: Check outdated
id: checker
shell: bash
run: |
##### DEBUG section, this will be removed later ###########
ls -al
git status
git branch
# Default environment variables
echo "GITHUB_REF: $GITHUB_REF"
echo "Extract branch: ${GITHUB_REF#refs/}"
# `github` context information
echo "(DEBUG) github.ref: ${{github.ref}}"
echo "(DEBUG) github.head_ref: ${{github.head_ref}}"
echo "(DEBUG) github.base_ref: ${{github.base_ref}}"
echo "(DEBUG) L10N_DIR: ${L10N_DIR}"
echo "(DEBUG) L10N_DIR: ${{ env.L10N_DIR }}"
#####################################################
# Get the lastest branch name from 'GITHUB_REF'
# The latest branch can be 'upstream/main' or 'forked/dev-ko' (rebased)
LATEST_BRANCH=${GITHUB_REF#refs/}
echo "(DUBUG) LATEST_BRANCH: ${LATEST_BRANCH}"
# Get the old branch from 'github.base_ref'
# The old branch can be 'upstream/dev-ko'
OLD_BRANCH="origin/${{github.base_ref}}"
echo "(DUBUG) OLD_BRANCH: ${OLD_BRANCH}"
# Make an output directory
mkdir outdated
# Check outdated only if there is a localized term
# Loop files in a localization directory, which is ${L10N_DIR} (e.g., ./content/ko/)
echo "(DEBUG) Check outdated"
for FILE_PATH in $(find ${L10N_DIR} -name '*.md'); do
# ${MYVAR#pattern}: delete shortest match of pattern from the beginning
FILE_NAME="${FILE_PATH#${L10N_DIR}}"
echo "(DEBUG) FILE_NAME: ${FILE_NAME}"
echo "(DEBUG) Localized file path: $FILE_PATH"
echo "(DEBUG) Original file path: ./content/en/${FILE_NAME}"
# Actually compare between the old and lastest English terms and log diff in the file
if [[ -f "./content/en/${FILE_NAME}" ]]; then
# File exists
git diff ${OLD_BRANCH}..${LATEST_BRANCH} -- ./content/en/${FILE_NAME} > ./outdated/${FILE_NAME}
else
# File dose not exist (e.g, changed, renamed or removed)
echo "Could not find ${FILE_NAME} in content/en/" > ./outdated/${FILE_NAME}
echo "Need to check if it has been changed, renamed or removed" >> ./outdated/${FILE_NAME}
fi
done
echo "(DEBUG) The outdated files"
ls -al ./outdated
- name: Upload output
uses: actions/upload-artifact@v3
with:
name: ${{ env.L10N_CODE }}-outdated-checking-result
path: ./outdated/

# - name: Create an issue from file
# uses: peter-evans/create-issue-from-file@v4
# with:
# title: An example issue
# content-filepath: ${{ steps.checker.outputs.output_path }}
# labels: |
# outdated
# lang/ko
2 changes: 1 addition & 1 deletion .github/workflows/es-spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: GitHub Spellcheck Action
uses: rojopolis/spellcheck-github-actions@0.25.0
uses: rojopolis/spellcheck-github-actions@0.28.0
with:
config_path: content/es/.spellcheck.yml
13 changes: 8 additions & 5 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: "Pull Request Labeler"
on:
pull_request:
types: [opened, synchronize]
pull_request_target:
types: [opened]
paths:
- 'content/**'
- 'content/**.md'
branches:
- '**'
- 'dev-ko'

jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Loading

0 comments on commit 1003a9e

Please sign in to comment.