Skip to content

Commit

Permalink
fix!: move all translations to admin domain
Browse files Browse the repository at this point in the history
Also changes the prefix from `neusta_pimcore_areabrick_config` to `neusta_areabrick_config`.

BREAKING CHANGE: this is a breaking change if you have overwritten the translations
  • Loading branch information
jdreesen committed Jan 23, 2025
1 parent eaf2c61 commit d158d59
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 42 deletions.
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.

0 comments on commit d158d59

Please sign in to comment.