mygo-cli 0.4.8 → 0.5.1

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.
Files changed (2) hide show
  1. package/index.d.ts +17 -0
  2. package/package.json +7 -7
package/index.d.ts CHANGED
@@ -97,6 +97,11 @@ export interface Config {
97
97
  urlSchemes?: string[];
98
98
  /** The types of files the app opens, which reach `App.OnOpenFile`. */
99
99
  fileAssociations?: FileAssociation[];
100
+ /**
101
+ * The catalogs of the app's messages, which make the languages it ships.
102
+ * Without it, the app ships English only.
103
+ */
104
+ i18n?: I18nConfig;
100
105
  /** Signed updates, which `mygo.Updater` installs. */
101
106
  updates?: UpdatesConfig;
102
107
  /** macOS packaging. */
@@ -107,6 +112,18 @@ export interface Config {
107
112
  linux?: LinuxConfig;
108
113
  }
109
114
 
115
+ /**
116
+ * The catalogs of the app's messages: a JSON file per language in `dir`,
117
+ * named after its BCP 47 tag (`de.json`, `zh-Hant.json`), whose messages
118
+ * `mygo generate` writes typed Go and TypeScript functions for.
119
+ */
120
+ export interface I18nConfig {
121
+ /** The directory of the catalogs, a Go package of its own (default `locales`). */
122
+ dir?: string;
123
+ /** The language the app is written in, which the others fall back to (default `en`). */
124
+ source?: string;
125
+ }
126
+
110
127
  /** A type of file the app opens. */
111
128
  export interface FileAssociation {
112
129
  /** The file name extensions, without dots, e.g. `["md"]`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mygo-cli",
3
- "version": "0.4.8",
3
+ "version": "0.5.1",
4
4
  "description": "The mygo command line tool: create, develop and package MyGo desktop apps",
5
5
  "keywords": [
6
6
  "mygo",
@@ -40,11 +40,11 @@
40
40
  "test": "bun test"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@egoist/mygo-cli-darwin-arm64": "0.4.8",
44
- "@egoist/mygo-cli-darwin-x64": "0.4.8",
45
- "@egoist/mygo-cli-linux-arm64": "0.4.8",
46
- "@egoist/mygo-cli-linux-x64": "0.4.8",
47
- "@egoist/mygo-cli-win32-arm64": "0.4.8",
48
- "@egoist/mygo-cli-win32-x64": "0.4.8"
43
+ "@egoist/mygo-cli-darwin-arm64": "0.5.1",
44
+ "@egoist/mygo-cli-darwin-x64": "0.5.1",
45
+ "@egoist/mygo-cli-linux-arm64": "0.5.1",
46
+ "@egoist/mygo-cli-linux-x64": "0.5.1",
47
+ "@egoist/mygo-cli-win32-arm64": "0.5.1",
48
+ "@egoist/mygo-cli-win32-x64": "0.5.1"
49
49
  }
50
50
  }