diff --git a/scripts/translation/libqa/OutputBuffer.php b/scripts/translation/libqa/OutputBuffer.php index ef443ae37..0e4566d17 100644 --- a/scripts/translation/libqa/OutputBuffer.php +++ b/scripts/translation/libqa/OutputBuffer.php @@ -30,8 +30,7 @@ class OutputBuffer function __construct( string $header , string $filename , OutputIgnore $ignore ) { - if ( str_starts_with( $filename , "./" ) ) - $filename = substr( $filename , 2 ); + $filename = str_replace( "/./" , "/" , $filename ); $this->header = $header . ": " . $filename . "\n\n"; $this->filename = $filename; diff --git a/scripts/translation/syncxmla.php b/scripts/translation/syncxmla.php index 3bfbb01dd..4576e59cb 100644 --- a/scripts/translation/syncxmla.php +++ b/scripts/translation/syncxmla.php @@ -19,14 +19,14 @@ require_once __DIR__ . '/libqa/all.php'; +$ignore = new OutputIgnore( $argv ); // always first, may exit. $oklist = SyncFileList::load(); -$ignore = new OutputIgnore( $argv ); foreach ( $oklist as $file ) { $source = $file->sourceDir . '/' . $file->file; $target = $file->targetDir . '/' . $file->file; - $output = new OutputBuffer( "qaxml.a" , $file->file , $ignore ); + $output = new OutputBuffer( "# qaxml.a" , $target , $ignore ); [ $s , $e ] = XmlFrag::loadXmlFragmentFile( $source ); [ $t , $e ] = XmlFrag::loadXmlFragmentFile( $target );