Skip to content

Commit 1ef486e

Browse files
committed
Resolve merge conflict while merging main into dev-fr
Signed-off-by: Jihoon Seo <[email protected]>
2 parents 7ff9be4 + 8865db9 commit 1ef486e

File tree

252 files changed

+36700
-1350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

252 files changed

+36700
-1350
lines changed

.github/ISSUE_TEMPLATE/new-term.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ body:
3838
required: true
3939
- label: I understand that maintainers will assess if the term should be part of the Glossary. (Please be patient)
4040
required: true
41-
- label: I want to work on this term. (If not checked, maintainers will assign another volunteer)
41+
- label: I want to work on this term and confirm that I meet the criteria as outlined in "[who can contribute](https://glossary.cncf.io/contribute/#who-can-contribute)". (If not checked, maintainers will assign another volunteer)
4242
required: false
4343
- type: textarea
4444
id: note

.github/ISSUE_TEMPLATE/update-term.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ body:
2828
options:
2929
- label: I understand that maintainers will confirm if the term should be updated. (Please be patient)
3030
required: true
31-
- label: I want to work on this suggestion. (If not checked, maintainers will assign another volunteer)
31+
- label: I want to work on this suggestion and confirm that I meet the criteria as outlined in "[who can contribute](https://glossary.cncf.io/contribute/#who-can-contribute)".. (If not checked, maintainers will assign another volunteer)
3232
required: false
3333
- type: textarea
3434
id: note

.github/labeler.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,24 @@ lang/es:
1616
lang/fr:
1717
- content/fr/*
1818

19+
lang/hi:
20+
- content/hi/*
21+
1922
lang/it:
2023
- content/it/*
2124

22-
lang/hi:
23-
- content/hi/*
25+
lang/ja:
26+
- content/ja/*
2427

2528
lang/ko:
2629
- content/ko/*
2730

2831
lang/pt:
2932
- content/pt-br/*
3033

34+
lang/tw:
35+
- content/zh-tw/*
36+
3137
lang/zh:
3238
- content/zh-cn/*
3339

.github/settings.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ collaborators:
4444
- username: nate-double-u
4545
permission: admin
4646

47+
- username: castrojo
48+
permission: push
49+
4750
# Localization approvers
4851

4952
# l10n ko approvers
@@ -226,6 +229,7 @@ branches:
226229
- iamNoah1
227230
- jihoon-seo
228231
- nate-double-u
232+
- castrojo
229233
teams: []
230234
enforce_admins: null
231235
required_linear_history: null

.github/workflows/check-outdated-terms.yaml renamed to .github/workflows/check-outdated-content.yaml

Lines changed: 67 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
# This workflow will check if localized terms are outdated or not
2-
# by comparing English terms in the old branch and the latest branch.
3-
name: Check outdated terms
1+
# This workflow will check if a localized content is outdated or not
2+
# by comparing English content in the old branch and the latest branch.
3+
name: Check outdated content
44
on:
55
pull_request:
6-
paths:
7-
- 'content/en/**.md'
86
branches:
97
- 'dev-ko' # add other branches or use wildcard 'dev-**'
8+
paths:
9+
- 'content/en/**.md'
1010

1111
jobs:
12-
check-outdated-terms:
13-
name: Check outdated terms
12+
check-outdated-content:
13+
name: Check outdated content
14+
15+
# if: contains(fromJSON('["dev-ko", "dev-xx"]'), github.base_ref)
16+
# Ref: https://docs.github.com/en/actions/learn-github-actions/expressions
17+
18+
if: github.base_ref == 'dev-ko'
1419

1520
# Condition to run this workflow on the upstream repository
1621
#if: github.repository == 'cncf/glossary'
@@ -30,26 +35,30 @@ jobs:
3035
L10N_BRANCH="${{github.base_ref}}"
3136
echo "(DEBUG) L10N Branch: ${L10N_BRANCH}"
3237
38+
# Set output direcory
39+
OUTPUT_DIR="./outdated"
40+
3341
# Set L10n directory and code
3442
case "${L10N_BRANCH}" in
3543
dev-ko)
36-
L10N_DIR="./content/ko/"
44+
L10N_DIR="content/ko/"
3745
L10N_CODE="ko"
3846
;;
3947
4048
#dev-pt)
41-
#L10N_DIR="./content/pt-br/"
49+
#L10N_DIR="content/pt-br/"
4250
#L10N_CODE="pt"
4351
#;;
4452
esac
4553
4654
echo "(DEBUG) L10N Directory: ${L10N_DIR}"
4755
echo "(DEBUG) L10N Code: ${L10N_CODE}"
4856
49-
# Set L10N_DIR and L10N_CODE as environment variables
57+
# Set L10N_DIR, L10N_CODE, and OUTPUT_DIR as environment variables
5058
# Ref: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
5159
echo "L10N_DIR=${L10N_DIR}" >> $GITHUB_ENV
52-
echo "L10N_CODE=${L10N_CODE}" >> $GITHUB_ENV
60+
echo "L10N_CODE=${L10N_CODE}" >> $GITHUB_ENV
61+
echo "OUTPUT_DIR=${OUTPUT_DIR}" >> $GITHUB_ENV
5362
5463
- name: Checkout
5564
uses: actions/checkout@v3
@@ -86,40 +95,70 @@ jobs:
8695
# The old branch can be 'upstream/dev-ko'
8796
OLD_BRANCH="origin/${{github.base_ref}}"
8897
echo "(DUBUG) OLD_BRANCH: ${OLD_BRANCH}"
98+
99+
L10N_INFO_JSON=$(cat <<EOF
100+
{
101+
"L10N_DIR": "${L10N_DIR}",
102+
"L10N_CODE": "${L10N_CODE}"
103+
}
104+
EOF
105+
)
89106
90107
# Make an output directory
91-
mkdir outdated
108+
if [[ ! -e $OUTPUT_DIR ]]; then
109+
mkdir $OUTPUT_DIR
110+
echo "${L10N_INFO_JSON}" > ${OUTPUT_DIR}/L10N_INFO.json
111+
elif [[ ! -d $OUTPUT_DIR ]]; then
112+
echo "$OUTPUT_DIR already exists but is not a directory" 1>&2
113+
fi
92114
93-
# Check outdated only if there is a localized term
94-
# Loop files in a localization directory, which is ${L10N_DIR} (e.g., ./content/ko/)
115+
# Check outdated only if a localized content exists
116+
# Loop files in a localization directory, which is ${L10N_DIR} (e.g., content/ko/)
95117
echo "(DEBUG) Check outdated"
96-
for FILE_PATH in $(find ${L10N_DIR} -name '*.md'); do
97-
# ${MYVAR#pattern}: delete shortest match of pattern from the beginning
98-
FILE_NAME="${FILE_PATH#${L10N_DIR}}"
118+
for L10N_FILE_PATH in $(find ${L10N_DIR} -name '*.md'); do
119+
echo "(DEBUG) L10N_FILE_PATH: ${L10N_FILE_PATH}"
120+
121+
# Note - extracting a pattern-based substring (https://stackoverflow.com/a/19482947)
122+
FILE_PATH="${L10N_FILE_PATH#${L10N_DIR}}"
123+
FILE_DIR=$(dirname ${FILE_PATH})
124+
FILE_NAME=$(basename ${FILE_PATH})
125+
126+
echo "(DEBUG) FILE_PATH: ${FILE_PATH}"
127+
echo "(DEBUG) FILE_DIR: ${FILE_DIR}"
99128
echo "(DEBUG) FILE_NAME: ${FILE_NAME}"
100-
echo "(DEBUG) Localized file path: $FILE_PATH"
101-
echo "(DEBUG) Original file path: ./content/en/${FILE_NAME}"
129+
echo "(DEBUG) Localized file path: $L10N_FILE_PATH"
130+
echo "(DEBUG) Original file path: ./content/en/${FILE_PATH}"
131+
132+
# Create subdirectories
133+
mkdir -p ${OUTPUT_DIR}/${FILE_DIR}
102134
103-
# Actually compare between the old and lastest English terms and log diff in the file
104-
if [[ -f "./content/en/${FILE_NAME}" ]]; then
135+
# Actually compare between the old and lastest English content and log diff in the file
136+
if [[ -f "./content/en/${FILE_PATH}" ]]; then
105137
# File exists
106-
git diff ${OLD_BRANCH}..${LATEST_BRANCH} -- ./content/en/${FILE_NAME} > ./outdated/${FILE_NAME}
138+
# Check changes
139+
git diff ${OLD_BRANCH}..${LATEST_BRANCH} -- ./content/en/${FILE_PATH} > temp.diff
140+
141+
if [[ -s "temp.diff" ]]; then
142+
echo "(DEBUG) ${FILE_PATH} is outdated."
143+
mv temp.diff ${OUTPUT_DIR}/${FILE_PATH}
144+
fi
145+
107146
else
147+
echo "(DEBUG) ${FILE_PATH} dose not exist."
108148
# File dose not exist (e.g, changed, renamed or removed)
109-
echo "Could not find ${FILE_NAME} in content/en/" > ./outdated/${FILE_NAME}
110-
echo "Need to check if it has been changed, renamed or removed" >> ./outdated/${FILE_NAME}
149+
echo "Could not find ${FILE_PATH} in content/en/" > ${OUTPUT_DIR}/${FILE_PATH}
150+
echo "Need to check if it has been changed, renamed or removed" >> ${OUTPUT_DIR}/${FILE_PATH}
111151
fi
112-
113152
done
114153
115154
echo "(DEBUG) The outdated files"
116-
ls -al ./outdated
155+
ls -al ${OUTPUT_DIR}
117156
118157
- name: Upload output
119158
uses: actions/upload-artifact@v3
120159
with:
121160
name: ${{ env.L10N_CODE }}-outdated-checking-result
122-
path: ./outdated/
161+
path: ${{ env.OUTPUT_DIR }}/
123162

124163
# - name: Create an issue from file
125164
# uses: peter-evans/create-issue-from-file@v4
@@ -128,4 +167,4 @@ jobs:
128167
# content-filepath: ${{ steps.checker.outputs.output_path }}
129168
# labels: |
130169
# outdated
131-
# lang/ko
170+
# lang/ko

.github/workflows/es-spellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ jobs:
2929
set -o errexit
3030
diff content/es/.wordlist.txt <(LC_ALL= sort -f content/es/.wordlist.txt)
3131
- name: GitHub Spellcheck Action
32-
uses: rojopolis/spellcheck-github-actions@0.29.0
32+
uses: rojopolis/spellcheck-github-actions@0.33.1
3333
with:
3434
config_path: content/es/.spellcheck.yml

.github/workflows/post-outdated-terms-report.yaml renamed to .github/workflows/post-outdated-content-report.yaml

Lines changed: 50 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# This workflow will post outdated terms report
1+
# This workflow will post a report of outdated content
22
# by using data from previous workflows.
3-
name: Post outdated terms report
3+
name: Post outdated content report
44

55
on:
66
workflow_run:
7-
workflows: ["Check outdated terms"]
7+
workflows: ["Check outdated content"]
88
types:
99
- completed
1010

1111
jobs:
1212
post-outdated-report:
13-
name: Post outdated terms report
13+
name: Post outdated content report
1414

1515
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1616

@@ -53,37 +53,42 @@ jobs:
5353
uses: dawidd6/action-download-artifact@v2
5454
with:
5555
github_token: ${{secrets.GITHUB_TOKEN}}
56-
workflow: check-outdated-terms.yaml
56+
workflow: check-outdated-content.yaml
5757
workflow_conclusion: success
5858

5959
- name: Set up environment variables from the output
6060
shell: bash
6161
run: |
62+
echo "(DEBUG) Install 'jq' to read json"
63+
sudo apt-get install -y jq
64+
6265
echo "(DEBUG) Display files and directories"
6366
tree
6467
6568
# Set the last changed directory as the output directory
6669
OUTPUT_DIR=$(ls -tp | head -1)
6770
68-
# Extract L10N code from the directory name
69-
# ${MYVAR%%-*}: retain the part before the first '-'
70-
L10N_CODE=${OUTPUT_DIR%%-*}
71+
# Read L10N_DIR and L10N_CODE from L10N_INFO.json
72+
L10N_DIR=$(jq -r '.L10N_DIR' < ${OUTPUT_DIR}/L10N_INFO.json)
73+
L10N_CODE=$(jq -r '.L10N_CODE' < ${OUTPUT_DIR}/L10N_INFO.json)
7174
72-
# Count outdated terms
73-
OUTDATED_TERMS_COUNT=$(ls $OUTPUT_DIR | wc -l)
75+
# Count outdated content
76+
OUTDATED_CONTENT_COUNT=$(ls $OUTPUT_DIR | wc -l)
7477
7578
echo "(DEBUG) OUTPUT_DIR: ${OUTPUT_DIR}"
79+
echo "(DEBUG) L10N_DIR: ${L10N_DIR}"
7680
echo "(DEBUG) L10N_CODE: ${L10N_CODE}"
77-
echo "(DEBUG) OUTDATED_TERMS_COUNT: ${OUTDATED_TERMS_COUNT}"
81+
echo "(DEBUG) OUTDATED_CONTENT_COUNT: ${OUTDATED_CONTENT_COUNT}"
7882
79-
# Set OUTPUT_DIR, L10N_CODE, and OUTDATED_TERMS_COUNT as environment variables
83+
# Set OUTPUT_DIR, L10N_DIR, L10N_CODE, and OUTDATED_CONTENT_COUNT as environment variables
8084
# Ref: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
8185
echo "OUTPUT_DIR=${OUTPUT_DIR}" >> $GITHUB_ENV
86+
echo "L10N_DIR=${L10N_DIR}" >> $GITHUB_ENV
8287
echo "L10N_CODE=${L10N_CODE}" >> $GITHUB_ENV
83-
echo "OUTDATED_TERMS_COUNT=${OUTDATED_TERMS_COUNT}" >> $GITHUB_ENV
88+
echo "OUTDATED_CONTENT_COUNT=${OUTDATED_CONTENT_COUNT}" >> $GITHUB_ENV
8489
8590
- name: Generate a report markdown
86-
if: ${{ env.OUTDATED_TERMS_COUNT > 0 }}
91+
if: ${{ env.OUTDATED_CONTENT_COUNT > 0 }}
8792
shell: bash
8893
run: |
8994
FILE_LIST=$(find ${OUTPUT_DIR} -name '*.md')
@@ -92,39 +97,57 @@ jobs:
9297
touch report.md
9398
9499
# Generate markdown
95-
echo "NOTICE - The following outdated terms must be resolved before the next L10n branch updates." >> report.md
100+
echo "This is an issue to track and reflect updates of English content. Please, check the files below as they may have been improved." >> report.md
101+
echo "" >> report.md
102+
echo "NOTICE - The following outdated content should be resolved before the next L10n branch updates." >> report.md
96103
echo "" >> report.md
97-
echo "### Outdated files" >> report.md
104+
echo "### Files to check" >> report.md
98105
99106
for FILE in ${FILE_LIST}; do
100107
FILE_NAME="${FILE#${OUTPUT_DIR}}"
101-
echo "- ${FILE_NAME}" >> report.md
108+
echo "- [ ] ${FILE_NAME}" >> report.md
102109
done
103110
104111
echo "" >> report.md
105112
106-
echo "### Details" >> report.md
113+
echo "### Changes in each file" >> report.md
107114
108115
for FILE in ${FILE_LIST}; do
109116
FILE_NAME="${FILE#${OUTPUT_DIR}}"
110117
111-
echo "Outdated file: ${FILE_NAME}" >> report.md
112-
echo "" >> report.md
113-
echo "\`\`\`diff" >> report.md
114-
cat ${FILE} >> report.md
115-
echo "\`\`\`" >> report.md
118+
echo "#### ${FILE_NAME}" >> report.md
119+
echo "- en: https://github.com/${{ github.repository }}/blob/main/content/en/${FILE_NAME}" >> report.md
120+
echo "- ${{ env.L10N_CODE }}: https://github.com/${{ github.repository }}/blob/dev-${{ env.L10N_CODE }}/${{ env.L10N_DIR }}${FILE_NAME}" >> report.md
116121
echo "" >> report.md
117-
122+
123+
# The collapsible section is applied to improve the readability of the report.
124+
# Apply collapsible section in case the number of lines is greater than 20.
125+
LINES=$(wc -l < ${FILE})
126+
if [[ "$LINES" -gt "20" ]]; then
127+
echo "<details>" >> report.md
128+
echo "<summary><b>Diff in detail</b></summary>" >> report.md
129+
echo "" >> report.md
130+
echo "\`\`\`diff" >> report.md
131+
cat ${FILE} >> report.md
132+
echo "\`\`\`" >> report.md
133+
echo "</details>" >> report.md
134+
echo "" >> report.md
135+
else
136+
echo "\`\`\`diff" >> report.md
137+
cat ${FILE} >> report.md
138+
echo "\`\`\`" >> report.md
139+
echo "" >> report.md
140+
fi
141+
118142
done
119143
120-
echo "The end of report" >> report.md
144+
echo "The end of report" >> report.md
121145
122146
- name: Create an issue from the report
123147
uses: peter-evans/create-issue-from-file@v4
124148
with:
125-
title: "[${{ env.L10N_CODE }}] A report to track update"
149+
title: "[${{ env.L10N_CODE }}] A report to track and reflect updates of English content"
126150
content-filepath: report.md
127151
labels: |
128152
outdated
129-
good first issue
130153
lang/${{ env.L10N_CODE }}

.github/workflows/spellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
- uses: actions/checkout@v3
2626

2727
- name: GitHub Spellcheck Action
28-
uses: rojopolis/spellcheck-github-actions@0.29.0
28+
uses: rojopolis/spellcheck-github-actions@0.33.1

0 commit comments

Comments
 (0)