Move /templates and /translations into the "var" folder

pull/3064/head
Julio 5 years ago
parent 9c9115c4ef
commit 8434cd8eaf
  1. 2
      config/packages/translation.yaml
  2. 2
      config/packages/twig.yaml
  3. 2
      public/main/install/index.php
  4. 9
      templates/themes/default/ChamiloThemeBundle/Layout/layout_one_col.html.twig.dist
  5. 7
      templates/themes/default/ChamiloThemeBundle/Layout/layout_two_col.html.twig.dist
  6. 69
      templates/themes/default/FOSUserBundle/Security/login.html.twig
  7. 21
      translations/installation.en.po
  8. 15
      translations/installation.fr.po

@ -2,7 +2,7 @@ framework:
default_locale: '%locale%'
translator:
paths:
- '%kernel.project_dir%/translations'
- '%kernel.project_dir%/var/translations'
- '%kernel.project_dir%/src/CoreBundle/Resources/translations'
fallbacks:
- '%locale%'

@ -1,6 +1,6 @@
twig:
debug: '%kernel.debug%'
paths: ['%kernel.project_dir%/templates', '%kernel.project_dir%/public/main/template/', '%kernel.project_dir%/public/plugin/']
paths: ['%kernel.project_dir%/var/templates', '%kernel.project_dir%/public/main/template/', '%kernel.project_dir%/public/plugin/']
form_themes:
- 'bootstrap_4_layout.html.twig'
- '@SonataFormatter/Form/formatter.html.twig'

@ -76,7 +76,7 @@ if (!array_key_exists($installationLanguage, get_language_folder_list())) {
// Set translation
$translator = new Translator($installationLanguage);
$translator->addLoader('po', new PoFileLoader());
$translator->addResource('po', "../../../translations/installation.$installationLanguage.po", $installationLanguage);
$translator->addResource('po', "../../../var/translations/installation.$installationLanguage.po", $installationLanguage);
Container::$translator = $translator;
// The function api_get_setting() might be called within the installation scripts.

@ -1,9 +0,0 @@
{% extends '@ChamiloTheme/Layout/base-layout.html.twig' %}
{# Edit the default chamilo template #}
{% block page_content %}
{{ parent() }}
{% endblock %}

@ -1,7 +0,0 @@
{% extends '@ChamiloTheme/Layout/base-layout.html.twig' %}
{# Edit the default chamilo template #}
{% block page_content %}
{{ parent() }}
{% endblock %}

@ -1,69 +0,0 @@
{% extends "@ChamiloUser/layout.html.twig" %}
{% block fos_user_content %}
{% block sonata_user_login %}
{% block sonata_user_login_error %}
{% if error %}
<div class="alert alert-danger alert-danger">
{{ error.messageKey|trans(error.messageData, 'FOSUserBundle') }}
</div>
{% endif %}
{% endblock %}
<div class="login-box-body">
{% block sonata_user_login_form %}
<form id="123" action="{{ path("fos_user_security_check") }}"
method="post" role="form">
<input type="hidden" name="_csrf_token"
value="{{ csrf_token('authenticate') }}"/>
<div class="form-group has-feedback">
<label for="username"
class="col-sm-4 control-label">{{ 'security.login.username'|trans({}, 'FOSUserBundle') }}</label>
<input type="text" class="form-control" id="username"
name="_username" value="{{ last_username }}"
required="required"/>
</div>
<div class="form-group has-feedback">
<label for="password"
class="col-sm-4 control-label">{{ 'security.login.password'|trans({}, 'FOSUserBundle') }}</label>
<input type="password" class="form-control"
id="password"
name="_password" required="required"/>
</div>
<div class="form-group has-feedback">
<div class="checkbox control-group">
<label for="remember_me">
<input type="checkbox" id="remember_me"
name="_remember_me" value="on"/>
{{ 'security.login.remember_me'|trans({}, 'FOSUserBundle') }}
</label>
</div>
</div>
<div class="form-group has-feedback">
{#<a href="{{ path('fos_user_resetting_request') }}">#}
<a href="{{ path('legacy_main', { 'name' : 'auth/lostPassword.php'}) }}">
{{ 'forgotten_password'|trans({}, 'SonataUserBundle') }}
</a>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<input type="submit" id="_submit" name="_submit"
class="btn btn-primary"
value="{{ 'security.login.submit'|trans({}, 'FOSUserBundle') }}"/>
</div>
</div>
</form>
{% endblock %}
</div>
{% endblock %}
{% endblock fos_user_content %}

@ -1,21 +0,0 @@
msgid "Installation language"
msgstr "Installation language"
msgid "Requirements"
msgstr "Requirements"
msgid "Database settings"
msgid "Database settings"
msgid "Read the installation guide"
msgstr "Read the installation guide"
msgid "Please select installation language"
msgstr "Please select installation language"
msgid "DefaultInstallAdminFirstname"
msgstr "Joe"
msgid "DefaultInstallAdminLastname"
msgstr "Doe"

@ -1,15 +0,0 @@
msgid "Installation language"
msgstr "Langue d'installation"
msgid "Database settings"
msgid "Paramètres de base de données"
msgid "Requirements"
msgstr "Pré-requis"
msgid "Read the installation guide"
msgstr "Lire le guide d'installation"
msgid "Please select installation language"
msgstr "Veuillez sélectionner la langue de l'installateur"
Loading…
Cancel
Save