Skip to content

Commit

Permalink
Fixed translations
Browse files Browse the repository at this point in the history
  • Loading branch information
kisztof committed Oct 31, 2023
1 parent 26e25ac commit 09859e4
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 29 deletions.
55 changes: 35 additions & 20 deletions src/bundle/Resources/translations/ibexa_locationview.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,41 @@
<target state="new">Enter your team members email addresses.</target>
<note>key: modal.info</note>
</trans-unit>
<trans-unit id="6c7b23f10048a1a732637fab418a66e6aa10b3dc" resname="tab.author.authors">
<source>Authors</source>
<target state="new">Authors</target>
<note>key: tab.author.authors</note>
</trans-unit>
<trans-unit id="f3531550ad402d3be828ec391f1a80a295d3382c" resname="tab.author.content_id">
<source>Content ID</source>
<target state="new">Content ID</target>
<note>key: tab.author.content_id</note>
</trans-unit>
<trans-unit id="762ccb5d0506d7818b3b00dcd1459dfa6b4776d9" resname="tab.author.creator">
<source>Creator</source>
<target state="new">Creator</target>
<note>key: tab.author.creator</note>
</trans-unit>
<trans-unit id="732e6a42956aa790c56e1c0a0af8af89189c5c96" resname="tab.author.creator.not_found">
<source>Can't fetch creator</source>
<target state="new">Can't fetch creator</target>
<note>key: tab.author.creator.not_found</note>
</trans-unit>
<trans-unit id="ccdfe4ede13f639239013d24eeedafd222f1f85e" resname="tab.author.last_contributor">
<source>Last contributor</source>
<target state="new">Last contributor</target>
<note>key: tab.author.last_contributor</note>
</trans-unit>
<trans-unit id="fbb9528d62d1dff7395ce7078bf7e066b6becb68" resname="tab.author.last_contributor.not_found">
<source>Can't fetch last contributor</source>
<target state="new">Can't fetch last contributor</target>
<note>key: tab.author.last_contributor.not_found</note>
</trans-unit>
<trans-unit id="6bb8a4c032509c485369da8d80e46b248911bbe7" resname="tab.author.location_id">
<source>Location ID</source>
<target state="new">Location ID</target>
<note>key: tab.author.location_id</note>
</trans-unit>
<trans-unit id="4fd9a40170cf4bc5acff719c14eaf2d15fc9942d" resname="tab.details.change_section ">
<source>Change section</source>
<target state="new">Change section</target>
Expand All @@ -116,26 +151,6 @@
<target state="new">Content remote ID</target>
<note>key: tab.details.content_remote_id</note>
</trans-unit>
<trans-unit id="dc195b32e812b751daa7a3321844c9712e1460ba" resname="tab.details.creator">
<source>Creator</source>
<target state="new">Creator</target>
<note>key: tab.details.creator</note>
</trans-unit>
<trans-unit id="91b45af4dd219651dc8b1a7d050822b71f03fad3" resname="tab.details.creator.not_found">
<source>Can't fetch creator</source>
<target state="new">Can't fetch creator</target>
<note>key: tab.details.creator.not_found</note>
</trans-unit>
<trans-unit id="acc17a8db8d00036233faa9948ad9a496cd621b3" resname="tab.details.last_contributor">
<source>Last contributor</source>
<target state="new">Last contributor</target>
<note>key: tab.details.last_contributor</note>
</trans-unit>
<trans-unit id="ba5ca8a7f923f6ee3a0e6bf9aca428403d0158fd" resname="tab.details.last_contributor.not_found">
<source>Can't fetch last contributor</source>
<target state="new">Can't fetch last contributor</target>
<note>key: tab.details.last_contributor.not_found</note>
</trans-unit>
<trans-unit id="671c2d4e91244548b29e8f293cd8d4d97a3c23bd" resname="tab.details.location_id">
<source>Location ID</source>
<target state="new">Location ID</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,41 @@
{% if creator is not empty %}
{% include '@ibexadesign/ui/component/user/user.html.twig' with { user: creator } only %}
{% else %}
{{ 'tab.details.creator.not_found'|trans|desc('Can\'t fetch creator') }}
{{ 'tab.author.creator.not_found'|trans|desc('Can\'t fetch creator') }}
{% endif %}
{% endset %}

{% set last_contributor_name %}
{% if last_contributor is not empty %}
{% include '@ibexadesign/ui/component/user/user.html.twig' with { user: last_contributor } only %}
{% else %}
{{ 'tab.details.last_contributor.not_found'|trans|desc('Can\'t fetch last contributor') }}
{{ 'tab.author.last_contributor.not_found'|trans|desc('Can\'t fetch last contributor') }}
{% endif %}
{% endset %}

{% set content_details_items = [
{
label: 'tab.details.creator'|trans()|desc('Creator'),
label: 'tab.author.creator'|trans()|desc('Creator'),
content: creator_name,
},
{
label: 'tab.details.last_contributor'|trans()|desc('Last contributor'),
label: 'tab.author.last_contributor'|trans()|desc('Last contributor'),
content: last_contributor_name,
}
] %}

{% include '@ibexadesign/ui/component/details/details.html.twig' with {
headline: 'tab.details.content_details'|trans()|desc('Content details'),
headline: 'tab.author.authors'|trans()|desc('Authors'),
items: content_details_items,
} only %}

{% set technical_details_items = [
{
label: 'tab.details.content_id'|trans()|desc('Content ID'),
label: 'tab.author.content_id'|trans()|desc('Content ID'),
content: content_info.id,
},
{
label: 'tab.details.location_id'|trans()|desc('Location ID'),
label: 'tab.author.location_id'|trans()|desc('Location ID'),
content: location.id,
}
] %}
4 changes: 2 additions & 2 deletions src/lib/Tab/LocationView/AuthorsTab.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function getTemplateParameters(array $contextParameters = []): array
* @param array<string, mixed> $parameters
* @param \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo $versionInfo
*/
private function supplyLastContributor(array $parameters, VersionInfo $versionInfo): void
private function supplyLastContributor(array &$parameters, VersionInfo $versionInfo): void
{
$parameters['last_contributor'] = null;
if ((new UserExists($this->userService))->isSatisfiedBy($versionInfo->creatorId)) {
Expand All @@ -108,7 +108,7 @@ private function supplyLastContributor(array $parameters, VersionInfo $versionIn
* @param array<string,mixed|null> $parameters
* @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo
*/
private function supplyCreator(array $parameters, ContentInfo $contentInfo): void
private function supplyCreator(array &$parameters, ContentInfo $contentInfo): void
{
$parameters['creator'] = null;
if ((new UserExists($this->userService))->isSatisfiedBy($contentInfo->ownerId)) {
Expand Down

0 comments on commit 09859e4

Please sign in to comment.