mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
support other SQLite wrappers, and various hooks needed by grist-static (#516)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import {hooks} from 'app/client/Hooks';
|
||||
import {getGristConfig} from 'app/common/urlUtils';
|
||||
import {DomContents} from 'grainjs';
|
||||
import i18next from 'i18next';
|
||||
@@ -34,7 +35,7 @@ export async function setupLocale() {
|
||||
// Detect what is resolved languages to load.
|
||||
const languages = i18next.languages;
|
||||
// Fetch all json files (all of which should be already preloaded);
|
||||
const loadPath = `${document.baseURI}locales/{{lng}}.{{ns}}.json`;
|
||||
const loadPath = `${hooks.baseURI || document.baseURI}locales/{{lng}}.{{ns}}.json`;
|
||||
const pathsToLoad: Promise<any>[] = [];
|
||||
async function load(lang: string, n: string) {
|
||||
const resourceUrl = loadPath.replace('{{lng}}', lang.replace("-", "_")).replace('{{ns}}', n);
|
||||
|
||||
Reference in New Issue
Block a user