Skip to content

Commit fed8a4f

Browse files
committed
Update title extraction
1 parent 29f3c6d commit fed8a4f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/i18n-consistency-checker.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ jobs:
5050
i18n_content_updated_at=$(date -d "$(git log -1 --format=%cd --date=iso $i18n_filename)" +%s)
5151
5252
if [[ $((original_updated_at - i18n_content_updated_at)) -ge 1 ]]; then
53-
content_header=$(grep -E '^title+' "$file" | sort -r | head -n1)
54-
content_title=$(echo "$content_header" | sed 's/title: //g')
53+
content_title= $(awk '/## Title/{flag=1; next} /##/{flag=0; exit} flag{printf "%s", $0}' "$file")
5554
days_since_overdue_updates=$(( ($(date +%s) - original_updated_at) / 60 / 60 / 24 ))
5655
original_last_update_hash=$(git log -1 --format=%H $file)
5756
parent_hash=$(git log -1 --format=%P $original_last_update_hash)

0 commit comments

Comments
 (0)