i18n: Refactor string formatting to use arg() method for translations

This commit is contained in:
月月
2025-07-16 21:11:27 +08:00
parent b98e843a9d
commit 2ad60a40a8
11 changed files with 85 additions and 72 deletions
@@ -377,7 +377,7 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
Layout.fillWidth: true Layout.fillWidth: true
padding: 10 padding: 10
color: activeFocus ? Appearance.m3colors.m3onSurface : Appearance.m3colors.m3onSurfaceVariant color: activeFocus ? Appearance.m3colors.m3onSurface : Appearance.m3colors.m3onSurfaceVariant
placeholderText: StringUtils.format(Translation.tr('Message the model... "{0}" for commands'), root.commandPrefix) placeholderText: Translation.tr('Message the model... "%1" for commands').arg(root.commandPrefix)
background: null background: null
@@ -577,8 +577,9 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
id: toolTip id: toolTip
extraVisibleCondition: false extraVisibleCondition: false
alternativeVisibleCondition: mouseArea.containsMouse // Show tooltip when hovered alternativeVisibleCondition: mouseArea.containsMouse // Show tooltip when hovered
content: StringUtils.format(Translation.tr("Current model: {0}\nSet it with {1}model MODEL"), content: Translation.tr("Current model: %1\nSet it with %2model MODEL")
Ai.getModel().name, root.commandPrefix) .arg(Ai.getModel().name)
.arg(root.commandPrefix)
} }
MouseArea { MouseArea {
@@ -242,7 +242,7 @@ Item {
font.pixelSize: Appearance.font.pixelSize.smaller font.pixelSize: Appearance.font.pixelSize.smaller
color: Appearance.m3colors.m3inverseOnSurface color: Appearance.m3colors.m3inverseOnSurface
wrapMode: Text.Wrap wrapMode: Text.Wrap
text: StringUtils.format(Translation.tr("{0} queries pending"), Booru.runningRequests) text: Translation.tr("%1 queries pending").arg(Booru.runningRequests)
} }
} }
} }
@@ -354,7 +354,7 @@ Item {
padding: 10 padding: 10
color: activeFocus ? Appearance.m3colors.m3onSurface : Appearance.m3colors.m3onSurfaceVariant color: activeFocus ? Appearance.m3colors.m3onSurface : Appearance.m3colors.m3onSurfaceVariant
renderType: Text.NativeRendering renderType: Text.NativeRendering
placeholderText: StringUtils.format(Translation.tr('Enter tags, or "{0}" for commands'), root.commandPrefix) placeholderText: Translation.tr('Enter tags, or "%1" for commands').arg(root.commandPrefix)
background: null background: null
@@ -518,8 +518,9 @@ Item {
extraVisibleCondition: false extraVisibleCondition: false
alternativeVisibleCondition: mouseArea.containsMouse // Show tooltip when hovered alternativeVisibleCondition: mouseArea.containsMouse // Show tooltip when hovered
// content: Translation.tr("The current API used. Endpoint: ") + Booru.providers[Booru.currentProvider].url + Translation.tr("\nSet with /mode PROVIDER") // content: Translation.tr("The current API used. Endpoint: ") + Booru.providers[Booru.currentProvider].url + Translation.tr("\nSet with /mode PROVIDER")
content: StringUtils.format(Translation.tr("Current API endpoint: {0}\nSet it with {1}mode PROVIDER"), content: Translation.tr("Current API endpoint: %1\nSet it with %2mode PROVIDER")
Booru.providers[Booru.currentProvider].url, root.commandPrefix) .arg(Booru.providers[Booru.currentProvider].url)
.arg(root.commandPrefix)
} }
MouseArea { MouseArea {
@@ -165,7 +165,7 @@ Button {
id: sourceButton id: sourceButton
visible: root.imageData.source && root.imageData.source.length > 0 visible: root.imageData.source && root.imageData.source.length > 0
Layout.fillWidth: true Layout.fillWidth: true
buttonText: StringUtils.format(Translation.tr("Go to source ({0})"), StringUtils.getDomain(root.imageData.source)) buttonText: Translation.tr("Go to source (%1)").arg(StringUtils.getDomain(root.imageData.source))
enabled: root.imageData.source && root.imageData.source.length > 0 enabled: root.imageData.source && root.imageData.source.length > 0
onClicked: { onClicked: {
root.showActions = false root.showActions = false
@@ -95,7 +95,7 @@ Rectangle {
font.pixelSize: Appearance.font.pixelSize.smaller font.pixelSize: Appearance.font.pixelSize.smaller
color: Appearance.colors.colOnLayer2 color: Appearance.colors.colOnLayer2
// text: `Page ${root.responseData.page}` // text: `Page ${root.responseData.page}`
text: StringUtils.format(Translation.tr("Page {0}"), root.responseData.page) text: Translation.tr("Page %1").arg(root.responseData.page)
} }
} }
} }
@@ -124,7 +124,7 @@ Scope {
StyledText { StyledText {
font.pixelSize: Appearance.font.pixelSize.normal font.pixelSize: Appearance.font.pixelSize.normal
color: Appearance.colors.colOnLayer0 color: Appearance.colors.colOnLayer0
text: StringUtils.format(Translation.tr("Uptime: {0}"), DateTime.uptime) text: Translation.tr("Uptime: %1").arg(DateTime.uptime)
textFormat: Text.MarkdownText textFormat: Text.MarkdownText
} }
@@ -29,7 +29,7 @@ QuickToggleButton {
} }
} }
StyledToolTip { StyledToolTip {
content: StringUtils.format(Translation.tr("{0} | Right-click to configure"), content: Translation.tr("%1 | Right-click to configure").arg(
(Bluetooth.bluetoothEnabled && Bluetooth.bluetoothDeviceName.length > 0) ? (Bluetooth.bluetoothEnabled && Bluetooth.bluetoothDeviceName.length > 0) ?
Bluetooth.bluetoothDeviceName : Translation.tr("Bluetooth")) Bluetooth.bluetoothDeviceName : Translation.tr("Bluetooth"))
@@ -29,6 +29,6 @@ QuickToggleButton {
} }
} }
StyledToolTip { StyledToolTip {
content: StringUtils.format(Translation.tr("{0} | Right-click to configure"), Network.networkName) content: Translation.tr("%1 | Right-click to configure").arg(Network.networkName)
} }
} }
+20 -17
View File
@@ -185,7 +185,7 @@ Singleton {
"openrouter-llama4-maverick": { "openrouter-llama4-maverick": {
"name": "Llama 4 Maverick", "name": "Llama 4 Maverick",
"icon": "ollama-symbolic", "icon": "ollama-symbolic",
"description": StringUtils.format(Translation.tr("Online via {0} | {1}'s model"), "OpenRouter", "Meta"), "description": Translation.tr("Online via %1 | %2's model").arg("OpenRouter").arg("Meta"),
"homepage": "https://openrouter.ai/meta-llama/llama-4-maverick:free", "homepage": "https://openrouter.ai/meta-llama/llama-4-maverick:free",
"endpoint": "https://openrouter.ai/api/v1/chat/completions", "endpoint": "https://openrouter.ai/api/v1/chat/completions",
"model": "meta-llama/llama-4-maverick:free", "model": "meta-llama/llama-4-maverick:free",
@@ -197,7 +197,7 @@ Singleton {
"openrouter-deepseek-r1": { "openrouter-deepseek-r1": {
"name": "DeepSeek R1", "name": "DeepSeek R1",
"icon": "deepseek-symbolic", "icon": "deepseek-symbolic",
"description": StringUtils.format(Translation.tr("Online via {0} | {1}'s model"), "OpenRouter", "DeepSeek"), "description": Translation.tr("Online via %1 | %2's model").arg("OpenRouter").arg("DeepSeek"),
"homepage": "https://openrouter.ai/deepseek/deepseek-r1:free", "homepage": "https://openrouter.ai/deepseek/deepseek-r1:free",
"endpoint": "https://openrouter.ai/api/v1/chat/completions", "endpoint": "https://openrouter.ai/api/v1/chat/completions",
"model": "deepseek/deepseek-r1:free", "model": "deepseek/deepseek-r1:free",
@@ -250,7 +250,7 @@ Singleton {
root.models[safeModelName] = { root.models[safeModelName] = {
"name": guessModelName(model), "name": guessModelName(model),
"icon": guessModelLogo(model), "icon": guessModelLogo(model),
"description": StringUtils.format(Translation.tr("Local Ollama model | {0}"), model), "description": Translation.tr("Local Ollama model | %1").arg(model),
"homepage": `https://ollama.com/library/${model}`, "homepage": `https://ollama.com/library/${model}`,
"endpoint": "http://localhost:11434/v1/chat/completions", "endpoint": "http://localhost:11434/v1/chat/completions",
"model": model, "model": model,
@@ -314,12 +314,12 @@ Singleton {
onLoadedChanged: { onLoadedChanged: {
if (!promptLoader.loaded) return; if (!promptLoader.loaded) return;
Config.options.ai.systemPrompt = promptLoader.text(); Config.options.ai.systemPrompt = promptLoader.text();
root.addMessage(StringUtils.format("Loaded the following system prompt\n\n---\n\n{0}", Config.options.ai.systemPrompt), root.interfaceRole); root.addMessage(Translation.tr("Loaded the following system prompt\n\n---\n\n%1").arg(Config.options.ai.systemPrompt), root.interfaceRole);
} }
} }
function printPrompt() { function printPrompt() {
root.addMessage(StringUtils.format("The current system prompt is\n\n---\n\n{0}", Config.options.ai.systemPrompt), root.interfaceRole); root.addMessage(Translation.tr("The current system prompt is\n\n---\n\n%1").arg(Config.options.ai.systemPrompt), root.interfaceRole);
} }
function loadPrompt(filePath) { function loadPrompt(filePath) {
@@ -352,8 +352,8 @@ Singleton {
function addApiKeyAdvice(model) { function addApiKeyAdvice(model) {
root.addMessage( root.addMessage(
StringUtils.format(Translation.tr('To set an API key, pass it with the command\n\nTo view the key, pass "get" with the command<br/>\n\n### For {0}:\n\n**Link**: {1}\n\n{2}'), Translation.tr('To set an API key, pass it with the command\n\nTo view the key, pass "get" with the command<br/>\n\n### For %1:\n\n**Link**: %2\n\n%3')
model.name, model.key_get_link, model.key_get_description ?? Translation.tr("<i>No further instruction provided</i>")), .arg(model.name).arg(model.key_get_link).arg(model.key_get_description ?? Translation.tr("<i>No further instruction provided</i>")),
Ai.interfaceRole Ai.interfaceRole
); );
} }
@@ -371,11 +371,14 @@ Singleton {
if (model?.requires_key) KeyringStorage.fetchKeyringData(); if (model?.requires_key) KeyringStorage.fetchKeyringData();
// See if policy prevents online models // See if policy prevents online models
if (Config.options.policies.ai === 2 && !model.endpoint.includes("localhost")) { if (Config.options.policies.ai === 2 && !model.endpoint.includes("localhost")) {
root.addMessage(StringUtils.format(StringUtils.format("Online models disallowed\n\nControlled by `policies.ai` config option"), model.name), root.interfaceRole); root.addMessage(
Translation.tr("Online models disallowed for %1\n\nControlled by `policies.ai` config option").arg(model.name),
root.interfaceRole
);
return; return;
} }
if (setPersistentState) Persistent.states.ai.model = modelId; if (setPersistentState) Persistent.states.ai.model = modelId;
if (feedback) root.addMessage(StringUtils.format("Model set to {0}", model.name), root.interfaceRole); if (feedback) root.addMessage(Translation.tr("Model set to %1").arg(model.name), root.interfaceRole);
if (model.requires_key) { if (model.requires_key) {
// If key not there show advice // If key not there show advice
if (root.apiKeysLoaded && (!root.apiKeys[model.key_id] || root.apiKeys[model.key_id].length === 0)) { if (root.apiKeysLoaded && (!root.apiKeys[model.key_id] || root.apiKeys[model.key_id].length === 0)) {
@@ -398,13 +401,13 @@ Singleton {
} }
Persistent.states.ai.temperature = value; Persistent.states.ai.temperature = value;
root.temperature = value; root.temperature = value;
root.addMessage(StringUtils.format(Translation.tr("Temperature set to {0}"), value), Ai.interfaceRole); root.addMessage(Translation.tr("Temperature set to %1").arg(value), Ai.interfaceRole);
} }
function setApiKey(key) { function setApiKey(key) {
const model = models[currentModelId]; const model = models[currentModelId];
if (!model.requires_key) { if (!model.requires_key) {
root.addMessage(StringUtils.format(Translation.tr("{0} does not require an API key"), model.name), Ai.interfaceRole); root.addMessage(Translation.tr("%1 does not require an API key").arg(model.name), Ai.interfaceRole);
return; return;
} }
if (!key || key.length === 0) { if (!key || key.length === 0) {
@@ -413,7 +416,7 @@ Singleton {
return; return;
} }
KeyringStorage.setNestedField(["apiKeys", model.key_id], key.trim()); KeyringStorage.setNestedField(["apiKeys", model.key_id], key.trim());
root.addMessage(StringUtils.format(Translation.tr("API key set for {0}"), model.name, Ai.interfaceRole)); root.addMessage(Translation.tr("API key set for %1").arg(model.name), Ai.interfaceRole);
} }
function printApiKey() { function printApiKey() {
@@ -421,17 +424,17 @@ Singleton {
if (model.requires_key) { if (model.requires_key) {
const key = root.apiKeys[model.key_id]; const key = root.apiKeys[model.key_id];
if (key) { if (key) {
root.addMessage(StringUtils.format(Translation.tr("API key:\n\n```txt\n{0}\n```"), key), Ai.interfaceRole); root.addMessage(Translation.tr("API key:\n\n```txt\n%1\n```").arg(key), Ai.interfaceRole);
} else { } else {
root.addMessage(StringUtils.format(Translation.tr("No API key set for {0}"), model.name), Ai.interfaceRole); root.addMessage(Translation.tr("No API key set for %1").arg(model.name), Ai.interfaceRole);
} }
} else { } else {
root.addMessage(StringUtils.format(Translation.tr("{0} does not require an API key"), model.name), Ai.interfaceRole); root.addMessage(Translation.tr("%1 does not require an API key").arg(model.name), Ai.interfaceRole);
} }
} }
function printTemperature() { function printTemperature() {
root.addMessage(StringUtils.format(Translation.tr("Temperature: {0}"), root.temperature), Ai.interfaceRole); root.addMessage(Translation.tr("Temperature: %1").arg(root.temperature), Ai.interfaceRole);
} }
function clearMessages() { function clearMessages() {
@@ -799,7 +802,7 @@ Singleton {
const value = args.value; const value = args.value;
Config.setNestedValue(key, value); Config.setNestedValue(key, value);
} }
else root.addMessage(Translation.tr("Unknown function call: {0}"), "assistant"); else root.addMessage(Translation.tr("Unknown function call: %1").arg(name), "assistant");
} }
function chatToJson() { function chatToJson() {
@@ -27,7 +27,7 @@ Singleton {
return arr.concat([key, root.properties[key]]); return arr.concat([key, root.properties[key]]);
}, [] }, []
) )
property string keyringLabel: StringUtils.format(Translation.tr("{0} Safe Storage"), "illogical-impulse") property string keyringLabel: Translation.tr("%1 Safe Storage").arg("illogical-impulse")
function setNestedField(path, value) { function setNestedField(path, value) {
if (!root.keyringData) root.keyringData = {}; if (!root.keyringData) root.keyringData = {};
+25 -21
View File
@@ -4,8 +4,6 @@
"**Pricing**: free. Data used for training.\n\n**Instructions**: Log into Google account, allow AI Studio to create Google Cloud project or whatever it asks, go back and click Get API key": "**Pricing**: free. Data used for training.\n\n**Instructions**: Log into Google account, allow AI Studio to create Google Cloud project or whatever it asks, go back and click Get API key", "**Pricing**: free. Data used for training.\n\n**Instructions**: Log into Google account, allow AI Studio to create Google Cloud project or whatever it asks, go back and click Get API key": "**Pricing**: free. Data used for training.\n\n**Instructions**: Log into Google account, allow AI Studio to create Google Cloud project or whatever it asks, go back and click Get API key",
". Notes for Zerochan:\n- You must enter a color\n- Set your zerochan username in `sidebar.booru.zerochan.username` config option. You [might be banned for not doing so](https://www.zerochan.net/api#:~:text=The%20request%20may%20still%20be%20completed%20successfully%20without%20this%20custom%20header%2C%20but%20your%20project%20may%20be%20banned%20for%20being%20anonymous.)!": ". Notes for Zerochan:\n- You must enter a color\n- Set your zerochan username in `sidebar.booru.zerochan.username` config option. You [might be banned for not doing so](https://www.zerochan.net/api#:~:text=The%20request%20may%20still%20be%20completed%20successfully%20without%20this%20custom%20header%2C%20but%20your%20project%20may%20be%20banned%20for%20being%20anonymous.)!", ". Notes for Zerochan:\n- You must enter a color\n- Set your zerochan username in `sidebar.booru.zerochan.username` config option. You [might be banned for not doing so](https://www.zerochan.net/api#:~:text=The%20request%20may%20still%20be%20completed%20successfully%20without%20this%20custom%20header%2C%20but%20your%20project%20may%20be%20banned%20for%20being%20anonymous.)!": ". Notes for Zerochan:\n- You must enter a color\n- Set your zerochan username in `sidebar.booru.zerochan.username` config option. You [might be banned for not doing so](https://www.zerochan.net/api#:~:text=The%20request%20may%20still%20be%20completed%20successfully%20without%20this%20custom%20header%2C%20but%20your%20project%20may%20be%20banned%20for%20being%20anonymous.)!",
"<i>No further instruction provided</i>": "<i>No further instruction provided</i>", "<i>No further instruction provided</i>": "<i>No further instruction provided</i>",
"API key set for {0}": "API key set for {0}",
"API key:\n\n```txt\n{0}\n```": "API key:\n\n```txt\n{0}\n```",
"Action": "Action", "Action": "Action",
"Add": "Add", "Add": "Add",
"Add task": "Add task", "Add task": "Add task",
@@ -35,8 +33,6 @@
"Closes right sidebar on press": "Closes right sidebar on press", "Closes right sidebar on press": "Closes right sidebar on press",
"Copy": "Copy", "Copy": "Copy",
"Copy code": "Copy code", "Copy code": "Copy code",
"Current API endpoint: {0}\nSet it with {1}mode PROVIDER": "Current API endpoint: {0}\nSet it with {1}mode PROVIDER",
"Current model: {0}\nSet it with {1}model MODEL": "Current model: {0}\nSet it with {1}model MODEL",
"Decrease brightness": "Decrease brightness", "Decrease brightness": "Decrease brightness",
"Delete": "Delete", "Delete": "Delete",
"Desktop": "Desktop", "Desktop": "Desktop",
@@ -51,7 +47,6 @@
"For storing API keys and other sensitive information": "For storing API keys and other sensitive information", "For storing API keys and other sensitive information": "For storing API keys and other sensitive information",
"Game mode": "Game mode", "Game mode": "Game mode",
"Get the next page of results": "Get the next page of results", "Get the next page of results": "Get the next page of results",
"Go to source ({0})": "Go to source ({0})",
"Hibernate": "Hibernate", "Hibernate": "Hibernate",
"Hides brightness OSD on press": "Hides brightness OSD on press", "Hides brightness OSD on press": "Hides brightness OSD on press",
"Hides volume OSD on press": "Hides volume OSD on press", "Hides volume OSD on press": "Hides volume OSD on press",
@@ -66,13 +61,11 @@
"Large images | God tier quality, no NSFW.": "Large images | God tier quality, no NSFW.", "Large images | God tier quality, no NSFW.": "Large images | God tier quality, no NSFW.",
"Large language models": "Large language models", "Large language models": "Large language models",
"Launch": "Launch", "Launch": "Launch",
"Local Ollama model | {0}": "Local Ollama model | {0}",
"Lock": "Lock", "Lock": "Lock",
"Logout": "Logout", "Logout": "Logout",
"Markdown test": "Markdown test", "Markdown test": "Markdown test",
"Math result": "Math result", "Math result": "Math result",
"Night Light": "Night Light", "Night Light": "Night Light",
"No API key set for {0}": "No API key set for {0}",
"No audio source": "No audio source", "No audio source": "No audio source",
"No media": "No media", "No media": "No media",
"No notifications": "No notifications", "No notifications": "No notifications",
@@ -88,7 +81,6 @@
"Opens right sidebar on press": "Opens right sidebar on press", "Opens right sidebar on press": "Opens right sidebar on press",
"Opens session screen on press": "Opens session screen on press", "Opens session screen on press": "Opens session screen on press",
"Output": "Output", "Output": "Output",
"Page {0}": "Page {0}",
"Reboot": "Reboot", "Reboot": "Reboot",
"Reboot to firmware settings": "Reboot to firmware settings", "Reboot to firmware settings": "Reboot to firmware settings",
"Reload Hyprland & Quickshell": "Reload Hyprland & Quickshell", "Reload Hyprland & Quickshell": "Reload Hyprland & Quickshell",
@@ -111,8 +103,6 @@
"Task Manager": "Task Manager", "Task Manager": "Task Manager",
"Task description": "Task description", "Task description": "Task description",
"Temperature must be between 0 and 2": "Temperature must be between 0 and 2", "Temperature must be between 0 and 2": "Temperature must be between 0 and 2",
"Temperature set to {0}": "Temperature set to {0}",
"Temperature: {0}": "Temperature: {0}",
"The hentai one | Great quantity, a lot of NSFW, quality varies wildly": "The hentai one | Great quantity, a lot of NSFW, quality varies wildly", "The hentai one | Great quantity, a lot of NSFW, quality varies wildly": "The hentai one | Great quantity, a lot of NSFW, quality varies wildly",
"The popular one | Best quantity, but quality can vary wildly": "The popular one | Best quantity, but quality can vary wildly", "The popular one | Best quantity, but quality can vary wildly": "The popular one | Best quantity, but quality can vary wildly",
"Thinking": "Thinking", "Thinking": "Thinking",
@@ -136,18 +126,12 @@
"Unknown Album": "Unknown Album", "Unknown Album": "Unknown Album",
"Unknown Artist": "Unknown Artist", "Unknown Artist": "Unknown Artist",
"Unknown Title": "Unknown Title", "Unknown Title": "Unknown Title",
"Unknown function call: {0}": "Unknown function call: {0}",
"Uptime: {0}": "Uptime: {0}",
"View Markdown source": "View Markdown source", "View Markdown source": "View Markdown source",
"Volume": "Volume", "Volume": "Volume",
"Volume mixer": "Volume mixer", "Volume mixer": "Volume mixer",
"Waifus only | Excellent quality, limited quantity": "Waifus only | Excellent quality, limited quantity", "Waifus only | Excellent quality, limited quantity": "Waifus only | Excellent quality, limited quantity",
"Waiting for response...": "Waiting for response...", "Waiting for response...": "Waiting for response...",
"Workspace": "Workspace", "Workspace": "Workspace",
"{0} Safe Storage": "{0} Safe Storage",
"{0} does not require an API key": "{0} does not require an API key",
"{0} queries pending": "{0} queries pending",
"{0} | Right-click to configure": "{0} | Right-click to configure",
"Set with /mode PROVIDER": "Set with /mode PROVIDER", "Set with /mode PROVIDER": "Set with /mode PROVIDER",
"Invalid API provider. Supported: \n-": "Invalid API provider. Supported: \n-", "Invalid API provider. Supported: \n-": "Invalid API provider. Supported: \n-",
"Unknown command:": "Unknown command:", "Unknown command:": "Unknown command:",
@@ -157,14 +141,10 @@
"Provider set to": "Provider set to", "Provider set to": "Provider set to",
"Invalid model. Supported: \n```": "Invalid model. Supported: \n```", "Invalid model. Supported: \n```": "Invalid model. Supported: \n```",
"Interrupts possibility of overview being toggled on release.": "Interrupts possibility of overview being toggled on release.", "Interrupts possibility of overview being toggled on release.": "Interrupts possibility of overview being toggled on release.",
"Enter tags, or \"{0}\" for commands": "Enter tags, or \"{0}\" for commands",
"That didn't work. Tips:\n- Check your tags and NSFW settings\n- If you don't have a tag in mind, type a page number": "That didn't work. Tips:\n- Check your tags and NSFW settings\n- If you don't have a tag in mind, type a page number", "That didn't work. Tips:\n- Check your tags and NSFW settings\n- If you don't have a tag in mind, type a page number": "That didn't work. Tips:\n- Check your tags and NSFW settings\n- If you don't have a tag in mind, type a page number",
"Online | Google's model\nGives up-to-date information with search.": "Online | Google's model\nGives up-to-date information with search.", "Online | Google's model\nGives up-to-date information with search.": "Online | Google's model\nGives up-to-date information with search.",
"Online via {0} | {1}'s model": "Online via {0} | {1}'s model",
"Switched to search mode. Continue with the user's request.": "Switched to search mode. Continue with the user's request.", "Switched to search mode. Continue with the user's request.": "Switched to search mode. Continue with the user's request.",
"Experimental | Online | Google's model\nCan do a little more but doesn't search quickly": "Experimental | Online | Google's model\nCan do a little more but doesn't search quickly", "Experimental | Online | Google's model\nCan do a little more but doesn't search quickly": "Experimental | Online | Google's model\nCan do a little more but doesn't search quickly",
"Message the model... \"{0}\" for commands": "Message the model... \"{0}\" for commands",
"To set an API key, pass it with the command\n\nTo view the key, pass \"get\" with the command<br/>\n\n### For {0}:\n\n**Link**: {1}\n\n{2}": "To set an API key, pass it with the command\n\nTo view the key, pass \"get\" with the command<br/>\n\n### For {0}:\n\n**Link**: {1}\n\n{2}",
"Settings": "Settings", "Settings": "Settings",
"Save chat": "Save chat", "Save chat": "Save chat",
"Load chat": "Load chat", "Load chat": "Load chat",
@@ -302,5 +282,29 @@
"Qt apps": "Qt apps", "Qt apps": "Qt apps",
"Report a Bug": "Report a Bug", "Report a Bug": "Report a Bug",
"Issues": "Issues", "Issues": "Issues",
"Drag or click a region • LMB: Copy • RMB: Edit": "Drag or click a region • LMB: Copy • RMB: Edit" "Drag or click a region • LMB: Copy • RMB: Edit": "Drag or click a region • LMB: Copy • RMB: Edit",
"Current model: %1\nSet it with %2model MODEL": "Current model: %1\nSet it with %2model MODEL",
"Message the model... \"%1\" for commands": "Message the model... \"%1\" for commands",
"No API key set for %1": "No API key set for %1",
"Loaded the following system prompt\n\n---\n\n%1": "Loaded the following system prompt\n\n---\n\n%1",
"%1 | Right-click to configure": "%1 | Right-click to configure",
"API key set for %1": "API key set for %1",
"Online models disallowed for %1\n\nControlled by `policies.ai` config option": "Online models disallowed for %1\n\nControlled by `policies.ai` config option",
"Online via %1 | %2's model": "Online via %1 | %2's model",
"Current API endpoint: %1\nSet it with %2mode PROVIDER": "Current API endpoint: %1\nSet it with %2mode PROVIDER",
"Go to source (%1)": "Go to source (%1)",
"Temperature set to %1": "Temperature set to %1",
"To set an API key, pass it with the command\n\nTo view the key, pass \"get\" with the command<br/>\n\n### For %1:\n\n**Link**: %2\n\n%3": "To set an API key, pass it with the command\n\nTo view the key, pass \"get\" with the command<br/>\n\n### For %1:\n\n**Link**: %2\n\n%3",
"Enter tags, or \"%1\" for commands": "Enter tags, or \"%1\" for commands",
"%1 queries pending": "%1 queries pending",
"API key:\n\n```txt\n%1\n```": "API key:\n\n```txt\n%1\n```",
"Uptime: %1": "Uptime: %1",
"%1 Safe Storage": "%1 Safe Storage",
"%1 does not require an API key": "%1 does not require an API key",
"Temperature: %1": "Temperature: %1",
"Model set to %1": "Model set to %1",
"Page %1": "Page %1",
"Local Ollama model | %1": "Local Ollama model | %1",
"The current system prompt is\n\n---\n\n%1": "The current system prompt is\n\n---\n\n%1",
"Unknown function call: %1": "Unknown function call: %1"
} }
+25 -21
View File
@@ -4,8 +4,8 @@
"**Pricing**: free. Data use policy varies depending on your OpenRouter account settings.\n\n**Instructions**: Log into OpenRouter account, go to Keys on the topright menu, click Create API Key": "**价格**:免费。数据使用政策取决于您的 OpenRouter 账户设置。\n\n**说明**:登录 OpenRouter 账户,在右上角菜单中选择 Keys,点击创建 API 密钥", "**Pricing**: free. Data use policy varies depending on your OpenRouter account settings.\n\n**Instructions**: Log into OpenRouter account, go to Keys on the topright menu, click Create API Key": "**价格**:免费。数据使用政策取决于您的 OpenRouter 账户设置。\n\n**说明**:登录 OpenRouter 账户,在右上角菜单中选择 Keys,点击创建 API 密钥",
". Notes for Zerochan:\n- You must enter a color\n- Set your zerochan username in `sidebar.booru.zerochan.username` config option. You [might be banned for not doing so](https://www.zerochan.net/api#:~:text=The%20request%20may%20still%20be%20completed%20successfully%20without%20this%20custom%20header%2C%20but%20your%20project%20may%20be%20banned%20for%20being%20anonymous.)!": ". Notes for Zerochan:\n- You must enter a color\n- Set your zerochan username in `sidebar.booru.zerochan.username` config option. You [might be banned for not doing so](https://www.zerochan.net/api#:~:text=The%20request%20may%20still%20be%20completed%20successfully%20without%20this%20custom%20header%2C%20but%20your%20project%20may%20be%20banned%20for%20being%20anonymous.)!", ". Notes for Zerochan:\n- You must enter a color\n- Set your zerochan username in `sidebar.booru.zerochan.username` config option. You [might be banned for not doing so](https://www.zerochan.net/api#:~:text=The%20request%20may%20still%20be%20completed%20successfully%20without%20this%20custom%20header%2C%20but%20your%20project%20may%20be%20banned%20for%20being%20anonymous.)!": ". Notes for Zerochan:\n- You must enter a color\n- Set your zerochan username in `sidebar.booru.zerochan.username` config option. You [might be banned for not doing so](https://www.zerochan.net/api#:~:text=The%20request%20may%20still%20be%20completed%20successfully%20without%20this%20custom%20header%2C%20but%20your%20project%20may%20be%20banned%20for%20being%20anonymous.)!",
"<i>No further instruction provided</i>": "<i>未提供进一步说明</i>", "<i>No further instruction provided</i>": "<i>未提供进一步说明</i>",
"API key set for {0}": "已为 {0} 设置 API 密钥", "API key set for %1": "已为 %1 设置 API 密钥",
"API key:\n\n```txt\n{0}\n```": "API 密钥:\n\n```txt\n{0}\n```", "API key:\n\n```txt\n%1\n```": "API 密钥:\n\n```txt\n%1\n```",
"Action": "操作", "Action": "操作",
"Add": "添加", "Add": "添加",
"Add task": "添加任务", "Add task": "添加任务",
@@ -35,8 +35,7 @@
"Closes right sidebar on press": "按下时关闭右侧边栏", "Closes right sidebar on press": "按下时关闭右侧边栏",
"Copy": "复制", "Copy": "复制",
"Copy code": "复制代码", "Copy code": "复制代码",
"Current API endpoint: {0}\nSet it with {1}mode PROVIDER": "当前 API 端点:{0}\n使用 {1}mode PROVIDER 设置", "Current API endpoint: %1\nSet it with %2mode PROVIDER": "当前 API 端点:%1\n使用 %2mode PROVIDER 设置",
"Current model: {0}\nSet it with {1}model MODEL": "当前模型:{0}\n使用 {1}model MODEL 设置",
"Decrease brightness": "降低亮度", "Decrease brightness": "降低亮度",
"Delete": "删除", "Delete": "删除",
"Desktop": "桌面", "Desktop": "桌面",
@@ -51,7 +50,7 @@
"For storing API keys and other sensitive information": "用于存储 API 密钥和其他敏感信息", "For storing API keys and other sensitive information": "用于存储 API 密钥和其他敏感信息",
"Game mode": "游戏模式", "Game mode": "游戏模式",
"Get the next page of results": "获取下一页结果", "Get the next page of results": "获取下一页结果",
"Go to source ({0})": "转到源 ({0})", "Go to source (%1)": "转到源 (%1)",
"Hibernate": "休眠", "Hibernate": "休眠",
"Hides brightness OSD on press": "按下时隐藏亮度显示", "Hides brightness OSD on press": "按下时隐藏亮度显示",
"Hides volume OSD on press": "按下时隐藏音量显示", "Hides volume OSD on press": "按下时隐藏音量显示",
@@ -66,13 +65,13 @@
"Large images | God tier quality, no NSFW.": "大尺寸图片 | 顶级质量,无 NSFW", "Large images | God tier quality, no NSFW.": "大尺寸图片 | 顶级质量,无 NSFW",
"Large language models": "大语言模型", "Large language models": "大语言模型",
"Launch": "启动", "Launch": "启动",
"Local Ollama model | {0}": "本地 Ollama 模型 | {0}", "Local Ollama model | %1": "本地 Ollama 模型 | %1",
"Lock": "锁定", "Lock": "锁定",
"Logout": "注销", "Logout": "注销",
"Markdown test": "Markdown 测试", "Markdown test": "Markdown 测试",
"Math result": "数学结果", "Math result": "数学结果",
"Night Light": "护眼模式", "Night Light": "护眼模式",
"No API key set for {0}": "未为 {0} 设置 API 密钥", "No API key set for %1": "未为 %1 设置 API 密钥",
"No audio source": "无音频源", "No audio source": "无音频源",
"No media": "无媒体", "No media": "无媒体",
"No notifications": "无通知", "No notifications": "无通知",
@@ -88,7 +87,7 @@
"Opens right sidebar on press": "按下时打开右侧边栏", "Opens right sidebar on press": "按下时打开右侧边栏",
"Opens session screen on press": "按下时打开会话屏幕", "Opens session screen on press": "按下时打开会话屏幕",
"Output": "输出", "Output": "输出",
"Page {0}": "第 {0} 页", "Page %1": "第 %1 页",
"Reboot": "重启", "Reboot": "重启",
"Reboot to firmware settings": "重启到固件设置", "Reboot to firmware settings": "重启到固件设置",
"Reload Hyprland & Quickshell": "重新加载 Hyprland 和 Quickshell", "Reload Hyprland & Quickshell": "重新加载 Hyprland 和 Quickshell",
@@ -111,8 +110,8 @@
"Task Manager": "任务管理器", "Task Manager": "任务管理器",
"Task description": "任务描述", "Task description": "任务描述",
"Temperature must be between 0 and 2": "温度必须在 0 到 2 之间", "Temperature must be between 0 and 2": "温度必须在 0 到 2 之间",
"Temperature set to {0}": "温度设置为 {0}", "Temperature set to %1": "温度设置为 %1",
"Temperature: {0}": "温度:{0}", "Temperature: %1": "温度:%1",
"The hentai one | Great quantity, a lot of NSFW, quality varies wildly": "成人向 | 数量巨大,大量 NSFW,质量参差不齐", "The hentai one | Great quantity, a lot of NSFW, quality varies wildly": "成人向 | 数量巨大,大量 NSFW,质量参差不齐",
"The popular one | Best quantity, but quality can vary wildly": "最受欢迎 | 数量最多,但质量参差不齐", "The popular one | Best quantity, but quality can vary wildly": "最受欢迎 | 数量最多,但质量参差不齐",
"Thinking": "思考中", "Thinking": "思考中",
@@ -136,18 +135,18 @@
"Unknown Album": "未知专辑", "Unknown Album": "未知专辑",
"Unknown Artist": "未知艺术家", "Unknown Artist": "未知艺术家",
"Unknown Title": "未知标题", "Unknown Title": "未知标题",
"Unknown function call: {0}": "未知函数调用:{0}", "Unknown function call: %1": "未知函数调用:%1",
"Uptime: {0}": "运行时间:{0}", "Uptime: %1": "运行时间:%1",
"View Markdown source": "查看 Markdown 源码", "View Markdown source": "查看 Markdown 源码",
"Volume": "音量", "Volume": "音量",
"Volume mixer": "音量混合器", "Volume mixer": "音量混合器",
"Waifus only | Excellent quality, limited quantity": "仅限角色 | 优秀质量,数量有限", "Waifus only | Excellent quality, limited quantity": "仅限角色 | 优秀质量,数量有限",
"Waiting for response...": "等待响应...", "Waiting for response...": "等待响应...",
"Workspace": "工作区", "Workspace": "工作区",
"{0} Safe Storage": "{0} 安全存储", "%1 Safe Storage": "%1 安全存储",
"{0} does not require an API key": "{0} 不需要 API 密钥", "%1 does not require an API key": "%1 不需要 API 密钥",
"{0} queries pending": "{0} 个查询等待中", "%1 queries pending": "%1 个查询等待中",
"{0} | Right-click to configure": "{0} | 右键点击进行配置", "%1 | Right-click to configure": "%1 | 右键点击进行配置",
"Set with /mode PROVIDER": "使用 /mode PROVIDER 设置", "Set with /mode PROVIDER": "使用 /mode PROVIDER 设置",
"Invalid API provider. Supported: \n-": "无效的 API 提供商。支持的:\n-", "Invalid API provider. Supported: \n-": "无效的 API 提供商。支持的:\n-",
"Unknown command:": "未知命令:", "Unknown command:": "未知命令:",
@@ -158,11 +157,10 @@
"Invalid model. Supported: \n```": "无效模型。支持的:\n```", "Invalid model. Supported: \n```": "无效模型。支持的:\n```",
"Interrupts possibility of overview being toggled on release.": "中断松开时切换概览的可能性。", "Interrupts possibility of overview being toggled on release.": "中断松开时切换概览的可能性。",
"Switched to search mode. Continue with the user's request.": "已切换到搜索模式。继续处理用户请求。", "Switched to search mode. Continue with the user's request.": "已切换到搜索模式。继续处理用户请求。",
"Message the model... \"{0}\" for commands": "与模型对话... \"{0}\" 查看命令",
"Experimental | Online | Google's model\nCan do a little more but doesn't search quickly": "实验性 | 在线 | Google 模型\n功能更多但搜索速度较慢", "Experimental | Online | Google's model\nCan do a little more but doesn't search quickly": "实验性 | 在线 | Google 模型\n功能更多但搜索速度较慢",
"To set an API key, pass it with the command\n\nTo view the key, pass \"get\" with the command<br/>\n\n### For {0}:\n\n**Link**: {1}\n\n{2}": "要设置 API 密钥,请将其与命令一起传递\n\n要查看密钥,请将 \"get\" 与命令一起传递<br/>\n\n### 对于 {0}\n\n**链接**{1}\n\n{2}", "To set an API key, pass it with the command\n\nTo view the key, pass \"get\" with the command<br/>\n\n### For %1:\n\n**Link**: %2\n\n%3": "要设置 API 密钥,请将其与命令一起传递\n\n要查看密钥,请将 \"get\" 与命令一起传递<br/>\n\n### 对于 %1\n\n**链接**%2\n\n%3",
"Enter tags, or \"{0}\" for commands": "输入标签,或 \"{0}\" 查看命令", "Enter tags, or \"%1\" for commands": "输入标签,或 \"%1\" 查看命令",
"Online via {0} | {1}'s model": "通过 {0} 在线 | {1} 的模型", "Online via %1 | %2's model": "通过 %1 在线 | %2 的模型",
"That didn't work. Tips:\n- Check your tags and NSFW settings\n- If you don't have a tag in mind, type a page number": "没有找到结果。提示:\n- 检查您的标签和 NSFW 设置\n- 如果没有想到标签,请输入页码", "That didn't work. Tips:\n- Check your tags and NSFW settings\n- If you don't have a tag in mind, type a page number": "没有找到结果。提示:\n- 检查您的标签和 NSFW 设置\n- 如果没有想到标签,请输入页码",
"Online | Google's model\nGives up-to-date information with search.": "在线 | Google 模型\n通过搜索提供最新信息。", "Online | Google's model\nGives up-to-date information with search.": "在线 | Google 模型\n通过搜索提供最新信息。",
"Settings": "设置", "Settings": "设置",
@@ -302,5 +300,11 @@
"Qt apps": "Qt 应用", "Qt apps": "Qt 应用",
"Report a Bug": "报告问题", "Report a Bug": "报告问题",
"Issues": "问题追踪", "Issues": "问题追踪",
"Drag or click a region • LMB: Copy • RMB: Edit": "拖动或点击一个区域 • 鼠标左键:复制 • 鼠标右键:编辑" "Drag or click a region • LMB: Copy • RMB: Edit": "拖动或点击一个区域 • 鼠标左键:复制 • 鼠标右键:编辑",
"Current model: %1\nSet it with %2model MODEL": "当前模型:%1\n使用 %2model MODEL 设置",
"Message the model... \"%1\" for commands": "与模型对话... \"%1\" 查看命令",
"The current system prompt is\n\n---\n\n%1": "The current system prompt is\n\n---\n\n%1",
"Model set to %1": "Model set to %1",
"Online models disallowed for %1\n\nControlled by `policies.ai` config option": "Online models disallowed for %1\n\nControlled by `policies.ai` config option",
"Loaded the following system prompt\n\n---\n\n%1": "Loaded the following system prompt\n\n---\n\n%1"
} }