From 4d502267d065bb030a8f65124ccf7cf15eb0ee23 Mon Sep 17 00:00:00 2001 From: Willie Date: Tue, 17 Nov 2026 00:05:47 +0800 Subject: [PATCH] fix(ui): say the target limit was removed in the Skills toasts (#929) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Choosing "No limit" for a skill, a folder or a selection still showed "… now available in All": the toasts put the old "All" label into the "available in {target}" sentence. That is the wording #925 found misleading, and it no longer matches the option's name. Give the no-limit case its own sentence in each of the three toasts and drop the "All" label nothing else uses. --- ui/src/i18n/locales/de.json | 5 ++++- ui/src/i18n/locales/en.json | 5 ++++- ui/src/i18n/locales/es.json | 5 ++++- ui/src/i18n/locales/fa.json | 5 ++++- ui/src/i18n/locales/fr.json | 5 ++++- ui/src/i18n/locales/id.json | 5 ++++- ui/src/i18n/locales/ja.json | 5 ++++- ui/src/i18n/locales/ko.json | 5 ++++- ui/src/i18n/locales/pt-BR.json | 5 ++++- ui/src/i18n/locales/zh-CN.json | 5 ++++- ui/src/i18n/locales/zh-TW.json | 5 ++++- ui/src/pages/ResourcesPage.tsx | 6 +++--- 12 files changed, 47 insertions(+), 14 deletions(-) diff --git a/ui/src/i18n/locales/de.json b/ui/src/i18n/locales/de.json index 8bb83977e..332202336 100644 --- a/ui/src/i18n/locales/de.json +++ b/ui/src/i18n/locales/de.json @@ -743,6 +743,7 @@ "resources.folder.collapse": "{name} einklappen", "resources.folder.noEditableSkills": "Keine Skills in {folder}/ geändert — deaktivierte Skills werden übersprungen", "resources.folder.skillsUpdated": "{count} Skill(s) in {folder}/ jetzt verfügbar in {target}", + "resources.folder.limitRemoved": "{count} Skill(s) in {folder}/ nicht mehr auf ein Ziel eingeschränkt", "resources.newSkill": "Neuer Skill", "resources.moreWays": "Weitere Möglichkeiten zum Hinzufügen", "resources.add.install": "Von URL oder Hub installieren", @@ -765,7 +766,6 @@ "resources.tab.analyze": "Analysieren", "resources.table.actions": "Aktionen", "resources.table.type": "Typ", - "resources.targets.all": "Alle", "resources.targets.global": "Global", "resources.targets.projects": "Projekte", "resources.targets.notIncluded": "nicht enthalten", @@ -773,6 +773,7 @@ "resources.toast.disabled": "{kind} {name} deaktiviert", "resources.toast.enabled": "{kind} {name} aktiviert", "resources.toast.nowAvailableIn": "{name} jetzt verfügbar in {target}", + "resources.toast.limitRemoved": "{name} nicht mehr auf ein Ziel eingeschränkt", "resources.tree.filteredOut.label": "Herausgefiltert", "resources.tree.mixed": "Gemischte Ziele", "resources.tree.allDisabled": "alle deaktiviert", @@ -1089,6 +1090,8 @@ "resources.showMore": "Mehr anzeigen", "resources.bulk.targetsSet.one": "{count} Skill jetzt verfügbar in {target}", "resources.bulk.targetsSet.other": "{count} Skills jetzt verfügbar in {target}", + "resources.bulk.limitRemoved.one": "{count} Skill nicht mehr auf ein Ziel eingeschränkt", + "resources.bulk.limitRemoved.other": "{count} Skills nicht mehr auf ein Ziel eingeschränkt", "resources.view.list": "Liste", "resources.view.cards": "Karten", "resources.view.tree": "Baum", diff --git a/ui/src/i18n/locales/en.json b/ui/src/i18n/locales/en.json index 0c7271c0f..293146272 100644 --- a/ui/src/i18n/locales/en.json +++ b/ui/src/i18n/locales/en.json @@ -736,6 +736,7 @@ "resources.folder.collapse": "Collapse {name}", "resources.folder.noEditableSkills": "No skills in {folder}/ were changed — disabled skills are skipped", "resources.folder.skillsUpdated": "{count} skill(s) in {folder}/ now available in {target}", + "resources.folder.limitRemoved": "{count} skill(s) in {folder}/ no longer limited to a target", "resources.newSkill": "New skill", "resources.moreWays": "More ways to add", "resources.add.install": "Install from URL or Hub", @@ -758,7 +759,6 @@ "resources.tab.analyze": "Analyze", "resources.table.actions": "Actions", "resources.table.type": "Type", - "resources.targets.all": "All", "resources.targets.global": "Global", "resources.targets.projects": "Projects", "resources.targets.notIncluded": "not included", @@ -766,6 +766,7 @@ "resources.toast.disabled": "{kind} {name} disabled", "resources.toast.enabled": "{kind} {name} enabled", "resources.toast.nowAvailableIn": "{name} now available in {target}", + "resources.toast.limitRemoved": "{name} is no longer limited to a target", "resources.tree.filteredOut.label": "Filtered out", "resources.tree.mixed": "Mixed targets", "resources.tree.allDisabled": "all disabled", @@ -1089,6 +1090,8 @@ "resources.showMore": "Show more", "resources.bulk.targetsSet.one": "{count} skill now available in {target}", "resources.bulk.targetsSet.other": "{count} skills now available in {target}", + "resources.bulk.limitRemoved.one": "{count} skill is no longer limited to a target", + "resources.bulk.limitRemoved.other": "{count} skills are no longer limited to a target", "resources.view.list": "List", "resources.view.cards": "Cards", "resources.view.tree": "Tree", diff --git a/ui/src/i18n/locales/es.json b/ui/src/i18n/locales/es.json index 3ae37d1be..f84a6facd 100644 --- a/ui/src/i18n/locales/es.json +++ b/ui/src/i18n/locales/es.json @@ -743,6 +743,7 @@ "resources.folder.collapse": "Contraer {name}", "resources.folder.noEditableSkills": "No se cambió ningún skill en {folder}/ — los skills deshabilitados se omiten", "resources.folder.skillsUpdated": "{count} skill(s) en {folder}/ ahora disponibles en {target}", + "resources.folder.limitRemoved": "{count} skill(s) en {folder}/ ya no limitado(s) a un destino", "resources.newSkill": "Nueva skill", "resources.moreWays": "Más formas de añadir", "resources.add.install": "Instalar desde URL o Hub", @@ -765,7 +766,6 @@ "resources.tab.analyze": "Analizar", "resources.table.actions": "Acciones", "resources.table.type": "Tipo", - "resources.targets.all": "Todos", "resources.targets.global": "Global", "resources.targets.projects": "Proyectos", "resources.targets.notIncluded": "no incluido", @@ -773,6 +773,7 @@ "resources.toast.disabled": "{kind} {name} desactivado", "resources.toast.enabled": "{kind} {name} activado", "resources.toast.nowAvailableIn": "{name} ahora disponible en {target}", + "resources.toast.limitRemoved": "{name} ya no está limitado a un destino", "resources.tree.filteredOut.label": "Filtrado", "resources.tree.mixed": "Destinos mixtos", "resources.tree.allDisabled": "todos deshabilitados", @@ -1089,6 +1090,8 @@ "resources.showMore": "Mostrar más", "resources.bulk.targetsSet.one": "{count} skill ahora disponible en {target}", "resources.bulk.targetsSet.other": "{count} skills ahora disponibles en {target}", + "resources.bulk.limitRemoved.one": "{count} skill ya no está limitado a un destino", + "resources.bulk.limitRemoved.other": "{count} skills ya no están limitados a un destino", "resources.view.list": "Lista", "resources.view.cards": "Tarjetas", "resources.view.tree": "Árbol", diff --git a/ui/src/i18n/locales/fa.json b/ui/src/i18n/locales/fa.json index 6edbb49b0..18452d80c 100644 --- a/ui/src/i18n/locales/fa.json +++ b/ui/src/i18n/locales/fa.json @@ -743,6 +743,7 @@ "resources.folder.collapse": "بستن {name}", "resources.folder.noEditableSkills": "هیچ اسکیلی در {folder}/ تغییر نکرد — اسکیل‌های غیرفعال نادیده گرفته می‌شوند", "resources.folder.skillsUpdated": "{count} اسکیل در {folder}/ اکنون در {target} در دسترس است", + "resources.folder.limitRemoved": "{count} اسکیل در {folder}/ دیگر به یک هدف محدود نیست", "resources.newSkill": "اسکیل جدید", "resources.moreWays": "راه‌های دیگر افزودن", "resources.add.install": "نصب از URL یا Hub", @@ -765,7 +766,6 @@ "resources.tab.analyze": "تحلیل", "resources.table.actions": "اقدامات", "resources.table.type": "نوع", - "resources.targets.all": "همه", "resources.targets.global": "سراسری", "resources.targets.projects": "پروژه‌ها", "resources.targets.notIncluded": "همگام نشده", @@ -773,6 +773,7 @@ "resources.toast.disabled": "{kind} {name} غیرفعال شد", "resources.toast.enabled": "{kind} {name} فعال شد", "resources.toast.nowAvailableIn": "{name} اکنون در {target} در دسترس است", + "resources.toast.limitRemoved": "{name} دیگر به یک هدف محدود نیست", "resources.tree.filteredOut.label": "فیلتر شده", "resources.tree.mixed": "هدف‌های متفاوت", "resources.tree.allDisabled": "همه غیرفعال", @@ -1089,6 +1090,8 @@ "resources.showMore": "نمایش بیشتر", "resources.bulk.targetsSet.one": "{count} اسکیل اکنون در {target} در دسترس است", "resources.bulk.targetsSet.other": "{count} اسکیل اکنون در {target} در دسترس است", + "resources.bulk.limitRemoved.one": "{count} اسکیل دیگر به یک هدف محدود نیست", + "resources.bulk.limitRemoved.other": "{count} اسکیل دیگر به یک هدف محدود نیست", "resources.view.list": "فهرست", "resources.view.cards": "کارت‌ها", "resources.view.tree": "درختی", diff --git a/ui/src/i18n/locales/fr.json b/ui/src/i18n/locales/fr.json index 74071fe1f..afa5e39ab 100644 --- a/ui/src/i18n/locales/fr.json +++ b/ui/src/i18n/locales/fr.json @@ -743,6 +743,7 @@ "resources.folder.collapse": "Réduire {name}", "resources.folder.noEditableSkills": "Aucun skill modifié dans {folder}/ — les skills désactivés sont ignorés", "resources.folder.skillsUpdated": "{count} skill(s) dans {folder}/ maintenant disponible(s) dans {target}", + "resources.folder.limitRemoved": "{count} skill(s) dans {folder}/ ne sont plus restreint(s) à une cible", "resources.newSkill": "Nouveau skill", "resources.moreWays": "Autres façons d’ajouter", "resources.add.install": "Installer depuis une URL ou un Hub", @@ -765,7 +766,6 @@ "resources.tab.analyze": "Analyser", "resources.table.actions": "Actions", "resources.table.type": "Type", - "resources.targets.all": "Tous", "resources.targets.global": "Global", "resources.targets.projects": "Projets", "resources.targets.notIncluded": "non inclus", @@ -773,6 +773,7 @@ "resources.toast.disabled": "{kind} {name} désactivé", "resources.toast.enabled": "{kind} {name} activé", "resources.toast.nowAvailableIn": "{name} maintenant disponible dans {target}", + "resources.toast.limitRemoved": "{name} n’est plus restreint à une cible", "resources.tree.filteredOut.label": "Filtré", "resources.tree.mixed": "Cibles mixtes", "resources.tree.allDisabled": "tous désactivés", @@ -1089,6 +1090,8 @@ "resources.showMore": "Afficher plus", "resources.bulk.targetsSet.one": "{count} skill désormais disponible dans {target}", "resources.bulk.targetsSet.other": "{count} skills désormais disponibles dans {target}", + "resources.bulk.limitRemoved.one": "{count} skill n’est plus restreint à une cible", + "resources.bulk.limitRemoved.other": "{count} skills ne sont plus restreints à une cible", "resources.view.list": "Liste", "resources.view.cards": "Cartes", "resources.view.tree": "Arborescence", diff --git a/ui/src/i18n/locales/id.json b/ui/src/i18n/locales/id.json index 553ec722c..28c11627e 100644 --- a/ui/src/i18n/locales/id.json +++ b/ui/src/i18n/locales/id.json @@ -743,6 +743,7 @@ "resources.folder.collapse": "Ciutkan {name}", "resources.folder.noEditableSkills": "Tidak ada skill di {folder}/ yang diubah — skill nonaktif dilewati", "resources.folder.skillsUpdated": "{count} skill di {folder}/ sekarang tersedia di {target}", + "resources.folder.limitRemoved": "{count} skill di {folder}/ tidak lagi dibatasi ke satu target", "resources.newSkill": "Skill Baru", "resources.moreWays": "Cara lain untuk menambahkan", "resources.add.install": "Pasang dari URL atau Hub", @@ -765,7 +766,6 @@ "resources.tab.analyze": "Analisis", "resources.table.actions": "Tindakan", "resources.table.type": "Tipe", - "resources.targets.all": "Semua", "resources.targets.global": "Global", "resources.targets.projects": "Proyek", "resources.targets.notIncluded": "tidak disertakan", @@ -773,6 +773,7 @@ "resources.toast.disabled": "{kind} {name} dinonaktifkan", "resources.toast.enabled": "{kind} {name} diaktifkan", "resources.toast.nowAvailableIn": "{name} sekarang tersedia di {target}", + "resources.toast.limitRemoved": "{name} tidak lagi dibatasi ke satu target", "resources.tree.filteredOut.label": "Difilter keluar", "resources.tree.mixed": "Target campuran", "resources.tree.allDisabled": "semua nonaktif", @@ -1089,6 +1090,8 @@ "resources.showMore": "Tampilkan lagi", "resources.bulk.targetsSet.one": "{count} skill kini tersedia di {target}", "resources.bulk.targetsSet.other": "{count} skill kini tersedia di {target}", + "resources.bulk.limitRemoved.one": "{count} skill tidak lagi dibatasi ke satu target", + "resources.bulk.limitRemoved.other": "{count} skill tidak lagi dibatasi ke satu target", "resources.view.list": "Daftar", "resources.view.cards": "Kartu", "resources.view.tree": "Pohon", diff --git a/ui/src/i18n/locales/ja.json b/ui/src/i18n/locales/ja.json index e4b594551..e2db5b3ec 100644 --- a/ui/src/i18n/locales/ja.json +++ b/ui/src/i18n/locales/ja.json @@ -743,6 +743,7 @@ "resources.folder.collapse": "{name} を折りたたむ", "resources.folder.noEditableSkills": "{folder}/ のスキルは変更されませんでした — 無効なスキルはスキップされます", "resources.folder.skillsUpdated": "{folder}/ の {count} 件のスキルが {target} で利用可能になりました", + "resources.folder.limitRemoved": "{folder}/ の {count} 件のスキルのターゲット限定を解除しました", "resources.newSkill": "新しいスキル", "resources.moreWays": "その他の追加方法", "resources.add.install": "URL または Hub からインストール", @@ -765,7 +766,6 @@ "resources.tab.analyze": "分析", "resources.table.actions": "アクション", "resources.table.type": "種類", - "resources.targets.all": "すべて", "resources.targets.global": "グローバル", "resources.targets.projects": "プロジェクト", "resources.targets.notIncluded": "未同期", @@ -773,6 +773,7 @@ "resources.toast.disabled": "{kind} {name} を無効化しました", "resources.toast.enabled": "{kind} {name} を有効化しました", "resources.toast.nowAvailableIn": "{name} が {target} で利用可能になりました", + "resources.toast.limitRemoved": "{name} のターゲット限定を解除しました", "resources.tree.filteredOut.label": "除外済み", "resources.tree.mixed": "ターゲットが混在", "resources.tree.allDisabled": "すべて無効", @@ -1089,6 +1090,8 @@ "resources.showMore": "さらに表示", "resources.bulk.targetsSet.one": "{count} 件のスキルが {target} で利用可能になりました", "resources.bulk.targetsSet.other": "{count} 件のスキルが {target} で利用可能になりました", + "resources.bulk.limitRemoved.one": "{count} 件のスキルのターゲット限定を解除しました", + "resources.bulk.limitRemoved.other": "{count} 件のスキルのターゲット限定を解除しました", "resources.view.list": "リスト", "resources.view.cards": "カード", "resources.view.tree": "ツリー", diff --git a/ui/src/i18n/locales/ko.json b/ui/src/i18n/locales/ko.json index 593fc8de0..11522bdf1 100644 --- a/ui/src/i18n/locales/ko.json +++ b/ui/src/i18n/locales/ko.json @@ -743,6 +743,7 @@ "resources.folder.collapse": "{name} 접기", "resources.folder.noEditableSkills": "{folder}/의 Skill이 변경되지 않았습니다 — 비활성화된 Skill은 건너뜁니다", "resources.folder.skillsUpdated": "{folder}/의 {count}개 skill(s)이 이제 {target}에서 사용 가능합니다", + "resources.folder.limitRemoved": "{folder}/의 {count}개 skill(s)의 대상 제한을 해제했습니다", "resources.newSkill": "새 Skill", "resources.moreWays": "다른 추가 방법", "resources.add.install": "URL 또는 Hub에서 설치", @@ -765,7 +766,6 @@ "resources.tab.analyze": "분석", "resources.table.actions": "작업", "resources.table.type": "유형", - "resources.targets.all": "전체", "resources.targets.global": "전역", "resources.targets.projects": "프로젝트", "resources.targets.notIncluded": "동기화 안 됨", @@ -773,6 +773,7 @@ "resources.toast.disabled": "{kind} {name} 비활성화됨", "resources.toast.enabled": "{kind} {name} 활성화됨", "resources.toast.nowAvailableIn": "{name}이(가) {target}에서 이제 사용 가능합니다", + "resources.toast.limitRemoved": "{name}의 대상 제한을 해제했습니다", "resources.tree.filteredOut.label": "필터로 제외됨", "resources.tree.mixed": "대상 혼합", "resources.tree.allDisabled": "모두 비활성화됨", @@ -1089,6 +1090,8 @@ "resources.showMore": "더 보기", "resources.bulk.targetsSet.one": "Skill {count}개를 이제 {target}에서 사용할 수 있습니다", "resources.bulk.targetsSet.other": "Skill {count}개를 이제 {target}에서 사용할 수 있습니다", + "resources.bulk.limitRemoved.one": "Skill {count}개의 대상 제한을 해제했습니다", + "resources.bulk.limitRemoved.other": "Skill {count}개의 대상 제한을 해제했습니다", "resources.view.list": "목록", "resources.view.cards": "카드", "resources.view.tree": "트리", diff --git a/ui/src/i18n/locales/pt-BR.json b/ui/src/i18n/locales/pt-BR.json index aee1c1e30..be64758d5 100644 --- a/ui/src/i18n/locales/pt-BR.json +++ b/ui/src/i18n/locales/pt-BR.json @@ -743,6 +743,7 @@ "resources.folder.collapse": "Recolher {name}", "resources.folder.noEditableSkills": "Nenhum skill em {folder}/ foi alterado — skills desativados são ignorados", "resources.folder.skillsUpdated": "{count} skill(s) em {folder}/ agora disponível(eis) em {target}", + "resources.folder.limitRemoved": "{count} skill(s) em {folder}/ não mais limitado(s) a um destino", "resources.newSkill": "Nova Skill", "resources.moreWays": "Outras formas de adicionar", "resources.add.install": "Instalar de URL ou Hub", @@ -765,7 +766,6 @@ "resources.tab.analyze": "Analisar", "resources.table.actions": "Ações", "resources.table.type": "Tipo", - "resources.targets.all": "Todos", "resources.targets.global": "Global", "resources.targets.projects": "Projetos", "resources.targets.notIncluded": "não incluído", @@ -773,6 +773,7 @@ "resources.toast.disabled": "{kind} {name} desativado", "resources.toast.enabled": "{kind} {name} ativado", "resources.toast.nowAvailableIn": "{name} agora disponível em {target}", + "resources.toast.limitRemoved": "{name} não está mais limitado a um destino", "resources.tree.filteredOut.label": "Filtrado", "resources.tree.mixed": "Destinos mistos", "resources.tree.allDisabled": "todos desativados", @@ -1089,6 +1090,8 @@ "resources.showMore": "Mostrar mais", "resources.bulk.targetsSet.one": "{count} skill agora disponível em {target}", "resources.bulk.targetsSet.other": "{count} skills agora disponíveis em {target}", + "resources.bulk.limitRemoved.one": "{count} skill não está mais limitado a um destino", + "resources.bulk.limitRemoved.other": "{count} skills não estão mais limitados a um destino", "resources.view.list": "Lista", "resources.view.cards": "Cartões", "resources.view.tree": "Árvore", diff --git a/ui/src/i18n/locales/zh-CN.json b/ui/src/i18n/locales/zh-CN.json index f7a152feb..7d44317a6 100644 --- a/ui/src/i18n/locales/zh-CN.json +++ b/ui/src/i18n/locales/zh-CN.json @@ -743,6 +743,7 @@ "resources.folder.collapse": "收起 {name}", "resources.folder.noEditableSkills": "{folder}/ 中没有 skill 被更改 — 已禁用的 skill 会被跳过", "resources.folder.skillsUpdated": "{folder}/ 中的 {count} 个 skill 现已在 {target} 中可用", + "resources.folder.limitRemoved": "{folder}/ 中的 {count} 个 skill 不再限定目标", "resources.newSkill": "新建 Skill", "resources.moreWays": "更多添加方式", "resources.add.install": "从 URL 或 Hub 安装", @@ -765,7 +766,6 @@ "resources.tab.analyze": "分析", "resources.table.actions": "操作", "resources.table.type": "类型", - "resources.targets.all": "全部", "resources.targets.global": "全局", "resources.targets.projects": "项目", "resources.targets.notIncluded": "未同步", @@ -773,6 +773,7 @@ "resources.toast.disabled": "{kind} {name} 已禁用", "resources.toast.enabled": "{kind} {name} 已启用", "resources.toast.nowAvailableIn": "{name} 现已在 {target} 中可用", + "resources.toast.limitRemoved": "{name} 不再限定目标", "resources.tree.filteredOut.label": "已被过滤", "resources.tree.mixed": "目标不一致", "resources.tree.allDisabled": "全部已禁用", @@ -1089,6 +1090,8 @@ "resources.showMore": "显示更多", "resources.bulk.targetsSet.one": "{count} 个 skill 现在适用于 {target}", "resources.bulk.targetsSet.other": "{count} 个 skill 现在适用于 {target}", + "resources.bulk.limitRemoved.one": "{count} 个 skill 不再限定目标", + "resources.bulk.limitRemoved.other": "{count} 个 skill 不再限定目标", "resources.view.list": "列表", "resources.view.cards": "卡片", "resources.view.tree": "树状", diff --git a/ui/src/i18n/locales/zh-TW.json b/ui/src/i18n/locales/zh-TW.json index 58f4fa619..d528fa246 100644 --- a/ui/src/i18n/locales/zh-TW.json +++ b/ui/src/i18n/locales/zh-TW.json @@ -743,6 +743,7 @@ "resources.folder.collapse": "收合 {name}", "resources.folder.noEditableSkills": "{folder}/ 中沒有 skill 被變更 — 已停用的 skill 會被略過", "resources.folder.skillsUpdated": "{folder}/ 中 {count} 個 skill 現在可在 {target} 中使用", + "resources.folder.limitRemoved": "{folder}/ 中 {count} 個 skill 不再限定目標", "resources.newSkill": "新增 Skill", "resources.moreWays": "更多新增方式", "resources.add.install": "從 URL 或 Hub 安裝", @@ -765,7 +766,6 @@ "resources.tab.analyze": "分析", "resources.table.actions": "操作", "resources.table.type": "類型", - "resources.targets.all": "全部", "resources.targets.global": "全域", "resources.targets.projects": "專案", "resources.targets.notIncluded": "未同步", @@ -773,6 +773,7 @@ "resources.toast.disabled": "{kind} {name} 已停用", "resources.toast.enabled": "{kind} {name} 已啟用", "resources.toast.nowAvailableIn": "{name} 現在可在 {target} 中使用", + "resources.toast.limitRemoved": "{name} 不再限定目標", "resources.tree.filteredOut.label": "已被篩選排除", "resources.tree.mixed": "目標不一致", "resources.tree.allDisabled": "全部已停用", @@ -1089,6 +1090,8 @@ "resources.showMore": "顯示更多", "resources.bulk.targetsSet.one": "{count} 個 skills 現在可用於 {target}", "resources.bulk.targetsSet.other": "{count} 個 skills 現在可用於 {target}", + "resources.bulk.limitRemoved.one": "{count} 個 skills 不再限定目標", + "resources.bulk.limitRemoved.other": "{count} 個 skills 不再限定目標", "resources.view.list": "列表", "resources.view.cards": "卡片", "resources.view.tree": "樹狀", diff --git a/ui/src/pages/ResourcesPage.tsx b/ui/src/pages/ResourcesPage.tsx index b26464bf2..19775d8ad 100644 --- a/ui/src/pages/ResourcesPage.tsx +++ b/ui/src/pages/ResourcesPage.tsx @@ -475,7 +475,7 @@ export default function ResourcesPage({ kind }: { kind: Kind }) { const setTargets = useMutation({ mutationFn: ({ name, target }: { name: string; target: string | null }) => api.setSkillTargets(name, target), onMutate: ({ name, target }) => patch((list) => list.map((x) => (x.flatName === name ? { ...x, targets: target ? [target] : undefined } : x))), - onSuccess: (_, { name, target }) => toast(t('resources.toast.nowAvailableIn', { name, target: target ?? t('resources.targets.all') }), 'success'), + onSuccess: (_, { name, target }) => toast(target ? t('resources.toast.nowAvailableIn', { name, target }) : t('resources.toast.limitRemoved', { name }), 'success'), onError: rollback, onSettled: refreshAfterTargets, }); @@ -485,7 +485,7 @@ export default function ResourcesPage({ kind }: { kind: Kind }) { onSuccess: (res, { folder: path, target }) => { const folder = formatTrackedRepoName(path); if (res.updated === 0 && res.skipped > 0) toast(t('resources.folder.noEditableSkills', { folder }), 'error'); - else toast(t('resources.folder.skillsUpdated', { count: res.updated, folder, target: target ?? t('resources.targets.all') }), 'success'); + else toast(target ? t('resources.folder.skillsUpdated', { count: res.updated, folder, target }) : t('resources.folder.limitRemoved', { count: res.updated, folder }), 'success'); }, onError: (err: Error) => toast(err.message, 'error'), onSettled: refreshAfterTargets, @@ -494,7 +494,7 @@ export default function ResourcesPage({ kind }: { kind: Kind }) { const setManyTargets = async (names: string[], target: string | null) => { const results = await Promise.allSettled(names.map((n) => api.setSkillTargets(n, target))); const failed = results.filter((r) => r.status === 'rejected').length; - if (failed === 0) toast(t(plural('resources.bulk.targetsSet', names.length), { count: names.length, target: target ?? t('resources.targets.all') }), 'success'); + if (failed === 0) toast(target ? t(plural('resources.bulk.targetsSet', names.length), { count: names.length, target }) : t(plural('resources.bulk.limitRemoved', names.length), { count: names.length }), 'success'); else toast(t('resources.batchToggle.toast.partial', { updated: names.length - failed, failed }), failed === names.length ? 'error' : 'warning'); refreshAfterTargets(); };