1 | <?php |
||
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'), |
||
|
|||
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 |