Skip to content

Commit 3a06430

Browse files
authored
Added translation for buttons and added translation test (#60)
1 parent 37e4e70 commit 3a06430

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
3+
<file source-language="en" target-language="en" datatype="plaintext" original="not.available">
4+
<header>
5+
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
6+
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
7+
</header>
8+
<body>
9+
<trans-unit id="61c7070a29f932eb0b1a343509d049aa52c92c09" resname="ibexa.clear-btn.label">
10+
<source>Clear</source>
11+
<target state="new">Clear</target>
12+
<note>key: ibexa.clear-btn.label</note>
13+
</trans-unit>
14+
<trans-unit id="6c89c5a149a0c096f007f1774344ec53cd18bb20" resname="ibexa.expander.label.collapse">
15+
<source>Hide</source>
16+
<target state="new">Hide</target>
17+
<note>key: ibexa.expander.label.collapse</note>
18+
</trans-unit>
19+
<trans-unit id="27f50d9dad7b783bd2a0db1d75acf7ef32824ab5" resname="ibexa.expander.label.expand">
20+
<source>Show</source>
21+
<target state="new">Show</target>
22+
<note>key: ibexa.expander.label.expand</note>
23+
</trans-unit>
24+
</body>
25+
</file>
26+
</xliff>

src/bundle/Resources/views/themes/standard/design_system/components/accordion.html.twig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{% trans_default_domain 'ibexa_design_system_twig' %}
2+
13
{% set classes =
24
html_classes(
35
'ids-accordion',

src/bundle/Resources/views/themes/standard/design_system/components/ui/clear_btn.html.twig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{% trans_default_domain 'ibexa_design_system_twig' %}
2+
13
{% set clear_msg = 'ibexa.clear-btn.label'|trans|desc('Clear') %}
24

35
<twig:ibexa:button
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
7+
declare(strict_types=1);
8+
9+
namespace Ibexa\Tests\Integration\DesignSystemTwig;
10+
11+
use Ibexa\Contracts\Test\Core\Translation\AbstractTranslationCase;
12+
13+
final class TranslationTest extends AbstractTranslationCase
14+
{
15+
public static function provideConfigNamesForTranslation(): iterable
16+
{
17+
yield 'ibexa_design_system_twig config' => ['ibexa_design_system_twig'];
18+
}
19+
}

0 commit comments

Comments
 (0)