diff --git a/.github/actions/translation-tracker/index.js b/.github/actions/translation-tracker/index.js index 7d9f3ff715..9ca677c58f 100644 --- a/.github/actions/translation-tracker/index.js +++ b/.github/actions/translation-tracker/index.js @@ -269,7 +269,7 @@ class GitHubCommitTracker { let isTruncated = false; if (patch) { const lines = patch.split('\n'); - const maxLines = 80; + const maxLines = 50; if (lines.length > maxLines) { patchSnippet = lines.slice(0, maxLines).join('\n'); isTruncated = true; @@ -407,6 +407,24 @@ class GitHubCommitTracker { }); } + // English diff. It shows the actual content changes in the English file. + if (englishDiff && (englishDiff.compareUrl || englishDiff.patchSnippet)) { + body += `### 🧩 Recent English Diff\n\n`; + if (englishDiff.compareUrl) { + body += `- [🔍 View full compare](${englishDiff.compareUrl})\n\n`; + } + if (englishDiff.patchSnippet) { + body += `
\nShow patch snippet\n\n`; + body += `\`\`\`diff\n${englishDiff.patchSnippet}\n\`\`\`\n\n`; + if (englishDiff.isTruncated) { + body += `_(Patch snippet truncated. Use the compare link above for the full diff.)_\n\n`; + } + body += `
\n\n`; + } else { + body += `_(Couldn't generate preview of the differences for this change. Use the compare link above to see the full diff.)_\n\n`; + } + } + body += `### 🔗 Quick Links - [📄 Current English file](https://github.com/${this.owner}/${this.repo}/blob/${this.currentBranch}/${englishFile})