Skip to content

Commit

Permalink
Set attribute target-language even if it does not exist yet (#31)
Browse files Browse the repository at this point in the history
fixes #30
  • Loading branch information
tpokorra authored May 30, 2022
1 parent fe17661 commit ce25343
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions XliffSync/Model/XlfDocument.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class XlfDocument {
"1.2" {
[System.Xml.XmlNode] $fileNode = [XlfDocument]::GetNode('file', $this.root);
if ($fileNode) {
$fileNode.'target-language' = $lng;
$fileNode.SetAttribute('target-language', $lng);
}
}
}
Expand Down Expand Up @@ -704,7 +704,7 @@ class XlfDocument {
switch ($baseXlfDoc.Version()) {
"1.2" {
$newFileNode = $newRootNode.ChildNodes.Item(0);
$newFileNode.'target-language' = $language;
$newFileNode.SetAttribute('target-language', $language);
break;
}
"2.0" {
Expand Down

0 comments on commit ce25343

Please sign in to comment.