@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.
@@ -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,2 @@
1
+ export declare type ValidTranslationKeys = "updateNotification.title" | "updateNotification.body";
2
+ export declare type ValidTranslationLanguages = "default";
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todesktop/shared",
3
- "version": "7.129.0",
3
+ "version": "7.130.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -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";