These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Nextcloud - NextNote |
||
4 | * |
||
5 | * |
||
6 | * @copyright Copyright (c) 2017, Sander Brand ([email protected]) |
||
7 | * @license GNU AGPL version 3 or any later version |
||
8 | * |
||
9 | * This program is free software: you can redistribute it and/or modify |
||
10 | * it under the terms of the GNU Affero General Public License as |
||
11 | * published by the Free Software Foundation, either version 3 of the |
||
12 | * License, or (at your option) any later version. |
||
13 | * |
||
14 | * This program is distributed in the hope that it will be useful, |
||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
17 | * GNU Affero General Public License for more details. |
||
18 | * |
||
19 | * You should have received a copy of the GNU Affero General Public License |
||
20 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
21 | * |
||
22 | */ |
||
23 | |||
24 | namespace OCA\NextNote\Controller; |
||
25 | |||
26 | |||
27 | use \OCP\AppFramework\ApiController; |
||
28 | use OCP\AppFramework\Http\JSONResponse; |
||
29 | use OCP\IL10N; |
||
30 | use \OCP\IRequest; |
||
31 | |||
32 | class TranslationController extends ApiController { |
||
33 | |||
34 | private $trans; |
||
35 | |||
36 | public function __construct($AppName, |
||
37 | IRequest $request, |
||
38 | IL10N $trans |
||
39 | ) { |
||
40 | parent::__construct( |
||
41 | $AppName, |
||
42 | $request, |
||
43 | 'GET, POST, DELETE, PUT, PATCH, OPTIONS', |
||
44 | 'Authorization, Content-Type, Accept', |
||
45 | 86400); |
||
46 | $this->trans = $trans; |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @NoAdminRequired |
||
51 | * @NoCSRFRequired |
||
52 | * @PublicPage |
||
53 | */ |
||
54 | public function getLanguageStrings() { |
||
55 | $translations = array( |
||
56 | //'create.notebook' => $this->trans->t('Generating sharing keys ( %s / 2)','%step'), |
||
57 | 'new.notebook' => $this->trans->t('New notebook'), |
||
58 | 'enter.notebook.name' => $this->trans->('Enter notebook name'), |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
59 | 'not.grouped' => $this->trans->t('Not in notebook'), |
||
60 | 'notebook.name' => $this->trans->t('Notebook name'), |
||
61 | 'deleted.notes' => $this->trans->t('Deleted notes'), |
||
62 | 'all' => $this->trans->t('all'), |
||
63 | 'new' => $this->trans->t('new'), |
||
64 | 'save' => $this->trans->t('save'), |
||
65 | 'back' => $this->trans->t('back'), |
||
66 | 'create' => $this->trans->t('create'), |
||
67 | 'cancel' => $this->trans->t('cancel'), |
||
68 | 'name' => $this->trans->t('name'), |
||
69 | 'modified' => $this->trans->t('modified'), |
||
70 | 'delete.note' => $this->trans->t('Delete note'), |
||
71 | 'restore.note' => $this->trans->t('Restore note'), |
||
72 | 'untitled.note' => $this->trans->t('Untitled note'), |
||
73 | 'edit.note' => $this->trans->t('Edit note'), |
||
74 | 'share.note' => $this->trans->t('Share note'), |
||
75 | 'sharedwith' => $this->trans->t('Shared with you by %s', '%name'), |
||
76 | 'no.edit.perm' => $this->trans->t('You don\'t have permissions to edit this note'), |
||
77 | ); |
||
78 | return new JSONResponse($translations); |
||
79 | } |
||
80 | } |
||
81 |