Skip to content

Commit

Permalink
Determine i18n_filename based on input file
Browse files Browse the repository at this point in the history
  • Loading branch information
spier committed Dec 2, 2023
1 parent f2cb5ae commit a4d45f5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/i18n-consistency-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@ jobs:
# Loop through all files in the English directory
for file in $(find patterns/{2-structured,3-validated} -name '*.md'); do
echo "Original file: $file"
[[ $file =~ "3-validated" ]] && continue # if the file is under 3-validated, skip (one liner) - 2023/08/26
[[ $file =~ "/templates" ]] && continue # if the file is under /templates, skip. consistency check does not work for that yet.
i18n_filename=$(echo "$file" | sed -E "s_patterns/(2-structured|3-validated)(/project-setup)?_translation/${{matrix.language}}/patterns_g")
#[[ $file =~ "3-validated" ]] && continue # if the file is under 3-validated, skip (one liner) - 2023/08/26
#[[ $file =~ "/templates" ]] && continue # if the file is under /templates, skip. consistency check does not work for that yet.
if [[ $file =~ "/templates" ]]; then
i18n_filename=$(echo "$file" | sed -E "s_patterns/(2-structured|3-validated)/templates_translation/${{matrix.language}}/templates")
else
i18n_filename=$(echo "$file" | sed -E "s_patterns/(2-structured|3-validated)_translation/${{matrix.language}}/patterns_g")
fi
echo "Translation file: $i18n_filename"
if [[ ! -e "$i18n_filename" ]]; then
Expand Down

0 comments on commit a4d45f5

Please sign in to comment.