brantje / nextnote

A full Evernote / OneNote style WYSIWYG note editor for Nextcloud / ownCloud. Join our telegram at: https://t.me/NextNote
GNU Affero General Public License v3.0
163 stars 19 forks source link

Change language app #40

Closed alexisrosano89 closed 6 years ago

alexisrosano89 commented 6 years ago

Hi all!

My nextcloud configuration is in Spanish, but when I activate NextNote, the language by default is in english.

Exists any way to change that?

Regards,

ThomasDaheim commented 6 years ago

Seems to be a general issue - other languages also don't seem to work. Translations are there but not picked up...

@brantje : I don't know enough about the language system. Any ideas?

ThomasDaheim commented 6 years ago

Seems like currently the text is hard-coded in the html files...

tinylcy commented 6 years ago

@brantje @ThomasDaheim :

In nextnote/js/templates.js, the HTML files are generated by $templateCache.put method, so if you want to change language, you can modify this file.

angular.module('views/list.html', []).run(['$templateCache', function ($templateCache) {
  'use strict';
  $templateCache.put('views/list.html',
    '<div id="ownnote"><div id="controls"><div id="new" class="button indent" ng-click="newNote()">New</div><div id="newfile" class="newfile indent"><form id="createform" class="note-title-form"><input type="text" class="newfileinput" id="newfilename" value="note title" style="color: rgb(160, 160, 160)"><select id="groupname"><option value="">Not grouped</option><option value="_new">New group</option></select><input type="text" class="newgroupinput" id="newgroupname" placeholder="group title"> <button id="create" class="button">Create</button><div id="cancel" class="button">Cancel</div></form></div></div><div class="listingBlank"></div><table class="listingSort"><thead><tr><th class="notename filesort notesort"><div class="pointer sorttitle" id="sortname" ng-click="list_sorting.what = \'name\'; list_sorting.reverse = !list_sorting.reverse; ">Name</div><div class="sortarrow" ng-show="list_sorting.what === \'name\'" ng-class="{\'sortup\': list_sorting.reverse, \'sortdown\': !list_sorting.reverse }"></div></th><th class="actions"></th><th class="info modified notesort"><span class="pointer" ng-click="list_sorting.what = \'mtime\'; list_sorting.reverse = !list_sorting.reverse; ">Modified</span><div class="sortarrow" ng-show="list_sorting.what === \'mtime\'" ng-class="{\'sortup\': list_sorting.reverse === true, \'sortdown\': !list_sorting.reverse }"></div></th></tr></thead><tbody><tr class="listing" ng-repeat="note in localNoteList | noteGroupFilter:noteGroupFilter | filter:list_filter | orderBy:list_sorting.what:list_sorting.reverse"><td title="{{ note.title }}" p="undefined" class="file pointer" ng-click="editNote(note)">{{ note.title }}</td><td class="actions" ng-if="list_filter.deleted === 0"><div id="note-{{ note.id }}-sdelete" class="buttons delete-note" ng-click="deleteNote(note)"><span tooltip="Delete note" class="pointer buttons delete"></span></div><div id="note-{{ note.id }}-edit" class="buttons edit-note" ng-click="editNote(note)"><span class="pointer buttons edit" tooltip="Edit note"></span></div></td><td class="actions" ng-if="list_filter.deleted === 1"><div id="note-{{ note.id }}-delete" class="buttons delete pointer" ng-click="deleteNote(note)"><span tooltip="Delete note" class="delete-note"></span></div><div id="note-{{ note.id }}-restore" class="buttons pointer restore-note" tooltip="Restore note" ng-click="resotoreNote(note)"></div></td><td class="info"><div class="modified"><span tooltip="{{ note.mtime | date:dateFormatLong}}">{{ note.mtime | timeAgo}}</span></div></td></tr></tbody></table></div>');
}]);

angular.module('views/note/edit.html', []).run(['$templateCache', function ($templateCache) {
  'use strict';
  $templateCache.put('views/note/edit.html',
    '<div id="ownnote" class="edit-note-container"><div id="controls"><span id="newfile" class="indent">Name: <input type="text" class="fileinput" ng-model="noteShadowCopy.title"> &nbsp;&nbsp; Group:<select id="groupname" ng-model="noteShadowCopy.grouping"><option value="">Not grouped</option><option value="_new">New group</option><option ng-repeat="group in note_groups" value="{{group.name}}">{{group.name}}</option></select><input type="text" placeholder="group title" ng-show="noteShadowCopy.grouping === \'_new\'" ng-model="new_group"><div class="button" ng-click="saveNote()">Save</div><div id="canceledit" class="button" ng-click="cancelEdit()">Cancel</div><div class="pull-right autosave" ng-class="{\'shown\': autoSaved }">Saved!</div></span></div><div class="listingBlank"></div><textarea ui-tinymce="tinymceOptions" ng-model="noteShadowCopy.content">\n' +
    '\n' +
    '   </textarea></div>');
}]);
brantje commented 6 years ago

Yea well. that is not the place to edit things. Will update the repo with a how to edit stuffs, and will look for a new maintainer, since i just don't have enough the time for the project that people are expecting that i have.

ThomasDaheim commented 6 years ago

With proper guidance I could help with a few things. But my knowledge of php and angular isn't deep enough to take over :-(

brantje commented 6 years ago

@MorrisJobke can you setup transifex for this repo? I've already invited you (and nextcloud-bot) to the repo.

MorrisJobke commented 6 years ago

Fix is in #87 - @nextcloud-bot needs to be admin to be able to push to master.