search: Settings' search help says a picked provider that can't search gives way (plugins#635)

625938a2f made a searcher picked in Settings that can't serve (out of
quota, credit or rate-limited) give way to the other providers that can
search, after the ones the user added after it. Settings' help still said
a picked provider "is replaced only by the ones you add after it, then by
your Search APIs". It now says it gives way to those, then, when it can't
search at all, to other available sources, then to the Search APIs. The
text is changed in en, zh, zh-TW, ja and de, and in searcher-pick's
expected text (en, zh, ja, de).

Run on mote (macOS 27), at this tree on origin/main 625938a2f:
- node --test searcher-pick, searcher-then, search-instead, search-order,
  provider-search, settings-search, search-all (chromium + webkit, their
  narrow widths and languages) and i18n-keys: all pass (22, 20, 10, 16,
  16, 14, 40, 4).
- go test -run 'Budget|Script|I18n|Search' ./internal/gui: ok.

- Rebased onto 37cc86b3b (f49f6ba68 changed i18n.js): searcher-pick
  (22), i18n-keys (4) and go test -run 'Budget|Script|I18n'
  ./internal/gui: pass again.

Broken by hand: nothing; it is text only, and searcher-pick checks the
whole help in each language it covers.

Not tried: zh-TW is not in searcher-pick's languages; read by eye only.
This commit is contained in:
yetone
2026-11-03 11:53:08 +08:00
parent 809801f1fb
commit 03d7927a8f
3 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -1412,7 +1412,7 @@ const I18N = {
"When provider search is off, only configured Search APIs are used. Without a Search API, magpie does not add a search tool. Providers' native web search is unchanged.": "关闭供应商代搜后,仅使用已配置的搜索 API;未配置时,Magpie 不添加搜索工具。供应商自带的联网搜索不受影响。",
"Provider search is off; only these APIs are used": "已关闭供应商代搜,仅使用这些 API",
"Searches for other models": "代搜供应商",
"When a model can't search the web directly, the selected provider searches for it and returns the results. Searches may use the service's quota or incur charges; if the provider magpie picks fails, it tries other available sources, but a provider you select here is replaced only by the ones you add after it, in their order, then by your Search APIs.": "当模型无法直接联网搜索时,由所选供应商代为搜索并返回结果。代搜可能消耗所用服务的额度或产生费用;magpie 自动选择的供应商失败时会尝试其他可用来源,而在此手动选中的供应商只会按顺序换成你在它后面添加的供应商,再改用你配置的搜索 API。",
"When a model can't search the web directly, the selected provider searches for it and returns the results. Searches may use the service's quota or incur charges; if the provider magpie picks fails, it tries other available sources, and a provider you select here gives way to the ones you add after it, in their order, then, when it can't search at all (out of quota or rate-limited), to other available sources, then to your Search APIs.": "当模型无法直接联网搜索时,由所选供应商代为搜索并返回结果。代搜可能消耗所用服务的额度或产生费用;magpie 自动选择的供应商失败时会尝试其他可用来源,在此手动选中的供应商失败时会按顺序换成你在它后面添加的供应商;若它完全搜不了(额度用完或被限流),再尝试其他可用来源,最后改用你配置的搜索 API。",
"{who} didn't search {when}: {why}. {next} searched in its place.": "{who} {when}没能搜索:{why}。已由 {next} 代为搜索。",
"{who} didn't search {when}: {why}. The ones after it didn't search either; add another provider after it, or a Search API.": "{who} {when}没能搜索:{why}。排在它后面的供应商也都没能搜索;可在它后面再添加一个供应商,或添加搜索 API。",
"If it fails": "失败时依次换用",
@@ -5879,7 +5879,7 @@ const I18N = {
"When provider search is off, only configured Search APIs are used. Without a Search API, magpie does not add a search tool. Providers' native web search is unchanged.": "關閉供應商代搜後,僅使用已設定的搜尋 API;未設定時,Magpie 不新增搜尋工具。供應商內建的聯網搜尋不受影響。",
"Provider search is off; only these APIs are used": "已關閉供應商代搜,僅使用這些 API",
"Searches for other models": "代搜供應商",
"When a model can't search the web directly, the selected provider searches for it and returns the results. Searches may use the service's quota or incur charges; if the provider magpie picks fails, it tries other available sources, but a provider you select here is replaced only by the ones you add after it, in their order, then by your Search APIs.": "當模型無法直接聯網搜尋時,由所選供應商代為搜尋並返回結果。代搜可能消耗所用服務的額度或產生費用;magpie 自動選擇的供應商失敗時會嘗試其他可用來源,而在此手動選中的供應商只會依序換成你在它後面新增的供應商,再改用你設定的搜尋 API。",
"When a model can't search the web directly, the selected provider searches for it and returns the results. Searches may use the service's quota or incur charges; if the provider magpie picks fails, it tries other available sources, and a provider you select here gives way to the ones you add after it, in their order, then, when it can't search at all (out of quota or rate-limited), to other available sources, then to your Search APIs.": "當模型無法直接聯網搜尋時,由所選供應商代為搜尋並返回結果。代搜可能消耗所用服務的額度或產生費用;magpie 自動選擇的供應商失敗時會嘗試其他可用來源,在此手動選中的供應商失敗時會依序換成你在它後面新增的供應商;若它完全搜不了(額度用完或被限流),再嘗試其他可用來源,最後改用你設定的搜尋 API。",
"{who} didn't search {when}: {why}. {next} searched in its place.": "{who} {when}沒能搜尋:{why}。已由 {next} 代為搜尋。",
"{who} didn't search {when}: {why}. The ones after it didn't search either; add another provider after it, or a Search API.": "{who} {when}沒能搜尋:{why}。排在它後面的供應商也都沒能搜尋;可在它後面再新增一個供應商,或新增搜尋 API。",
"If it fails": "失敗時依序換用",
@@ -10316,7 +10316,7 @@ const I18N = {
"When provider search is off, only configured Search APIs are used. Without a Search API, magpie does not add a search tool. Providers' native web search is unchanged.": "プロバイダによる代行検索がオフの場合、設定済みの検索 API のみを使用します。検索 API がない場合、magpie は検索ツールを追加しません。プロバイダのネイティブなウェブ検索には影響しません。",
"Provider search is off; only these APIs are used": "プロバイダによる代行検索はオフです。これらの API のみを使用します",
"Searches for other models": "他のモデルの代わりに検索",
"When a model can't search the web directly, the selected provider searches for it and returns the results. Searches may use the service's quota or incur charges; if the provider magpie picks fails, it tries other available sources, but a provider you select here is replaced only by the ones you add after it, in their order, then by your Search APIs.": "モデルが直接ウェブ検索できない場合、選択したプロバイダが代わりに検索し、結果を返します。検索にはサービスの利用枠を消費したり、料金が発生したりする場合があります。magpie が自動で選んだプロバイダが失敗すると他の利用可能な検索元を試しますが、ここで選んだプロバイダの代わりに使われるのは、その後ろに追加したプロバイダ(その順番で)と、設定済みの検索 API だけです。",
"When a model can't search the web directly, the selected provider searches for it and returns the results. Searches may use the service's quota or incur charges; if the provider magpie picks fails, it tries other available sources, and a provider you select here gives way to the ones you add after it, in their order, then, when it can't search at all (out of quota or rate-limited), to other available sources, then to your Search APIs.": "モデルが直接ウェブ検索できない場合、選択したプロバイダが代わりに検索し、結果を返します。検索にはサービスの利用枠を消費したり、料金が発生したりする場合があります。magpie が自動で選んだプロバイダが失敗すると他の利用可能な検索元を試しますが、ここで選んだプロバイダが失敗すると、その後ろに追加したプロバイダをその順番で試し、利用枠切れやレート制限でまったく検索できないときは他の利用可能な検索元も試し、最後に設定済みの検索 API を使います。",
"{who} didn't search {when}: {why}. {next} searched in its place.": "{who} は{when}、検索できませんでした:{why}。代わりに {next} が検索しました。",
"{who} didn't search {when}: {why}. The ones after it didn't search either; add another provider after it, or a Search API.": "{who} は{when}、検索できませんでした:{why}。後ろのプロバイダも検索できませんでした。後ろに別のプロバイダを追加するか、検索 API を追加してください。",
"If it fails": "失敗したとき",
@@ -14784,7 +14784,7 @@ const I18N = {
"When provider search is off, only configured Search APIs are used. Without a Search API, magpie does not add a search tool. Providers' native web search is unchanged.": "Wenn die Anbietersuche ausgeschaltet ist, werden nur konfigurierte Such-APIs verwendet. Ohne Such-API fügt magpie kein Suchwerkzeug hinzu. Die native Websuche der Anbieter bleibt unverändert.",
"Provider search is off; only these APIs are used": "Die Anbietersuche ist ausgeschaltet; nur diese APIs werden verwendet",
"Searches for other models": "Sucht für andere Modelle",
"When a model can't search the web directly, the selected provider searches for it and returns the results. Searches may use the service's quota or incur charges; if the provider magpie picks fails, it tries other available sources, but a provider you select here is replaced only by the ones you add after it, in their order, then by your Search APIs.": "Wenn ein Modell nicht direkt im Web suchen kann, übernimmt der ausgewählte Anbieter die Suche und liefert die Ergebnisse. Suchen können das Kontingent des Dienstes verbrauchen oder Kosten verursachen. Schlägt der von magpie gewählte Anbieter fehl, versucht magpie andere verfügbare Quellen; ein hier ausgewählter Anbieter wird nur durch die Anbieter ersetzt, die Sie danach hinzufügen, in ihrer Reihenfolge, und dann durch Ihre Such-APIs.",
"When a model can't search the web directly, the selected provider searches for it and returns the results. Searches may use the service's quota or incur charges; if the provider magpie picks fails, it tries other available sources, and a provider you select here gives way to the ones you add after it, in their order, then, when it can't search at all (out of quota or rate-limited), to other available sources, then to your Search APIs.": "Wenn ein Modell nicht direkt im Web suchen kann, übernimmt der ausgewählte Anbieter die Suche und liefert die Ergebnisse. Suchen können das Kontingent des Dienstes verbrauchen oder Kosten verursachen. Schlägt der von magpie gewählte Anbieter fehl, versucht magpie andere verfügbare Quellen; ein hier ausgewählter Anbieter wird zuerst durch die Anbieter ersetzt, die Sie danach hinzufügen, in ihrer Reihenfolge; kann er gar nicht suchen (Kontingent aufgebraucht oder Ratenlimit), dann durch andere verfügbare Quellen und zuletzt durch Ihre Such-APIs.",
"{who} didn't search {when}: {why}. {next} searched in its place.": "{who} hat {when} nicht gesucht: {why}. {next} hat an seiner Stelle gesucht.",
"{who} didn't search {when}: {why}. The ones after it didn't search either; add another provider after it, or a Search API.": "{who} hat {when} nicht gesucht: {why}. Die Anbieter danach haben auch nicht gesucht; fügen Sie danach einen weiteren Anbieter oder eine Such-API hinzu.",
"If it fails": "Wenn er fehlschlägt",
@@ -329,7 +329,7 @@ function renderSearcher(s, keep, box) {
const icOf = (id) => choices.find((x) => x.id === id.split("/")[0])?.icon;
const r = el("div", "row pref searcher-row");
const who = el("div", "who");
const sub = el("div", "sub", off ? (s.searchAll ? t("When provider search is off, only configured Search APIs are used, for every model. Without a Search API, magpie does not add a search tool.") : t("When provider search is off, only configured Search APIs are used. Without a Search API, magpie does not add a search tool. Providers' native web search is unchanged.")) : t("When a model can't search the web directly, the selected provider searches for it and returns the results. Searches may use the service's quota or incur charges; if the provider magpie picks fails, it tries other available sources, but a provider you select here is replaced only by the ones you add after it, in their order, then by your Search APIs."));
const sub = el("div", "sub", off ? (s.searchAll ? t("When provider search is off, only configured Search APIs are used, for every model. Without a Search API, magpie does not add a search tool.") : t("When provider search is off, only configured Search APIs are used. Without a Search API, magpie does not add a search tool. Providers' native web search is unchanged.")) : t("When a model can't search the web directly, the selected provider searches for it and returns the results. Searches may use the service's quota or incur charges; if the provider magpie picks fails, it tries other available sources, and a provider you select here gives way to the ones you add after it, in their order, then, when it can't search at all (out of quota or rate-limited), to other available sources, then to your Search APIs."));
if (!off && v && s.searchUnused) {
const why = { gone: t("it is no longer in magpie"), off: t("it is turned off"), cant: t("it can't search the web by itself"), nomodel: t("it lists no model") }[s.searchUnused] || s.searchUnused;
sub.append(" · ", el("span", "warn searcher-unused", t("{who} isn't used: {why}, so magpie picks one", { who: named(v), why })));
+4 -4
View File
@@ -51,22 +51,22 @@ const words = {
};
const helpWords = {
en: {
help: "When a model can't search the web directly, the selected provider searches for it and returns the results. Searches may use the service's quota or incur charges; if the provider magpie picks fails, it tries other available sources, but a provider you select here is replaced only by the ones you add after it, in their order, then by your Search APIs.",
help: "When a model can't search the web directly, the selected provider searches for it and returns the results. Searches may use the service's quota or incur charges; if the provider magpie picks fails, it tries other available sources, and a provider you select here gives way to the ones you add after it, in their order, then, when it can't search at all (out of quota or rate-limited), to other available sources, then to your Search APIs.",
relays: "These relays must be selected manually and are not used for automatic selection or fallback: MyRelay.",
left: "These providers can't be selected to search for other models with the current configuration: MiniMax, Kimi For Coding. Their models can still get search results through other available search providers or configured search APIs.",
},
zh: {
help: "当模型无法直接联网搜索时,由所选供应商代为搜索并返回结果。代搜可能消耗所用服务的额度或产生费用;magpie 自动选择的供应商失败时会尝试其他可用来源,而在此手动选中的供应商只会按顺序换成你在它后面添加的供应商,再改用你配置的搜索 API。",
help: "当模型无法直接联网搜索时,由所选供应商代为搜索并返回结果。代搜可能消耗所用服务的额度或产生费用;magpie 自动选择的供应商失败时会尝试其他可用来源,在此手动选中的供应商失败时会按顺序换成你在它后面添加的供应商;若它完全搜不了(额度用完或被限流),再尝试其他可用来源,最后改用你配置的搜索 API。",
relays: "以下中转服务需手动指定,不参与自动选择或自动回退:MyRelay。",
left: "以下供应商在当前配置下不可选为代搜供应商:MiniMax, Kimi For Coding。它们的模型仍可通过其他可用的代搜供应商或已配置的搜索 API 获取搜索结果。",
},
ja: {
help: "モデルが直接ウェブ検索できない場合、選択したプロバイダが代わりに検索し、結果を返します。検索にはサービスの利用枠を消費したり、料金が発生したりする場合があります。magpie が自動で選んだプロバイダが失敗すると他の利用可能な検索元を試しますが、ここで選んだプロバイダの代わりに使われるのは、その後ろに追加したプロバイダ(その順番で)と、設定済みの検索 API だけです。",
help: "モデルが直接ウェブ検索できない場合、選択したプロバイダが代わりに検索し、結果を返します。検索にはサービスの利用枠を消費したり、料金が発生したりする場合があります。magpie が自動で選んだプロバイダが失敗すると他の利用可能な検索元を試しますが、ここで選んだプロバイダが失敗すると、その後ろに追加したプロバイダをその順番で試し、利用枠切れやレート制限でまったく検索できないときは他の利用可能な検索元も試し、最後に設定済みの検索 API を使います。",
relays: "次の中継サービスは手動で選択する必要があり、自動選択や自動フォールバックの対象にはなりません:MyRelay。",
left: "次のプロバイダは現在の設定では他のモデルの検索用に選択できません:MiniMax, Kimi For Coding。これらのモデルも、他の利用可能な検索用プロバイダや設定済みの検索 API を通じて検索結果を取得できます。",
},
de: {
help: "Wenn ein Modell nicht direkt im Web suchen kann, übernimmt der ausgewählte Anbieter die Suche und liefert die Ergebnisse. Suchen können das Kontingent des Dienstes verbrauchen oder Kosten verursachen. Schlägt der von magpie gewählte Anbieter fehl, versucht magpie andere verfügbare Quellen; ein hier ausgewählter Anbieter wird nur durch die Anbieter ersetzt, die Sie danach hinzufügen, in ihrer Reihenfolge, und dann durch Ihre Such-APIs.",
help: "Wenn ein Modell nicht direkt im Web suchen kann, übernimmt der ausgewählte Anbieter die Suche und liefert die Ergebnisse. Suchen können das Kontingent des Dienstes verbrauchen oder Kosten verursachen. Schlägt der von magpie gewählte Anbieter fehl, versucht magpie andere verfügbare Quellen; ein hier ausgewählter Anbieter wird zuerst durch die Anbieter ersetzt, die Sie danach hinzufügen, in ihrer Reihenfolge; kann er gar nicht suchen (Kontingent aufgebraucht oder Ratenlimit), dann durch andere verfügbare Quellen und zuletzt durch Ihre Such-APIs.",
relays: "Diese Relays müssen manuell ausgewählt werden und werden weder automatisch noch als Fallback gewählt: MyRelay.",
left: "Diese Anbieter können mit der aktuellen Konfiguration nicht für die Suche anderer Modelle ausgewählt werden: MiniMax, Kimi For Coding. Ihre Modelle können weiterhin über andere verfügbare Suchanbieter oder konfigurierte Such-APIs Suchergebnisse erhalten.",
},