@generaltranslation/api 0.0.3 → 0.0.5

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,25 @@
1
1
  # @generaltranslation/api
2
2
 
3
+ ## 0.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2226](https://github.com/generaltranslation/gt/pull/2226) [`44aabc7`](https://github.com/generaltranslation/gt/commit/44aabc734d99fab4fcab7faedc84d20b5772bde3) Thanks [@eoinest](https://github.com/eoinest)! - Rename the `.strings` and `.stringsdict` file formats. The API format names become `DOT_STRINGS` and `DOT_STRINGSDICT`, and the `gt.config.json` keys under `files` become `dotStrings` and `dotStringsdict`.
8
+
9
+ **This is a breaking configuration change.** A `gt.config.json` that still uses `files.strings` or `files.stringsdict` will silently stop matching those files, because the old keys are no longer recognised file types. Rename them to `files.dotStrings` and `files.dotStringsdict`. The file extensions on disk are unchanged, and translated output is still written as `.strings` and `.stringsdict`.
10
+
11
+ The old names identified a vendor rather than a file. Apple ships four string formats — `.strings`, `.stringsdict`, `.xcstrings` and `.plist` — so `APPLE_STRINGS` never said which one it meant. The new names identify the extension itself, the way developers say it out loud.
12
+
13
+ ## 0.0.4
14
+
15
+ ### Patch Changes
16
+
17
+ - [#2222](https://github.com/generaltranslation/gt/pull/2222) [`091c964`](https://github.com/generaltranslation/gt/commit/091c964b45eba191d6e35bc1cdb93cc3683a3f71) Thanks [@eoinest](https://github.com/eoinest)! - Add Apple `.strings` support to the CLI. Configure a `strings` entry under `files` in `gt.config.json` to upload `.strings` sources and download the translated per-locale files. `.strings` files written as UTF-16 by older versions of Xcode upload correctly: their bytes are sent unmodified so the API can read the byte order mark.
18
+
19
+ Fix `save-local` for formats whose content travels base64. It compared the local file against the still-encoded server copy, so a Lottie translation reported an edit on every run. Unchanged files are now recognised, and an edited file whose bytes are not valid UTF-8 is reported by name rather than submitted as unreadable text.
20
+
21
+ - [#2222](https://github.com/generaltranslation/gt/pull/2222) [`b8a9679`](https://github.com/generaltranslation/gt/commit/b8a96797860f2bb7b12f3c307d47c9b1fead2096) Thanks [@eoinest](https://github.com/eoinest)! - Add Apple `.stringsdict` support to the CLI. Configure a `stringsdict` entry under `files` in `gt.config.json` to upload `.stringsdict` plural rule sources and download the translated per-locale files.
22
+
3
23
  ## 0.0.3
4
24
 
5
25
  ### Patch Changes
package/dist/index.d.cts CHANGED
@@ -315,7 +315,7 @@ type ClientOptions = {
315
315
  type ErrorResponse = {
316
316
  error: string;
317
317
  };
318
- type FileFormat = 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
318
+ type FileFormat = 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT';
319
319
  type ModelProvider = 'ANTHROPIC' | 'OPENAI' | 'XAI' | 'GOOGLE';
320
320
  type JsonObject = {
321
321
  [key: string]: JsonValue;
@@ -455,7 +455,7 @@ type UploadSourceFilesData = {
455
455
  source: {
456
456
  content: string;
457
457
  fileName: string;
458
- fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
458
+ fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT';
459
459
  dataFormat?: string;
460
460
  locale: string;
461
461
  fileId?: string;
@@ -544,7 +544,7 @@ type UploadTranslationsData = {
544
544
  source: {
545
545
  content: string;
546
546
  fileName: string;
547
- fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
547
+ fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT';
548
548
  dataFormat?: string;
549
549
  locale: string;
550
550
  fileId?: string;
@@ -559,10 +559,10 @@ type UploadTranslationsData = {
559
559
  translations: Array<{
560
560
  content: string;
561
561
  fileName: string;
562
- fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
562
+ fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT';
563
563
  dataFormat?: string;
564
564
  locale: string;
565
- transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
565
+ transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT';
566
566
  }>;
567
567
  }>;
568
568
  sourceLocale?: string;
@@ -951,7 +951,7 @@ type EnqueueFileTranslationsData = {
951
951
  fileId: string;
952
952
  versionId: string;
953
953
  fileName?: string;
954
- transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
954
+ transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT';
955
955
  }>;
956
956
  targetLocales?: Array<string>;
957
957
  sourceLocale?: string;
package/dist/index.d.mts CHANGED
@@ -315,7 +315,7 @@ type ClientOptions = {
315
315
  type ErrorResponse = {
316
316
  error: string;
317
317
  };
318
- type FileFormat = 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
318
+ type FileFormat = 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT';
319
319
  type ModelProvider = 'ANTHROPIC' | 'OPENAI' | 'XAI' | 'GOOGLE';
320
320
  type JsonObject = {
321
321
  [key: string]: JsonValue;
@@ -455,7 +455,7 @@ type UploadSourceFilesData = {
455
455
  source: {
456
456
  content: string;
457
457
  fileName: string;
458
- fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
458
+ fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT';
459
459
  dataFormat?: string;
460
460
  locale: string;
461
461
  fileId?: string;
@@ -544,7 +544,7 @@ type UploadTranslationsData = {
544
544
  source: {
545
545
  content: string;
546
546
  fileName: string;
547
- fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
547
+ fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT';
548
548
  dataFormat?: string;
549
549
  locale: string;
550
550
  fileId?: string;
@@ -559,10 +559,10 @@ type UploadTranslationsData = {
559
559
  translations: Array<{
560
560
  content: string;
561
561
  fileName: string;
562
- fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
562
+ fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT';
563
563
  dataFormat?: string;
564
564
  locale: string;
565
- transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
565
+ transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT';
566
566
  }>;
567
567
  }>;
568
568
  sourceLocale?: string;
@@ -951,7 +951,7 @@ type EnqueueFileTranslationsData = {
951
951
  fileId: string;
952
952
  versionId: string;
953
953
  fileName?: string;
954
- transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
954
+ transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT';
955
955
  }>;
956
956
  targetLocales?: Array<string>;
957
957
  sourceLocale?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@generaltranslation/api",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Generated TypeScript SDK for the General Translation API",
5
5
  "type": "module",
6
6
  "sideEffects": false,
package/spec/openapi.json CHANGED
@@ -71,7 +71,9 @@
71
71
  "POT",
72
72
  "TWILIO_CONTENT_JSON",
73
73
  "LOTTIE",
74
- "SVG"
74
+ "SVG",
75
+ "DOT_STRINGS",
76
+ "DOT_STRINGSDICT"
75
77
  ]
76
78
  },
77
79
  "ModelProvider": {
@@ -614,7 +616,9 @@
614
616
  "POT",
615
617
  "TWILIO_CONTENT_JSON",
616
618
  "LOTTIE",
617
- "SVG"
619
+ "SVG",
620
+ "DOT_STRINGS",
621
+ "DOT_STRINGSDICT"
618
622
  ]
619
623
  },
620
624
  "dataFormat": {
@@ -926,7 +930,9 @@
926
930
  "POT",
927
931
  "TWILIO_CONTENT_JSON",
928
932
  "LOTTIE",
929
- "SVG"
933
+ "SVG",
934
+ "DOT_STRINGS",
935
+ "DOT_STRINGSDICT"
930
936
  ]
931
937
  },
932
938
  "dataFormat": {
@@ -996,7 +1002,9 @@
996
1002
  "POT",
997
1003
  "TWILIO_CONTENT_JSON",
998
1004
  "LOTTIE",
999
- "SVG"
1005
+ "SVG",
1006
+ "DOT_STRINGS",
1007
+ "DOT_STRINGSDICT"
1000
1008
  ]
1001
1009
  },
1002
1010
  "dataFormat": {
@@ -1022,7 +1030,9 @@
1022
1030
  "POT",
1023
1031
  "TWILIO_CONTENT_JSON",
1024
1032
  "LOTTIE",
1025
- "SVG"
1033
+ "SVG",
1034
+ "DOT_STRINGS",
1035
+ "DOT_STRINGSDICT"
1026
1036
  ]
1027
1037
  }
1028
1038
  },
@@ -2306,7 +2316,9 @@
2306
2316
  "POT",
2307
2317
  "TWILIO_CONTENT_JSON",
2308
2318
  "LOTTIE",
2309
- "SVG"
2319
+ "SVG",
2320
+ "DOT_STRINGS",
2321
+ "DOT_STRINGSDICT"
2310
2322
  ]
2311
2323
  }
2312
2324
  },