class DeveloperController extends Controller
{
/**
+ * List all clients and link to create a new one.
+ *
* @Route("/developer", name="developer")
*
* @return \Symfony\Component\HttpFoundation\Response
}
/**
+ * Create a client (an app).
+ *
* @param Request $request
*
* @Route("/developer/client/create", name="developer_create_client")
/**
* 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);
}
/**
+ * Display developer how to use an existing app.
+ *
* @Route("/developer/howto/first-app", name="developer_howto_firstapp")
*
* @return \Symfony\Component\HttpFoundation\Response
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')
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"
<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) }}
<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>
<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>
<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) }}
<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>
<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>