Skip to content
Snippets Groups Projects
Commit 04401988 authored by Camille Simiand's avatar Camille Simiand
Browse files

WIP - add switch buttons en/fr

parent d28ab22d
Branches
Tags
1 merge request!76tuleap-76-internationalize-i18n-app
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
"php": ">=8.1", "php": ">=8.1",
"ext-ctype": "*", "ext-ctype": "*",
"ext-curl": "*", "ext-curl": "*",
"ext-gd": "*",
"ext-iconv": "*", "ext-iconv": "*",
"ext-json": "*", "ext-json": "*",
"ext-simplexml": "*", "ext-simplexml": "*",
...@@ -54,8 +55,8 @@ ...@@ -54,8 +55,8 @@
"symfonycasts/reset-password-bundle": "^1.11", "symfonycasts/reset-password-bundle": "^1.11",
"symfonycasts/verify-email-bundle": "^1.6", "symfonycasts/verify-email-bundle": "^1.6",
"twig/extra-bundle": "^2.12|^3.0", "twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0", "twig/intl-extra": "^3.3",
"ext-gd": "*" "twig/twig": "^2.12|^3.0"
}, },
"require-dev": { "require-dev": {
"ext-dom": "*", "ext-dom": "*",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "fd7c9a34c6ba09c3a42ece90733af736", "content-hash": "077d009e42a0c08b3582c05e161c5bf8",
"packages": [ "packages": [
{ {
"name": "composer/package-versions-deprecated", "name": "composer/package-versions-deprecated",
...@@ -8148,6 +8148,75 @@ ...@@ -8148,6 +8148,75 @@
], ],
"time": "2022-01-04T13:58:53+00:00" "time": "2022-01-04T13:58:53+00:00"
}, },
{
"name": "twig/intl-extra",
"version": "v3.3.5",
"source": {
"type": "git",
"url": "https://github.com/twigphp/intl-extra.git",
"reference": "8dca6f4c5a00cdd3c43b6bd080f50d32aca33a84"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/intl-extra/zipball/8dca6f4c5a00cdd3c43b6bd080f50d32aca33a84",
"reference": "8dca6f4c5a00cdd3c43b6bd080f50d32aca33a84",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"symfony/intl": "^4.4|^5.0|^6.0",
"twig/twig": "^2.7|^3.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"psr-4": {
"Twig\\Extra\\Intl\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
}
],
"description": "A Twig extension for Intl",
"homepage": "https://twig.symfony.com",
"keywords": [
"intl",
"twig"
],
"support": {
"source": "https://github.com/twigphp/intl-extra/tree/v3.3.5"
},
"funding": [
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/twig/twig",
"type": "tidelift"
}
],
"time": "2022-01-02T10:02:25+00:00"
},
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v3.3.8", "version": "v3.3.8",
...@@ -11156,11 +11225,11 @@ ...@@ -11156,11 +11225,11 @@
"php": ">=8.1", "php": ">=8.1",
"ext-ctype": "*", "ext-ctype": "*",
"ext-curl": "*", "ext-curl": "*",
"ext-gd": "*",
"ext-iconv": "*", "ext-iconv": "*",
"ext-json": "*", "ext-json": "*",
"ext-simplexml": "*", "ext-simplexml": "*",
"ext-zip": "^1.15", "ext-zip": "^1.15"
"ext-gd": "*"
}, },
"platform-dev": { "platform-dev": {
"ext-dom": "*" "ext-dom": "*"
......
...@@ -120,7 +120,7 @@ class CapsuleController extends AbstractController ...@@ -120,7 +120,7 @@ class CapsuleController extends AbstractController
); );
} }
#[Route('capsule/edit/{path}', name:'edit_capsule')] #[Route('/capsule/edit/{path}', name:'edit_capsule')]
public function edit(string $path): Response public function edit(string $path): Response
{ {
$current_user = $this->getUser(); $current_user = $this->getUser();
......
...@@ -74,7 +74,7 @@ class User implements UserInterface, LegacyPasswordAuthenticatedUserInterface ...@@ -74,7 +74,7 @@ class User implements UserInterface, LegacyPasswordAuthenticatedUserInterface
/** /**
* @var Collection<Group> * @var Collection<Group>
*/ */
#[ORM\OneToMany(targetEntity:'App\Entity\Group', mappedBy:'author')] #[ORM\OneToMany(mappedBy: 'author', targetEntity: 'App\Entity\Group')]
private Collection $groups; private Collection $groups;
/** /**
......
...@@ -695,6 +695,9 @@ ...@@ -695,6 +695,9 @@
"twig/extra-bundle": { "twig/extra-bundle": {
"version": "v3.3.3" "version": "v3.3.3"
}, },
"twig/intl-extra": {
"version": "v3.3.5"
},
"twig/twig": { "twig/twig": {
"version": "v3.3.3" "version": "v3.3.3"
}, },
......
...@@ -26,6 +26,16 @@ ...@@ -26,6 +26,16 @@
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %} {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
<div class="d-flex flex-column position-absolute end-0 align-content-end text-end fw-light gray-600"> <div class="d-flex flex-column position-absolute end-0 align-content-end text-end fw-light gray-600">
<div class="nav-item dropdown">
<a class="nav-link p-0 dropdown-toggle text-capitalize" href="#" id="dropdown-language" role="button"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ app.request.locale|locale_name(app.request.locale) }}
</a>
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdown-language">
<li><a class="dropdown-item" href="{{ path('home', {_locale: 'en'}) }}">English</a></li>
<li><a class="dropdown-item" href="{{ path('home', {_locale: 'fr'}) }}">Français</a></li>
</ul>
</div>
<div class="fw-bold text-capitalize">{{ app.user.firstName }} {{ app.user.lastName }}</div> <div class="fw-bold text-capitalize">{{ app.user.firstName }} {{ app.user.lastName }}</div>
<a href="{{ path('show_profile') }}" class="text-decoration-none fs-5">My profile</a> <a href="{{ path('show_profile') }}" class="text-decoration-none fs-5">My profile</a>
<a href="{{ path('edit_user_groups') }}" class="text-decoration-none fs-5"> <a href="{{ path('edit_user_groups') }}" class="text-decoration-none fs-5">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment