Fix untranslated document types

This commit is contained in:
Aurel
2023-03-28 13:02:44 +00:00
committed by Xbird
parent f955733afa
commit 2a0cbc101e
14 changed files with 574 additions and 561 deletions

1104
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -437,6 +437,7 @@ class AdminController extends AbstractController
$entityManager = $this->getDoctrine()->getManager(); $entityManager = $this->getDoctrine()->getManager();
$newrank = clone $Rank; $newrank = clone $Rank;
$newrank->setName($newrank->getName() . ' - copy'); $newrank->setName($newrank->getName() . ' - copy');
$newrank->setCreatedAt(new \DateTimeImmutable());
$entityManager->persist($newrank); $entityManager->persist($newrank);
try { try {

View File

@@ -38,7 +38,7 @@
<img src="{{ asset(groupLogo) }}" alt="{{ i.mainGroup.name }} " class="img-icon"> <img src="{{ asset(groupLogo) }}" alt="{{ i.mainGroup.name }} " class="img-icon">
{% endif %} {% endif %}
{% if notype is not defined %} {% if notype is not defined %}
{{ ("documentType_" ~ i.classShort)|trans }}<br /><small>N°: #{{i.id}}</small> {{ ('documentType_' ~ i.classShort)|trans }}<br /><small>N°: #{{i.id}}</small>
{% endif %} {% endif %}
</td> </td>
{% endif %} {% endif %}

View File

@@ -1 +1 @@
<a href="{{ path('user_view', {id: sender.id}) }}">{{ sender.fullname }}</a> {{ 'commented_your'|trans }} {{ ("documentType_" ~ document.getClassShort)|trans }} <a href="{{ path('document_view', {id: document.id}) }}">{{ document.title }}</a> <a href="{{ path('user_view', {id: sender.id}) }}">{{ sender.fullname }}</a> {{ 'commented_your'|trans }} {{ ('documentType_' ~ document.classShort)|trans }} <a href="{{ path('document_view', {id: document.id}) }}">{{ document.title }}</a>

View File

@@ -1 +1 @@
<a href="{{ path('user_view', {id: sender.id}) }}">{{ sender.fullname }}</a> {{ 'removed_your'|trans }} {{ 'comment'|trans }} {{ 'on'|trans }} {{ ("documentType_" ~ document.getClassShort)|trans }} <a href="{{ path('document_view', {id: document.id}) }}">{{ document.title }}</a> <a href="{{ path('user_view', {id: sender.id}) }}">{{ sender.fullname }}</a> {{ 'removed_your'|trans }} {{ 'comment'|trans }} {{ 'on'|trans }} {{ ('documentType_' ~ document.classShort)|trans }} <a href="{{ path('document_view', {id: document.id}) }}">{{ document.title }}</a>

View File

@@ -1 +1 @@
<a href="{{ path('user_view', {id: sender.id}) }}">{{ sender.fullname }}</a> {{ 'edited_your'|trans }} {{ 'comment'|trans }} {{ 'on'|trans }} {{ ("documentType_" ~ document.getClassShort)|trans }} <a href="{{ path('document_view', {id: document.id}) }}">{{ document.title }}</a> <a href="{{ path('user_view', {id: sender.id}) }}">{{ sender.fullname }}</a> {{ 'edited_your'|trans }} {{ 'comment'|trans }} {{ 'on'|trans }} {{ ('documentType_' ~ document.classShort)|trans }} <a href="{{ path('document_view', {id: document.id}) }}">{{ document.title }}</a>

View File

@@ -1 +1 @@
<a href="{{ path('user_view', {id: sender.id}) }}">{{ sender.fullname }}</a> {{ 'removed_your'|trans }} {{ ("documentType_" ~ document.getClassShort)|trans }} {{ document.title }} <a href="{{ path('user_view', {id: sender.id}) }}">{{ sender.fullname }}</a> {{ 'removed_your'|trans }} {{ ('documentType_' ~ document.classShort)|trans }} {{ document.title }}

View File

@@ -1 +1 @@
<a href="{{ path('user_view', {id: sender.id}) }}">{{ sender.fullname }}</a> {{ 'edited_your'|trans }} {{ ("documentType_" ~ document.getClassShort)|trans }} <a href="{{ path('document_view', {id: document.id}) }}">{{ document.title }}</a> <a href="{{ path('user_view', {id: sender.id}) }}">{{ sender.fullname }}</a> {{ 'edited_your'|trans }} {{ ('documentType_' ~ document.classShort)|trans }} <a href="{{ path('document_view', {id: document.id}) }}">{{ document.title }}</a>

View File

@@ -9,7 +9,7 @@
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">
<h3>{% trans %}title_comment_belong_document{% endtrans %}</h3> <h3>{% trans %}title_comment_belong_document{% endtrans %}</h3>
<p><a href="{{ path('document_view', {'id': comment.document.id}) }}" class="btn btn-primary btn-sm">{{ comment.document.getClassShort}} - {{comment.document.title}}</a></p> <p><a href="{{ path('document_view', {'id': comment.document.id}) }}" class="btn btn-primary btn-sm">{{ ('documentType_' ~ comment.document.classShort)|trans }} - {{comment.document.title}}</a></p>
<p>{% trans %}title_author{% endtrans %} {{comment.creator.fullName}}, {{comment.creator.mainGroup.shortname}}</p> <p>{% trans %}title_author{% endtrans %} {{comment.creator.fullName}}, {{comment.creator.mainGroup.shortname}}</p>
<p>{% trans %}title_created_at{% endtrans %} {{comment.createdAt |date('_datetime.format'|trans)}}</p> <p>{% trans %}title_created_at{% endtrans %} {{comment.createdAt |date('_datetime.format'|trans)}}</p>
</div> </div>

View File

@@ -1,7 +1,7 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %} {% block title %}
{{ "title_creation"|trans }} {{ "of"|trans }} {{ ("documentType_" ~ type|capitalize)|trans }} {{ "title_creation"|trans }} {{ "of"|trans }} {{ ('documentType_' ~ type|capitalize)|trans }}
{% endblock %} {% endblock %}
{% block body %} {% block body %}

View File

@@ -1,6 +1,6 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}{{ document.getClassShort }}: {{ document.getTitle }} - {% trans %}title_history{% endtrans %}{% endblock %} {% block title %}{{ ('documentType_' ~ document.classShort)|trans }}: {{ document.getTitle }} - {% trans %}title_history{% endtrans %}{% endblock %}
{% block subtitle %}#{{ document.id }}: {{ document.getTitle }} - {% trans %}title_history{% endtrans %} {% endblock %} {% block subtitle %}#{{ document.id }}: {{ document.getTitle }} - {% trans %}title_history{% endtrans %} {% endblock %}
{% block body %} {% block body %}

View File

@@ -1,8 +1,8 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}{{ ("documentType_" ~ type)|trans }}{% if archive %} | {% trans %}title_archives{% endtrans %}{% endif %}{% endblock %} {% block title %}{{ ('documentType_' ~ type)|trans }}{% if archive %} | {% trans %}title_archives{% endtrans %}{% endif %}{% endblock %}
{% block subtitle %} {% block subtitle %}
{{ ("documentType_" ~ type)|trans }} {% if archive %} | {% trans %}title_archives{% endtrans %}{% else %} {{ ('documentType_' ~ type)|trans }} {% if archive %} | {% trans %}title_archives{% endtrans %}{% else %}
{% if documentTypeEntity.directory is not defined and documentTypeEntity.user is not defined %} {% if documentTypeEntity.directory is not defined and documentTypeEntity.user is not defined %}
{% if app.user.hasPermission(type ~ '_create') %} {% if app.user.hasPermission(type ~ '_create') %}
<a href="{{ path('document_create', {type: type}) }}"><span class="badge rounded-pill bg-success"><i class="fa fa-plus"></i> {% trans %}button_create{% endtrans %}</span></a>{% endif %} <a href="{{ path('document_create', {type: type}) }}"><span class="badge rounded-pill bg-success"><i class="fa fa-plus"></i> {% trans %}button_create{% endtrans %}</span></a>{% endif %}

View File

@@ -26,7 +26,7 @@
</div> </div>
<div class="col"> <div class="col">
{% if i.AllowShare %}<a href="{{ path('share', {'share': i.share}) }}" target="_blank">{% endif %} {% if i.AllowShare %}<a href="{{ path('share', {'share': i.share}) }}" target="_blank">{% endif %}
<h4>#{{i.id}} {{i.classShort}} - {{i.title }} {% if i.archive %}<small>({% trans %}title_archived{% endtrans %})</small>{% endif %}{% if i.AllowShare %} <i class="fa fa-link text-success" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_document_shared{% endtrans %}" ></i>{% endif %}</h4> <h4>#{{i.id}} {{ ('documentType_' ~ i.classShort)|trans }} - {{i.title }} {% if i.archive %}<small>({% trans %}title_archived{% endtrans %})</small>{% endif %}{% if i.AllowShare %} <i class="fa fa-link text-success" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_document_shared{% endtrans %}" ></i>{% endif %}</h4>
{% if i.AllowShare %}</a>{% endif %} {% if i.AllowShare %}</a>{% endif %}
{% if i.directory is defined %}<p>#{{i.directory.id}} - {{i.directory.fullName}} {{i.directory.gender}} {{i.directory.phone}}</p>{% endif %} {% if i.directory is defined %}<p>#{{i.directory.id}} - {{i.directory.fullName}} {{i.directory.gender}} {{i.directory.phone}}</p>{% endif %}
{% if i.status is defined %} {% if i.status is defined %}

View File

@@ -1,6 +1,6 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block title %}{{ ("documentType_" ~ document.getClassShort)|trans }}: {{ document.getTitle }}{% endblock %} {% block title %}{{ ('documentType_' ~ document.classShort)|trans }}: {{ document.getTitle }}{% endblock %}
{% block subtitle %}#{{ document.id }}: {{ document.getTitle }} {% endblock %} {% block subtitle %}#{{ document.id }}: {{ document.getTitle }} {% endblock %}
{% block body %} {% block body %}
@@ -53,13 +53,13 @@
</div> </div>
<div class="col"> <div class="col">
<h1 style="color:beige;">{{document.mainGroup.name}}</h1> <h1 style="color:beige;">{{document.mainGroup.name}}</h1>
<h2 style="color:beige;">{{ ("documentType_" ~ document.getClassShort)|trans }} #{{ document.getId }} : {{ document.getTitle }}</h2> <h2 style="color:beige;">{{ ('documentType_' ~ document.classShort)|trans }} #{{ document.getId }} : {{ document.getTitle }}</h2>
</div> </div>
</div> </div>
<hr> <hr>
<div class="row p-2"> <div class="row p-2">
<div class="col-12"> <div class="col-12">
{% include 'document/types/' ~ document.getClassShort ~ '.html.twig' with {'document': document} %} {% include 'document/types/' ~ document.classShort ~ '.html.twig' with {'document': document} %}
</div> </div>
</div> </div>
<hr> <hr>