1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-11-01 14:51:10 +03:00

Updated JS translations to be inserted from back-end

Removes old awkward JS translations endpoint.
New system still a little akward in code but not now in process.

Also extracted out page editors into their own files.

Closes #1258
This commit is contained in:
Dan Brown
2019-07-06 14:52:25 +01:00
parent 6fa093d9d0
commit 15c39c1976
13 changed files with 138 additions and 102 deletions

View File

@@ -16,7 +16,7 @@ window.$events = eventManager;
// Translation setup
// Creates a global function with name 'trans' to be used in the same way as Laravel's translation system
import Translations from "./services/translations"
const translator = new Translations(window.translations);
const translator = new Translations();
window.trans = translator.get.bind(translator);
window.trans_choice = translator.getPlural.bind(translator);