Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: move all translations to admin domain #42

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions templates/bricks/overview.html.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% trans_default_domain 'admin' %}

{% set hasVersions = bricks has some brick => brick.version is not empty %}
{% set hasDescriptions = bricks has some brick => brick.description is not empty %}
{% set hasAdditionalProperties = bricks has some brick => brick.additionalProperties is not empty %}
Expand All @@ -6,36 +8,36 @@
<table>
<thead>
<tr>
<th>{{ 'neusta_pimcore_areabrick_config.areabricks.overview.table.col_headers.name'|trans }}</th>
<th>{{ 'neusta_pimcore_areabrick_config.areabricks.overview.table.col_headers.id'|trans }}</th>
<th>{{ 'neusta_areabrick_config.areabricks.overview.table.col_headers.name'|trans }}</th>
<th>{{ 'neusta_areabrick_config.areabricks.overview.table.col_headers.id'|trans }}</th>
{% if hasVersions %}
<th>{{ 'neusta_pimcore_areabrick_config.areabricks.overview.table.col_headers.version'|trans }}</th>
<th>{{ 'neusta_areabrick_config.areabricks.overview.table.col_headers.version'|trans }}</th>
{% endif %}
{% if hasDescriptions %}
<th>{{ 'neusta_pimcore_areabrick_config.areabricks.overview.table.col_headers.description'|trans }}</th>
<th>{{ 'neusta_areabrick_config.areabricks.overview.table.col_headers.description'|trans }}</th>
{% endif %}
<th>{{ 'neusta_pimcore_areabrick_config.areabricks.overview.table.col_headers.template'|trans }}</th>
<th>{{ 'neusta_pimcore_areabrick_config.areabricks.overview.table.col_headers.pages'|trans }}</th>
<th>{{ 'neusta_areabrick_config.areabricks.overview.table.col_headers.template'|trans }}</th>
<th>{{ 'neusta_areabrick_config.areabricks.overview.table.col_headers.pages'|trans }}</th>
{% if hasAdditionalProperties %}
<th>{{ 'neusta_pimcore_areabrick_config.areabricks.overview.table.col_headers.additional_properties'|trans }}</th>
<th>{{ 'neusta_areabrick_config.areabricks.overview.table.col_headers.additional_properties'|trans }}</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for brick in bricks %}
<tr>
<td>{{ brick.name|trans(domain='admin') }}</td>
<td>{{ brick.name|trans }}</td>
<td>{{ brick.id }}</td>
{% if hasVersions %}
<td>{{ brick.version }}</td>
{% endif %}
{% if hasDescriptions %}
<td>{{ brick.description|trans(domain='admin') }}</td>
<td>{{ brick.description|trans }}</td>
{% endif %}
<td>{{ brick.template }}</td>
<td>
{% embed "@NeustaPimcoreAreabrickConfig/bricks/pages_accordion.html.twig" with {
title: 'neusta_pimcore_areabrick_config.areabricks.overview.table.published_pages'|trans,
title: 'neusta_areabrick_config.areabricks.overview.table.published_pages'|trans,
pages: brick.pages|filter(page => page.published),
} only %}
{% block page %}
Expand All @@ -44,7 +46,7 @@
{% endembed %}

{% embed "@NeustaPimcoreAreabrickConfig/bricks/pages_accordion.html.twig" with {
title: 'neusta_pimcore_areabrick_config.areabricks.overview.table.unpublished_pages'|trans,
title: 'neusta_areabrick_config.areabricks.overview.table.unpublished_pages'|trans,
pages: brick.pages|filter(page => not page.published),
} only %}
{% endembed %}
Expand All @@ -55,7 +57,7 @@
{% for additionalProperty in brick.additionalProperties|default([]) %}
<li><span>{{ additionalProperty.name }}</span>: {{ additionalProperty.value }}</li>
{% else %}
<li class="empty">{{ 'neusta_pimcore_areabrick_config.areabricks.overview.table.no_additional_properties'|trans }}</li>
<li class="empty">{{ 'neusta_areabrick_config.areabricks.overview.table.no_additional_properties'|trans }}</li>
{% endfor %}
</ul>
</td>
Expand Down
14 changes: 14 additions & 0 deletions translations/admin.de.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
neusta_areabrick_config:
areabrick_overview: Areabrick-Übersicht
areabricks:
overview:
table:
col_headers:
id: ID
name: Name
version: Version
description: Beschreibung
template: Twig Template
pages: Seiten (mit Brick)
additional_properties: zusätzliche Eigenschaften
no_additional_properties: Keine zusätzlichen Eigenschaften
published_pages: Veröffentlichte Seiten
unpublished_pages: Unveröffentlichte Seiten
14 changes: 14 additions & 0 deletions translations/admin.en.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
neusta_areabrick_config:
areabrick_overview: Areabrick Overview
areabricks:
overview:
table:
col_headers:
id: ID
name: Name
version: Version
description: Description
template: Twig template
pages: Pages (using brick)
additional_properties: Additional properties
no_additional_properties: No additional properties
published_pages: Published Pages
unpublished_pages: Unpublished Pages
15 changes: 0 additions & 15 deletions translations/messages.de.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions translations/messages.en.yaml

This file was deleted.

Loading