Skip to content

Commit

Permalink
Add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
doishub committed Dec 7, 2020
1 parent abd7069 commit 3a66fa3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Resources/contao/languages/de/default.xlf
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?xml version="1.0" ?><xliff version="1.1">
<file datatype="php" original="src/Resources/contao/languages/en/default.php" source-language="en" target-language="de">
<body>
<trans-unit id="MSC.msgNoLicenses">
<source>After completing your order you will find your licenses here.</source>
<target>Nach abgeschlossener Bestellung finden Sie hier Ihre Lizenzen.</target>
</trans-unit>
<trans-unit id="ERR.noMoreLicenses">
<source>Licences for the product "%s" is exhausted</source>
<target>Lizenzen für das Produkt "%s" sind ausgeschöpft</target>
Expand Down
3 changes: 3 additions & 0 deletions src/Resources/contao/languages/en/default.xlf
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" ?><xliff version="1.1">
<file datatype="php" original="src/Resources/contao/languages/en/default.php" source-language="en">
<body>
<trans-unit id="MSC.msgNoLicenses">
<source>After completing your order you will find your licenses here.</source>
</trans-unit>
<trans-unit id="ERR.noMoreLicenses">
<source>Licences for the product "%s" is exhausted</source>
</trans-unit>
Expand Down
3 changes: 2 additions & 1 deletion src/Resources/contao/modules/ModuleOrderLicenses.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ public function generate()
protected function compile()
{
$objLicenses = LicenseItemModel::findByOrder($this->objOrder->id, ['order' => 'pid']);
$arrProducts = null;

if(null != $objLicenses)
{
$arrProducts = [];
$intCurrentProduct = 0;

while($objLicenses->next())
Expand All @@ -84,6 +84,7 @@ protected function compile()
}
}

$this->Template->empty = $GLOBALS['TL_LANG']['MSC']['msgNoLicenses'];
$this->Template->products = $arrProducts;
}
}
2 changes: 2 additions & 0 deletions src/Resources/contao/templates/mod_orderLicenses.html5
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
</ul>
</div>
<?php endforeach; ?>
<?php else: ?>
<p class="empty message"><?=$this->empty?></p>
<?php endif; ?>

<?php $this->endblock(); ?>

0 comments on commit 3a66fa3

Please sign in to comment.