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({
95
95
) ;
96
96
97
97
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 ( ) } ` ,
99
99
) ;
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
+ ) {
102
106
logger . debug (
103
107
`Source file ${ sourcePath } has been updated since last translation, needs updating` ,
104
108
) ;
You can’t perform that action at this time.
0 commit comments