aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Wallabag/CoreBundle/Controller/DeveloperController.php10
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ClientType.php4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml25
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig4
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig8
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig4
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig8
9 files changed, 49 insertions, 18 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/DeveloperController.php b/src/Wallabag/CoreBundle/Controller/DeveloperController.php
index e7720355..71065534 100644
--- a/src/Wallabag/CoreBundle/Controller/DeveloperController.php
+++ b/src/Wallabag/CoreBundle/Controller/DeveloperController.php
@@ -11,6 +11,8 @@ use Wallabag\CoreBundle\Form\Type\ClientType;
11class DeveloperController extends Controller 11class DeveloperController extends Controller
12{ 12{
13 /** 13 /**
14 * List all clients and link to create a new one.
15 *
14 * @Route("/developer", name="developer") 16 * @Route("/developer", name="developer")
15 * 17 *
16 * @return \Symfony\Component\HttpFoundation\Response 18 * @return \Symfony\Component\HttpFoundation\Response
@@ -25,6 +27,8 @@ class DeveloperController extends Controller
25 } 27 }
26 28
27 /** 29 /**
30 * Create a client (an app).
31 *
28 * @param Request $request 32 * @param Request $request
29 * 33 *
30 * @Route("/developer/client/create", name="developer_create_client") 34 * @Route("/developer/client/create", name="developer_create_client")
@@ -62,13 +66,13 @@ class DeveloperController extends Controller
62 /** 66 /**
63 * Remove a client. 67 * Remove a client.
64 * 68 *
65 * @param Request $request 69 * @param Client $client
66 * 70 *
67 * @Route("/developer/client/delete/{id}", requirements={"id" = "\d+"}, name="developer_delete_client") 71 * @Route("/developer/client/delete/{id}", requirements={"id" = "\d+"}, name="developer_delete_client")
68 * 72 *
69 * @return \Symfony\Component\HttpFoundation\RedirectResponse 73 * @return \Symfony\Component\HttpFoundation\RedirectResponse
70 */ 74 */
71 public function deleteClientAction(Request $request, Client $client) 75 public function deleteClientAction(Client $client)
72 { 76 {
73 $em = $this->getDoctrine()->getManager(); 77 $em = $this->getDoctrine()->getManager();
74 $em->remove($client); 78 $em->remove($client);
@@ -83,6 +87,8 @@ class DeveloperController extends Controller
83 } 87 }
84 88
85 /** 89 /**
90 * Display developer how to use an existing app.
91 *
86 * @Route("/developer/howto/first-app", name="developer_howto_firstapp") 92 * @Route("/developer/howto/first-app", name="developer_howto_firstapp")
87 * 93 *
88 * @return \Symfony\Component\HttpFoundation\Response 94 * @return \Symfony\Component\HttpFoundation\Response
diff --git a/src/Wallabag/CoreBundle/Form/Type/ClientType.php b/src/Wallabag/CoreBundle/Form/Type/ClientType.php
index cb6b5e65..dd934715 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ClientType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ClientType.php
@@ -14,8 +14,8 @@ class ClientType extends AbstractType
14 public function buildForm(FormBuilderInterface $builder, array $options) 14 public function buildForm(FormBuilderInterface $builder, array $options)
15 { 15 {
16 $builder 16 $builder
17 ->add('redirect_uris', UrlType::class, array('required' => true)) 17 ->add('redirect_uris', UrlType::class, array('required' => true, 'label' => 'Redirect URIs'))
18 ->add('save', SubmitType::class, array('label' => 'Create new client')) 18 ->add('save', SubmitType::class, array('label' => 'Create a new client'))
19 ; 19 ;
20 20
21 $builder->get('redirect_uris') 21 $builder->get('redirect_uris')
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index e4935b9e..6fbdcb9b 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -240,3 +240,28 @@ If you need some help, we are here for you.: "Parce que vous avez peut-être bes
240On GitHub: "Sur GitHub" 240On GitHub: "Sur GitHub"
241By email: "Par email" 241By email: "Par email"
242On Gitter: "Sur Gitter" 242On Gitter: "Sur Gitter"
243
244# developer
245Developer: Développeur
246Welcome to the wallabag API: "Bienvenue sur l'API de wallabag"
247How to create my first application: "Comment créer votre première application"
248View full API documentation: "Voir la documentation complète de l'API"
249Clients: "Clients"
250Create a new client: "Créer une nouveau client"
251Existing clients: "Les clients existants"
252Client ID: "ID Client"
253Client secret: "Clé secrète"
254Redirect URIs: "URLs de redirection"
255Grant type allowed: "Type de privilège accordé"
256You have the ability to remove this client. This action is IRREVERSIBLE !: "Vous avez la possibilité de supprimer un client. Cette action est IRREVERSIBLE !"
257If 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."
258Remove this client: "Supprimer ce client"
259New client: "Nouveau client"
260You 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."
261Back: "Retour"
262Client parameters: "Les parameters de votre client"
263New client created.: "Nouveau client créé."
264Here are your client parameters.: "Voilà les paramètres de votre client"
265Read the howto "Create my first application": "Lire \"comment créer ma première application\""
266Client deleted: "Client supprimé"
267No client yet.: "Aucun client pour le moment"
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig
index 5cbe1c39..c9ce6d08 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client.html.twig
@@ -8,7 +8,7 @@
8 <div class="card-panel settings"> 8 <div class="card-panel settings">
9 9
10 <div class="row"> 10 <div class="row">
11 <p>{% trans %}You are about to create a new client. Please fill the field below for the redirect URI of your application:{% endtrans %}</p> 11 <p>{% trans %}You are about to create a new client. Please fill the field below for the redirect URI of your application.{% endtrans %}</p>
12 {{ form_start(form) }} 12 {{ form_start(form) }}
13 {{ form_errors(form) }} 13 {{ form_errors(form) }}
14 14
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig
index c2f7e95c..a214dfd0 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/client_parameters.html.twig
@@ -9,8 +9,8 @@
9 <div class="row"> 9 <div class="row">
10 <p>{% trans %}Here are your client parameters.{% endtrans %}</p> 10 <p>{% trans %}Here are your client parameters.{% endtrans %}</p>
11 <ul> 11 <ul>
12 <li>{% trans %}Client ID:{% endtrans %} <strong><pre>{{ client_id }}</pre></strong></li> 12 <li>{% trans %}Client ID{% endtrans %}: <strong><pre>{{ client_id }}</pre></strong></li>
13 <li>{% trans %}Client secret:{% endtrans %} <strong><pre>{{ client_secret }}</pre></strong></li> 13 <li>{% trans %}Client secret{% endtrans %}: <strong><pre>{{ client_secret }}</pre></strong></li>
14 </ul> 14 </ul>
15 15
16 <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> 16 <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig
index 604bfec9..2e7dbcab 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Developer/index.html.twig
@@ -31,19 +31,19 @@
31 <div class="collapsible-body"> 31 <div class="collapsible-body">
32 <table class="striped"> 32 <table class="striped">
33 <tr> 33 <tr>
34 <td>{% trans %}Client ID:{% endtrans %}</td> 34 <td>{% trans %}Client ID{% endtrans %}</td>
35 <td><strong><code>{{ client.id }}_{{ client.randomId }}</code></strong></td> 35 <td><strong><code>{{ client.id }}_{{ client.randomId }}</code></strong></td>
36 </tr> 36 </tr>
37 <tr> 37 <tr>
38 <td>{% trans %}Client secret:{% endtrans %}</td> 38 <td>{% trans %}Client secret{% endtrans %}</td>
39 <td><strong><code>{{ client.secret }}</code></strong></td> 39 <td><strong><code>{{ client.secret }}</code></strong></td>
40 </tr> 40 </tr>
41 <tr> 41 <tr>
42 <td>{% trans %}Redirect URIs:{% endtrans %}</td> 42 <td>{% trans %}Redirect URIs{% endtrans %}</td>
43 <td><strong><code>{{ client.redirectUris|json_encode() }}</code></strong></td> 43 <td><strong><code>{{ client.redirectUris|json_encode() }}</code></strong></td>
44 </tr> 44 </tr>
45 <tr> 45 <tr>
46 <td>{% trans %}Grant type allowed:{% endtrans %}</td> 46 <td>{% trans %}Grant type allowed{% endtrans %}</td>
47 <td><strong><code>{{ client.allowedGrantTypes|json_encode() }}</code></strong></td> 47 <td><strong><code>{{ client.allowedGrantTypes|json_encode() }}</code></strong></td>
48 </tr> 48 </tr>
49 </table> 49 </table>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client.html.twig
index 5cbe1c39..c9ce6d08 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client.html.twig
@@ -8,7 +8,7 @@
8 <div class="card-panel settings"> 8 <div class="card-panel settings">
9 9
10 <div class="row"> 10 <div class="row">
11 <p>{% trans %}You are about to create a new client. Please fill the field below for the redirect URI of your application:{% endtrans %}</p> 11 <p>{% trans %}You are about to create a new client. Please fill the field below for the redirect URI of your application.{% endtrans %}</p>
12 {{ form_start(form) }} 12 {{ form_start(form) }}
13 {{ form_errors(form) }} 13 {{ form_errors(form) }}
14 14
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig
index c2f7e95c..a214dfd0 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/client_parameters.html.twig
@@ -9,8 +9,8 @@
9 <div class="row"> 9 <div class="row">
10 <p>{% trans %}Here are your client parameters.{% endtrans %}</p> 10 <p>{% trans %}Here are your client parameters.{% endtrans %}</p>
11 <ul> 11 <ul>
12 <li>{% trans %}Client ID:{% endtrans %} <strong><pre>{{ client_id }}</pre></strong></li> 12 <li>{% trans %}Client ID{% endtrans %}: <strong><pre>{{ client_id }}</pre></strong></li>
13 <li>{% trans %}Client secret:{% endtrans %} <strong><pre>{{ client_secret }}</pre></strong></li> 13 <li>{% trans %}Client secret{% endtrans %}: <strong><pre>{{ client_secret }}</pre></strong></li>
14 </ul> 14 </ul>
15 15
16 <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a> 16 <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{% trans %}Back{% endtrans %}</a>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig
index 604bfec9..2e7dbcab 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/index.html.twig
@@ -31,19 +31,19 @@
31 <div class="collapsible-body"> 31 <div class="collapsible-body">
32 <table class="striped"> 32 <table class="striped">
33 <tr> 33 <tr>
34 <td>{% trans %}Client ID:{% endtrans %}</td> 34 <td>{% trans %}Client ID{% endtrans %}</td>
35 <td><strong><code>{{ client.id }}_{{ client.randomId }}</code></strong></td> 35 <td><strong><code>{{ client.id }}_{{ client.randomId }}</code></strong></td>
36 </tr> 36 </tr>
37 <tr> 37 <tr>
38 <td>{% trans %}Client secret:{% endtrans %}</td> 38 <td>{% trans %}Client secret{% endtrans %}</td>
39 <td><strong><code>{{ client.secret }}</code></strong></td> 39 <td><strong><code>{{ client.secret }}</code></strong></td>
40 </tr> 40 </tr>
41 <tr> 41 <tr>
42 <td>{% trans %}Redirect URIs:{% endtrans %}</td> 42 <td>{% trans %}Redirect URIs{% endtrans %}</td>
43 <td><strong><code>{{ client.redirectUris|json_encode() }}</code></strong></td> 43 <td><strong><code>{{ client.redirectUris|json_encode() }}</code></strong></td>
44 </tr> 44 </tr>
45 <tr> 45 <tr>
46 <td>{% trans %}Grant type allowed:{% endtrans %}</td> 46 <td>{% trans %}Grant type allowed{% endtrans %}</td>
47 <td><strong><code>{{ client.allowedGrantTypes|json_encode() }}</code></strong></td> 47 <td><strong><code>{{ client.allowedGrantTypes|json_encode() }}</code></strong></td>
48 </tr> 48 </tr>
49 </table> 49 </table>