Commit 47448a1b authored by Thomas's avatar Thomas
Browse files

Dutch translation + some changes

parent de2b9349
**If you want to contribute to a _translation_:**[![Crowdin](https://badges.crowdin.net/fediplan/localized.svg)](https://crowdin.com/project/fediplan)
### How to install FediPlan
**1 - Clone the repository**
......
......@@ -21,5 +21,5 @@ security:
# Note: Only the *first* access control that matches will be used
access_control:
# - { path: ^/admin, roles: ROLE_ADMIN }
- { path: ^/(en|fr)?/schedule, roles: ROLE_USER }
- { path: ^/(en|fr)?/scheduled, roles: ROLE_USER }
- { path: ^/(en|fr|nl)?/schedule, roles: ROLE_USER }
- { path: ^/(en|fr|nl)?/scheduled, roles: ROLE_USER }
......@@ -4,7 +4,7 @@
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
allowed_language: "fr|en|nl"
services:
# default configuration for services in *this* file
_defaults:
......
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icon-css-nl" viewBox="0 0 640 480">
<rect fill="#21468b" width="640" height="480"/>
<rect fill="#fff" width="640" height="320"/>
<rect fill="#ae1c28" width="640" height="160"/>
</svg>
......@@ -33,7 +33,7 @@ class FediPlanController extends AbstractController
/**
* @Route("/{_locale}",name="index", defaults={"_locale"="en"}, requirements={"_locale": "en|fr"})
* @Route("/{_locale}",name="index", defaults={"_locale"="en"}, requirements={"_locale": "%allowed_language%"})
*/
public function indexAction(Request $request, AuthorizationCheckerInterface $authorizationChecker, ConnectMastodonAccountFlow $flow, Mastodon_api $mastodon_api, TranslatorInterface $translator, EventDispatcherInterface $eventDispatcher)
{
......@@ -146,7 +146,7 @@ class FediPlanController extends AbstractController
/**
* @Route("/{_locale}/schedule", name="schedule", defaults={"_locale"="en"}, requirements={"_locale": "en|fr"})
* @Route("/{_locale}/schedule", name="schedule", defaults={"_locale"="en"}, requirements={"_locale": "%allowed_language%"})
*/
public function schedule(Request $request, Mastodon_api $mastodon_api)
{
......@@ -234,7 +234,7 @@ class FediPlanController extends AbstractController
/**
* @Route("/{_locale}/scheduled", name="scheduled", defaults={"_locale"="en"}, requirements={"_locale": "en|fr"})
* @Route("/{_locale}/scheduled", name="scheduled", defaults={"_locale"="en"}, requirements={"_locale": "%allowed_language%"})
*/
public function scheduled()
{
......@@ -273,7 +273,7 @@ class FediPlanController extends AbstractController
}
/**
* @Route("/{_locale}/scheduled/delete/messages/{id}", options={"expose"=true}, name="delete_message", methods={"POST"}, defaults={"_locale"="en"}, requirements={"_locale": "en|fr"})
* @Route("/{_locale}/scheduled/delete/messages/{id}", options={"expose"=true}, name="delete_message", methods={"POST"}, defaults={"_locale"="en"}, requirements={"_locale": "%allowed_language%"})
*/
public function deleteMessage(Mastodon_api $mastodon_api, String $id = null){
......@@ -293,7 +293,7 @@ class FediPlanController extends AbstractController
/**
* @Route("/about",defaults={"_locale"="en"})
* @Route("/{_locale}/about", name="about", defaults={"_locale":"en"}, requirements={"_locale": "en|fr"})
* @Route("/{_locale}/about", name="about", defaults={"_locale":"en"}, requirements={"_locale": "%allowed_language%"})
*/
public function about()
{
......
......@@ -24,4 +24,12 @@
</div>
</div>
<div class="row">
<div class="col-md-8 alert alert-info" role="alert">
You can help to translate the project into your language with <b>Crowdin</b> at <a title="Crowdin" target="_blank" href="https://crowdin.com/project/fediplan"><img src="https://badges.crowdin.net/fediplan/localized.svg"></a>
</div>
</div>
{% endblock %}
......@@ -42,8 +42,9 @@
{% if route == "app_fediplan_about" %}
{% set route = "about" %}
{% endif %}
<a class="dropdown-item" href="{{ path(route, {'_locale':'en' }) }}">English</a>
<a class="dropdown-item" href="{{ path(route, {'_locale':'fr' }) }}">Français</a>
<a class="dropdown-item" href="{{ path(route, {'_locale':'en' }) }}"><img src="{{ asset("img/flags/en.svg") }}" alt="English" width="20">&nbsp;&nbsp;English</a>
<a class="dropdown-item" href="{{ path(route, {'_locale':'fr' }) }}"><img src="{{ asset("img/flags/fr.svg") }}" alt="Français" width="20">&nbsp;&nbsp;Français</a>
<a class="dropdown-item" href="{{ path(route, {'_locale':'nl' }) }}"><img src="{{ asset("img/flags/nl.svg") }}" alt="Nederlands" width="20">&nbsp;&nbsp;Nederlands</a>
</div>
</li>
</ul>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment