@todesktop/shared 7.129.0 → 7.130.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/desktopify2.d.ts +9 -0
- package/lib/translation.d.ts +2 -0
- package/lib/translation.js +14 -0
- package/package.json +1 -1
- package/src/desktopify2.ts +9 -0
- package/src/translation.ts +16 -0
package/lib/desktopify2.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ISwitchableValue } from "./toDesktop";
|
|
|
3
3
|
import { MenuItemConstructorOptions, BrowserWindowConstructorOptions, WebPreferences } from "@todesktop/client-electron-types";
|
|
4
4
|
import { BaseApp } from "./base";
|
|
5
5
|
import { DesktopAppPlugin } from "./plugin";
|
|
6
|
+
import { ValidTranslationKeys, ValidTranslationLanguages } from "./translation";
|
|
6
7
|
interface BaseAssetDetails {
|
|
7
8
|
/**
|
|
8
9
|
* Remote URL where the asset can be downloaded
|
|
@@ -343,6 +344,14 @@ export interface DesktopifyApp2 {
|
|
|
343
344
|
buttonBackgroundColor: string;
|
|
344
345
|
buttonTextColor: string;
|
|
345
346
|
};
|
|
347
|
+
/**
|
|
348
|
+
* Sets strings to be used in the app UI. Currently only supports English
|
|
349
|
+
*/
|
|
350
|
+
appStrings?: {
|
|
351
|
+
[key in ValidTranslationKeys]?: {
|
|
352
|
+
[lang in ValidTranslationLanguages]?: string;
|
|
353
|
+
};
|
|
354
|
+
};
|
|
346
355
|
}
|
|
347
356
|
export interface IApp2 extends BaseApp {
|
|
348
357
|
desktopApp: DesktopifyApp2;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* TODO - Support more languages here */
|
|
4
|
+
// | "en"
|
|
5
|
+
// | "es"
|
|
6
|
+
// | "fr"
|
|
7
|
+
// | "de"
|
|
8
|
+
// | "it"
|
|
9
|
+
// | "ja"
|
|
10
|
+
// | "ko"
|
|
11
|
+
// | "pt-BR"
|
|
12
|
+
// | "ru"
|
|
13
|
+
// | "zh-CN"
|
|
14
|
+
// | "zh-TW";
|
package/package.json
CHANGED
package/src/desktopify2.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
} from "@todesktop/client-electron-types";
|
|
7
7
|
import { BaseApp, Schemable } from "./base";
|
|
8
8
|
import { DesktopAppPlugin } from "./plugin";
|
|
9
|
+
import { ValidTranslationKeys, ValidTranslationLanguages } from "./translation";
|
|
9
10
|
|
|
10
11
|
interface BaseAssetDetails {
|
|
11
12
|
/**
|
|
@@ -466,6 +467,14 @@ export interface DesktopifyApp2 {
|
|
|
466
467
|
buttonBackgroundColor: string;
|
|
467
468
|
buttonTextColor: string;
|
|
468
469
|
};
|
|
470
|
+
/**
|
|
471
|
+
* Sets strings to be used in the app UI. Currently only supports English
|
|
472
|
+
*/
|
|
473
|
+
appStrings?: {
|
|
474
|
+
[key in ValidTranslationKeys]?: {
|
|
475
|
+
[lang in ValidTranslationLanguages]?: string;
|
|
476
|
+
};
|
|
477
|
+
};
|
|
469
478
|
}
|
|
470
479
|
|
|
471
480
|
export interface IApp2 extends BaseApp {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type ValidTranslationKeys =
|
|
2
|
+
| "updateNotification.title"
|
|
3
|
+
| "updateNotification.body";
|
|
4
|
+
export type ValidTranslationLanguages = "default";
|
|
5
|
+
/* TODO - Support more languages here */
|
|
6
|
+
// | "en"
|
|
7
|
+
// | "es"
|
|
8
|
+
// | "fr"
|
|
9
|
+
// | "de"
|
|
10
|
+
// | "it"
|
|
11
|
+
// | "ja"
|
|
12
|
+
// | "ko"
|
|
13
|
+
// | "pt-BR"
|
|
14
|
+
// | "ru"
|
|
15
|
+
// | "zh-CN"
|
|
16
|
+
// | "zh-TW";
|