summaryrefslogtreecommitdiff
path: root/src/ollama_web/static/tools.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ollama_web/static/tools.js')
-rw-r--r--src/ollama_web/static/tools.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ollama_web/static/tools.js b/src/ollama_web/static/tools.js
index 59d5c02..ab392ca 100644
--- a/src/ollama_web/static/tools.js
+++ b/src/ollama_web/static/tools.js
@@ -1,15 +1,17 @@
"use strict";
window.TOOLS = [
- { name: "web_search", label: "Web検索" },
- { name: "scrape_url", label: "スクレイピング" },
- { name: "search_and_fetch", label: "ファイル検索・取得" },
- { name: "pdf_to_text", label: "PDFテキスト変換" },
+ { name: "web_search", i18n_key: "tools.web_search" },
+ { name: "scrape_url", i18n_key: "tools.scrape_url" },
+ { name: "search_and_fetch", i18n_key: "tools.search_and_fetch" },
+ { name: "pdf_to_text", i18n_key: "tools.pdf_to_text" },
];
window.toolLabel = function toolLabel(name) {
const builtin = window.TOOLS.find((t) => t.name === name);
- if (builtin) return builtin.label;
+ if (builtin) {
+ return typeof window.t === "function" ? window.t(builtin.i18n_key, builtin.name) : builtin.name;
+ }
const mcpMatch = /^mcp__([^_]+)__(.+)$/.exec(name);
if (mcpMatch) {