diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-04-30 09:16:55 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2017-06-14 17:53:52 +0200 |
commit | 0f8268c93e6210d368f9dcd1900274871a9eacdf (patch) | |
tree | 251024ae114d2a14a67399ba28d02ddb6d031bad /src/Wallabag | |
parent | f93a3109a5f0999dbbd69131c9e5041c390120c9 (diff) | |
download | wallabag-0f8268c93e6210d368f9dcd1900274871a9eacdf.tar.gz wallabag-0f8268c93e6210d368f9dcd1900274871a9eacdf.tar.zst wallabag-0f8268c93e6210d368f9dcd1900274871a9eacdf.zip |
Add client_credentials as grant_typeoauth-changes
Therefore, username and password are no longer needed
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Allow to have global clients, auth through direct token or auth code and bring scopes
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
fix review
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
remove redirect uri requirement on specific clients
add back password and depreciate it
enforce state
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Allow apps to register themselves
A handful of changes
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
change timeout values
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
set access_token lifetime to 1 year and double for refresh_token
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'src/Wallabag')
27 files changed, 912 insertions, 695 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php b/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php index 2dd26c07..c524a24c 100644 --- a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php +++ b/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php | |||
@@ -4,6 +4,7 @@ namespace Wallabag\ApiBundle\Controller; | |||
4 | 4 | ||
5 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; | 5 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | ||
7 | use Symfony\Component\HttpFoundation\Request; | 8 | use Symfony\Component\HttpFoundation\Request; |
8 | use Symfony\Component\HttpFoundation\JsonResponse; | 9 | use Symfony\Component\HttpFoundation\JsonResponse; |
9 | use Wallabag\CoreBundle\Entity\Entry; | 10 | use Wallabag\CoreBundle\Entity\Entry; |
@@ -21,7 +22,7 @@ class AnnotationRestController extends WallabagRestController | |||
21 | * ) | 22 | * ) |
22 | * | 23 | * |
23 | * @param Entry $entry | 24 | * @param Entry $entry |
24 | * | 25 | * @Security("has_role('ROLE_READ')") |
25 | * @return JsonResponse | 26 | * @return JsonResponse |
26 | */ | 27 | */ |
27 | public function getAnnotationsAction(Entry $entry) | 28 | public function getAnnotationsAction(Entry $entry) |
@@ -46,7 +47,7 @@ class AnnotationRestController extends WallabagRestController | |||
46 | * | 47 | * |
47 | * @param Request $request | 48 | * @param Request $request |
48 | * @param Entry $entry | 49 | * @param Entry $entry |
49 | * | 50 | * @Security("has_role('ROLE_WRITE')") |
50 | * @return JsonResponse | 51 | * @return JsonResponse |
51 | */ | 52 | */ |
52 | public function postAnnotationAction(Request $request, Entry $entry) | 53 | public function postAnnotationAction(Request $request, Entry $entry) |
@@ -72,7 +73,7 @@ class AnnotationRestController extends WallabagRestController | |||
72 | * | 73 | * |
73 | * @param Annotation $annotation | 74 | * @param Annotation $annotation |
74 | * @param Request $request | 75 | * @param Request $request |
75 | * | 76 | * @Security("has_role('ROLE_WRITE')") |
76 | * @return JsonResponse | 77 | * @return JsonResponse |
77 | */ | 78 | */ |
78 | public function putAnnotationAction(Annotation $annotation, Request $request) | 79 | public function putAnnotationAction(Annotation $annotation, Request $request) |
@@ -97,7 +98,7 @@ class AnnotationRestController extends WallabagRestController | |||
97 | * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") | 98 | * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") |
98 | * | 99 | * |
99 | * @param Annotation $annotation | 100 | * @param Annotation $annotation |
100 | * | 101 | * @Security("has_role('ROLE_WRITE')") |
101 | * @return JsonResponse | 102 | * @return JsonResponse |
102 | */ | 103 | */ |
103 | public function deleteAnnotationAction(Annotation $annotation) | 104 | public function deleteAnnotationAction(Annotation $annotation) |
diff --git a/src/Wallabag/ApiBundle/Controller/AppsController.php b/src/Wallabag/ApiBundle/Controller/AppsController.php new file mode 100644 index 00000000..6ef77667 --- /dev/null +++ b/src/Wallabag/ApiBundle/Controller/AppsController.php | |||
@@ -0,0 +1,189 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\ApiBundle\Controller; | ||
4 | |||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; | ||
6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
7 | use Symfony\Component\Finder\Exception\AccessDeniedException; | ||
8 | use Symfony\Component\HttpFoundation\JsonResponse; | ||
9 | use Symfony\Component\HttpFoundation\Request; | ||
10 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
11 | use Wallabag\ApiBundle\Entity\AccessToken; | ||
12 | use Wallabag\ApiBundle\Entity\Client; | ||
13 | use Wallabag\ApiBundle\Form\Type\ClientType; | ||
14 | |||
15 | class AppsController extends Controller | ||
16 | { | ||
17 | /** | ||
18 | * List all clients and link to create a new one. | ||
19 | * | ||
20 | * @Route("/apps", name="apps") | ||
21 | * | ||
22 | * @return \Symfony\Component\HttpFoundation\Response | ||
23 | */ | ||
24 | public function indexAction() | ||
25 | { | ||
26 | $clients = $this->getDoctrine()->getRepository('WallabagApiBundle:Client')->findByUser($this->getUser()->getId()); | ||
27 | |||
28 | $apps = $this->getDoctrine()->getRepository('WallabagApiBundle:AccessToken')->findAppsByUser($this->getUser()->getId()); | ||
29 | |||
30 | return $this->render('@WallabagCore/themes/common/Developer/index.html.twig', [ | ||
31 | 'clients' => $clients, | ||
32 | 'apps' => $apps, | ||
33 | ]); | ||
34 | } | ||
35 | |||
36 | /** | ||
37 | * Create a an app | ||
38 | * | ||
39 | * @param Request $request | ||
40 | * | ||
41 | * @Route("/api/apps", name="apps_create") | ||
42 | * @Method("POST") | ||
43 | * | ||
44 | * @return \Symfony\Component\HttpFoundation\Response | ||
45 | */ | ||
46 | public function createAppAction(Request $request) | ||
47 | { | ||
48 | $em = $this->getDoctrine()->getManager(); | ||
49 | |||
50 | $clientName = $request->request->get('client_name'); | ||
51 | $redirectURIs = $request->request->get('redirect_uris'); | ||
52 | $logoURI = $request->request->get('logo_uri'); | ||
53 | $description = $request->request->get('description'); | ||
54 | $appURI = $request->request->get('app_uri'); | ||
55 | $nextRedirect = $request->request->get('uri_redirect_after_creation'); | ||
56 | |||
57 | if (!$clientName) { | ||
58 | return new JsonResponse([ | ||
59 | 'error' => 'invalid_client_name', | ||
60 | 'error_description' => 'The client name cannot be empty', | ||
61 | ], 400); | ||
62 | } | ||
63 | |||
64 | if (!$redirectURIs) { | ||
65 | return new JsonResponse([ | ||
66 | 'error' => 'invalid_redirect_uri', | ||
67 | 'error_description' => 'One or more redirect_uri values are invalid', | ||
68 | ], 400); | ||
69 | } | ||
70 | |||
71 | $redirectURIs = (array) $redirectURIs; | ||
72 | |||
73 | $client = new Client(); | ||
74 | |||
75 | $client->setName($clientName); | ||
76 | |||
77 | $client->setDescription($description); | ||
78 | |||
79 | $client->setRedirectUris($redirectURIs); | ||
80 | |||
81 | $client->setImage($logoURI); | ||
82 | $client->setAppUrl($appURI); | ||
83 | |||
84 | $client->setAllowedGrantTypes(['token', 'refresh_token', 'authorization_code']); | ||
85 | $em->persist($client); | ||
86 | $em->flush(); | ||
87 | |||
88 | return new JsonResponse([ | ||
89 | 'client_id' => $client->getPublicId(), | ||
90 | 'client_secret' => $client->getSecret(), | ||
91 | 'client_name' => $client->getName(), | ||
92 | 'redirect_uri' => $client->getRedirectUris(), | ||
93 | 'description' => $client->getDescription(), | ||
94 | 'logo_uri' => $client->getImage(), | ||
95 | 'app_uri' => $client->getAppUrl(), | ||
96 | ], 201); | ||
97 | } | ||
98 | |||
99 | /** | ||
100 | * Create a client (an app). | ||
101 | * | ||
102 | * @param Request $request | ||
103 | * | ||
104 | * @Route("/apps/client/create", name="apps_create_client") | ||
105 | * | ||
106 | * @return \Symfony\Component\HttpFoundation\Response | ||
107 | */ | ||
108 | public function createClientAction(Request $request) | ||
109 | { | ||
110 | $em = $this->getDoctrine()->getManager(); | ||
111 | $client = new Client($this->getUser()); | ||
112 | $clientForm = $this->createForm(ClientType::class, $client); | ||
113 | $clientForm->handleRequest($request); | ||
114 | |||
115 | if ($clientForm->isSubmitted() && $clientForm->isValid()) { | ||
116 | $client->setAllowedGrantTypes(['password', 'token', 'refresh_token', 'client_credentials']); // Password is depreciated | ||
117 | $em->persist($client); | ||
118 | $em->flush(); | ||
119 | |||
120 | $this->get('session')->getFlashBag()->add( | ||
121 | 'notice', | ||
122 | $this->get('translator')->trans('flashes.developer.notice.client_created', ['%name%' => $client->getName()]) | ||
123 | ); | ||
124 | |||
125 | return $this->render('@WallabagCore/themes/common/Developer/client_parameters.html.twig', [ | ||
126 | 'client_id' => $client->getPublicId(), | ||
127 | 'client_secret' => $client->getSecret(), | ||
128 | 'client_name' => $client->getName(), | ||
129 | ]); | ||
130 | } | ||
131 | |||
132 | return $this->render('@WallabagCore/themes/common/Developer/client.html.twig', [ | ||
133 | 'form' => $clientForm->createView(), | ||
134 | ]); | ||
135 | } | ||
136 | |||
137 | /** | ||
138 | * Revoke an access token | ||
139 | * @param $token | ||
140 | * @Route("/api/revoke/{token}", name="apps_revoke_access_token") | ||
141 | * @return JsonResponse | ||
142 | */ | ||
143 | public function removeAccessTokenAction($token) | ||
144 | { | ||
145 | if (false === $this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) { | ||
146 | throw new AccessDeniedException(); | ||
147 | } | ||
148 | |||
149 | $em = $this->getDoctrine()->getManager(); | ||
150 | $accessToken = $em->getRepository('WallabagApiBundle:AccessToken')->findOneBy([ | ||
151 | 'user' => $this->getUser()->getId(), | ||
152 | 'token' => $token | ||
153 | ]); | ||
154 | if ($accessToken) { | ||
155 | $em->remove($accessToken); | ||
156 | $em->flush(); | ||
157 | |||
158 | return new JsonResponse([], 204); | ||
159 | } | ||
160 | return new JsonResponse([], 404); | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * Remove a client. | ||
165 | * | ||
166 | * @param Client $client | ||
167 | * | ||
168 | * @Route("/apps/client/delete/{id}", requirements={"id" = "\d+"}, name="apps_delete_client") | ||
169 | * | ||
170 | * @return \Symfony\Component\HttpFoundation\RedirectResponse | ||
171 | */ | ||
172 | public function deleteClientAction(Client $client) | ||
173 | { | ||
174 | if (null === $this->getUser() || $client->getUser()->getId() != $this->getUser()->getId()) { | ||
175 | throw $this->createAccessDeniedException('You can not access this client.'); | ||
176 | } | ||
177 | |||
178 | $em = $this->getDoctrine()->getManager(); | ||
179 | $em->remove($client); | ||
180 | $em->flush(); | ||
181 | |||
182 | $this->get('session')->getFlashBag()->add( | ||
183 | 'notice', | ||
184 | $this->get('translator')->trans('flashes.developer.notice.client_deleted', ['%name%' => $client->getName()]) | ||
185 | ); | ||
186 | |||
187 | return $this->redirect($this->generateUrl('apps')); | ||
188 | } | ||
189 | } | ||
diff --git a/src/Wallabag/ApiBundle/Controller/DeveloperController.php b/src/Wallabag/ApiBundle/Controller/DeveloperController.php deleted file mode 100644 index 9cb1b626..00000000 --- a/src/Wallabag/ApiBundle/Controller/DeveloperController.php +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\ApiBundle\Controller; | ||
4 | |||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | use Symfony\Component\HttpFoundation\Request; | ||
7 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
8 | use Wallabag\ApiBundle\Entity\Client; | ||
9 | use Wallabag\ApiBundle\Form\Type\ClientType; | ||
10 | |||
11 | class DeveloperController extends Controller | ||
12 | { | ||
13 | /** | ||
14 | * List all clients and link to create a new one. | ||
15 | * | ||
16 | * @Route("/developer", name="developer") | ||
17 | * | ||
18 | * @return \Symfony\Component\HttpFoundation\Response | ||
19 | */ | ||
20 | public function indexAction() | ||
21 | { | ||
22 | $clients = $this->getDoctrine()->getRepository('WallabagApiBundle:Client')->findByUser($this->getUser()->getId()); | ||
23 | |||
24 | return $this->render('@WallabagCore/themes/common/Developer/index.html.twig', [ | ||
25 | 'clients' => $clients, | ||
26 | ]); | ||
27 | } | ||
28 | |||
29 | /** | ||
30 | * Create a client (an app). | ||
31 | * | ||
32 | * @param Request $request | ||
33 | * | ||
34 | * @Route("/developer/client/create", name="developer_create_client") | ||
35 | * | ||
36 | * @return \Symfony\Component\HttpFoundation\Response | ||
37 | */ | ||
38 | public function createClientAction(Request $request) | ||
39 | { | ||
40 | $em = $this->getDoctrine()->getManager(); | ||
41 | $client = new Client($this->getUser()); | ||
42 | $clientForm = $this->createForm(ClientType::class, $client); | ||
43 | $clientForm->handleRequest($request); | ||
44 | |||
45 | if ($clientForm->isSubmitted() && $clientForm->isValid()) { | ||
46 | $client->setAllowedGrantTypes(['token', 'authorization_code', 'password', 'refresh_token']); | ||
47 | $em->persist($client); | ||
48 | $em->flush(); | ||
49 | |||
50 | $this->get('session')->getFlashBag()->add( | ||
51 | 'notice', | ||
52 | $this->get('translator')->trans('flashes.developer.notice.client_created', ['%name%' => $client->getName()]) | ||
53 | ); | ||
54 | |||
55 | return $this->render('@WallabagCore/themes/common/Developer/client_parameters.html.twig', [ | ||
56 | 'client_id' => $client->getPublicId(), | ||
57 | 'client_secret' => $client->getSecret(), | ||
58 | 'client_name' => $client->getName(), | ||
59 | ]); | ||
60 | } | ||
61 | |||
62 | return $this->render('@WallabagCore/themes/common/Developer/client.html.twig', [ | ||
63 | 'form' => $clientForm->createView(), | ||
64 | ]); | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * Remove a client. | ||
69 | * | ||
70 | * @param Client $client | ||
71 | * | ||
72 | * @Route("/developer/client/delete/{id}", requirements={"id" = "\d+"}, name="developer_delete_client") | ||
73 | * | ||
74 | * @return \Symfony\Component\HttpFoundation\RedirectResponse | ||
75 | */ | ||
76 | public function deleteClientAction(Client $client) | ||
77 | { | ||
78 | if (null === $this->getUser() || $client->getUser()->getId() != $this->getUser()->getId()) { | ||
79 | throw $this->createAccessDeniedException('You can not access this client.'); | ||
80 | } | ||
81 | |||
82 | $em = $this->getDoctrine()->getManager(); | ||
83 | $em->remove($client); | ||
84 | $em->flush(); | ||
85 | |||
86 | $this->get('session')->getFlashBag()->add( | ||
87 | 'notice', | ||
88 | $this->get('translator')->trans('flashes.developer.notice.client_deleted', ['%name%' => $client->getName()]) | ||
89 | ); | ||
90 | |||
91 | return $this->redirect($this->generateUrl('developer')); | ||
92 | } | ||
93 | |||
94 | /** | ||
95 | * Display developer how to use an existing app. | ||
96 | * | ||
97 | * @Route("/developer/howto/first-app", name="developer_howto_firstapp") | ||
98 | * | ||
99 | * @return \Symfony\Component\HttpFoundation\Response | ||
100 | */ | ||
101 | public function howtoFirstAppAction() | ||
102 | { | ||
103 | return $this->render('@WallabagCore/themes/common/Developer/howto_app.html.twig'); | ||
104 | } | ||
105 | } | ||
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index 768c4fdc..93f1f461 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php | |||
@@ -5,6 +5,7 @@ namespace Wallabag\ApiBundle\Controller; | |||
5 | use Hateoas\Configuration\Route; | 5 | use Hateoas\Configuration\Route; |
6 | use Hateoas\Representation\Factory\PagerfantaFactory; | 6 | use Hateoas\Representation\Factory\PagerfantaFactory; |
7 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; | 7 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | ||
8 | use Symfony\Component\HttpKernel\Exception\HttpException; | 9 | use Symfony\Component\HttpKernel\Exception\HttpException; |
9 | use Symfony\Component\HttpFoundation\Request; | 10 | use Symfony\Component\HttpFoundation\Request; |
10 | use Symfony\Component\HttpFoundation\JsonResponse; | 11 | use Symfony\Component\HttpFoundation\JsonResponse; |
@@ -25,7 +26,7 @@ class EntryRestController extends WallabagRestController | |||
25 | * {"name"="urls", "dataType"="string", "required"=false, "format"="An array of urls (?urls[]=http...&urls[]=http...)", "description"="Urls (as an array) to check if it exists"} | 26 | * {"name"="urls", "dataType"="string", "required"=false, "format"="An array of urls (?urls[]=http...&urls[]=http...)", "description"="Urls (as an array) to check if it exists"} |
26 | * } | 27 | * } |
27 | * ) | 28 | * ) |
28 | * | 29 | * @Security("has_role('ROLE_READ')") |
29 | * @return JsonResponse | 30 | * @return JsonResponse |
30 | */ | 31 | */ |
31 | public function getEntriesExistsAction(Request $request) | 32 | public function getEntriesExistsAction(Request $request) |
@@ -80,7 +81,7 @@ class EntryRestController extends WallabagRestController | |||
80 | * {"name"="public", "dataType"="integer", "required"=false, "format"="1 or 0, all entries by default", "description"="filter by entries with a public link"}, | 81 | * {"name"="public", "dataType"="integer", "required"=false, "format"="1 or 0, all entries by default", "description"="filter by entries with a public link"}, |
81 | * } | 82 | * } |
82 | * ) | 83 | * ) |
83 | * | 84 | * @Security("has_role('ROLE_READ')") |
84 | * @return JsonResponse | 85 | * @return JsonResponse |
85 | */ | 86 | */ |
86 | public function getEntriesAction(Request $request) | 87 | public function getEntriesAction(Request $request) |
@@ -143,7 +144,7 @@ class EntryRestController extends WallabagRestController | |||
143 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} | 144 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} |
144 | * } | 145 | * } |
145 | * ) | 146 | * ) |
146 | * | 147 | * @Security("has_role('ROLE_READ')") |
147 | * @return JsonResponse | 148 | * @return JsonResponse |
148 | */ | 149 | */ |
149 | public function getEntryAction(Entry $entry) | 150 | public function getEntryAction(Entry $entry) |
@@ -162,7 +163,7 @@ class EntryRestController extends WallabagRestController | |||
162 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} | 163 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} |
163 | * } | 164 | * } |
164 | * ) | 165 | * ) |
165 | * | 166 | * @Security("has_role('ROLE_READ')") |
166 | * @return Response | 167 | * @return Response |
167 | */ | 168 | */ |
168 | public function getEntryExportAction(Entry $entry, Request $request) | 169 | public function getEntryExportAction(Entry $entry, Request $request) |
@@ -302,7 +303,7 @@ class EntryRestController extends WallabagRestController | |||
302 | * {"name"="public", "dataType"="integer", "required"=false, "format"="1 or 0", "description"="will generate a public link for the entry"}, | 303 | * {"name"="public", "dataType"="integer", "required"=false, "format"="1 or 0", "description"="will generate a public link for the entry"}, |
303 | * } | 304 | * } |
304 | * ) | 305 | * ) |
305 | * | 306 | * @Security("has_role('ROLE_WRITE')") |
306 | * @return JsonResponse | 307 | * @return JsonResponse |
307 | */ | 308 | */ |
308 | public function postEntriesAction(Request $request) | 309 | public function postEntriesAction(Request $request) |
@@ -346,7 +347,7 @@ class EntryRestController extends WallabagRestController | |||
346 | * {"name"="public", "dataType"="integer", "required"=false, "format"="1 or 0", "description"="will generate a public link for the entry"}, | 347 | * {"name"="public", "dataType"="integer", "required"=false, "format"="1 or 0", "description"="will generate a public link for the entry"}, |
347 | * } | 348 | * } |
348 | * ) | 349 | * ) |
349 | * | 350 | * @Security("has_role('ROLE_WRITE')") |
350 | * @return JsonResponse | 351 | * @return JsonResponse |
351 | */ | 352 | */ |
352 | public function patchEntriesAction(Entry $entry, Request $request) | 353 | public function patchEntriesAction(Entry $entry, Request $request) |
@@ -368,7 +369,7 @@ class EntryRestController extends WallabagRestController | |||
368 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} | 369 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} |
369 | * } | 370 | * } |
370 | * ) | 371 | * ) |
371 | * | 372 | * @Security("has_role('ROLE_WRITE')") |
372 | * @return JsonResponse | 373 | * @return JsonResponse |
373 | */ | 374 | */ |
374 | public function patchEntriesReloadAction(Entry $entry) | 375 | public function patchEntriesReloadAction(Entry $entry) |
@@ -410,7 +411,7 @@ class EntryRestController extends WallabagRestController | |||
410 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} | 411 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} |
411 | * } | 412 | * } |
412 | * ) | 413 | * ) |
413 | * | 414 | * @Security("has_role('ROLE_WRITE')") |
414 | * @return JsonResponse | 415 | * @return JsonResponse |
415 | */ | 416 | */ |
416 | public function deleteEntriesAction(Entry $entry) | 417 | public function deleteEntriesAction(Entry $entry) |
@@ -436,7 +437,7 @@ class EntryRestController extends WallabagRestController | |||
436 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} | 437 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} |
437 | * } | 438 | * } |
438 | * ) | 439 | * ) |
439 | * | 440 | * @Security("has_role('ROLE_READ')") |
440 | * @return JsonResponse | 441 | * @return JsonResponse |
441 | */ | 442 | */ |
442 | public function getEntriesTagsAction(Entry $entry) | 443 | public function getEntriesTagsAction(Entry $entry) |
@@ -458,7 +459,7 @@ class EntryRestController extends WallabagRestController | |||
458 | * {"name"="tags", "dataType"="string", "required"=false, "format"="tag1,tag2,tag3", "description"="a comma-separated list of tags."}, | 459 | * {"name"="tags", "dataType"="string", "required"=false, "format"="tag1,tag2,tag3", "description"="a comma-separated list of tags."}, |
459 | * } | 460 | * } |
460 | * ) | 461 | * ) |
461 | * | 462 | * @Security("has_role('ROLE_WRITE')") |
462 | * @return JsonResponse | 463 | * @return JsonResponse |
463 | */ | 464 | */ |
464 | public function postEntriesTagsAction(Request $request, Entry $entry) | 465 | public function postEntriesTagsAction(Request $request, Entry $entry) |
@@ -487,7 +488,7 @@ class EntryRestController extends WallabagRestController | |||
487 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} | 488 | * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} |
488 | * } | 489 | * } |
489 | * ) | 490 | * ) |
490 | * | 491 | * @Security("has_role('ROLE_WRITE')") |
491 | * @return JsonResponse | 492 | * @return JsonResponse |
492 | */ | 493 | */ |
493 | public function deleteEntriesTagsAction(Entry $entry, Tag $tag) | 494 | public function deleteEntriesTagsAction(Entry $entry, Tag $tag) |
diff --git a/src/Wallabag/ApiBundle/Controller/TagRestController.php b/src/Wallabag/ApiBundle/Controller/TagRestController.php index 354187a0..6f460a2d 100644 --- a/src/Wallabag/ApiBundle/Controller/TagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/TagRestController.php | |||
@@ -3,6 +3,7 @@ | |||
3 | namespace Wallabag\ApiBundle\Controller; | 3 | namespace Wallabag\ApiBundle\Controller; |
4 | 4 | ||
5 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; | 5 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | ||
6 | use Symfony\Component\HttpFoundation\Request; | 7 | use Symfony\Component\HttpFoundation\Request; |
7 | use Symfony\Component\HttpFoundation\JsonResponse; | 8 | use Symfony\Component\HttpFoundation\JsonResponse; |
8 | use Wallabag\CoreBundle\Entity\Entry; | 9 | use Wallabag\CoreBundle\Entity\Entry; |
@@ -14,7 +15,7 @@ class TagRestController extends WallabagRestController | |||
14 | * Retrieve all tags. | 15 | * Retrieve all tags. |
15 | * | 16 | * |
16 | * @ApiDoc() | 17 | * @ApiDoc() |
17 | * | 18 | * @Security("has_role('ROLE_READ')") |
18 | * @return JsonResponse | 19 | * @return JsonResponse |
19 | */ | 20 | */ |
20 | public function getTagsAction() | 21 | public function getTagsAction() |
@@ -38,7 +39,7 @@ class TagRestController extends WallabagRestController | |||
38 | * {"name"="tag", "dataType"="string", "required"=true, "requirement"="\w+", "description"="Tag as a string"} | 39 | * {"name"="tag", "dataType"="string", "required"=true, "requirement"="\w+", "description"="Tag as a string"} |
39 | * } | 40 | * } |
40 | * ) | 41 | * ) |
41 | * | 42 | * @Security("has_role('ROLE_WRITE')") |
42 | * @return JsonResponse | 43 | * @return JsonResponse |
43 | */ | 44 | */ |
44 | public function deleteTagLabelAction(Request $request) | 45 | public function deleteTagLabelAction(Request $request) |
@@ -71,7 +72,7 @@ class TagRestController extends WallabagRestController | |||
71 | * {"name"="tags", "dataType"="string", "required"=true, "format"="tag1,tag2", "description"="Tags as strings (comma splitted)"} | 72 | * {"name"="tags", "dataType"="string", "required"=true, "format"="tag1,tag2", "description"="Tags as strings (comma splitted)"} |
72 | * } | 73 | * } |
73 | * ) | 74 | * ) |
74 | * | 75 | * @Security("has_role('ROLE_WRITE')") |
75 | * @return JsonResponse | 76 | * @return JsonResponse |
76 | */ | 77 | */ |
77 | public function deleteTagsLabelAction(Request $request) | 78 | public function deleteTagsLabelAction(Request $request) |
@@ -113,7 +114,7 @@ class TagRestController extends WallabagRestController | |||
113 | * {"name"="tag", "dataType"="integer", "requirement"="\w+", "description"="The tag"} | 114 | * {"name"="tag", "dataType"="integer", "requirement"="\w+", "description"="The tag"} |
114 | * } | 115 | * } |
115 | * ) | 116 | * ) |
116 | * | 117 | * @Security("has_role('ROLE_WRITE')") |
117 | * @return JsonResponse | 118 | * @return JsonResponse |
118 | */ | 119 | */ |
119 | public function deleteTagAction(Tag $tag) | 120 | public function deleteTagAction(Tag $tag) |
@@ -133,7 +134,7 @@ class TagRestController extends WallabagRestController | |||
133 | 134 | ||
134 | /** | 135 | /** |
135 | * Remove orphan tag in case no entries are associated to it. | 136 | * Remove orphan tag in case no entries are associated to it. |
136 | * | 137 | * @Security("has_role('ROLE_WRITE')") |
137 | * @param Tag|array $tags | 138 | * @param Tag|array $tags |
138 | */ | 139 | */ |
139 | private function cleanOrphanTag($tags) | 140 | private function cleanOrphanTag($tags) |
diff --git a/src/Wallabag/ApiBundle/Entity/AccessToken.php b/src/Wallabag/ApiBundle/Entity/AccessToken.php index c09a0c80..a8b46742 100644 --- a/src/Wallabag/ApiBundle/Entity/AccessToken.php +++ b/src/Wallabag/ApiBundle/Entity/AccessToken.php | |||
@@ -7,7 +7,7 @@ use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken; | |||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * @ORM\Table("oauth2_access_tokens") | 9 | * @ORM\Table("oauth2_access_tokens") |
10 | * @ORM\Entity | 10 | * @ORM\Entity(repositoryClass="Wallabag\ApiBundle\Repository\AccessTokenRepository") |
11 | */ | 11 | */ |
12 | class AccessToken extends BaseAccessToken | 12 | class AccessToken extends BaseAccessToken |
13 | { | 13 | { |
diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php index c15fd3fa..24444c9f 100644 --- a/src/Wallabag/ApiBundle/Entity/Client.php +++ b/src/Wallabag/ApiBundle/Entity/Client.php | |||
@@ -8,6 +8,7 @@ use Wallabag\UserBundle\Entity\User; | |||
8 | use JMS\Serializer\Annotation\Groups; | 8 | use JMS\Serializer\Annotation\Groups; |
9 | use JMS\Serializer\Annotation\SerializedName; | 9 | use JMS\Serializer\Annotation\SerializedName; |
10 | use JMS\Serializer\Annotation\VirtualProperty; | 10 | use JMS\Serializer\Annotation\VirtualProperty; |
11 | use Symfony\Component\Validator\Constraints as Assert; | ||
11 | 12 | ||
12 | /** | 13 | /** |
13 | * @ORM\Table("oauth2_clients") | 14 | * @ORM\Table("oauth2_clients") |
@@ -51,13 +52,39 @@ class Client extends BaseClient | |||
51 | 52 | ||
52 | /** | 53 | /** |
53 | * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="clients") | 54 | * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="clients") |
55 | * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true) | ||
54 | */ | 56 | */ |
55 | private $user; | 57 | private $user; |
56 | 58 | ||
57 | public function __construct(User $user) | 59 | /** |
60 | * @ORM\Column(type="string", nullable=true) | ||
61 | */ | ||
62 | private $image; | ||
63 | |||
64 | /** | ||
65 | * @ORM\Column(type="string", nullable=true) | ||
66 | */ | ||
67 | private $description; | ||
68 | |||
69 | /** | ||
70 | * @ORM\Column(type="string", nullable=true) | ||
71 | */ | ||
72 | private $appUrl; | ||
73 | |||
74 | /** | ||
75 | * @ORM\Column(type="datetime", nullable=true) | ||
76 | */ | ||
77 | private $createdAt; | ||
78 | |||
79 | /** | ||
80 | * Client constructor. | ||
81 | * @param User|null $user | ||
82 | */ | ||
83 | public function __construct(User $user = null) | ||
58 | { | 84 | { |
59 | parent::__construct(); | 85 | parent::__construct(); |
60 | $this->user = $user; | 86 | $this->user = $user; |
87 | $this->createdAt = new \DateTime(); | ||
61 | } | 88 | } |
62 | 89 | ||
63 | /** | 90 | /** |
@@ -99,6 +126,62 @@ class Client extends BaseClient | |||
99 | */ | 126 | */ |
100 | public function getClientId() | 127 | public function getClientId() |
101 | { | 128 | { |
102 | return $this->getId().'_'.$this->getRandomId(); | 129 | return $this->getId() . '_' . $this->getRandomId(); |
130 | } | ||
131 | |||
132 | /** | ||
133 | * @return string | ||
134 | */ | ||
135 | public function getImage() | ||
136 | { | ||
137 | return $this->image; | ||
138 | } | ||
139 | |||
140 | /** | ||
141 | * @param string $image | ||
142 | */ | ||
143 | public function setImage($image) | ||
144 | { | ||
145 | $this->image = $image; | ||
146 | } | ||
147 | |||
148 | /** | ||
149 | * @return string | ||
150 | */ | ||
151 | public function getDescription() | ||
152 | { | ||
153 | return $this->description; | ||
154 | } | ||
155 | |||
156 | /** | ||
157 | * @param string $description | ||
158 | */ | ||
159 | public function setDescription($description) | ||
160 | { | ||
161 | $this->description = $description; | ||
162 | } | ||
163 | |||
164 | /** | ||
165 | * @return string | ||
166 | */ | ||
167 | public function getAppUrl() | ||
168 | { | ||
169 | return $this->appUrl; | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * @param string $appUrl | ||
174 | */ | ||
175 | public function setAppUrl($appUrl) | ||
176 | { | ||
177 | $this->appUrl = $appUrl; | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * @return \DateTime | ||
182 | */ | ||
183 | public function getCreatedAt() | ||
184 | { | ||
185 | return $this->createdAt; | ||
103 | } | 186 | } |
104 | } | 187 | } |
diff --git a/src/Wallabag/ApiBundle/Form/Type/ClientType.php b/src/Wallabag/ApiBundle/Form/Type/ClientType.php index eaea4feb..58602d22 100644 --- a/src/Wallabag/ApiBundle/Form/Type/ClientType.php +++ b/src/Wallabag/ApiBundle/Form/Type/ClientType.php | |||
@@ -15,24 +15,8 @@ class ClientType extends AbstractType | |||
15 | public function buildForm(FormBuilderInterface $builder, array $options) | 15 | public function buildForm(FormBuilderInterface $builder, array $options) |
16 | { | 16 | { |
17 | $builder | 17 | $builder |
18 | ->add('name', TextType::class, ['label' => 'developer.client.form.name_label']) | 18 | ->add('name', TextType::class, ['label' => 'apps.old_client.form.name_label']) |
19 | ->add('redirect_uris', UrlType::class, [ | 19 | ->add('save', SubmitType::class, ['label' => 'apps.old_client.form.save_label']) |
20 | 'required' => false, | ||
21 | 'label' => 'developer.client.form.redirect_uris_label', | ||
22 | 'property_path' => 'redirectUris', | ||
23 | ]) | ||
24 | ->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label']) | ||
25 | ; | ||
26 | |||
27 | $builder->get('redirect_uris') | ||
28 | ->addModelTransformer(new CallbackTransformer( | ||
29 | function ($originalUri) { | ||
30 | return $originalUri; | ||
31 | }, | ||
32 | function ($submittedUri) { | ||
33 | return [$submittedUri]; | ||
34 | } | ||
35 | )) | ||
36 | ; | 20 | ; |
37 | } | 21 | } |
38 | 22 | ||
diff --git a/src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php b/src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php new file mode 100644 index 00000000..2b8d24df --- /dev/null +++ b/src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php | |||
@@ -0,0 +1,18 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\ApiBundle\Repository; | ||
4 | |||
5 | use Doctrine\ORM\EntityRepository; | ||
6 | |||
7 | |||
8 | class AccessTokenRepository extends EntityRepository | ||
9 | { | ||
10 | public function findAppsByUser($userId) | ||
11 | { | ||
12 | $qb = $this->createQueryBuilder('a') | ||
13 | ->innerJoin('a.client', 'c') | ||
14 | ->addSelect('c') | ||
15 | ->where('a.user =:userId')->setParameter('userId', $userId); | ||
16 | return $qb->getQuery()->getResult(); | ||
17 | } | ||
18 | } | ||
diff --git a/src/Wallabag/ApiBundle/Resources/config/services.yml b/src/Wallabag/ApiBundle/Resources/config/services.yml new file mode 100644 index 00000000..1275107d --- /dev/null +++ b/src/Wallabag/ApiBundle/Resources/config/services.yml | |||
@@ -0,0 +1,6 @@ | |||
1 | services: | ||
2 | wallabag_api.accesstoken_repository: | ||
3 | class: Wallabag\ApiBundle\Repository\AccessTokenRepository | ||
4 | factory: [ "@doctrine.orm.default_entity_manager", getRepository ] | ||
5 | arguments: | ||
6 | - WallabagApiBundle:AccessToken | ||
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 02dd04f2..adf896ee 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -156,6 +156,7 @@ config: | |||
156 | # and: 'One rule AND another' | 156 | # and: 'One rule AND another' |
157 | # matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' | 157 | # matches: 'Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code>' |
158 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' | 158 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' |
159 | |||
159 | entry: | 160 | entry: |
160 | page_titles: | 161 | page_titles: |
161 | # unread: 'Unread entries' | 162 | # unread: 'Unread entries' |
@@ -442,55 +443,55 @@ import: | |||
442 | # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' | 443 | # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' |
443 | # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' | 444 | # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' |
444 | 445 | ||
445 | developer: | 446 | apps: |
446 | # page_title: 'API clients management' | 447 | # page_title: 'Apps' |
447 | # welcome_message: 'Welcome to the wallabag API' | 448 | # allow: |
448 | # documentation: 'Documentation' | 449 | # title: 'A new application would like to connect to your account' |
449 | # how_to_first_app: 'How to create my first application' | 450 | # permissions: |
450 | # full_documentation: 'View full API documentation' | 451 | # read: |
451 | # list_methods: 'List API methods' | 452 | # label: 'Read your data' |
452 | # clients: | 453 | # desc: '%name% will be able to access the list and contents of your entries, tags and annotations.' |
453 | # title: 'Clients' | 454 | # write: |
454 | # create_new: 'Create a new client' | 455 | # label: 'Edit your data' |
455 | # existing_clients: | 456 | # desc: '%name% will be able to edit and manage (including deleting) your entries, tags and annotations.' |
456 | # title: 'Existing clients' | 457 | # user: |
457 | # field_id: 'Client ID' | 458 | # label: 'Edit your user settings' |
458 | # field_secret: 'Client secret' | 459 | # desc: '%name% will be able to manage your user account.' |
459 | # field_uris: 'Redirect URIs' | 460 | #featured: |
460 | # field_grant_types: 'Grant type allowed' | 461 | # title: 'Featured apps' |
461 | # no_client: 'No client yet.' | 462 | #list: |
462 | # remove: | 463 | # title: 'Authorized apps' |
463 | # warn_message_1: 'You have the ability to remove this client. This action is IRREVERSIBLE !' | 464 | #old_clients: |
464 | # warn_message_2: "If you remove it, every app configured with that client won't be able to auth on your wallabag." | 465 | # create_new: 'Create a new client' |
465 | # action: 'Remove this client' | 466 | # title: 'Old clients (depreciated)' |
466 | # client: | 467 | # list: 'Old clients list' |
467 | # page_title: 'API clients management > New client' | 468 | # field_id: 'Client ID' |
468 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' | 469 | # field_secret: 'Client secret' |
469 | # form: | 470 | # no_client: 'No client yet.' |
470 | # name_label: 'Name of the client' | 471 | #remove: |
471 | # redirect_uris_label: 'Redirect URIs' | 472 | # warn_message_1: 'You have the ability to remove the client %name%. This action is IRREVERSIBLE !' |
472 | # save_label: 'Create a new client' | 473 | # warn_message_2: "If you remove it, every app configured with that client won't be able to auth on your wallabag." |
473 | # action_back: 'Back' | 474 | # action: 'Remove the client %name%' |
474 | # client_parameter: | 475 | #old_client: |
475 | # page_title: 'API clients management > Client parameters' | 476 | # page_title: 'Apps > New client' |
476 | # page_description: 'Here are your client parameters.' | 477 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' |
477 | # field_name: 'Client name' | 478 | # form: |
478 | # field_id: 'Client ID' | 479 | # name_label: 'Name of the client' |
479 | # field_secret: 'Client secret' | 480 | # save_label: 'Create a new client' |
480 | # back: 'Back' | 481 | # action_back: 'Back' |
481 | # read_howto: 'Read the howto "Create my first application"' | 482 | # parameters: |
482 | # howto: | 483 | # page_title: 'Apps > Client parameters' |
483 | # page_title: 'Developer > How to create my first application' | 484 | # page_description: 'Here are your client parameters.' |
484 | # description: | 485 | # field_name: 'Client name' |
485 | # paragraph_1: 'The following commands make use of the <a href="https://github.com/jkbrzt/httpie">HTTPie library</a>. Make sure it is installed on your system before using it.' | 486 | # field_id: 'Client ID' |
486 | # paragraph_2: 'You need a token to communicate between your 3rd application and wallabag API.' | 487 | # field_secret: 'Client secret' |
487 | # paragraph_3: 'To create this token, you need <a href="%link%">to create a new client</a>.' | 488 | # back: 'Back' |
488 | # paragraph_4: 'Now, create your token (replace client_id, client_secret, username and password with the good values):' | 489 | # app: |
489 | # paragraph_5: 'The API will return a response like this:' | 490 | # created_at: 'Created at: %date%' |
490 | # paragraph_6: 'The access_token is useful to do a call to the API endpoint. For example:' | 491 | # documentation: |
491 | # paragraph_7: 'This call will return all the entries for your user.' | 492 | # title: 'Documentation' |
492 | # paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' | 493 | # full_documentation: 'Full documentation' |
493 | # back: 'Back' | 494 | # list_methods: 'List API methods' |
494 | 495 | ||
495 | user: | 496 | user: |
496 | # page_title: Users management | 497 | # page_title: Users management |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index f6ccdae0..17b8297f 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -443,55 +443,55 @@ import: | |||
443 | description: 'Dieser Import wird all deine Pinboard Artikel importieren. Auf der Seite Backup (https://pinboard.in/settings/backup) klickst du auf "JSON" in dem Abschnitt "Lesezeichen". Eine JSON Datei wird dann heruntergeladen (z.B. "pinboard_export").' | 443 | description: 'Dieser Import wird all deine Pinboard Artikel importieren. Auf der Seite Backup (https://pinboard.in/settings/backup) klickst du auf "JSON" in dem Abschnitt "Lesezeichen". Eine JSON Datei wird dann heruntergeladen (z.B. "pinboard_export").' |
444 | how_to: 'Bitte wähle deinen Pinboard Export aus und klicke den nachfolgenden Button zum Importieren.' | 444 | how_to: 'Bitte wähle deinen Pinboard Export aus und klicke den nachfolgenden Button zum Importieren.' |
445 | 445 | ||
446 | developer: | 446 | apps: |
447 | page_title: 'API-Client-Verwaltung' | 447 | page_title: 'API-Client-Verwaltung' |
448 | welcome_message: 'Willkomen zur wallabag API' | 448 | # allow: |
449 | documentation: 'Dokumentation' | 449 | # title: 'A new application would like to connect to your account' |
450 | how_to_first_app: 'Wie erstelle ich meine erste Anwendung' | 450 | # permissions: |
451 | full_documentation: 'Komplette API-Dokumentation einsehen' | 451 | # read: |
452 | list_methods: 'Liste der API-Methoden' | 452 | # label: 'Read your data' |
453 | clients: | 453 | # desc: '%name% will be able to access the list and contents of your entries, tags and annotations.' |
454 | title: 'Clients' | 454 | # write: |
455 | # label: 'Edit your data' | ||
456 | # desc: '%name% will be able to edit and manage (including deleting) your entries, tags and annotations.' | ||
457 | # user: | ||
458 | # label: 'Edit your user settings' | ||
459 | # desc: '%name% will be able to manage your user account.' | ||
460 | featured: | ||
461 | # title: 'Featured apps' | ||
462 | list: | ||
463 | # title: 'Authorized apps' | ||
464 | old_clients: | ||
455 | create_new: 'Neuen Client erstellen' | 465 | create_new: 'Neuen Client erstellen' |
456 | existing_clients: | ||
457 | title: 'Bestehende Clients' | 466 | title: 'Bestehende Clients' |
467 | list: 'Clients' | ||
458 | field_id: 'Client-ID' | 468 | field_id: 'Client-ID' |
459 | field_secret: 'Client-Secret' | 469 | field_secret: 'Client-Secret' |
460 | field_uris: 'Weiterleitungs-URIs' | ||
461 | field_grant_types: "Erlaubte grant_types" | ||
462 | no_client: 'Bisher kein Client.' | 470 | no_client: 'Bisher kein Client.' |
463 | remove: | 471 | remove: |
464 | warn_message_1: 'Du hast die Möglichkeit, diesen Client zu entfernen. DIESE AKTION IST NICHT WIDERRUFBAR!' | 472 | warn_message_1: 'Du hast die Möglichkeit, diesen Client zu entfernen. DIESE AKTION IST NICHT WIDERRUFBAR!' |
465 | warn_message_2: "Wenn du ihn entfernst, hat keine der damit konfigurierten Anwendungen mehr die Möglichkeit, sich in deinen wallabag-Konto anzumelden." | 473 | warn_message_2: "Wenn du ihn entfernst, hat keine der damit konfigurierten Anwendungen mehr die Möglichkeit, sich in deinen wallabag-Konto anzumelden." |
466 | action: 'Client entfernen' | 474 | action: 'Client entfernen' |
467 | client: | 475 | old_client: |
468 | page_title: 'API-Client-Verwaltung > Neuer Client' | 476 | page_title: 'API-Client-Verwaltung > Neuer Client' |
469 | page_description: 'Du bist dabei, einen neuen Client zu erstellen. Fülle das nachfolgende Feld für die Weiterleitungs-URIs deiner Anwendung aus.' | 477 | page_description: 'Du bist dabei, einen neuen Client zu erstellen. Fülle das nachfolgende Feld für die Weiterleitungs-URIs deiner Anwendung aus.' |
470 | form: | 478 | form: |
471 | name_label: 'Name des Clients' | 479 | name_label: 'Name des Clients' |
472 | redirect_uris_label: 'Weiterleitungs-URIs' | ||
473 | save_label: 'Neuen Client erstellen' | 480 | save_label: 'Neuen Client erstellen' |
474 | action_back: 'Zurück' | 481 | action_back: 'Zurück' |
475 | client_parameter: | 482 | parameters: |
476 | page_title: 'API-Client-Verwaltung > Client-Parameter' | 483 | page_title: 'API-Client-Verwaltung > Client-Parameter' |
477 | page_description: 'Dies sind deine Client-Parameter.' | 484 | page_description: 'Dies sind deine Client-Parameter.' |
478 | field_name: 'Client Name' | 485 | field_name: 'Client Name' |
479 | field_id: 'Client-ID' | 486 | field_id: 'Client-ID' |
480 | field_secret: 'Client-Secret' | 487 | field_secret: 'Client-Secret' |
481 | back: 'Zurück' | 488 | back: 'Zurück' |
482 | read_howto: 'Lese des How-To zu "Wie erstelle ich meine erste Anwendung"' | 489 | app: |
483 | howto: | 490 | # created_at: 'Created at: %date%' |
484 | page_title: 'API-Client-Verwaltung > Wie erstelle ich meine erste Anwendung' | 491 | documentation: |
485 | description: | 492 | title: 'Dokumentation' |
486 | paragraph_1: 'Die folgenden Befehle machen Gebrauch von der <a href="https://github.com/jkbrzt/httpie">HTTPie-Bibliothek</a>. Stelle sicher, dass sie auf deinem System installiert ist, bevor du fortfährst.' | 493 | full_documentation: 'Komplette API-Dokumentation einsehen' |
487 | paragraph_2: 'Du benötigst einen Token, damit deine Anwendung mit der wallabag-API kommunizieren kann.' | 494 | list_methods: 'Liste der API-Methoden' |
488 | paragraph_3: 'Um diesen Token zu erstellen, muss <a href="%link%">ein neuer Client erstellt werden</a>.' | ||
489 | paragraph_4: 'Nun erstelle deinen Token (ersetze client_id, client_secret, username und password mit deinen Werten):' | ||
490 | paragraph_5: 'Die API wird eine Antwort der folgenden Art zurückgeben:' | ||
491 | paragraph_6: 'Der access_token ist nützlich, um die API aufzurufen. Beispiel:' | ||
492 | paragraph_7: 'Dieser Aufruf wird alle Einträge für den Nutzer zurückgeben.' | ||
493 | paragraph_8: 'Wenn du alle API-Endpunkte sehen willst, werfe einen Blick auf die <a href="%link%">API-Dokumentation</a>.' | ||
494 | back: 'Zurück' | ||
495 | 495 | ||
496 | user: | 496 | user: |
497 | page_title: Benutzerverwaltung | 497 | page_title: Benutzerverwaltung |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 902c3046..c78228e0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -25,7 +25,7 @@ menu: | |||
25 | internal_settings: 'Internal Settings' | 25 | internal_settings: 'Internal Settings' |
26 | import: 'Import' | 26 | import: 'Import' |
27 | howto: 'How to' | 27 | howto: 'How to' |
28 | developer: 'API clients management' | 28 | apps: 'Apps' |
29 | logout: 'Logout' | 29 | logout: 'Logout' |
30 | about: 'About' | 30 | about: 'About' |
31 | search: 'Search' | 31 | search: 'Search' |
@@ -443,55 +443,55 @@ import: | |||
443 | description: 'This importer will import all your Pinboard articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' | 443 | description: 'This importer will import all your Pinboard articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' |
444 | how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' | 444 | how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' |
445 | 445 | ||
446 | developer: | 446 | apps: |
447 | page_title: 'API clients management' | 447 | page_title: 'Apps' |
448 | welcome_message: 'Welcome to the wallabag API' | 448 | allow: |
449 | documentation: 'Documentation' | 449 | title: 'A new application would like to connect to your account' |
450 | how_to_first_app: 'How to create my first application' | 450 | permissions: |
451 | full_documentation: 'View full API documentation' | 451 | read: |
452 | list_methods: 'List API methods' | 452 | label: 'Read your data' |
453 | clients: | 453 | desc: '%name% will be able to access the list and contents of your entries, tags and annotations.' |
454 | title: 'Clients' | 454 | write: |
455 | label: 'Edit your data' | ||
456 | desc: '%name% will be able to edit and manage (including deleting) your entries, tags and annotations.' | ||
457 | user: | ||
458 | label: 'Edit your user settings' | ||
459 | desc: '%name% will be able to manage your user account.' | ||
460 | featured: | ||
461 | title: 'Featured apps' | ||
462 | list: | ||
463 | title: 'Authorized apps' | ||
464 | old_clients: | ||
455 | create_new: 'Create a new client' | 465 | create_new: 'Create a new client' |
456 | existing_clients: | 466 | title: 'Old clients (depreciated)' |
457 | title: 'Existing clients' | 467 | list: 'Old clients list' |
458 | field_id: 'Client ID' | 468 | field_id: 'Client ID' |
459 | field_secret: 'Client secret' | 469 | field_secret: 'Client secret' |
460 | field_uris: 'Redirect URIs' | ||
461 | field_grant_types: 'Grant type allowed' | ||
462 | no_client: 'No client yet.' | 470 | no_client: 'No client yet.' |
463 | remove: | 471 | remove: |
464 | warn_message_1: 'You have the ability to remove the client %name%. This action is IRREVERSIBLE !' | 472 | warn_message_1: 'You have the ability to remove the client %name%. This action is IRREVERSIBLE !' |
465 | warn_message_2: "If you remove it, every app configured with that client won't be able to auth on your wallabag." | 473 | warn_message_2: "If you remove it, every app configured with that client won't be able to auth on your wallabag." |
466 | action: 'Remove the client %name%' | 474 | action: 'Remove the client %name%' |
467 | client: | 475 | old_client: |
468 | page_title: 'API clients management > New client' | 476 | page_title: 'Apps > New client' |
469 | page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' | 477 | page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' |
470 | form: | 478 | form: |
471 | name_label: 'Name of the client' | 479 | name_label: 'Name of the client' |
472 | redirect_uris_label: 'Redirect URIs (optional)' | ||
473 | save_label: 'Create a new client' | 480 | save_label: 'Create a new client' |
474 | action_back: 'Back' | 481 | action_back: 'Back' |
475 | client_parameter: | 482 | parameters: |
476 | page_title: 'API clients management > Client parameters' | 483 | page_title: 'Apps > Client parameters' |
477 | page_description: 'Here are your client parameters.' | 484 | page_description: 'Here are your client parameters.' |
478 | field_name: 'Client name' | 485 | field_name: 'Client name' |
479 | field_id: 'Client ID' | 486 | field_id: 'Client ID' |
480 | field_secret: 'Client secret' | 487 | field_secret: 'Client secret' |
481 | back: 'Back' | 488 | back: 'Back' |
482 | read_howto: 'Read the howto "Create my first application"' | 489 | app: |
483 | howto: | 490 | created_at: 'Created at: %date%' |
484 | page_title: 'API clients management > How to create my first application' | 491 | documentation: |
485 | description: | 492 | title: 'Documentation' |
486 | paragraph_1: 'The following commands make use of the <a href="https://github.com/jkbrzt/httpie">HTTPie library</a>. Make sure it is installed on your system before using it.' | 493 | full_documentation: 'Full documentation' |
487 | paragraph_2: 'You need a token to communicate between your 3rd application and wallabag API.' | 494 | list_methods: 'List API methods' |
488 | paragraph_3: 'To create this token, you need <a href="%link%">to create a new client</a>.' | ||
489 | paragraph_4: 'Now, create your token (replace client_id, client_secret, username and password with the good values):' | ||
490 | paragraph_5: 'The API will return a response like this:' | ||
491 | paragraph_6: 'The access_token is useful to do a call to the API endpoint. For example:' | ||
492 | paragraph_7: 'This call will return all the entries for your user.' | ||
493 | paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' | ||
494 | back: 'Back' | ||
495 | 495 | ||
496 | user: | 496 | user: |
497 | page_title: Users management | 497 | page_title: Users management |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index afd6a7b1..36dd6016 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -443,55 +443,55 @@ import: | |||
443 | description: 'Importa todos tus artículos de Pinboard. En la página de backup (https://pinboard.in/settings/backup), haz clic en "JSON" en la sección "Marcadores". Obtendrás un archivo JSON llamado "pinboard_export".' | 443 | description: 'Importa todos tus artículos de Pinboard. En la página de backup (https://pinboard.in/settings/backup), haz clic en "JSON" en la sección "Marcadores". Obtendrás un archivo JSON llamado "pinboard_export".' |
444 | how_to: 'Seleccione el archivo exportado de Pinboard y haga clic en el botón para subirlo e importarlo.' | 444 | how_to: 'Seleccione el archivo exportado de Pinboard y haga clic en el botón para subirlo e importarlo.' |
445 | 445 | ||
446 | developer: | 446 | apps: |
447 | page_title: 'Gestión de clientes API' | 447 | page_title: 'Gestión de clientes API' |
448 | welcome_message: 'Bienvenido al API de wallabag' | 448 | # allow: |
449 | documentation: 'Documentación' | 449 | # title: 'A new application would like to connect to your account' |
450 | how_to_first_app: 'Cómo crear mi primera aplicación' | 450 | # permissions: |
451 | full_documentation: 'Ver documentación completa del API' | 451 | # read: |
452 | list_methods: 'Lista con los métodos del API' | 452 | # label: 'Read your data' |
453 | clients: | 453 | # desc: '%name% will be able to access the list and contents of your entries, tags and annotations.' |
454 | title: 'Clientes' | 454 | # write: |
455 | # label: 'Edit your data' | ||
456 | # desc: '%name% will be able to edit and manage (including deleting) your entries, tags and annotations.' | ||
457 | # user: | ||
458 | # label: 'Edit your user settings' | ||
459 | # desc: '%name% will be able to manage your user account.' | ||
460 | featured: | ||
461 | # title: 'Featured apps' | ||
462 | list: | ||
463 | # title: 'Authorized apps' | ||
464 | old_clients: | ||
455 | create_new: 'Crear un nuevo cliente' | 465 | create_new: 'Crear un nuevo cliente' |
456 | existing_clients: | ||
457 | title: 'Clientes existentes' | 466 | title: 'Clientes existentes' |
467 | list: 'Clientes' | ||
458 | field_id: 'Identificador del cliente' | 468 | field_id: 'Identificador del cliente' |
459 | field_secret: 'Secreto del cliente' | 469 | field_secret: 'Secreto del cliente' |
460 | field_uris: 'URIs de redirección' | ||
461 | field_grant_types: 'Permisos concedidos' | ||
462 | no_client: 'Todavía no hay clientes.' | 470 | no_client: 'Todavía no hay clientes.' |
463 | remove: | 471 | remove: |
464 | warn_message_1: 'Tienes permiso para eliminar el cliente %name%. ¡Está acción es IRREVERSIBLE!' | 472 | warn_message_1: 'Tienes permiso para eliminar el cliente %name%. ¡Está acción es IRREVERSIBLE!' |
465 | warn_message_2: "Si lo eliminas, cada aplicación configurada con ese cliente no podrá autenticarse en wallabag." | 473 | warn_message_2: "Si lo eliminas, cada aplicación configurada con ese cliente no podrá autenticarse en wallabag." |
466 | action: 'Eliminar el cliente %name%' | 474 | action: 'Eliminar el cliente %name%' |
467 | client: | 475 | old_client: |
468 | page_title: 'Gestión de clientes API > Nuevo cliente' | 476 | page_title: 'Gestión de clientes API > Nuevo cliente' |
469 | page_description: 'Está a punto de crear un nuevo cliente. Por favor, rellene el campo de abajo con la URI de redirección de su aplicación.' | 477 | page_description: 'Está a punto de crear un nuevo cliente. Por favor, rellene el campo de abajo con la URI de redirección de su aplicación.' |
470 | form: | 478 | form: |
471 | name_label: 'Nombre del cliente' | 479 | name_label: 'Nombre del cliente' |
472 | redirect_uris_label: 'URIs de redirección' | ||
473 | save_label: 'Crear un nuevo cliente' | 480 | save_label: 'Crear un nuevo cliente' |
474 | action_back: 'Volver' | 481 | action_back: 'Volver' |
475 | client_parameter: | 482 | parameters: |
476 | page_title: 'Gestión de clientes API > Parámetros del cliente' | 483 | page_title: 'Gestión de clientes API > Parámetros del cliente' |
477 | page_description: 'Aquí están los parámetros del cliente.' | 484 | page_description: 'Aquí están los parámetros del cliente.' |
478 | field_name: 'Nombre del cliente' | 485 | field_name: 'Nombre del cliente' |
479 | field_id: 'Identificador del cliente' | 486 | field_id: 'Identificador del cliente' |
480 | field_secret: 'Secreto del cliente' | 487 | field_secret: 'Secreto del cliente' |
481 | back: 'Volver' | 488 | back: 'Volver' |
482 | read_howto: 'Lea la guía "Crear mi primera aplicación"' | 489 | app: |
483 | howto: | 490 | # created_at: 'Created at: %date%' |
484 | page_title: 'Gestión de clientes API > Cómo crear mi primera aplicación' | 491 | documentation: |
485 | description: | 492 | title: 'Documentación' |
486 | paragraph_1: 'Los siguientes comandos hacen uso de la <a href="https://github.com/jkbrzt/httpie">biblioteca HTTPie</a>. Compruebe que está instalada en su sistema antes de usarla.' | 493 | full_documentation: 'Ver documentación completa del API' |
487 | paragraph_2: 'Necesitas un token para establecer la comunicación entre una aplicación de terceros y la API de wallabag.' | 494 | list_methods: 'Lista con los métodos del API' |
488 | paragraph_3: 'Para crear este token, necesitas <a href="%link%">crear un nuevo cliente</a>.' | ||
489 | paragraph_4: 'Ahora crea tu token (reemplace client_id, client_secret, username y password con los valores generados):' | ||
490 | paragraph_5: 'Este API devolverá una respuesta como esta:' | ||
491 | paragraph_6: 'El access_token es útil para llamar a los métodos del API. Por ejemplo:' | ||
492 | paragraph_7: 'Esta llamada devolverá todos los artículos de tu usuario.' | ||
493 | paragraph_8: 'Si quiere ver todos los métodos del API, puede verlos en <a href="%link%">nuestra documentación del API</a>.' | ||
494 | back: 'Volver' | ||
495 | 495 | ||
496 | user: | 496 | user: |
497 | page_title: Gestión de usuarios | 497 | page_title: Gestión de usuarios |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 545514b3..e399c199 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -443,55 +443,55 @@ import: | |||
443 | # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' | 443 | # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' |
444 | # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' | 444 | # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' |
445 | 445 | ||
446 | developer: | 446 | apps: |
447 | # page_title: 'API clients management' | 447 | # page_title: 'Apps' |
448 | # welcome_message: 'Welcome to the wallabag API' | 448 | # allow: |
449 | # documentation: 'Documentation' | 449 | # title: 'A new application would like to connect to your account' |
450 | # how_to_first_app: 'How to create my first application' | 450 | # permissions: |
451 | # full_documentation: 'View full API documentation' | 451 | # read: |
452 | # list_methods: 'List API methods' | 452 | # label: 'Read your data' |
453 | # clients: | 453 | # desc: '%name% will be able to access the list and contents of your entries, tags and annotations.' |
454 | # title: 'Clients' | 454 | # write: |
455 | # create_new: 'Create a new client' | 455 | # label: 'Edit your data' |
456 | # existing_clients: | 456 | # desc: '%name% will be able to edit and manage (including deleting) your entries, tags and annotations.' |
457 | # title: 'Existing clients' | 457 | # user: |
458 | # field_id: 'Client ID' | 458 | # label: 'Edit your user settings' |
459 | # field_secret: 'Client secret' | 459 | # desc: '%name% will be able to manage your user account.' |
460 | # field_uris: 'Redirect URIs' | 460 | #featured: |
461 | # field_grant_types: 'Grant type allowed' | 461 | # title: 'Featured apps' |
462 | # no_client: 'No client yet.' | 462 | #list: |
463 | # remove: | 463 | # title: 'Authorized apps' |
464 | # warn_message_1: 'You have the ability to remove this client. This action is IRREVERSIBLE !' | 464 | #old_clients: |
465 | # warn_message_2: "If you remove it, every app configured with that client won't be able to auth on your wallabag." | 465 | # create_new: 'Create a new client' |
466 | # action: 'Remove this client' | 466 | # title: 'Old clients (depreciated)' |
467 | # client: | 467 | # list: 'Old clients list' |
468 | # page_title: 'API clients management > New client' | 468 | # field_id: 'Client ID' |
469 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' | 469 | # field_secret: 'Client secret' |
470 | # form: | 470 | # no_client: 'No client yet.' |
471 | # name_label: 'Name of the client' | 471 | #remove: |
472 | # redirect_uris_label: 'Redirect URIs' | 472 | # warn_message_1: 'You have the ability to remove the client %name%. This action is IRREVERSIBLE !' |
473 | # save_label: 'Create a new client' | 473 | # warn_message_2: "If you remove it, every app configured with that client won't be able to auth on your wallabag." |
474 | # action_back: 'بازگشت' | 474 | # action: 'Remove the client %name%' |
475 | # client_parameter: | 475 | #old_client: |
476 | # page_title: 'API clients management > Client parameters' | 476 | # page_title: 'Apps > New client' |
477 | # page_description: 'Here are your client parameters.' | 477 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' |
478 | # field_name: 'Client name' | 478 | # form: |
479 | # field_id: 'Client ID' | 479 | # name_label: 'Name of the client' |
480 | # field_secret: 'Client secret' | 480 | # save_label: 'Create a new client' |
481 | # back: 'بازگشت' | 481 | # action_back: 'Back' |
482 | # read_howto: 'Read the howto "Create my first application"' | 482 | # parameters: |
483 | # howto: | 483 | # page_title: 'Apps > Client parameters' |
484 | # page_title: 'API clients management > How to create my first application' | 484 | # page_description: 'Here are your client parameters.' |
485 | # description: | 485 | # field_name: 'Client name' |
486 | # paragraph_1: 'The following commands make use of the <a href="https://github.com/jkbrzt/httpie">HTTPie library</a>. Make sure it is installed on your system before using it.' | 486 | # field_id: 'Client ID' |
487 | # paragraph_2: 'You need a token to communicate between your 3rd application and wallabag API.' | 487 | # field_secret: 'Client secret' |
488 | # paragraph_3: 'To create this token, you need <a href="%link%">to create a new client</a>.' | 488 | # back: 'Back' |
489 | # paragraph_4: 'Now, create your token (replace client_id, client_secret, username and password with the good values):' | 489 | # app: |
490 | # paragraph_5: 'The API will return a response like this:' | 490 | # created_at: 'Created at: %date%' |
491 | # paragraph_6: 'The access_token is useful to do a call to the API endpoint. For example:' | 491 | # documentation: |
492 | # paragraph_7: 'This call will return all the entries for your user.' | 492 | # title: 'Documentation' |
493 | # paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' | 493 | # full_documentation: 'Full documentation' |
494 | # back: 'بازگشت' | 494 | # list_methods: 'List API methods' |
495 | 495 | ||
496 | user: | 496 | user: |
497 | # page_title: Users management | 497 | # page_title: Users management |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index e9e79c67..e3967960 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -443,55 +443,55 @@ import: | |||
443 | description: "Sur la page « Backup » (https://pinboard.in/settings/backup), cliquez sur « JSON » dans la section « Bookmarks ». Un fichier json (sans extension) sera téléchargé (« pinboard_export »)." | 443 | description: "Sur la page « Backup » (https://pinboard.in/settings/backup), cliquez sur « JSON » dans la section « Bookmarks ». Un fichier json (sans extension) sera téléchargé (« pinboard_export »)." |
444 | how_to: "Choisissez le fichier de votre export Pinboard et cliquez sur le bouton ci-dessous pour l’importer." | 444 | how_to: "Choisissez le fichier de votre export Pinboard et cliquez sur le bouton ci-dessous pour l’importer." |
445 | 445 | ||
446 | developer: | 446 | apps: |
447 | page_title: "Gestion des clients API" | 447 | page_title: "Gestion des clients API" |
448 | welcome_message: "Bienvenue sur l’API de wallabag" | 448 | allow: |
449 | documentation: "Documentation" | 449 | title: 'Une nouvelle application voudrait accéder à votre compte' |
450 | how_to_first_app: "Comment créer votre première application" | 450 | permissions: |
451 | full_documentation: "Voir la documentation complète de l’API" | 451 | read: |
452 | list_methods: "Lister toutes les méthodes de l’API" | 452 | label: 'Lire vos données' |
453 | clients: | 453 | desc: '%name% pourra accéder à la liste et au contenu de vos articles, tags et annotations.' |
454 | title: "Clients" | 454 | write: |
455 | label: 'Modifier vos données' | ||
456 | desc: '%name% pourra modifier et gérer (y compris supprimer) vos articles, tags et annotations.' | ||
457 | user: | ||
458 | label: 'Modifier votre compte utilisateur' | ||
459 | desc: '%name% pourra modifier les détails de votre compte utilisateur.' | ||
460 | featured: | ||
461 | title: 'Applications mises en avant' | ||
462 | list: | ||
463 | title: 'Applications autorisées' | ||
464 | old_clients: | ||
455 | create_new: "Créer un nouveau client" | 465 | create_new: "Créer un nouveau client" |
456 | existing_clients: | 466 | title: "Clients existants (déprécié)" |
457 | title: "Les clients existants" | 467 | list: "Liste des clients" |
458 | field_id: "ID Client" | 468 | field_id: "ID Client" |
459 | field_secret: "Clé secrète" | 469 | field_secret: "Clé secrète" |
460 | field_uris: "Adresse de redirection" | ||
461 | field_grant_types: "Type de privilège accordé" | ||
462 | no_client: "Aucun client pour le moment" | 470 | no_client: "Aucun client pour le moment" |
463 | remove: | 471 | remove: |
464 | warn_message_1: "Vous avez la possibilité de supprimer le client %name%. Cette action est IRRÉVERSIBLE !" | 472 | warn_message_1: "Vous avez la possibilité de supprimer le client %name%. Cette action est IRRÉVERSIBLE !" |
465 | warn_message_2: "Si vous supprimez le client %name%, toutes les applications qui l’utilisaient ne fonctionneront plus avec votre compte wallabag." | 473 | warn_message_2: "Si vous supprimez le client %name%, toutes les applications qui l’utilisaient ne fonctionneront plus avec votre compte wallabag." |
466 | action: "Supprimer le client %name%" | 474 | action: "Supprimer le client %name%" |
467 | client: | 475 | old_client: |
468 | page_title: "Gestion des clients API > Nouveau client" | 476 | page_title: "Gestion des clients API > Nouveau client" |
469 | page_description: "Vous allez créer un nouveau client. Merci de remplir l’adresse de redirection vers votre application." | 477 | page_description: "Vous allez créer un nouveau client. Merci de remplir l’adresse de redirection vers votre application." |
470 | form: | 478 | form: |
471 | name_label: "Nom du client" | 479 | name_label: "Nom du client" |
472 | redirect_uris_label: "Adresses de redirection (optionnel)" | ||
473 | save_label: "Créer un nouveau client" | 480 | save_label: "Créer un nouveau client" |
474 | action_back: "Retour" | 481 | action_back: "Retour" |
475 | client_parameter: | 482 | parameters: |
476 | page_title: "Gestion des clients API > Les paramètres de votre client" | 483 | page_title: "Gestion des clients API > Les paramètres de votre client" |
477 | page_description: "Voilà les paramètres de votre client" | 484 | page_description: "Voilà les paramètres de votre client" |
478 | field_name: "Nom du client" | 485 | field_name: "Nom du client" |
479 | field_id: "ID client" | 486 | field_id: "ID client" |
480 | field_secret: "Clé secrète" | 487 | field_secret: "Clé secrète" |
481 | back: "Retour" | 488 | back: "Retour" |
482 | read_howto: "Lire « comment créer ma première application »" | 489 | app: |
483 | howto: | 490 | created_at: 'Créé le : %date%' |
484 | page_title: "Gestion des clients API > Comment créer votre première application" | 491 | documentation: |
485 | description: | 492 | title: "Documentation" |
486 | paragraph_1: "Les commandes suivantes utilisent la <a href=\"https://github.com/jkbrzt/httpie\">librarie HTTPie</a>. Assurez-vous qu’elle soit installée avant de l’utiliser." | 493 | full_documentation: "Voir la documentation complète de l’API" |
487 | paragraph_2: "Vous avez besoin d’un token pour échanger entre votre application et l’API de wallabag." | 494 | list_methods: "Lister toutes les méthodes de l’API" |
488 | paragraph_3: "Pour créer un token, vous devez <a href=\"%link%\">créer un nouveau client</a>." | ||
489 | paragraph_4: "Maintenant créez votre token (remplacer client_id, client_secret, username et password avec les bonnes valeurs):" | ||
490 | paragraph_5: "L’API vous retournera une réponse comme ça :" | ||
491 | paragraph_6: "L’access_token doit être utilisé pour faire un appel à l’API. Par exemple :" | ||
492 | paragraph_7: "Cet appel va retourner tous les articles de l’utilisateur." | ||
493 | paragraph_8: "Si vous voulez toutes les méthodes de l’API, jetez un oeil <a href=\"%link%\">à la documentation de l’API</a>." | ||
494 | back: "Retour" | ||
495 | 495 | ||
496 | user: | 496 | user: |
497 | page_title: "Gestion des utilisateurs" | 497 | page_title: "Gestion des utilisateurs" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 0597d3e3..504f990f 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -443,18 +443,28 @@ import: | |||
443 | # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' | 443 | # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' |
444 | # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' | 444 | # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' |
445 | 445 | ||
446 | developer: | 446 | apps: |
447 | # page_title: 'API clients management' | 447 | # page_title: 'API clients management' |
448 | welcome_message: 'Benvenuto nelle API di wallabag' | 448 | # allow: |
449 | documentation: 'Documentazione' | 449 | # title: 'A new application would like to connect to your account' |
450 | how_to_first_app: 'Come creare la mia prima applicazione' | 450 | # permissions: |
451 | full_documentation: 'Consulta la documentazione API completa' | 451 | # read: |
452 | list_methods: 'Elenco dei metodi API' | 452 | # label: 'Read your data' |
453 | clients: | 453 | # desc: '%name% will be able to access the list and contents of your entries, tags and annotations.' |
454 | title: 'Client' | 454 | # write: |
455 | # label: 'Edit your data' | ||
456 | # desc: '%name% will be able to edit and manage (including deleting) your entries, tags and annotations.' | ||
457 | # user: | ||
458 | # label: 'Edit your user settings' | ||
459 | # desc: '%name% will be able to manage your user account.' | ||
460 | #featured: | ||
461 | # title: 'Featured apps' | ||
462 | #list: | ||
463 | # title: 'Authorized apps' | ||
464 | old_clients: | ||
455 | create_new: 'Crea un nuovo client' | 465 | create_new: 'Crea un nuovo client' |
456 | existing_clients: | ||
457 | title: 'Client esistenti' | 466 | title: 'Client esistenti' |
467 | list: 'Client' | ||
458 | field_id: 'Client ID' | 468 | field_id: 'Client ID' |
459 | field_secret: 'Client secret' | 469 | field_secret: 'Client secret' |
460 | field_uris: 'URI di reindirizzamento' | 470 | field_uris: 'URI di reindirizzamento' |
@@ -464,34 +474,26 @@ developer: | |||
464 | warn_message_1: "Hai la possibilità di rimuovere questo client. L'operazione è IRREVERSIBILE!" | 474 | warn_message_1: "Hai la possibilità di rimuovere questo client. L'operazione è IRREVERSIBILE!" |
465 | warn_message_2: "Se lo rimuovi, ogni app configurata con questo client non sarà più in grado di autenticarsi." | 475 | warn_message_2: "Se lo rimuovi, ogni app configurata con questo client non sarà più in grado di autenticarsi." |
466 | action: 'Rimuovi questo client' | 476 | action: 'Rimuovi questo client' |
467 | client: | 477 | old_client: |
468 | # page_title: 'API clients management > Nuovo client' | 478 | # page_title: 'API clients management > Nuovo client' |
469 | page_description: 'Stai per creare un nuovo client. Compila i campi sottostanti per lo URI di reindirizzamento della tua applicazione.' | 479 | page_description: 'Stai per creare un nuovo client. Compila i campi sottostanti per lo URI di reindirizzamento della tua applicazione.' |
470 | form: | 480 | form: |
471 | # name_label: 'Name of the client' | 481 | # name_label: 'Name of the client' |
472 | redirect_uris_label: 'URI di reindirizzamento' | ||
473 | save_label: 'Crea un nuovo client' | 482 | save_label: 'Crea un nuovo client' |
474 | action_back: 'Indietro' | 483 | action_back: 'Indietro' |
475 | client_parameter: | 484 | parameters: |
476 | # page_title: 'API clients management > parametri Client' | 485 | # page_title: 'API clients management > parametri Client' |
477 | page_description: 'Questi sono i tuoi parametri del client.' | 486 | page_description: 'Questi sono i tuoi parametri del client.' |
478 | # field_name: 'Client name' | 487 | # field_name: 'Client name' |
479 | field_id: 'Client ID' | 488 | field_id: 'Client ID' |
480 | field_secret: 'Client secret' | 489 | field_secret: 'Client secret' |
481 | back: 'Indietro' | 490 | back: 'Indietro' |
482 | read_howto: 'Leggi "Come creare la mia prima applicazione"' | 491 | # app: |
483 | howto: | 492 | # created_at: 'Created at: %date%' |
484 | # page_title: 'API clients management > Come creare la mia prima applicazione' | 493 | documentation: |
485 | description: | 494 | title: 'Documentazione' |
486 | paragraph_1: 'I seguenti comandi fanno uso della <a href="https://github.com/jkbrzt/httpie">libreria HTTPie</a>. Verifica che sia installata sul tuo sistema prima di utilizzarli.' | 495 | full_documentation: 'Consulta la documentazione API completa' |
487 | paragraph_2: 'Hai bisogno di un token per far comunicare la tua applicazione di terze parti e le API di wallabag.' | 496 | list_methods: 'Elenco dei metodi API' |
488 | paragraph_3: 'Per creare questo token, hai bisogno di <a href="%link%">creare un nuovo client</a>.' | ||
489 | paragraph_4: 'Ora, crea il tuo token (sostituisci client_id, client_secret, username e password con valori reali):' | ||
490 | paragraph_5: 'Le API ritorneranno una risposta di questo tipo:' | ||
491 | paragraph_6: "L'access_token è utile per chiamare un API endpoint. Per esempio:" | ||
492 | paragraph_7: 'Questa chiamata ritornerà tutti i contenuti per il tuo utente.' | ||
493 | paragraph_8: 'Se vuoi visualizzare tutti gli API endpoints, dai una occhiata alla <a href="%link%">documentazione delle API</a>.' | ||
494 | back: 'Indietro' | ||
495 | 497 | ||
496 | user: | 498 | user: |
497 | # page_title: Users management | 499 | # page_title: Users management |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index c172a0f6..ea05fc4c 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -445,31 +445,38 @@ import: | |||
445 | 445 | ||
446 | developer: | 446 | developer: |
447 | page_title: 'Gestion dels clients API' | 447 | page_title: 'Gestion dels clients API' |
448 | welcome_message: "Benvenguda sus l'API de wallabag" | 448 | # allow: |
449 | documentation: 'Documentacion' | 449 | # title: 'A new application would like to connect to your account' |
450 | how_to_first_app: 'Cossí crear vòstra primièra aplicacion' | 450 | # permissions: |
451 | full_documentation: "Veire la documentacion completa de l'API" | 451 | # read: |
452 | list_methods: "Lista dels metòdes de l'API" | 452 | # label: 'Read your data' |
453 | clients: | 453 | # desc: '%name% will be able to access the list and contents of your entries, tags and annotations.' |
454 | title: 'Clients' | 454 | # write: |
455 | # label: 'Edit your data' | ||
456 | # desc: '%name% will be able to edit and manage (including deleting) your entries, tags and annotations.' | ||
457 | # user: | ||
458 | # label: 'Edit your user settings' | ||
459 | # desc: '%name% will be able to manage your user account.' | ||
460 | #featured: | ||
461 | # title: 'Featured apps' | ||
462 | #list: | ||
463 | # title: 'Authorized apps' | ||
464 | old_clients: | ||
455 | create_new: 'Crear un novèl client' | 465 | create_new: 'Crear un novèl client' |
456 | existing_clients: | ||
457 | title: 'Los clients existents' | 466 | title: 'Los clients existents' |
467 | list: 'Clients' | ||
458 | field_id: 'ID Client' | 468 | field_id: 'ID Client' |
459 | field_secret: 'Clé secreta' | 469 | field_secret: 'Clé secreta' |
460 | field_uris: 'URLs de redireccion' | ||
461 | field_grant_types: 'Tipe de privilègi acordat' | ||
462 | no_client: 'Pas cap de client pel moment.' | 470 | no_client: 'Pas cap de client pel moment.' |
463 | remove: | 471 | remove: |
464 | warn_message_1: 'Avètz la possibilitat de supriimr un client. Aquesta accion es IRREVERSIBLA !' | 472 | warn_message_1: 'Avètz la possibilitat de supriimr un client. Aquesta accion es IRREVERSIBLA !' |
465 | warn_message_2: "Se suprimissètz un client, totas las aplicacions que l'emplegan foncionaràn pas mai amb vòstre compte wallabag." | 473 | warn_message_2: "Se suprimissètz un client, totas las aplicacions que l'emplegan foncionaràn pas mai amb vòstre compte wallabag." |
466 | action: 'Suprimir aqueste client' | 474 | action: 'Suprimir aqueste client' |
467 | client: | 475 | old_client: |
468 | page_title: 'Gestion dels clients API > Novèl client' | 476 | page_title: 'Gestion dels clients API > Novèl client' |
469 | page_description: "Anatz crear un novèl client. Mercés de garnir l'url de redireccion cap a vòstra aplicacion." | 477 | page_description: "Anatz crear un novèl client. Mercés de garnir l'url de redireccion cap a vòstra aplicacion." |
470 | form: | 478 | form: |
471 | name_label: "Nom del client" | 479 | name_label: "Nom del client" |
472 | redirect_uris_label: 'URLs de redireccion' | ||
473 | save_label: 'Crear un novèl client' | 480 | save_label: 'Crear un novèl client' |
474 | action_back: 'Retorn' | 481 | action_back: 'Retorn' |
475 | client_parameter: | 482 | client_parameter: |
@@ -492,6 +499,19 @@ developer: | |||
492 | paragraph_7: "Aquesta requèsta tornarà totes los articles de l'utilizaire." | 499 | paragraph_7: "Aquesta requèsta tornarà totes los articles de l'utilizaire." |
493 | paragraph_8: "Se volètz totas las adreças d'accès de l'API, donatz un còp d’uèlh <a href=\"%link%\">a la documentacion de l'API</a>." | 500 | paragraph_8: "Se volètz totas las adreças d'accès de l'API, donatz un còp d’uèlh <a href=\"%link%\">a la documentacion de l'API</a>." |
494 | back: 'Retorn' | 501 | back: 'Retorn' |
502 | parameters: | ||
503 | page_title: 'Gestion dels clients API > Los paramètres de vòstre client' | ||
504 | page_description: 'Vaquí los paramètres de vòstre client.' | ||
505 | field_name: 'Nom del client' | ||
506 | field_id: 'ID Client' | ||
507 | field_secret: 'Clau secreta' | ||
508 | back: 'Retour' | ||
509 | # app: | ||
510 | # created_at: 'Created at: %date%' | ||
511 | documentation: | ||
512 | title: 'Documentacion' | ||
513 | full_documentation: "Veire la documentacion completa de l'API" | ||
514 | list_methods: "Lista dels metòdes de l'API" | ||
495 | 515 | ||
496 | user: | 516 | user: |
497 | page_title: 'Gestion dels utilizaires' | 517 | page_title: 'Gestion dels utilizaires' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 82d16767..d2e5c1d5 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -443,55 +443,55 @@ import: | |||
443 | description: 'Ten importer, zaimportuje wszystkie twoje artykuły z Pinboard. W ustawieniach kopii zapasowej (https://pinboard.in/settings/backup), kliknij na "JSON" w sekcji "Bookmarks". Otrzymasz plik "pinboard_export".' | 443 | description: 'Ten importer, zaimportuje wszystkie twoje artykuły z Pinboard. W ustawieniach kopii zapasowej (https://pinboard.in/settings/backup), kliknij na "JSON" w sekcji "Bookmarks". Otrzymasz plik "pinboard_export".' |
444 | how_to: 'Wybierz swój plik eksportu z Pinboard i kliknij poniższy przycisk, aby go załadować.' | 444 | how_to: 'Wybierz swój plik eksportu z Pinboard i kliknij poniższy przycisk, aby go załadować.' |
445 | 445 | ||
446 | developer: | 446 | apps: |
447 | page_title: 'Zarządzanie klientami API' | 447 | page_title: 'Zarządzanie klientami API' |
448 | welcome_message: 'Witaj w API wallabag' | 448 | # allow: |
449 | documentation: 'Dokumentacja' | 449 | # title: 'A new application would like to connect to your account' |
450 | how_to_first_app: 'Jak stworzyć moją pierwszą aplikację' | 450 | # permissions: |
451 | full_documentation: 'Pokaż pełne API' | 451 | # read: |
452 | list_methods: 'Lista metod API' | 452 | # label: 'Read your data' |
453 | clients: | 453 | # desc: '%name% will be able to access the list and contents of your entries, tags and annotations.' |
454 | title: 'Klienci' | 454 | # write: |
455 | # label: 'Edit your data' | ||
456 | # desc: '%name% will be able to edit and manage (including deleting) your entries, tags and annotations.' | ||
457 | # user: | ||
458 | # label: 'Edit your user settings' | ||
459 | # desc: '%name% will be able to manage your user account.' | ||
460 | #featured: | ||
461 | # title: 'Featured apps' | ||
462 | #list: | ||
463 | # title: 'Authorized apps' | ||
464 | old_clients: | ||
455 | create_new: 'Utwórz nowego klienta' | 465 | create_new: 'Utwórz nowego klienta' |
456 | existing_clients: | ||
457 | title: 'Istniejący klienci' | 466 | title: 'Istniejący klienci' |
467 | list: 'Klienci' | ||
458 | field_id: 'ID klienta' | 468 | field_id: 'ID klienta' |
459 | field_secret: 'Client secret' | 469 | field_secret: 'Client secret' |
460 | field_uris: 'Przekieruj URIs' | ||
461 | field_grant_types: 'Przyznaj pozwolenie' | ||
462 | no_client: 'Nie ma jeszcze klienta.' | 470 | no_client: 'Nie ma jeszcze klienta.' |
463 | remove: | 471 | remove: |
464 | warn_message_1: 'Masz możliwość usunięcia tego klienta. Ta akcja jest NIEODWRACALNA !' | 472 | warn_message_1: 'Masz możliwość usunięcia tego klienta. Ta akcja jest NIEODWRACALNA !' |
465 | warn_message_2: "Jeżeli go usuniesz, aplikacje skonfigurowane z tym klientem nię będa w stanie autoryzować twojego wallabag." | 473 | warn_message_2: "Jeżeli go usuniesz, aplikacje skonfigurowane z tym klientem nię będa w stanie autoryzować twojego wallabag." |
466 | action: 'Usuń tego klienta' | 474 | action: 'Usuń tego klienta' |
467 | client: | 475 | old_client: |
468 | page_title: 'Zarządzanie klientami API > Nowy klient' | 476 | page_title: 'Zarządzanie klientami API > Nowy klient' |
469 | page_description: 'Tworzysz nowego klienta. Wypełnij poniższe pole w celu przekierowania URI twojej aplikacji.' | 477 | page_description: 'Tworzysz nowego klienta. Wypełnij poniższe pole w celu przekierowania URI twojej aplikacji.' |
470 | form: | 478 | form: |
471 | name_label: 'Nazwa klienta' | 479 | name_label: 'Nazwa klienta' |
472 | redirect_uris_label: 'Przekieruj adresy URI' | ||
473 | save_label: 'Stwórz nowego klienta' | 480 | save_label: 'Stwórz nowego klienta' |
474 | action_back: 'Cofnij' | 481 | action_back: 'Cofnij' |
475 | client_parameter: | 482 | parameters: |
476 | page_title: 'Zarządzanie klientami API > Parametry klienta' | 483 | page_title: 'Zarządzanie klientami API > Parametry klienta' |
477 | page_description: 'Tutaj znajdują się parametry klienta.' | 484 | page_description: 'Tutaj znajdują się parametry klienta.' |
478 | field_name: 'Nazwa klienta' | 485 | field_name: 'Nazwa klienta' |
479 | field_id: 'Client ID' | 486 | field_id: 'Client ID' |
480 | field_secret: 'Client secret' | 487 | field_secret: 'Client secret' |
481 | back: 'Cofnij' | 488 | back: 'Cofnij' |
482 | read_howto: 'Przeczytaj jak "Stworzyć moją pierwszą aplikację"' | 489 | # app: |
483 | howto: | 490 | # created_at: 'Created at: %date%' |
484 | page_title: 'Zarządzanie klientami API > Jak stworzyć moją pierwszą aplikację' | 491 | documentation: |
485 | description: | 492 | title: 'Dokumentacja' |
486 | paragraph_1: 'Następujące komendy korzystają <a href="https://github.com/jkbrzt/httpie">Biblioteka HTTPie</a>. Upewnij się, czy zainstalowałeś ją w swoim systemie zanim z niej skorzystasz' | 493 | full_documentation: 'Pokaż pełne API' |
487 | paragraph_2: 'Potrzebujesz tokena w celu nawiązania komunikacji między swoją aplikacją a API wallabag.' | 494 | list_methods: 'Lista metod API' |
488 | paragraph_3: 'W celu stworzenia tokena musisz <a href="%link%">stwórz nowego klienta</a>.' | ||
489 | paragraph_4: 'Teraz, utwórz tokena (zmień client_id, client_secret, username i password z poprawnymi wartościami):' | ||
490 | paragraph_5: 'API powinno zwrócić taką informację:' | ||
491 | paragraph_6: 'access_token jest użyteczny do wywołania API endpoint. Na przykład:' | ||
492 | paragraph_7: 'To wywołanie zwróci wszystkie twoje wpisy.' | ||
493 | paragraph_8: 'Jeżeli chcesz wyświetlić wszystkie punkty końcowe API, zobacz <a href="%link%">Dokumentacja naszego API</a>.' | ||
494 | back: 'Cofnij' | ||
495 | 495 | ||
496 | user: | 496 | user: |
497 | page_title: Zarządzanie użytkownikami | 497 | page_title: Zarządzanie użytkownikami |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index b75567d6..0533ddba 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml | |||
@@ -445,53 +445,53 @@ import: | |||
445 | 445 | ||
446 | developer: | 446 | developer: |
447 | # page_title: 'API clients management' | 447 | # page_title: 'API clients management' |
448 | welcome_message: 'Bem-vindo a API do wallabag' | 448 | # allow: |
449 | documentation: 'Documentação' | 449 | # title: 'A new application would like to connect to your account' |
450 | how_to_first_app: 'Como criar minha primeira aplicação' | 450 | # permissions: |
451 | full_documentation: 'Ver a documentação completa da API' | 451 | # read: |
452 | list_methods: 'Lista de métodos da API' | 452 | # label: 'Read your data' |
453 | clients: | 453 | # desc: '%name% will be able to access the list and contents of your entries, tags and annotations.' |
454 | title: 'Clientes' | 454 | # write: |
455 | # label: 'Edit your data' | ||
456 | # desc: '%name% will be able to edit and manage (including deleting) your entries, tags and annotations.' | ||
457 | # user: | ||
458 | # label: 'Edit your user settings' | ||
459 | # desc: '%name% will be able to manage your user account.' | ||
460 | #featured: | ||
461 | # title: 'Featured apps' | ||
462 | #list: | ||
463 | # title: 'Authorized apps' | ||
464 | old_clients: | ||
455 | create_new: 'Criar um novo cliente' | 465 | create_new: 'Criar um novo cliente' |
456 | existing_clients: | ||
457 | title: 'Clientes existentes' | 466 | title: 'Clientes existentes' |
467 | list: 'Clientes' | ||
458 | field_id: 'ID do cliente' | 468 | field_id: 'ID do cliente' |
459 | field_secret: 'Chave do cliente' | 469 | field_secret: 'Chave do cliente' |
460 | field_uris: 'URIs de redirecionamento' | ||
461 | field_grant_types: 'Tipo permitido' | ||
462 | no_client: 'Nenhum cliente até agora.' | 470 | no_client: 'Nenhum cliente até agora.' |
463 | remove: | 471 | remove: |
464 | warn_message_1: 'Você tem permissão pare remover este cliente. Esta ação é IRREVERSÍVEL !' | 472 | warn_message_1: 'Você tem permissão pare remover este cliente. Esta ação é IRREVERSÍVEL !' |
465 | warn_message_2: 'Se você remover isso, todo o aplicativo configurado com este cliente não poderá se autenticar no seu wallabag.' | 473 | warn_message_2: 'Se você remover isso, todo o aplicativo configurado com este cliente não poderá se autenticar no seu wallabag.' |
466 | action: 'Remover este cliente' | 474 | action: 'Remover este cliente' |
467 | client: | 475 | old_client: |
468 | # page_title: 'API clients management > Novo cliente' | 476 | # page_title: 'API clients management > Novo cliente' |
469 | page_description: 'Você está prestes a criar um novo cliente. Por favor preencha o campo abaixo para a URI de redirecionamento de sua aplicação.' | 477 | page_description: 'Você está prestes a criar um novo cliente. Por favor preencha o campo abaixo para a URI de redirecionamento de sua aplicação.' |
470 | form: | 478 | form: |
471 | name_label: 'Nome do cliente' | 479 | name_label: 'Nome do cliente' |
472 | redirect_uris_label: 'URIs de redirecionamento' | ||
473 | save_label: 'Criar um novo cliente' | 480 | save_label: 'Criar um novo cliente' |
474 | action_back: 'Voltar' | 481 | action_back: 'Voltar' |
475 | client_parameter: | 482 | parameters: |
476 | # page_title: 'API clients management > Parâmetros de clientes' | 483 | # page_title: 'API clients management > Parâmetros de clientes' |
477 | page_description: 'Aqui estão os parâmetros de seus clientes.' | 484 | page_description: 'Aqui estão os parâmetros de seus clientes.' |
478 | field_name: 'Nome do cliente' | 485 | field_name: 'Nome do cliente' |
479 | field_id: 'ID do cliente' | 486 | field_id: 'ID do cliente' |
480 | field_secret: 'Chave do cliente' | 487 | field_secret: 'Chave do cliente' |
481 | back: 'Voltar' | 488 | back: 'Voltar' |
482 | read_howto: 'Leia o how-to "Criar minha primeira aplicação"' | 489 | # app: |
483 | howto: | 490 | # created_at: 'Created at: %date%' |
484 | # page_title: 'API clients management > Criar minha primeira aplicação' | 491 | documentation: |
485 | description: | 492 | title: 'Documentação' |
486 | paragraph_1: 'Os seguintes comandos fazem uso da <a href="https://github.com/jkbrzt/httpie">biblioteca HTTPie</a>. Tenha certeza que ela está instalada em seu servidor antes de usá-la.' | 493 | full_documentation: 'Ver a documentação completa da API' |
487 | paragraph_2: 'Você precisa de um token para a comunicação entre sua aplicação terceira e a API do wallabag.' | 494 | list_methods: 'Lista de métodos da API' |
488 | paragraph_3: 'Para criar este token, você precisa <a href="%link%">criar um novo cliente</a>.' | ||
489 | paragraph_4: 'Agora, crie seu token (altere client_id, client_secret, username e password com os valores corretos):' | ||
490 | paragraph_5: 'A API pode retornar uma resposta como essa:' | ||
491 | paragraph_6: 'O access_token é utilizável para fazer uma chamada para o endpoint da API. Por exemplo:' | ||
492 | paragraph_7: 'Esta chamada pode retornar todas as entradas de seu usuário.' | ||
493 | paragraph_8: 'Se você deseja ver todos os endpoints da API, dê uma olhada <a href="%link%">em nossa documentação da API</a>.' | ||
494 | back: 'Voltar' | ||
495 | 495 | ||
496 | user: | 496 | user: |
497 | page_title: 'Gerenciamento de Usuários' | 497 | page_title: 'Gerenciamento de Usuários' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 95df573d..3cea2900 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -443,55 +443,55 @@ import: | |||
443 | # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' | 443 | # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' |
444 | # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' | 444 | # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' |
445 | 445 | ||
446 | developer: | 446 | apps: |
447 | # page_title: 'API clients management' | 447 | # page_title: 'Apps' |
448 | # welcome_message: 'Welcome to the wallabag API' | 448 | # allow: |
449 | # documentation: 'Documentation' | 449 | # title: 'A new application would like to connect to your account' |
450 | # how_to_first_app: 'How to create my first application' | 450 | # permissions: |
451 | # full_documentation: 'View full API documentation' | 451 | # read: |
452 | # list_methods: 'List API methods' | 452 | # label: 'Read your data' |
453 | # clients: | 453 | # desc: '%name% will be able to access the list and contents of your entries, tags and annotations.' |
454 | # title: 'Clients' | 454 | # write: |
455 | # create_new: 'Create a new client' | 455 | # label: 'Edit your data' |
456 | # existing_clients: | 456 | # desc: '%name% will be able to edit and manage (including deleting) your entries, tags and annotations.' |
457 | # title: 'Existing clients' | 457 | # user: |
458 | # field_id: 'Client ID' | 458 | # label: 'Edit your user settings' |
459 | # field_secret: 'Client secret' | 459 | # desc: '%name% will be able to manage your user account.' |
460 | # field_uris: 'Redirect URIs' | 460 | #featured: |
461 | # field_grant_types: 'Grant type allowed' | 461 | # title: 'Featured apps' |
462 | # no_client: 'No client yet.' | 462 | #list: |
463 | # remove: | 463 | # title: 'Authorized apps' |
464 | # warn_message_1: 'You have the ability to remove this client. This action is IRREVERSIBLE !' | 464 | #old_clients: |
465 | # warn_message_2: "If you remove it, every app configured with that client won't be able to auth on your wallabag." | 465 | # create_new: 'Create a new client' |
466 | # action: 'Remove this client' | 466 | # title: 'Old clients (depreciated)' |
467 | # client: | 467 | # list: 'Old clients list' |
468 | # page_title: 'API clients management > New client' | 468 | # field_id: 'Client ID' |
469 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' | 469 | # field_secret: 'Client secret' |
470 | # form: | 470 | # no_client: 'No client yet.' |
471 | # name_label: 'Name of the client' | 471 | #remove: |
472 | # redirect_uris_label: 'Redirect URIs' | 472 | # warn_message_1: 'You have the ability to remove the client %name%. This action is IRREVERSIBLE !' |
473 | # save_label: 'Create a new client' | 473 | # warn_message_2: "If you remove it, every app configured with that client won't be able to auth on your wallabag." |
474 | # action_back: 'Back' | 474 | # action: 'Remove the client %name%' |
475 | # client_parameter: | 475 | #old_client: |
476 | # page_title: 'API clients management > Client parameters' | 476 | # page_title: 'Apps > New client' |
477 | # page_description: 'Here are your client parameters.' | 477 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' |
478 | # field_name: 'Client name' | 478 | # form: |
479 | # field_id: 'Client ID' | 479 | # name_label: 'Name of the client' |
480 | # field_secret: 'Client secret' | 480 | # save_label: 'Create a new client' |
481 | # back: 'Back' | 481 | # action_back: 'Back' |
482 | # read_howto: 'Read the howto "Create my first application"' | 482 | # parameters: |
483 | # howto: | 483 | # page_title: 'Apps > Client parameters' |
484 | # page_title: 'API clients management > How to create my first application' | 484 | # page_description: 'Here are your client parameters.' |
485 | # description: | 485 | # field_name: 'Client name' |
486 | # paragraph_1: 'The following commands make use of the <a href="https://github.com/jkbrzt/httpie">HTTPie library</a>. Make sure it is installed on your system before using it.' | 486 | # field_id: 'Client ID' |
487 | # paragraph_2: 'You need a token to communicate between your 3rd application and wallabag API.' | 487 | # field_secret: 'Client secret' |
488 | # paragraph_3: 'To create this token, you need <a href="%link%">to create a new client</a>.' | 488 | # back: 'Back' |
489 | # paragraph_4: 'Now, create your token (replace client_id, client_secret, username and password with the good values):' | 489 | # app: |
490 | # paragraph_5: 'The API will return a response like this:' | 490 | # created_at: 'Created at: %date%' |
491 | # paragraph_6: 'The access_token is useful to do a call to the API endpoint. For example:' | 491 | # documentation: |
492 | # paragraph_7: 'This call will return all the entries for your user.' | 492 | # title: 'Documentation' |
493 | # paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' | 493 | # full_documentation: 'Full documentation' |
494 | # back: 'Back' | 494 | # list_methods: 'List API methods' |
495 | 495 | ||
496 | user: | 496 | user: |
497 | # page_title: Users management | 497 | # page_title: Users management |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 61e1a1ea..7c2edba0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -441,55 +441,55 @@ import: | |||
441 | # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' | 441 | # description: 'This importer will import all your Instapaper articles. On the backup (https://pinboard.in/settings/backup) page, click on "JSON" in the "Bookmarks" section. A JSON file will be downloaded (like "pinboard_export").' |
442 | # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' | 442 | # how_to: 'Please select your Pinboard export and click on the below button to upload and import it.' |
443 | 443 | ||
444 | developer: | 444 | apps: |
445 | # page_title: 'API clients management' | 445 | # page_title: 'Apps' |
446 | # welcome_message: 'Welcome to the wallabag API' | 446 | # allow: |
447 | # documentation: 'Documentation' | 447 | # title: 'A new application would like to connect to your account' |
448 | # how_to_first_app: 'How to create my first application' | 448 | # permissions: |
449 | # full_documentation: 'View full API documentation' | 449 | # read: |
450 | # list_methods: 'List API methods' | 450 | # label: 'Read your data' |
451 | # clients: | 451 | # desc: '%name% will be able to access the list and contents of your entries, tags and annotations.' |
452 | # title: 'Clients' | 452 | # write: |
453 | # create_new: 'Create a new client' | 453 | # label: 'Edit your data' |
454 | # existing_clients: | 454 | # desc: '%name% will be able to edit and manage (including deleting) your entries, tags and annotations.' |
455 | # title: 'Existing clients' | 455 | # user: |
456 | # field_id: 'Client ID' | 456 | # label: 'Edit your user settings' |
457 | # field_secret: 'Client secret' | 457 | # desc: '%name% will be able to manage your user account.' |
458 | # field_uris: 'Redirect URIs' | 458 | #featured: |
459 | # field_grant_types: 'Grant type allowed' | 459 | # title: 'Featured apps' |
460 | # no_client: 'No client yet.' | 460 | #list: |
461 | # remove: | 461 | # title: 'Authorized apps' |
462 | # warn_message_1: 'You have the ability to remove this client. This action is IRREVERSIBLE !' | 462 | #old_clients: |
463 | # warn_message_2: "If you remove it, every app configured with that client won't be able to auth on your wallabag." | 463 | # create_new: 'Create a new client' |
464 | # action: 'Remove this client' | 464 | # title: 'Old clients (depreciated)' |
465 | # client: | 465 | # list: 'Old clients list' |
466 | # page_title: 'API clients management > New client' | 466 | # field_id: 'Client ID' |
467 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' | 467 | # field_secret: 'Client secret' |
468 | # form: | 468 | # no_client: 'No client yet.' |
469 | #remove: | ||
470 | # warn_message_1: 'You have the ability to remove the client %name%. This action is IRREVERSIBLE !' | ||
471 | # warn_message_2: "If you remove it, every app configured with that client won't be able to auth on your wallabag." | ||
472 | # action: 'Remove the client %name%' | ||
473 | #old_client: | ||
474 | # page_title: 'Apps > New client' | ||
475 | # page_description: 'You are about to create a new client. Please fill the field below for the redirect URI of your application.' | ||
476 | # form: | ||
469 | # name_label: 'Name of the client' | 477 | # name_label: 'Name of the client' |
470 | # redirect_uris_label: 'Redirect URIs' | 478 | # save_label: 'Create a new client' |
471 | # save_label: 'Create a new client' | 479 | # action_back: 'Back' |
472 | # action_back: 'Back' | 480 | # parameters: |
473 | # client_parameter: | 481 | # page_title: 'Apps > Client parameters' |
474 | # page_title: 'API clients management > Client parameters' | 482 | # page_description: 'Here are your client parameters.' |
475 | # page_description: 'Here are your client parameters.' | 483 | # field_name: 'Client name' |
476 | # field_name: 'Client name' | 484 | # field_id: 'Client ID' |
477 | # field_id: 'Client ID' | 485 | # field_secret: 'Client secret' |
478 | # field_secret: 'Client secret' | 486 | # back: 'Back' |
479 | # back: 'Back' | 487 | # app: |
480 | # read_howto: 'Read the howto "Create my first application"' | 488 | # created_at: 'Created at: %date%' |
481 | # howto: | 489 | # documentation: |
482 | # page_title: 'API clients management > How to create my first application' | 490 | # title: 'Documentation' |
483 | # description: | 491 | # full_documentation: 'Full documentation' |
484 | # paragraph_1: 'The following commands make use of the <a href="https://github.com/jkbrzt/httpie">HTTPie library</a>. Make sure it is installed on your system before using it.' | 492 | # list_methods: 'List API methods' |
485 | # paragraph_2: 'You need a token to communicate between your 3rd application and wallabag API.' | ||
486 | # paragraph_3: 'To create this token, you need <a href="%link%">to create a new client</a>.' | ||
487 | # paragraph_4: 'Now, create your token (replace client_id, client_secret, username and password with the good values):' | ||
488 | # paragraph_5: 'The API will return a response like this:' | ||
489 | # paragraph_6: 'The access_token is useful to do a call to the API endpoint. For example:' | ||
490 | # paragraph_7: 'This call will return all the entries for your user.' | ||
491 | # paragraph_8: 'If you want to see all the API endpoints, you can have a look <a href="%link%">to our API documentation</a>.' | ||
492 | # back: 'Back' | ||
493 | 493 | ||
494 | user: | 494 | user: |
495 | # page_title: Users management | 495 | # page_title: Users management |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/client.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/client.html.twig index 8a5da71a..09e138ed 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/client.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/client.html.twig | |||
@@ -1,6 +1,6 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title %}{{ 'developer.client.page_title'|trans }}{% endblock %} | 3 | {% block title %}{{ 'apps.old_client.page_title'|trans }}{% endblock %} |
4 | 4 | ||
5 | {% block content %} | 5 | {% block content %} |
6 | <div class="row"> | 6 | <div class="row"> |
@@ -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>{{ 'developer.client.page_description'|trans }}</p> | 11 | <p>{{ 'apps.old_client.page_description'|trans }}</p> |
12 | {{ form_start(form) }} | 12 | {{ form_start(form) }} |
13 | {{ form_errors(form) }} | 13 | {{ form_errors(form) }} |
14 | 14 | ||
@@ -18,13 +18,7 @@ | |||
18 | {{ form_widget(form.name) }} | 18 | {{ form_widget(form.name) }} |
19 | </div> | 19 | </div> |
20 | 20 | ||
21 | <div class="input-field col s12"> | 21 | <a href="{{ path('apps') }}" class="waves-effect waves-light grey btn">{{ 'apps.old_client.action_back'|trans }}</a> |
22 | {{ form_label(form.redirect_uris) }} | ||
23 | {{ form_errors(form.redirect_uris) }} | ||
24 | {{ form_widget(form.redirect_uris) }} | ||
25 | </div> | ||
26 | |||
27 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{{ 'developer.client.action_back'|trans }}</a> | ||
28 | {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} | 22 | {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} |
29 | 23 | ||
30 | {{ form_rest(form) }} | 24 | {{ form_rest(form) }} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/client_parameters.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/client_parameters.html.twig index b498cceb..30b90252 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/client_parameters.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/client_parameters.html.twig | |||
@@ -1,21 +1,20 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title %}{{ 'developer.client_parameter.page_title'|trans }}{% endblock %} | 3 | {% block title %}{{ 'apps.old_client.parameters.page_title'|trans }}{% endblock %} |
4 | 4 | ||
5 | {% block content %} | 5 | {% block content %} |
6 | <div class="row"> | 6 | <div class="row"> |
7 | <div class="col s12"> | 7 | <div class="col s12"> |
8 | <div class="card-panel settings"> | 8 | <div class="card-panel settings"> |
9 | <div class="row"> | 9 | <div class="row"> |
10 | <p>{{ 'developer.client_parameter.page_description'|trans }}</p> | 10 | <p>{{ 'apps.old_client.parameters.page_description'|trans }}</p> |
11 | <ul> | 11 | <ul> |
12 | <li>{{ 'developer.client_parameter.field_name'|trans }}: <strong><pre>{{ client_name }}</pre></strong></li> | 12 | <li>{{ 'apps.old_client.parameters.field_name'|trans }}: <strong><pre>{{ client_name }}</pre></strong></li> |
13 | <li>{{ 'developer.client_parameter.field_id'|trans }}: <strong><pre>{{ client_id }}</pre></strong></li> | 13 | <li>{{ 'apps.old_client.parameters.field_id'|trans }}: <strong><pre>{{ client_id }}</pre></strong></li> |
14 | <li>{{ 'developer.client_parameter.field_secret'|trans }}: <strong><pre>{{ client_secret }}</pre></strong></li> | 14 | <li>{{ 'apps.old_client.parameters.field_secret'|trans }}: <strong><pre>{{ client_secret }}</pre></strong></li> |
15 | </ul> | 15 | </ul> |
16 | 16 | ||
17 | <a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{{ 'developer.client_parameter.back'|trans }}</a> | 17 | <a href="{{ path('apps') }}" class="waves-effect waves-light grey btn">{{ 'apps.old_client.parameters.back'|trans }}</a> |
18 | <a href="{{ path('developer_howto_firstapp') }}" class="btn waves-effect waves-light">{{ 'developer.client_parameter.read_howto'|trans }}</a> | ||
19 | </div> | 18 | </div> |
20 | </div> | 19 | </div> |
21 | </div> | 20 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/howto_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/howto_app.html.twig deleted file mode 100644 index acbc2c88..00000000 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/howto_app.html.twig +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ 'developer.howto.page_title'|trans }}{% endblock %} | ||
4 | |||
5 | {% block css %} | ||
6 | {{ parent() }} | ||
7 | <link rel="stylesheet" href="{{ asset('https://cdnjs.cloudflare.com/ajax/libs/prism/1.4.1/themes/prism-dark.min.css') }}"> | ||
8 | {% endblock %} | ||
9 | |||
10 | {% block content %} | ||
11 | <div class="row"> | ||
12 | <div class="col s12"> | ||
13 | <div class="card-panel settings"> | ||
14 | |||
15 | <div class="row"> | ||
16 | <p>{{ 'developer.howto.description.paragraph_1'|trans|raw }}</p> | ||
17 | <p>{{ 'developer.howto.description.paragraph_2'|trans }}</p> | ||
18 | <p>{{ 'developer.howto.description.paragraph_3'|trans({'%link%': path('developer_create_client')})|raw }}</p> | ||
19 | <p>{{ 'developer.howto.description.paragraph_4'|trans }}</p> | ||
20 | <p> | ||
21 | <pre><code class="language-bash">http POST http://v2.wallabag.org/oauth/v2/token \ | ||
22 | grant_type=password \ | ||
23 | client_id=12_5um6nz50ceg4088c0840wwc0kgg44g00kk84og044ggkscso0k \ | ||
24 | client_secret=3qd12zpeaxes8cwg8c0404g888co4wo8kc4gcw0occww8cgw4k \ | ||
25 | username=yourUsername \ | ||
26 | password=yourPassw0rd</code></pre> | ||
27 | </p> | ||
28 | <p>{{ 'developer.howto.description.paragraph_5'|trans }}</p> | ||
29 | <p> | ||
30 | <pre><code class="language-bash">HTTP/1.1 200 OK | ||
31 | Cache-Control: no-store, private | ||
32 | Connection: close | ||
33 | Content-Type: application/json | ||
34 | Date: Tue, 06 Oct 2015 18:24:03 GMT | ||
35 | Host: localhost:8000 | ||
36 | Pragma: no-cache | ||
37 | X-Debug-Token: be00a1 | ||
38 | X-Debug-Token-Link: /profiler/be00a1 | ||
39 | X-Powered-By: PHP/5.5.9-1ubuntu4.13 | ||
40 | { | ||
41 | "access_token": "ZWFjNjA3ZWMwYWVmYzRkYTBlMmQ3NTllYmVhOGJiZDE0ZTg1NjE4MjczOTVlNzM0ZTRlMWQ0MmRlMmYwNTk5Mw", | ||
42 | "expires_in": 3600, | ||
43 | "refresh_token": "ODBjODU1NWUwNmUzZTBkNDQ5YWVlZTVlMjQ2Y2I0OWM2NTM1ZGM2M2Y3MDhjMTViM2U2MzYxYzRkMDk5ODRlZg", | ||
44 | "scope": null, | ||
45 | "token_type": "bearer" | ||
46 | }</code></pre> | ||
47 | </p> | ||
48 | <p>{{ 'developer.howto.description.paragraph_6'|trans }}</p> | ||
49 | <p> | ||
50 | <pre><code class="language-bash">http GET http://v2.wallabag.org/api/entries.json \ | ||
51 | "Authorization:Bearer ZWFjNjA3ZWMwYWVmYzRkYTBlMmQ3NTllYmVhOGJiZDE0ZTg1NjE4MjczOTVlNzM0ZTRlMWQ0MmRlMmYwNTk5Mw"</code></pre> | ||
52 | </p> | ||
53 | <p>{{ 'developer.howto.description.paragraph_7'|trans }}</p> | ||
54 | <p>{{ 'developer.howto.description.paragraph_8'|trans({'%link%': path('nelmio_api_doc_index')})|raw }}</p> | ||
55 | <p><a href="{{ path('developer') }}" class="waves-effect waves-light grey btn">{{ 'developer.howto.back'|trans }}</a></p> | ||
56 | </div> | ||
57 | |||
58 | </div> | ||
59 | </div> | ||
60 | </div> | ||
61 | <script src="{{ asset('https://cdnjs.cloudflare.com/ajax/libs/prism/1.4.1/prism.min.js') }}"></script> | ||
62 | <script src="{{ asset('https://cdnjs.cloudflare.com/ajax/libs/prism/1.4.1/components/prism-bash.min.js') }}"></script> | ||
63 | {% endblock %} | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/index.html.twig index 528b055c..a41e64f7 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/index.html.twig | |||
@@ -1,67 +1,153 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title %}{{ 'developer.page_title'|trans }}{% endblock %} | 3 | {% block title %}{{ 'apps.page_title'|trans }}{% endblock %} |
4 | 4 | ||
5 | {% block content %} | 5 | {% block content %} |
6 | <div class="row"> | 6 | <div class="row"> |
7 | <div class="col s12"> | 7 | <div class="col s12"> |
8 | <div class="card-panel settings"> | 8 | <div class="card-panel settings"> |
9 | |||
10 | <div class="row"> | 9 | <div class="row"> |
11 | <h3>{{ 'developer.welcome_message'|trans }}</h3> | 10 | <h4>{{ 'apps.featured.title'|trans }}</h4> |
11 | |||
12 | <div class="slider"> | ||
13 | <ul class="slides"> | ||
14 | <li> | ||
15 | <img src="{{ asset('assets/appicons/android_full.png') }}"> | ||
16 | <div class="caption right-align"> | ||
17 | <h3>Android</h3> | ||
18 | <h5 class="light grey-text text-lighten-3">For all Android 4.4+ devices</h5> | ||
19 | <p> | ||
20 | <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche"> | ||
21 | <img class="icon" alt="Get it on Google Play" | ||
22 | height="80" | ||
23 | src="{{ asset('assets/appicons/google_play.png') }}" /> | ||
24 | </a> | ||
25 | <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche"> | ||
26 | <img class="icon" alt="Get it on F-Droid" | ||
27 | height="80" | ||
28 | src="{{ asset('assets/appicons/fdroid.png') }}" /> | ||
29 | </a> | ||
30 | </p> | ||
31 | </div> | ||
32 | </li> | ||
33 | <li> | ||
34 | <img style="background-position: right" src="{{ asset('assets/appicons/iOS_full.png') }}"> | ||
35 | <div class="caption left-align"> | ||
36 | <h3>iOS</h3> | ||
37 | <h5 class="light grey-text text-lighten-3">For your iPhones and iPads</h5> | ||
38 | <p> | ||
39 | <a href="https://itunes.apple.com/app/wallabag-2/id1170800946?mt=8"> | ||
40 | <img class="icon" alt="Get it on the AppStore" | ||
41 | height="80" | ||
42 | src="{{ asset('assets/appicons/appstore.svg') }}" /> | ||
43 | </a> | ||
44 | </p> | ||
45 | </div> | ||
46 | </li> | ||
47 | <li> | ||
48 | <img src="{{ asset('assets/appicons/windows.jpeg') }}"> | ||
49 | <div class="caption right-align"> | ||
50 | <h3>Windows</h3> | ||
51 | <h5 class="light grey-text text-lighten-3">Available on Windows Phones and Windows 10</h5> | ||
52 | <p> | ||
53 | <a href="https://www.microsoft.com/en-us/store/p/wallabag/9nblggh5x3p6"> | ||
54 | <img class="icon" alt="Get it on the Windows Store" | ||
55 | height="80" | ||
56 | src="{{ asset('assets/appicons/windowsstore.png') }}" /> | ||
57 | </a> | ||
58 | </p> | ||
59 | </div> | ||
60 | </li> | ||
61 | <li> | ||
62 | <img style="background-position: right" src="{{ asset('assets/appicons/browser.png') }}"> | ||
63 | <div class="caption left-align"> | ||
64 | <h3>Browser Extension</h3> | ||
65 | <h5 class="light grey-text text-lighten-3">Available on Firefox, Chrome and Opera</h5> | ||
66 | <p> | ||
67 | <a href="https://addons.mozilla.org/en/firefox/addon/wallabagger/"> | ||
68 | <img class="icon browser" alt="Get it on the Firefox Addons Website" | ||
69 | height="80" | ||
70 | src="{{ asset('assets/appicons/Firefox-logo.svg') }}" /> | ||
71 | </a> | ||
72 | <a href="https://chrome.google.com/webstore/detail/wallabagger/gbmgphmejlcoihgedabhgjdkcahacjlj"> | ||
73 | <img class="icon browser" alt="Get it on the Firefox Addons Website" | ||
74 | height="80" | ||
75 | src="{{ asset('assets/appicons/Logo_Google_Chrome.svg') }}" /> | ||
76 | </a> | ||
77 | <a href="https://addons.opera.com/fr/extensions/details/wallabagger/"> | ||
78 | <img class="icon browser" alt="Get it on the Firefox Addons Website" | ||
79 | height="80" | ||
80 | src="{{ asset('assets/appicons/opera-for-computers_icon_128x128.png') }}" /> | ||
81 | </a> | ||
82 | </p> | ||
83 | </div> | ||
84 | </li> | ||
85 | </ul> | ||
86 | </div> | ||
12 | 87 | ||
13 | <h4>{{ 'developer.documentation'|trans }}</h4> | 88 | <h4>{{ 'apps.list.title'|trans }}</h4> |
14 | 89 | ||
15 | <ul> | 90 | <ul class="collection"> |
16 | <li><a href="{{ path('developer_howto_firstapp') }}">{{ 'developer.how_to_first_app'|trans }}</a></li> | 91 | {% for app in apps %} |
17 | <li><a href="https://doc.wallabag.org/en/developer/api/readme.html">{{ 'developer.full_documentation'|trans }}</a></li> | 92 | <li class="collection-item avatar"> |
18 | <li><a href="{{ path('nelmio_api_doc_index') }}">{{ 'developer.list_methods'|trans }}</a></li> | 93 | {% if app.client.image %} |
94 | <img src="{{ app.client.image }}" alt="" class="circle"> | ||
95 | {% endif %} | ||
96 | <span class="title"><a href="{{ app.client.appUrl }}">{{ app.client.name }}</a></span> | ||
97 | <p>{{ app.client.description }}</p> | ||
98 | <div class="scopes"> | ||
99 | {% for scope in app.scope | split(' ') %} | ||
100 | <div class="chip">{{ scope }}</div> | ||
101 | {% endfor %} | ||
102 | </div> | ||
103 | <p>{{ 'apps.app.created_at' | trans({'%date%': app.client.createdAt}) }}</p> | ||
104 | <a href="#!" class="secondary-content"><i class="material-icons">grade</i></a> | ||
105 | </li> | ||
106 | {% endfor %} | ||
19 | </ul> | 107 | </ul> |
20 | 108 | ||
21 | <h4>{{ 'developer.clients.title'|trans }}</h4> | 109 | <h4>{{ 'apps.old_clients.title'|trans }}</h4> |
22 | <ul> | 110 | <ul> |
23 | <li><a href="{{ path('developer_create_client') }}">{{ 'developer.clients.create_new'|trans }}</a></li> | 111 | <li><a href="{{ path('apps_create_client') }}">{{ 'apps.old_clients.create_new'|trans }}</a></li> |
24 | </ul> | 112 | </ul> |
25 | 113 | ||
26 | <h4>{{ 'developer.existing_clients.title'|trans }}</h4> | 114 | <h5>{{ 'apps.old_clients.list'|trans }}</h5> |
27 | {% if clients %} | 115 | {% if clients %} |
28 | <ul class="collapsible" data-collapsible="expandable"> | 116 | <ul class="collapsible" data-collapsible="expandable"> |
29 | {% for client in clients %} | 117 | {% for client in clients %} |
30 | <li> | 118 | <li> |
31 | <div class="collapsible-header">{{ client.name }} - #{{ client.id }}</div> | 119 | <div class="collapsible-header">{{ client.name }}</div> |
32 | <div class="collapsible-body"> | 120 | <div class="collapsible-body"> |
33 | <table class="striped"> | 121 | <table class="striped"> |
34 | <tr> | 122 | <tr> |
35 | <td>{{ 'developer.existing_clients.field_id'|trans }}</td> | 123 | <td>{{ 'apps.old_clients.field_id'|trans }}</td> |
36 | <td><strong><code>{{ client.clientId }}</code></strong></td> | 124 | <td><strong><code>{{ client.id }}_{{ client.randomId }}</code></strong></td> |
37 | </tr> | 125 | </tr> |
38 | <tr> | 126 | <tr> |
39 | <td>{{ 'developer.existing_clients.field_secret'|trans }}</td> | 127 | <td>{{ 'apps.old_clients.field_secret'|trans }}</td> |
40 | <td><strong><code>{{ client.secret }}</code></strong></td> | 128 | <td><strong><code>{{ client.secret }}</code></strong></td> |
41 | </tr> | 129 | </tr> |
42 | <tr> | ||
43 | <td>{{ 'developer.existing_clients.field_uris'|trans }}</td> | ||
44 | <td><strong><code>{{ client.redirectUris|json_encode() }}</code></strong></td> | ||
45 | </tr> | ||
46 | <tr> | ||
47 | <td>{{ 'developer.existing_clients.field_grant_types'|trans }}</td> | ||
48 | <td><strong><code>{{ client.allowedGrantTypes|json_encode() }}</code></strong></td> | ||
49 | </tr> | ||
50 | </table> | 130 | </table> |
51 | <p> | 131 | <p> |
52 | {{ 'developer.remove.warn_message_1'|trans({'%name%': client.name }) }}<br/> | 132 | {{ 'apps.remove.warn_message_1'|trans({'%name%': client.name }) }}<br/> |
53 | {{ 'developer.remove.warn_message_2'|trans({'%name%': client.name }) }}<br/> | 133 | {{ 'apps.remove.warn_message_2'|trans({'%name%': client.name }) }}<br/> |
54 | <a class="waves-effect waves-light red btn" href="{{ path('developer_delete_client', {'id': client.id}) }}">{{ 'developer.remove.action'|trans({'%name%': client.name }) }}</a> | 134 | <a class="waves-effect waves-light red btn" href="{{ path('apps_delete_client', {'id': client.id}) }}">{{ 'apps.remove.action'|trans({'%name%': client.name }) }}</a> |
55 | </p> | 135 | </p> |
136 | |||
56 | </div> | 137 | </div> |
57 | </li> | 138 | </li> |
58 | {% endfor %} | 139 | {% endfor %} |
59 | </ul> | 140 | </ul> |
60 | {% else %} | 141 | {% else %} |
61 | {{ 'developer.existing_clients.no_client'|trans }} | 142 | {{ 'apps.old_clients.no_client'|trans }} |
62 | {% endif %} | 143 | {% endif %} |
63 | </div> | 144 | <h4>{{ 'apps.documentation.title'|trans }}</h4> |
64 | 145 | ||
146 | <ul> | ||
147 | <li><a href="http://doc.wallabag.org/en/master/developer/api.html">{{ 'apps.documentation.full_documentation'|trans }}</a></li> | ||
148 | <li><a href="{{ path('nelmio_api_doc_index') }}">{{ 'apps.documentation.list_methods'|trans }}</a></li> | ||
149 | </ul> | ||
150 | </div> | ||
65 | </div> | 151 | </div> |
66 | </div> | 152 | </div> |
67 | </div> | 153 | </div> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index 2dab1c18..6bee628d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | |||
@@ -78,8 +78,8 @@ | |||
78 | <li class="bold {% if currentRoute == 'import' %}active{% endif %}"> | 78 | <li class="bold {% if currentRoute == 'import' %}active{% endif %}"> |
79 | <a class="waves-effect" href="{{ path('import') }}">{{ 'menu.left.import'|trans }}</a> | 79 | <a class="waves-effect" href="{{ path('import') }}">{{ 'menu.left.import'|trans }}</a> |
80 | </li> | 80 | </li> |
81 | <li class="bold {% if currentRoute == 'developer' %}active{% endif %}"> | 81 | <li class="bold {% if currentRoute == 'apps' %}active{% endif %}"> |
82 | <a class="waves-effect" href="{{ path('developer') }}">{{ 'menu.left.developer'|trans }}</a> | 82 | <a class="waves-effect" href="{{ path('apps') }}">{{ 'menu.left.apps'|trans }}</a> |
83 | </li> | 83 | </li> |
84 | <li class="bold {% if currentRoute == 'howto' %}active{% endif %}"> | 84 | <li class="bold {% if currentRoute == 'howto' %}active{% endif %}"> |
85 | <a class="waves-effect" href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a> | 85 | <a class="waves-effect" href="{{ path('howto') }}">{{ 'menu.left.howto'|trans }}</a> |