(core) i18

Summary:
Adding initial work for localization support.

Summary in https://grist.quip.com/OtZKA6RHdQ6T/Internationalization-and-Localization

Test Plan: Not yet

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3633
This commit is contained in:
Jarosław Sadziński
2022-09-29 10:01:37 +02:00
parent cd64237dad
commit 5219932a1f
21 changed files with 471 additions and 15 deletions

View File

@@ -264,6 +264,9 @@ export class HomeModelImpl extends Disposable implements HomeModel, ViewSettings
// Fetches and updates workspaces, which include contained docs as well.
private async _updateWorkspaces() {
if (this.isDisposed()) {
return;
}
const org = this._app.currentOrg;
if (!org) {
this.workspaces.set([]);
@@ -285,7 +288,9 @@ export class HomeModelImpl extends Disposable implements HomeModel, ViewSettings
this.loading.set("slow");
}
const [wss, trashWss, templateWss] = await promise;
if (this.isDisposed()) {
return;
}
// bundleChanges defers computeds' evaluations until all changes have been applied.
bundleChanges(() => {
this.workspaces.set(wss || []);