@synopackageland/sdk 0.9.6 → 0.9.7
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/README.md +29 -0
- package/dist/i18n/background/de.json +10 -0
- package/dist/i18n/background/en.json +10 -0
- package/dist/i18n/background/es.json +10 -0
- package/dist/i18n/background/fr.json +10 -0
- package/dist/i18n/background/it.json +10 -0
- package/dist/i18n/background/ja.json +9 -0
- package/dist/i18n/background/ko.json +9 -0
- package/dist/i18n/background/zh-CN.json +9 -0
- package/dist/i18n/background/zh-TW.json +9 -0
- package/dist/index.js +2219 -2116
- package/dist/src/background/i18n.d.ts +10 -0
- package/dist/src/dsm/file-station.d.ts +27 -0
- package/dist/src/i18n.d.ts +17 -0
- package/dist/src/index.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/vue.js +1369 -1330
- package/package.json +1 -1
- package/spec/protocol/v1/README.md +21 -0
- package/spec/protocol/v1/vectors/files.jsonl +1 -0
- package/dist/src/nas/i18n.d.ts +0 -2
package/README.md
CHANGED
|
@@ -12,6 +12,35 @@ App's `backend/go.mod`.
|
|
|
12
12
|
| `@synopackageland/sdk/i18n/<capability>/<locale>.json` | Copy in `en`, `zh-TW`, `zh-CN`, `ja`, `ko`, `de`, `fr`, `es`, `it`. |
|
|
13
13
|
| `@synopackageland/sdk/spec/protocol/v1/` | The executor protocol (`errors.json`, `schema/`, `vectors/`), a file copy of the repository's `spec/protocol/v1`. Read it from `node_modules/@synopackageland/sdk/spec/protocol/v1`. |
|
|
14
14
|
|
|
15
|
+
## File Station
|
|
16
|
+
|
|
17
|
+
`openFolderInFileStation(path)` opens DSM's File Station at a folder;
|
|
18
|
+
`openFileInFileStation(path)` opens the file's folder with the file selected.
|
|
19
|
+
Both call `SYNO.SDS.AppLaunch('SYNO.SDS.App.FileStation3.Instance', {opendir|openfile})`
|
|
20
|
+
with the shared-folder path (`/volume1/photo/a` becomes `/photo/a`; pass
|
|
21
|
+
`{mount}` when the volume mount is known). They return `false` when nothing
|
|
22
|
+
was launched: outside DSM, for an empty path, or when DSM reports File Station
|
|
23
|
+
disabled or not launchable. File Station reports no completion and applies the
|
|
24
|
+
signed-in user's own permissions.
|
|
25
|
+
|
|
26
|
+
## Localized copy
|
|
27
|
+
|
|
28
|
+
`format(message, values, locale)` fills `{key}` placeholders from `values`; a
|
|
29
|
+
placeholder with no value stays visible. A message may be plural forms keyed by
|
|
30
|
+
the `Intl.PluralRules` categories (`zero`, `one`, `two`, `few`, `many`, `other`;
|
|
31
|
+
`other` is required), chosen by `values.count` in `locale` (a DSM code such as
|
|
32
|
+
`cht` or a BCP-47 tag).
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import {catalogs, format, mergeCatalogs} from '@synopackageland/sdk'
|
|
36
|
+
const copy = mergeCatalogs(sdkCatalogs, import.meta.glob('./i18n/*.json', {eager: true, import: 'default'}))
|
|
37
|
+
format(copy[locale].files, {count: 3, folder: 'photo'}, locale) // {"one": "{count} file in {folder}", "other": "{count} files in {folder}"}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`catalogs` and `mergeCatalogs` fill every key a locale lacks from `en`.
|
|
41
|
+
`mergeCatalogs` layers the App's catalogs over the SDK's, key by key; for each
|
|
42
|
+
key the order is the App's locale, the SDK's locale, then `en`.
|
|
43
|
+
|
|
15
44
|
The Vue entry needs the peer dependencies `vue`, `@synopackageland/ui` and
|
|
16
45
|
`@lucide/vue`. The headless entry needs none.
|
|
17
46
|
|
|
@@ -20,6 +20,16 @@
|
|
|
20
20
|
"state_failed": "Fehlgeschlagen",
|
|
21
21
|
"state_canceled": "Abgebrochen",
|
|
22
22
|
"state_interrupted": "Unterbrochen",
|
|
23
|
+
"state_paused": "Angehalten",
|
|
24
|
+
"pausing": "Wird angehalten…",
|
|
25
|
+
"pause": "Anhalten",
|
|
26
|
+
"resume": "Fortsetzen",
|
|
27
|
+
"progressItems": {
|
|
28
|
+
"one": "{done} von {count} Element",
|
|
29
|
+
"other": "{done} von {count} Elementen"
|
|
30
|
+
},
|
|
31
|
+
"progressBytes": "{done} von {total}",
|
|
32
|
+
"progressItem": "Aktuelles Element: {item}",
|
|
23
33
|
"limits": "Bis zu {size} KB pro Datei, {queue} Aufträge in der Warteschlange, {seconds} Sekunden pro Auftrag.",
|
|
24
34
|
"errors": {
|
|
25
35
|
"jobs_busy": "Das System ist beschäftigt. Bitte versuchen Sie es später erneut.",
|
|
@@ -20,6 +20,16 @@
|
|
|
20
20
|
"state_failed": "Failed",
|
|
21
21
|
"state_canceled": "Canceled",
|
|
22
22
|
"state_interrupted": "Interrupted",
|
|
23
|
+
"state_paused": "Paused",
|
|
24
|
+
"pausing": "Pausing…",
|
|
25
|
+
"pause": "Pause",
|
|
26
|
+
"resume": "Resume",
|
|
27
|
+
"progressItems": {
|
|
28
|
+
"one": "{done} of {count} item",
|
|
29
|
+
"other": "{done} of {count} items"
|
|
30
|
+
},
|
|
31
|
+
"progressBytes": "{done} of {total}",
|
|
32
|
+
"progressItem": "Current item: {item}",
|
|
23
33
|
"limits": "Up to {size} KB per file, {queue} queued jobs, {seconds} seconds per job.",
|
|
24
34
|
"errors": {
|
|
25
35
|
"jobs_busy": "Busy, please try again later.",
|
|
@@ -20,6 +20,16 @@
|
|
|
20
20
|
"state_failed": "Error",
|
|
21
21
|
"state_canceled": "Cancelado",
|
|
22
22
|
"state_interrupted": "Interrumpido",
|
|
23
|
+
"state_paused": "En pausa",
|
|
24
|
+
"pausing": "Pausando…",
|
|
25
|
+
"pause": "Pausar",
|
|
26
|
+
"resume": "Reanudar",
|
|
27
|
+
"progressItems": {
|
|
28
|
+
"one": "{done} de {count} elemento",
|
|
29
|
+
"other": "{done} de {count} elementos"
|
|
30
|
+
},
|
|
31
|
+
"progressBytes": "{done} de {total}",
|
|
32
|
+
"progressItem": "Elemento actual: {item}",
|
|
23
33
|
"limits": "Hasta {size} KB por archivo, {queue} trabajos en cola, {seconds} segundos por trabajo.",
|
|
24
34
|
"errors": {
|
|
25
35
|
"jobs_busy": "Sistema ocupado. Vuelva a intentarlo más tarde.",
|
|
@@ -20,6 +20,16 @@
|
|
|
20
20
|
"state_failed": "Échec",
|
|
21
21
|
"state_canceled": "Annulée",
|
|
22
22
|
"state_interrupted": "Interrompue",
|
|
23
|
+
"state_paused": "En pause",
|
|
24
|
+
"pausing": "Mise en pause…",
|
|
25
|
+
"pause": "Pause",
|
|
26
|
+
"resume": "Reprendre",
|
|
27
|
+
"progressItems": {
|
|
28
|
+
"one": "{done} sur {count} élément",
|
|
29
|
+
"other": "{done} sur {count} éléments"
|
|
30
|
+
},
|
|
31
|
+
"progressBytes": "{done} sur {total}",
|
|
32
|
+
"progressItem": "Élément en cours : {item}",
|
|
23
33
|
"limits": "Jusqu’à {size} KB par fichier, {queue} tâches en attente, {seconds} secondes par tâche.",
|
|
24
34
|
"errors": {
|
|
25
35
|
"jobs_busy": "Le système est occupé. Veuillez réessayer plus tard.",
|
|
@@ -20,6 +20,16 @@
|
|
|
20
20
|
"state_failed": "Non riuscito",
|
|
21
21
|
"state_canceled": "Annullato",
|
|
22
22
|
"state_interrupted": "Interrotto",
|
|
23
|
+
"state_paused": "In pausa",
|
|
24
|
+
"pausing": "Sospensione in corso…",
|
|
25
|
+
"pause": "Sospendi",
|
|
26
|
+
"resume": "Riprendi",
|
|
27
|
+
"progressItems": {
|
|
28
|
+
"one": "{done} di {count} elemento",
|
|
29
|
+
"other": "{done} di {count} elementi"
|
|
30
|
+
},
|
|
31
|
+
"progressBytes": "{done} di {total}",
|
|
32
|
+
"progressItem": "Elemento corrente: {item}",
|
|
23
33
|
"limits": "Fino a {size} KB per file, {queue} processi in coda, {seconds} secondi per processo.",
|
|
24
34
|
"errors": {
|
|
25
35
|
"jobs_busy": "Sistema occupato. Riprovare in seguito.",
|
|
@@ -20,6 +20,15 @@
|
|
|
20
20
|
"state_failed": "失敗",
|
|
21
21
|
"state_canceled": "キャンセル済み",
|
|
22
22
|
"state_interrupted": "中断",
|
|
23
|
+
"state_paused": "一時停止中",
|
|
24
|
+
"pausing": "一時停止しています…",
|
|
25
|
+
"pause": "一時停止",
|
|
26
|
+
"resume": "再開",
|
|
27
|
+
"progressItems": {
|
|
28
|
+
"other": "{done} / {count} 項目"
|
|
29
|
+
},
|
|
30
|
+
"progressBytes": "{done} / {total}",
|
|
31
|
+
"progressItem": "現在の項目: {item}",
|
|
23
32
|
"limits": "1 ファイル最大 {size} KB、キュー {queue} 件、1 ジョブ {seconds} 秒。",
|
|
24
33
|
"errors": {
|
|
25
34
|
"jobs_busy": "処理が混み合っています。しばらくしてから再試行してください。",
|
|
@@ -20,6 +20,15 @@
|
|
|
20
20
|
"state_failed": "실패",
|
|
21
21
|
"state_canceled": "취소됨",
|
|
22
22
|
"state_interrupted": "중단됨",
|
|
23
|
+
"state_paused": "일시 중지됨",
|
|
24
|
+
"pausing": "일시 중지 중…",
|
|
25
|
+
"pause": "일시 중지",
|
|
26
|
+
"resume": "다시 시작",
|
|
27
|
+
"progressItems": {
|
|
28
|
+
"other": "{done}/{count}개 항목"
|
|
29
|
+
},
|
|
30
|
+
"progressBytes": "{done} / {total}",
|
|
31
|
+
"progressItem": "현재 항목: {item}",
|
|
23
32
|
"limits": "파일당 최대 {size} KB, 대기 {queue}개, 작업당 {seconds}초.",
|
|
24
33
|
"errors": {
|
|
25
34
|
"jobs_busy": "시스템이 사용 중입니다. 나중에 다시 시도하십시오.",
|
|
@@ -20,6 +20,15 @@
|
|
|
20
20
|
"state_failed": "失败",
|
|
21
21
|
"state_canceled": "已取消",
|
|
22
22
|
"state_interrupted": "已中断",
|
|
23
|
+
"state_paused": "已暂停",
|
|
24
|
+
"pausing": "正在暂停…",
|
|
25
|
+
"pause": "暂停",
|
|
26
|
+
"resume": "继续",
|
|
27
|
+
"progressItems": {
|
|
28
|
+
"other": "{done} / {count} 个项目"
|
|
29
|
+
},
|
|
30
|
+
"progressBytes": "{done} / {total}",
|
|
31
|
+
"progressItem": "当前项目:{item}",
|
|
23
32
|
"limits": "每个文件最多 {size} KB、最多 {queue} 个排队任务、每个任务最长 {seconds} 秒。",
|
|
24
33
|
"errors": {
|
|
25
34
|
"jobs_busy": "忙碌中,请稍后重试",
|
|
@@ -20,6 +20,15 @@
|
|
|
20
20
|
"state_failed": "失敗",
|
|
21
21
|
"state_canceled": "已取消",
|
|
22
22
|
"state_interrupted": "已中斷",
|
|
23
|
+
"state_paused": "已暫停",
|
|
24
|
+
"pausing": "正在暫停…",
|
|
25
|
+
"pause": "暫停",
|
|
26
|
+
"resume": "繼續",
|
|
27
|
+
"progressItems": {
|
|
28
|
+
"other": "{done} / {count} 個項目"
|
|
29
|
+
},
|
|
30
|
+
"progressBytes": "{done} / {total}",
|
|
31
|
+
"progressItem": "目前項目:{item}",
|
|
23
32
|
"limits": "每個檔案最多 {size} KB、最多 {queue} 個排隊工作、每個工作最長 {seconds} 秒。",
|
|
24
33
|
"errors": {
|
|
25
34
|
"jobs_busy": "忙碌中,請稍後重試",
|