@@ -371,14 +371,15 @@ class GitHubCommitTracker {
371371 const englishFile = fileTranslations . englishFile ;
372372 const outdatedLanguages = fileTranslations . outdatedLanguages ;
373373 const missingLanguages = fileTranslations . missingLanguages ;
374+ const englishCommit = fileTranslations . englishCommit ;
374375
375376 let body = `## 🌍 Translation Update Needed
376377
377378**File**: \`${ englishFile } \`
378379**Branch**: \`${ this . currentBranch } \`
379380
380381### 📅 Timeline
381- - **Latest English update**: ${ fileTranslations . englishCommit . date . toLocaleDateString ( ) } by ${ fileTranslations . englishCommit . author }
382+ - **Latest English update**: ${ englishCommit . date . toLocaleDateString ( ) } by ${ englishCommit . author }
382383
383384` ;
384385
@@ -420,7 +421,7 @@ class GitHubCommitTracker {
420421- [ ] Ensure translation is accurate and culturally appropriate
421422
422423### 📝 Summary of English File Changes
423- **Last commit**: [${ fileTranslations . englishCommit . message } ](${ fileTranslations . englishCommit . url } )
424+ **Last commit**: [${ englishCommit . message } ](${ englishCommit . url } )
424425
425426${ outdatedLanguages . length > 0 || missingLanguages . length > 0 ? `**Change Type**: English file was updated. ${ outdatedLanguages . length > 0 ? `${ outdatedLanguages . map ( l => this . getLanguageDisplayName ( l . language ) ) . join ( ', ' ) } translation${ outdatedLanguages . length > 1 ? 's' : '' } may be outdated.` : '' } ${ missingLanguages . length > 0 ? `${ missingLanguages . map ( l => this . getLanguageDisplayName ( l . language ) ) . join ( ', ' ) } translation${ missingLanguages . length > 1 ? 's are' : ' is' } missing.` : '' } ` : '' }
426427
@@ -543,12 +544,22 @@ async function checkTranslationStatus(changedFiles, githubTracker = null, create
543544 const fileTranslationMap = translationStatus . fileTranslationMap ;
544545
545546 for ( const englishFile of changedFiles ) {
547+
548+ let englishCommit = null ;
549+ if ( githubTracker ) {
550+ englishCommit = await githubTracker . getLastCommit ( englishFile ) ;
551+ if ( ! englishCommit ) {
552+ console . log ( `⚠️ Skipping ${ englishFile } - could not retrieve commit data` ) ;
553+ continue ;
554+ }
555+ }
556+
546557 const fileTranslations = {
547558 englishFile,
548559 outdatedLanguages : [ ] ,
549560 missingLanguages : [ ] ,
550561 upToDateLanguages : [ ] ,
551- englishCommit : null
562+ englishCommit
552563 } ;
553564
554565 for ( const language of SUPPORTED_LANGUAGES ) {
@@ -569,17 +580,8 @@ async function checkTranslationStatus(changedFiles, githubTracker = null, create
569580
570581
571582 if ( githubTracker ) {
572- // Get English commit only once per file
573- if ( ! fileTranslations . englishCommit ) {
574- fileTranslations . englishCommit = await githubTracker . getLastCommit ( englishFile ) ;
575- }
576- const englishCommit = fileTranslations . englishCommit ;
577583 const translationCommit = await githubTracker . getLastCommit ( translationPath ) ;
578584
579- if ( ! englishCommit ) {
580- continue ;
581- }
582-
583585 if ( ! translationCommit ) {
584586 const missingItem = {
585587 englishFile,
0 commit comments