File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -95,10 +95,14 @@ export async function getDocUpdateStatus({
9595 ) ;
9696
9797 logger . debug (
98- `${ sourcePath } : sourceLastModifiedDate ${ sourceLastModifiedDate . toISOString ( ) } , meta[translation-updated-at] ${ metadataTranslationUpdatedAt . toISOString ( ) } ` ,
98+ `${ sourcePath } : source's lastModifiedDate ${ sourceLastModifiedDate . toISOString ( ) } , target. meta[translation-updated-at] ${ metadataTranslationUpdatedAt . toISOString ( ) } ` ,
9999 ) ;
100- // If the source file has been updated since the last translation
101- if ( sourceLastModifiedDate > metadataTranslationUpdatedAt ) {
100+ // If the source file has been updated since the last translation plus 5 minutes
101+ // (to account for any potential delays in git log updates), it needs to be updated
102+ if (
103+ sourceLastModifiedDate . getTime ( ) >
104+ metadataTranslationUpdatedAt . getTime ( ) + 5 * 60 * 1000
105+ ) {
102106 logger . debug (
103107 `Source file ${ sourcePath } has been updated since last translation, needs updating` ,
104108 ) ;
You can’t perform that action at this time.
0 commit comments