-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow context failing (cherry picked #39)
* allow context failing * improve template locations * add upgrade note
- Loading branch information
Showing
10 changed files
with
177 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace I18nBundle\Exception; | ||
|
||
final class ContextNotDefinedException extends \Exception | ||
{ | ||
public function __construct() | ||
{ | ||
parent::__construct('context is not defined'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ app.request.locale }}"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Test Page for I18n</title> | ||
{{ pimcore_head_meta() }} | ||
{{ pimcore_head_link() }} | ||
</head> | ||
<body> | ||
<div id="site"> | ||
|
||
{% set languages = i18n_context('getActiveLanguages') %} | ||
{% if languages is iterable %} | ||
<nav id="i18n-language-selector"> | ||
<select> | ||
{% for language in languages %} | ||
<option {{ language.active ? 'selected' : '' }} value="{{ language.linkedHref }}">{{ language.iso|upper }}</option> | ||
{% endfor %} | ||
</select> | ||
</nav> | ||
{% endif %} | ||
|
||
<div class="navigation"> | ||
{% set menu = pimcore_build_nav(document, document, null, app.request.locale) %} | ||
{{ pimcore_render_nav(menu, 'menu', 'renderMenu', { | ||
maxDepth: 10, | ||
ulClass: 'nav navbar-nav' | ||
}) }} | ||
</div> | ||
<div class="content"> | ||
{% if document is defined %} | ||
<span id="page-id">{{ document.getId() }}</span> | ||
{% endif %} | ||
</div> | ||
{% block content %} | ||
{{ pimcore_areablock('dachcomBundleTest') }} | ||
{% endblock %} | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace DachcomBundle\Test\FunctionalDefault; | ||
|
||
use DachcomBundle\Test\FunctionalTester; | ||
|
||
class XliffExportCest | ||
{ | ||
/** | ||
* @param FunctionalTester $I | ||
*/ | ||
public function testXliffExport(FunctionalTester $I) | ||
{ | ||
$document = $I->haveAPageDocument('en', 'en', 'languageSelector'); | ||
|
||
$I->haveAUser('dachcom_test'); | ||
$I->amLoggedInAs('dachcom_test'); | ||
|
||
$I->submitDocumentToXliffExporter($document); | ||
} | ||
|
||
} |