Skip to content

Commit

Permalink
Better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
André L F S Bacci committed Nov 25, 2024
1 parent c654945 commit 8f710c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion scripts/translation/lib/GitLogParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ static function parseDir( string $gdir , RevcheckFileList $list )
$lcnt++;
if ( $lcnt == 1 && str_starts_with( trim( $proc->line ) , '[skip-revcheck]' ) )
$skip = true;

$proc->next();
}

Expand Down
6 changes: 5 additions & 1 deletion scripts/translation/lib/RevcheckRun.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ private function parseTranslationXml() : void
$this->revData->lang = $this->targetDir;
$this->revData->date = date("r");

$dom = XmlUtil::loadFile( $this->targetDir . '/translation.xml' );
$transfile = $this->targetDir . '/translation.xml';
if ( ! file_exists( $transfile ) )
throw new \Exception("Missing translation.xml file." );

$dom = XmlUtil::loadFile( $transfile );

$tag = $dom->getElementsByTagName( 'intro' )[0] ?? null;
if ( $tag == null )
Expand Down

0 comments on commit 8f710c4

Please sign in to comment.