dsh-quick-phrases 0.8.0 → 0.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/README.md +1 -1
- package/client.js +25 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ dsh plugin --profile <你的 profile> add dsh-quick-phrases
|
|
|
43
43
|
在 DSH 里打开 **Plugins → Discover → Index sources**,添加本仓库的索引地址:
|
|
44
44
|
|
|
45
45
|
```
|
|
46
|
-
https://
|
|
46
|
+
https://raw.githubusercontent.com/pengtang1024/dsh-quick-phrases/main/index.json
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
之后在 Discover 里搜索「快捷短语」即可看到本插件与版本,点安装走的就是 `plugin_manager`。
|
package/client.js
CHANGED
|
@@ -151,7 +151,7 @@ window.__ModuleLoader__.load({
|
|
|
151
151
|
'default.push.label': '推送',
|
|
152
152
|
'default.push.text': '把本地提交推送到远端',
|
|
153
153
|
'default.release.label': '发版',
|
|
154
|
-
'default.release.text': '
|
|
154
|
+
'default.release.text': '提交,推送,发布新版本,更新到本地',
|
|
155
155
|
'manager.starHint': '觉得好用?点开下面的链接,在仓库右上角点 Star 支持一下:',
|
|
156
156
|
'manager.starLink': '点个 star',
|
|
157
157
|
},
|
|
@@ -222,7 +222,7 @@ window.__ModuleLoader__.load({
|
|
|
222
222
|
'default.push.label': 'Push',
|
|
223
223
|
'default.push.text': 'Push local commits to the remote',
|
|
224
224
|
'default.release.label': 'Release',
|
|
225
|
-
'default.release.text': '
|
|
225
|
+
'default.release.text': 'Commit, push, publish the new version, then update locally',
|
|
226
226
|
'manager.starHint': 'Enjoying it? Open the link and click Star at the top right of the repo:',
|
|
227
227
|
'manager.starLink': 'Star on GitHub',
|
|
228
228
|
},
|
|
@@ -293,7 +293,7 @@ window.__ModuleLoader__.load({
|
|
|
293
293
|
'default.push.label': 'Enviar',
|
|
294
294
|
'default.push.text': 'Enviar los commits locales al remoto',
|
|
295
295
|
'default.release.label': 'Publicar',
|
|
296
|
-
'default.release.text': '
|
|
296
|
+
'default.release.text': 'Haz commit, haz push, publica la nueva versión y actualiza tu copia local',
|
|
297
297
|
'manager.starHint': '¿Te resulta útil? Abre el enlace y pulsa Star arriba a la derecha del repositorio:',
|
|
298
298
|
'manager.starLink': 'Dar una estrella',
|
|
299
299
|
},
|
|
@@ -364,7 +364,7 @@ window.__ModuleLoader__.load({
|
|
|
364
364
|
'default.push.label': 'Pousser',
|
|
365
365
|
'default.push.text': 'Pousser les commits locaux vers le dépôt distant',
|
|
366
366
|
'default.release.label': 'Publier',
|
|
367
|
-
'default.release.text': '
|
|
367
|
+
'default.release.text': 'Fais un commit, pousse-le, publie la nouvelle version puis mets à jour en local',
|
|
368
368
|
'manager.starHint': 'Utile au quotidien ? Ouvrez le lien et cliquez sur Star en haut à droite du dépôt :',
|
|
369
369
|
'manager.starLink': 'Mettre une étoile',
|
|
370
370
|
},
|
|
@@ -435,7 +435,7 @@ window.__ModuleLoader__.load({
|
|
|
435
435
|
'default.push.label': 'Pushen',
|
|
436
436
|
'default.push.text': 'Lokale Commits zum Remote pushen',
|
|
437
437
|
'default.release.label': 'Release',
|
|
438
|
-
'default.release.text': '
|
|
438
|
+
'default.release.text': 'Committen, pushen, neue Version veröffentlichen und lokal aktualisieren',
|
|
439
439
|
'manager.starHint': 'Gefällt dir die Erweiterung? Öffne den Link und klicke oben rechts im Repo auf Star:',
|
|
440
440
|
'manager.starLink': 'Stern geben',
|
|
441
441
|
},
|
|
@@ -506,7 +506,7 @@ window.__ModuleLoader__.load({
|
|
|
506
506
|
'default.push.label': 'Пуш',
|
|
507
507
|
'default.push.text': 'Запушить локальные коммиты в удалённый репозиторий',
|
|
508
508
|
'default.release.label': 'Релиз',
|
|
509
|
-
'default.release.text': '
|
|
509
|
+
'default.release.text': 'Закоммитить, запушить, опубликовать новую версию и обновить локальную копию',
|
|
510
510
|
'manager.starHint': 'Полезно? Откройте ссылку и нажмите Star в правом верхнем углу репозитория:',
|
|
511
511
|
'manager.starLink': 'Поставить звезду',
|
|
512
512
|
},
|
|
@@ -577,7 +577,7 @@ window.__ModuleLoader__.load({
|
|
|
577
577
|
'default.push.label': 'Push',
|
|
578
578
|
'default.push.text': 'Enviar commits locais ao remoto',
|
|
579
579
|
'default.release.label': 'Publicar',
|
|
580
|
-
'default.release.text': '
|
|
580
|
+
'default.release.text': 'Commite, dê push, publique a nova versão e atualize localmente',
|
|
581
581
|
'manager.starHint': 'Gostou? Abra o link e clique em Star no canto superior direito do repositório:',
|
|
582
582
|
'manager.starLink': 'Dar uma estrela',
|
|
583
583
|
},
|
|
@@ -585,8 +585,6 @@ window.__ModuleLoader__.load({
|
|
|
585
585
|
|
|
586
586
|
var DEFAULT_SPECS = [
|
|
587
587
|
{ id: 'continue', label: 'default.continue.label', text: 'default.continue.text' },
|
|
588
|
-
{ id: 'commit', label: 'default.commit.label', text: 'default.commit.text' },
|
|
589
|
-
{ id: 'push', label: 'default.push.label', text: 'default.push.text' },
|
|
590
588
|
{ id: 'release', label: 'default.release.label', text: 'default.release.text' },
|
|
591
589
|
]
|
|
592
590
|
|
|
@@ -1228,12 +1226,26 @@ window.__ModuleLoader__.load({
|
|
|
1228
1226
|
* Dock chips
|
|
1229
1227
|
* ------------------------------------------------------------------ */
|
|
1230
1228
|
|
|
1231
|
-
|
|
1232
|
-
|
|
1229
|
+
var DICT_KEYS = ['zh', 'en', 'es', 'fr', 'de', 'ru', 'pt']
|
|
1230
|
+
|
|
1231
|
+
/** Language of the last-resort dictionary when the host gives us no `t`. */
|
|
1232
|
+
function navigatorDictKey() {
|
|
1233
|
+
if (typeof navigator === 'undefined') return 'en'
|
|
1234
|
+
var raw = String(navigator.language || navigator.userLanguage || '').toLowerCase()
|
|
1235
|
+
var base = raw.replace(/_/g, '-').split('-')[0]
|
|
1236
|
+
for (var i = 0; i < DICT_KEYS.length; i += 1) {
|
|
1237
|
+
if (base === DICT_KEYS[i]) return DICT_KEYS[i]
|
|
1238
|
+
}
|
|
1239
|
+
return 'en'
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/** The slot synthesizes `t` from the locale seat, already bound to the DSH
|
|
1243
|
+
* language; both seeded defaults and UI strings use that same source. A host
|
|
1244
|
+
* that drops the seat falls back to navigator.language across all seven
|
|
1245
|
+
* dictionaries instead of the old zh/en-only split. */
|
|
1233
1246
|
function resolveT(props) {
|
|
1234
1247
|
if (typeof props.t === 'function') return props.t
|
|
1235
|
-
var
|
|
1236
|
-
var dict = zh ? DICTS.zh : DICTS.en
|
|
1248
|
+
var dict = DICTS[navigatorDictKey()] || DICTS.en
|
|
1237
1249
|
return function (key) {
|
|
1238
1250
|
return dict[key] !== undefined ? dict[key] : key
|
|
1239
1251
|
}
|
package/package.json
CHANGED