Add translations

This commit is contained in:
Jeremy Benoist 2016-03-05 22:29:58 +01:00
parent 9bf15f0269
commit 1256f6fe34
9 changed files with 49 additions and 18 deletions

View file

@ -11,6 +11,8 @@ use Wallabag\CoreBundle\Form\Type\ClientType;
class DeveloperController extends Controller
{
/**
* List all clients and link to create a new one.
*
* @Route("/developer", name="developer")
*
* @return \Symfony\Component\HttpFoundation\Response
@ -25,6 +27,8 @@ class DeveloperController extends Controller
}
/**
* Create a client (an app).
*
* @param Request $request
*
* @Route("/developer/client/create", name="developer_create_client")
@ -62,13 +66,13 @@ class DeveloperController extends Controller
/**
* Remove a client.
*
* @param Request $request
* @param Client $client
*
* @Route("/developer/client/delete/{id}", requirements={"id" = "\d+"}, name="developer_delete_client")
*
* @return \Symfony\Component\HttpFoundation\RedirectResponse
*/
public function deleteClientAction(Request $request, Client $client)
public function deleteClientAction(Client $client)
{
$em = $this->getDoctrine()->getManager();
$em->remove($client);
@ -83,6 +87,8 @@ class DeveloperController extends Controller
}
/**
* Display developer how to use an existing app.
*
* @Route("/developer/howto/first-app", name="developer_howto_firstapp")
*
* @return \Symfony\Component\HttpFoundation\Response

View file

@ -14,8 +14,8 @@ class ClientType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('redirect_uris', UrlType::class, array('required' => true))
->add('save', SubmitType::class, array('label' => 'Create new client'))
->add('redirect_uris', UrlType::class, array('required' => true, 'label' => 'Redirect URIs'))
->add('save', SubmitType::class, array('label' => 'Create a new client'))
;
$builder->get('redirect_uris')

View file

@ -240,3 +240,28 @@ If you need some help, we are here for you.: "Parce que vous avez peut-être bes
On GitHub: "Sur GitHub"
By email: "Par email"
On Gitter: "Sur Gitter"
# developer
Developer: Développeur
Welcome to the wallabag API: "Bienvenue sur l'API de wallabag"
How to create my first application: "Comment créer votre première application"
View full API documentation: "Voir la documentation complète de l'API"
Clients: "Clients"
Create a new client: "Créer une nouveau client"
Existing clients: "Les clients existants"
Client ID: "ID Client"
Client secret: "Clé secrète"
Redirect URIs: "URLs de redirection"
Grant type allowed: "Type de privilège accordé"
You have the ability to remove this client. This action is IRREVERSIBLE !: "Vous avez la possibilité de supprimer un client. Cette action est IRREVERSIBLE !"
If you remove it, every app configured with that client won't be able to auth on your wallabag.: "Si vous supprimez un client, toutes les applications qui l'utilisaient ne fonctionneront plus avec votre compte wallabag."
Remove this client: "Supprimer ce client"
New client: "Nouveau client"
You are about to create a new client. Please fill the field below for the redirect URI of your application.: "Vous allez créer un nouveau client. Merci de remplir l'url de redirection vers votre application."
Back: "Retour"
Client parameters: "Les parameters de votre client"
New client created.: "Nouveau client créé."
Here are your client parameters.: "Voilà les paramètres de votre client"
Read the howto "Create my first application": "Lire \"comment créer ma première application\""
Client deleted: "Client supprimé"
No client yet.: "Aucun client pour le moment"

View file

@ -8,7 +8,7 @@
<div class="card-panel settings">
<div class="row">
<p>{% trans %}You are about to create a new client. Please fill the field below for the redirect URI of your application:{% endtrans %}</p>
<p>{% trans %}You are about to create a new client. Please fill the field below for the redirect URI of your application.{% endtrans %}</p>
{{ form_start(form) }}
{{ form_errors(form) }}

View file

@ -9,8 +9,8 @@
<div class="row">
<p>{% trans %}Here are your client parameters.{% endtrans %}</p>
<ul>
<li>{% trans %}Client ID:{% endtrans %} <strong><pre>{{ client_id }}</pre></strong></li>
<li>{% trans %}Client secret:{% endtrans %} <strong><pre>{{ client_secret }}</pre></strong></li>
<li>{% trans %}Client ID{% endtrans %}: <strong><pre>{{ client_id }}</pre></strong></li>
<li>{% trans %}Client secret{% endtrans %}: <strong><pre>{{ client_secret }}</pre></strong></li>
</ul>
<a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a>

View file

@ -31,19 +31,19 @@
<div class="collapsible-body">
<table class="striped">
<tr>
<td>{% trans %}Client ID:{% endtrans %}</td>
<td>{% trans %}Client ID{% endtrans %}</td>
<td><strong><code>{{ client.id }}_{{ client.randomId }}</code></strong></td>
</tr>
<tr>
<td>{% trans %}Client secret:{% endtrans %}</td>
<td>{% trans %}Client secret{% endtrans %}</td>
<td><strong><code>{{ client.secret }}</code></strong></td>
</tr>
<tr>
<td>{% trans %}Redirect URIs:{% endtrans %}</td>
<td>{% trans %}Redirect URIs{% endtrans %}</td>
<td><strong><code>{{ client.redirectUris|json_encode() }}</code></strong></td>
</tr>
<tr>
<td>{% trans %}Grant type allowed:{% endtrans %}</td>
<td>{% trans %}Grant type allowed{% endtrans %}</td>
<td><strong><code>{{ client.allowedGrantTypes|json_encode() }}</code></strong></td>
</tr>
</table>

View file

@ -8,7 +8,7 @@
<div class="card-panel settings">
<div class="row">
<p>{% trans %}You are about to create a new client. Please fill the field below for the redirect URI of your application:{% endtrans %}</p>
<p>{% trans %}You are about to create a new client. Please fill the field below for the redirect URI of your application.{% endtrans %}</p>
{{ form_start(form) }}
{{ form_errors(form) }}

View file

@ -9,8 +9,8 @@
<div class="row">
<p>{% trans %}Here are your client parameters.{% endtrans %}</p>
<ul>
<li>{% trans %}Client ID:{% endtrans %} <strong><pre>{{ client_id }}</pre></strong></li>
<li>{% trans %}Client secret:{% endtrans %} <strong><pre>{{ client_secret }}</pre></strong></li>
<li>{% trans %}Client ID{% endtrans %}: <strong><pre>{{ client_id }}</pre></strong></li>
<li>{% trans %}Client secret{% endtrans %}: <strong><pre>{{ client_secret }}</pre></strong></li>
</ul>
<a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a>

View file

@ -31,19 +31,19 @@
<div class="collapsible-body">
<table class="striped">
<tr>
<td>{% trans %}Client ID:{% endtrans %}</td>
<td>{% trans %}Client ID{% endtrans %}</td>
<td><strong><code>{{ client.id }}_{{ client.randomId }}</code></strong></td>
</tr>
<tr>
<td>{% trans %}Client secret:{% endtrans %}</td>
<td>{% trans %}Client secret{% endtrans %}</td>
<td><strong><code>{{ client.secret }}</code></strong></td>
</tr>
<tr>
<td>{% trans %}Redirect URIs:{% endtrans %}</td>
<td>{% trans %}Redirect URIs{% endtrans %}</td>
<td><strong><code>{{ client.redirectUris|json_encode() }}</code></strong></td>
</tr>
<tr>
<td>{% trans %}Grant type allowed:{% endtrans %}</td>
<td>{% trans %}Grant type allowed{% endtrans %}</td>
<td><strong><code>{{ client.allowedGrantTypes|json_encode() }}</code></strong></td>
</tr>
</table>