sku 15.8.0 → 15.9.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # sku
2
2
 
3
+ ## 15.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add auto-translate feature for translations push command ([#1444](https://github.com/seek-oss/sku/pull/1444))
8
+
9
+ Adds a new `--auto-translate` flag to the `sku translations push` command that enables automatic translation for missing translations in the Phrase platform. When enabled, this flag instructs Phrase to automatically translate any missing keys using machine translation.
10
+
11
+ ```sh
12
+ $ sku translations push --auto-translate
13
+ ```
14
+
3
15
  ## 15.8.0
4
16
 
5
17
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "15.8.0";
2
+ var version = "15.9.0";
3
3
  var package_default = {
4
4
  name: "sku",
5
5
  version,
@@ -95,7 +95,7 @@ var package_default = {
95
95
  "@vitejs/plugin-basic-ssl": "^2.1.0",
96
96
  "@vitejs/plugin-react": "^5.1.1",
97
97
  "@vocab/core": "^1.6.2",
98
- "@vocab/phrase": "^2.0.1",
98
+ "@vocab/phrase": "^2.2.0",
99
99
  "@vocab/pseudo-localize": "^1.0.1",
100
100
  "@vocab/vite": "catalog:",
101
101
  "@vocab/webpack": "^1.2.9",
@@ -0,0 +1,7 @@
1
+ import { Option } from "commander";
2
+
3
+ //#region src/program/commands/translations/commands/push/auto-translate.option.ts
4
+ const autoTranslateOption = new Option("--auto-translate", "Enable automatic translation for missing translations").default(false);
5
+
6
+ //#endregion
7
+ export { autoTranslateOption };
@@ -5,7 +5,7 @@ import { push } from "@vocab/phrase";
5
5
 
6
6
  //#region src/program/commands/translations/commands/push/push.action.ts
7
7
  const log = (message) => console.log(chalk.cyan(message));
8
- const pushAction = async ({ deleteUnusedKeys, skuContext }) => {
8
+ const pushAction = async ({ autoTranslate, deleteUnusedKeys, skuContext }) => {
9
9
  await configureProject(skuContext);
10
10
  try {
11
11
  const vocabConfigFromSkuConfig = await getResolvedVocabConfig({
@@ -15,6 +15,7 @@ const pushAction = async ({ deleteUnusedKeys, skuContext }) => {
15
15
  const branch = await ensureBranch();
16
16
  log("Pushing translations to Phrase...");
17
17
  await push({
18
+ autoTranslate,
18
19
  branch,
19
20
  deleteUnusedKeys
20
21
  }, vocabConfigFromSkuConfig);
@@ -1,8 +1,9 @@
1
1
  import { deleteUnusedKeysOption } from "./delete-unused-keys.option.mjs";
2
+ import { autoTranslateOption } from "./auto-translate.option.mjs";
2
3
  import { Command } from "commander";
3
4
 
4
5
  //#region src/program/commands/translations/commands/push/push.command.ts
5
- const pushCommand = new Command("push").description("Push translations to Phrase").addOption(deleteUnusedKeysOption).action(async (options) => {
6
+ const pushCommand = new Command("push").description("Push translations to Phrase").addOption(autoTranslateOption).addOption(deleteUnusedKeysOption).action(async (options) => {
6
7
  const { pushAction } = await import("./push.action.mjs");
7
8
  await pushAction(options);
8
9
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sku",
3
- "version": "15.8.0",
3
+ "version": "15.9.0",
4
4
  "description": "Front-end development toolkit, powered by Webpack, Babel, Vanilla Extract and Jest",
5
5
  "types": "./dist/index.d.mts",
6
6
  "bin": {
@@ -99,7 +99,7 @@
99
99
  "@vitejs/plugin-basic-ssl": "^2.1.0",
100
100
  "@vitejs/plugin-react": "^5.1.1",
101
101
  "@vocab/core": "^1.6.2",
102
- "@vocab/phrase": "^2.0.1",
102
+ "@vocab/phrase": "^2.2.0",
103
103
  "@vocab/pseudo-localize": "^1.0.1",
104
104
  "@vocab/vite": "^0.3.1",
105
105
  "@vocab/webpack": "^1.2.9",
@@ -169,8 +169,8 @@
169
169
  "webpack-dev-server": "<=5.2.0",
170
170
  "webpack-merge": "^6.0.1",
171
171
  "webpack-node-externals": "^3.0.0",
172
- "@sku-lib/babel-plugin-display-name": "0.0.2",
173
- "@sku-lib/vite": "1.0.1"
172
+ "@sku-lib/vite": "1.0.1",
173
+ "@sku-lib/babel-plugin-display-name": "0.0.2"
174
174
  },
175
175
  "devDependencies": {
176
176
  "@types/babel__core": "^7.20.5",