diff --git a/.config/ags/i18n/locales/Default.json b/.config/ags/i18n/locales/Default.json index 6ead42ca1..a17750df6 100755 --- a/.config/ags/i18n/locales/Default.json +++ b/.config/ags/i18n/locales/Default.json @@ -1,6 +1,5 @@ { "No media": "No media", - "Assistant": "Assistant", "Powered by Google": "Powered by Google", "Uses gemini-pro.\nNot affiliated, endorsed, or sponsored by Google.\n\nPrivacy: Chat messages aren't linked to your account,\n but will be read by human reviewers to improve the model.": "Uses gemini-pro.\nNot affiliated, endorsed, or sponsored by Google.\n\nPrivacy: Chat messages aren't linked to your account,\n but will be read by human reviewers to improve the model.", "Precise": "Precise", @@ -228,5 +227,15 @@ "Toggle fallback launcher: anyrun": "Toggle fallback launcher: anyrun", "Toggle fallback launcher: fuzzel": "Toggle fallback launcher: fuzzel", "Initialization complete!": "Initialization complete!", - "Not found": "Not found:" + "Not found": "Not found:", + "Calling API": "Calling API", + "Downloading image": "Downloading image", + "Finished!": "Finished!", + "Error": "Error", + "Not found!": "Not found!", + "Go to file url": "Go to file url", + "Save image": "Save image", + "Hoard": "Hoard", + "Open externally": "Open externally", + "You are an assistant on a sidebar of a Wayland Linux desktop. Please always use a casual tone when answering your questions, unless requested otherwise or making writing suggestions. These are the steps you should take to respond to the user's queries:\n1. If it's a writing- or grammar-related question or a sentence in quotation marks, Please point out errors and correct when necessary using underlines, and make the writing more natural where appropriate without making too major changes. If you're given a sentence in quotes but is grammatically correct, explain briefly concepts that are uncommon.\n2. If it's a question about system tasks, give a bash command in a code block with brief explanation.\n3. Otherwise, when asked to summarize information or explaining concepts, you are should use bullet points and headings. For mathematics expressions, you *have to* use LaTeX within a code block with the language set as \"latex\". \nNote: Use casual language, be short, while ensuring the factual correctness of your response. If you are unsure or don’t have enough information to provide a confident answer, simply say “I don’t know” or “I’m not sure.”. \nThanks!": "You are an assistant on a sidebar of a Wayland Linux desktop. Please always use a casual tone when answering your questions, unless requested otherwise or making writing suggestions. These are the steps you should take to respond to the user's queries:\n1. If it's a writing- or grammar-related question or a sentence in quotation marks, Please point out errors and correct when necessary using underlines, and make the writing more natural where appropriate without making too major changes. If you're given a sentence in quotes but is grammatically correct, explain briefly concepts that are uncommon.\n2. If it's a question about system tasks, give a bash command in a code block with brief explanation.\n3. Otherwise, when asked to summarize information or explaining concepts, you are should use bullet points and headings. For mathematics expressions, you *have to* use LaTeX within a code block with the language set as \"latex\". \nNote: Use casual language, be short, while ensuring the factual correctness of your response. If you are unsure or don’t have enough information to provide a confident answer, simply say “I don’t know” or “I’m not sure.”. \nThanks!" } \ No newline at end of file diff --git a/.config/ags/i18n/locales/zh_CN.json b/.config/ags/i18n/locales/zh_CN.json index da37402b7..d686b1333 100755 --- a/.config/ags/i18n/locales/zh_CN.json +++ b/.config/ags/i18n/locales/zh_CN.json @@ -1,6 +1,5 @@ { "No media": "无媒体活动", - "Assistant": "助手", "Powered by Google": "由 Google 提供技术支持", "Uses gemini-pro.\nNot affiliated, endorsed, or sponsored by Google.\n\nPrivacy: Chat messages aren't linked to your account,\n but will be read by human reviewers to improve the model.": "使用 Gemini Pro\n不隶属于、不受 Google 赞助或支持。\n\n隐私:聊天信息不会与你的账户关联,\n但会被人类审阅者阅读,用于改进模型。", "Precise": "精确", @@ -35,8 +34,8 @@ "Anime booru": "动漫图库", "Powered by yande.re and konachan": "由 yande.re 和 konachan 提供支持", "An image booru. May contain NSFW content.\nWatch your back.\n\nDisclaimer: Not affiliated with the provider\nnor responsible for any of its content.": "一个图片图库。可能包含 NSFW 内容。\n小心。\n\n免责声明:与提供商无关联\n也不对它的任何内容负责。", - "Lewds": "色情内容", - "Shows naughty stuff when enabled.\nYa like those? Add this to user_options.js:\n\t'sidebar': {\n\t'image': {\n\t\t'allowNsfw': true,\n\t}\n}": "启用时显示色情内容。\n你喜欢这些?添加到 user_options.js 中:\n'sidebar': {\n\t'image': {\n\t\t'allowNsfw': true,\n\t}\n}", + "Lewds": "不雅内容", + "Shows naughty stuff when enabled.\nYa like those? Add this to user_options.js:\n\t'sidebar': {\n\t'image': {\n\t\t'allowNsfw': true,\n\t}\n}": "启用时显示不雅内容。\n你喜欢这些?添加到 user_options.js 中:\n'sidebar': {\n\t'image': {\n\t\t'allowNsfw': true,\n\t}\n}", "Save in folder by tags": "按标签保存到文件夹", "Saves images in folders by their tags": "按标签将图片保存到文件夹中", "Message Gemini...": "向 Gemini 发送消息...", @@ -228,5 +227,15 @@ "Toggle fallback launcher: anyrun": "切换备用启动器:anyrun", "Toggle fallback launcher: fuzzel": "切换备用启动器:fuzzel", "Initialization complete!": "初始化完成!", - "Not found": "未找到" + "Not found": "未找到", + "Calling API": "调用 API", + "Downloading image": "正在下载图片", + "Finished!": "完成!", + "Error": "错误", + "Not found!": "未找到!", + "Go to file url": "前往文件链接", + "Save image": "保存图片", + "Hoard": "保存", + "Open externally": "在外部打开", + "You are an assistant on a sidebar of a Wayland Linux desktop. Please always use a casual tone when answering your questions, unless requested otherwise or making writing suggestions. These are the steps you should take to respond to the user's queries:\n1. If it's a writing- or grammar-related question or a sentence in quotation marks, Please point out errors and correct when necessary using underlines, and make the writing more natural where appropriate without making too major changes. If you're given a sentence in quotes but is grammatically correct, explain briefly concepts that are uncommon.\n2. If it's a question about system tasks, give a bash command in a code block with brief explanation.\n3. Otherwise, when asked to summarize information or explaining concepts, you are should use bullet points and headings. For mathematics expressions, you *have to* use LaTeX within a code block with the language set as \"latex\". \nNote: Use casual language, be short, while ensuring the factual correctness of your response. If you are unsure or don’t have enough information to provide a confident answer, simply say “I don’t know” or “I’m not sure.”. \nThanks!": "你是 Wayland Linux 桌面侧边栏上的助手。除非有其他要求或提供建议,否则请始终保持轻松的语气回答问题。这是你回答用户查询的步骤:\n1. 如果是写作或语法相关的问题,或者引号中的句子,请指出错误并在必要时进行更正,使用下划线,并在适当的地方使写作更自然,不要进行太大更改。如果你给出的句子在引号中但语法正确,请简要解释不常见概念。\n2. 如果是关于系统任务的问题,请给出bash命令,并在代码块中简要说明。\n3. 否则,在总结信息或解释概念时,你应该使用项目符号和标题。对于数学表达式,你必须在代码块中使用 LaTeX,并将语言设置为\"latex\"。\n注意:使用轻松的语言,简洁,同时确保回答的事实正确性。如果你不确定或没有足够的信息来提供自信的答案,只需说“我不知道”或“我不确定”。\n谢谢!" } \ No newline at end of file diff --git a/.config/ags/modules/.commonwidgets/notification.js b/.config/ags/modules/.commonwidgets/notification.js index c00b2a375..85ee86bad 100644 --- a/.config/ags/modules/.commonwidgets/notification.js +++ b/.config/ags/modules/.commonwidgets/notification.js @@ -6,7 +6,6 @@ const { Box, EventBox, Icon, Overlay, Label, Button, Revealer } = Widget; import { MaterialIcon } from './materialicon.js'; import { setupCursorHover } from "../.widgetutils/cursorhover.js"; import { AnimatedCircProg } from "./cairo_circularprogress.js"; -import { getString } from '../../i18n/i18n.js'; function guessMessageType(summary) { const str = summary.toLowerCase(); diff --git a/.config/ags/modules/.configuration/user_options.js b/.config/ags/modules/.configuration/user_options.js index 46fe3abbe..c7c19eafa 100644 --- a/.config/ags/modules/.configuration/user_options.js +++ b/.config/ags/modules/.configuration/user_options.js @@ -70,8 +70,8 @@ let configOptions = { }, }, 'i18n': { - 'langCode': "",//Customize the locale, such as zh_CN - 'Extra_logs': true + 'langCode': "",//Customize the locale, such as zh_CN,Optional value references "~/.config/ags/i18n/locales/" + 'extraLogs': false }, 'monitors': { 'scaleMethod': "division", // Either "division" [default] or "gdk" diff --git a/.config/ags/modules/bar/normal/system.js b/.config/ags/modules/bar/normal/system.js index 804783fca..6e4907eb2 100644 --- a/.config/ags/modules/bar/normal/system.js +++ b/.config/ags/modules/bar/normal/system.js @@ -8,7 +8,6 @@ import Battery from 'resource:///com/github/Aylur/ags/service/battery.js'; import { MaterialIcon } from '../../.commonwidgets/materialicon.js'; import { AnimatedCircProg } from "../../.commonwidgets/cairo_circularprogress.js"; import { WWO_CODE, WEATHER_SYMBOL, NIGHT_WEATHER_SYMBOL } from '../../.commondata/weather.js'; -import { getString } from '../../../i18n/i18n.js'; const WEATHER_CACHE_FOLDER = `${GLib.get_user_cache_dir()}/ags/weather`; Utils.exec(`mkdir -p ${WEATHER_CACHE_FOLDER}`); diff --git a/.config/ags/modules/sideleft/apis/booru.js b/.config/ags/modules/sideleft/apis/booru.js index 7f1e54807..564a625db 100644 --- a/.config/ags/modules/sideleft/apis/booru.js +++ b/.config/ags/modules/sideleft/apis/booru.js @@ -11,7 +11,6 @@ import BooruService from '../../../services/booru.js'; import { chatEntry } from '../apiwidgets.js'; import { ConfigToggle } from '../../.commonwidgets/configwidgets.js'; import { SystemMessage } from './ai_chatmessage.js'; -import { getString } from '../../../i18n/i18n.js'; const IMAGE_REVEAL_DELAY = 13; // Some wait for inits n other weird stuff const USER_CACHE_DIR = GLib.get_user_cache_dir(); @@ -213,17 +212,17 @@ const BooruPage = (taglist, serviceName = 'Booru') => { children: [ Box({ hexpand: true }), ImageAction({ - name: 'Go to file url', + name: getString('Go to file url'), icon: 'file_open', action: () => execAsync(['xdg-open', `${data.file_url}`]).catch(print), }), ImageAction({ - name: 'Go to source', + name: getString('Go to source'), icon: 'open_in_new', action: () => execAsync(['xdg-open', `${data.source}`]).catch(print), }), ImageAction({ - name: 'Save image', + name: getString('Save image'), icon: 'save', action: (self) => { const currentTags = BooruService.queries.at(-1).realTagList.filter(tag => !tag.includes('rating:')); @@ -259,10 +258,10 @@ const BooruPage = (taglist, serviceName = 'Booru') => { transition: 'slide_up_down', transitionDuration: userOptions.animations.durationSmall, children: { - 'api': PageState('api', 'Calling API'), - 'download': PageState('downloading', 'Downloading image'), - 'done': PageState('done', 'Finished!'), - 'error': PageState('error', 'Error'), + 'api': PageState('api', getString('Calling API')), + 'download': PageState('downloading', getString('Downloading image')), + 'done': PageState('done', getString('Finished!')), + 'error': PageState('error', getString('Error')), }, }); const downloadIndicator = MarginRevealer({ diff --git a/.config/ags/modules/sideleft/apis/chatgpt.js b/.config/ags/modules/sideleft/apis/chatgpt.js index 08c470c76..6bdc3828a 100644 --- a/.config/ags/modules/sideleft/apis/chatgpt.js +++ b/.config/ags/modules/sideleft/apis/chatgpt.js @@ -12,7 +12,6 @@ import { markdownTest } from '../../.miscutils/md2pango.js'; import { MarginRevealer } from '../../.widgethacks/advancedrevealers.js'; import { MaterialIcon } from '../../.commonwidgets/materialicon.js'; import { chatEntry } from '../apiwidgets.js'; -import { getString } from '../../../i18n/i18n.js'; export const chatGPTTabIcon = Icon({ hpack: 'center', @@ -122,7 +121,7 @@ const GPTInfo = () => { className: 'txt txt-title-small sidebar-chat-welcome-txt', wrap: true, justify: Gtk.Justification.CENTER, - label: `${getString("Assistant")} (GPTs)`, + label: `Assistant (GPTs)`, }), Box({ className: 'spacing-h-5', diff --git a/.config/ags/modules/sideleft/apis/gemini.js b/.config/ags/modules/sideleft/apis/gemini.js index 511daf8ca..2f7de59b6 100644 --- a/.config/ags/modules/sideleft/apis/gemini.js +++ b/.config/ags/modules/sideleft/apis/gemini.js @@ -11,7 +11,6 @@ import { ConfigToggle, ConfigSegmentedSelection, ConfigGap } from '../../.common import { markdownTest } from '../../.miscutils/md2pango.js'; import { MarginRevealer } from '../../.widgethacks/advancedrevealers.js'; import { chatEntry } from '../apiwidgets.js'; -import { getString } from '../../../i18n/i18n.js'; const MODEL_NAME = `Gemini`; @@ -35,7 +34,7 @@ const GeminiInfo = () => { className: 'txt txt-title-small sidebar-chat-welcome-txt', wrap: true, justify: Gtk.Justification.CENTER, - label: `${getString('Assistant')} (Gemini)`, + label: `Assistant (Gemini)`, }), Box({ className: 'spacing-h-5', diff --git a/.config/ags/modules/sideleft/apis/waifu.js b/.config/ags/modules/sideleft/apis/waifu.js index 30ad244ac..89684d9a1 100644 --- a/.config/ags/modules/sideleft/apis/waifu.js +++ b/.config/ags/modules/sideleft/apis/waifu.js @@ -13,7 +13,6 @@ import { setupCursorHover, setupCursorHoverInfo } from '../../.widgetutils/curso import WaifuService from '../../../services/waifus.js'; import { darkMode } from '../../.miscutils/system.js'; import { chatEntry } from '../apiwidgets.js'; -import { getString } from '../../../i18n/i18n.js'; async function getImageViewerApp(preferredApp) { Utils.execAsync(['bash', '-c', `command -v ${preferredApp}`]) @@ -124,11 +123,11 @@ const WaifuImage = (taglist) => { transition: 'slide_up_down', transitionDuration: userOptions.animations.durationSmall, children: { - 'api': ImageState('api', 'Calling API'), - 'download': ImageState('downloading', 'Downloading image'), - 'done': ImageState('done', 'Finished!'), - 'error': ImageState('error', 'Error'), - 'notfound': ImageState('error', 'Not found!'), + 'api': ImageState('api', getString('Calling API')), + 'download': ImageState('downloading', getString('Downloading image')), + 'done': ImageState('done', getString('Finished!')), + 'error': ImageState('error', getString('Error')), + 'notfound': ImageState('error', getString('Not found!')), }, }); const downloadIndicator = MarginRevealer({ @@ -157,12 +156,12 @@ const WaifuImage = (taglist) => { children: [ Box({ hexpand: true }), ImageAction({ - name: 'Go to source', + name: getString('Go to source'), icon: 'link', action: () => execAsync(['xdg-open', `${thisBlock.attribute.imageData.source}`]).catch(print), }), ImageAction({ - name: 'Hoard', + name: getString('Hoard'), icon: 'save', action: (self) => { execAsync(['bash', '-c', `mkdir -p $(xdg-user-dir PICTURES)/homework${thisBlock.attribute.isNsfw ? '/🌶️' : ''} && cp ${thisBlock.attribute.imagePath} $(xdg-user-dir PICTURES)/homework${thisBlock.attribute.isNsfw ? '/🌶️/' : ''}`]) @@ -171,7 +170,7 @@ const WaifuImage = (taglist) => { }, }), ImageAction({ - name: 'Open externally', + name: getString('Open externally'), icon: 'open_in_new', action: () => execAsync([IMAGE_VIEWER_APP, `${thisBlock.attribute.imagePath}`]).catch(print), }), diff --git a/.config/ags/modules/sideleft/apiwidgets.js b/.config/ags/modules/sideleft/apiwidgets.js index b6b0deca1..14b335bb9 100644 --- a/.config/ags/modules/sideleft/apiwidgets.js +++ b/.config/ags/modules/sideleft/apiwidgets.js @@ -17,7 +17,6 @@ const TextView = Widget.subclass(Gtk.TextView, "AgsTextView"); import { widgetContent } from './sideleft.js'; import { IconTabContainer } from '../.commonwidgets/tabcontainer.js'; -import { getString } from '../../i18n/i18n.js'; const EXPAND_INPUT_THRESHOLD = 30; const APILIST = { diff --git a/.config/ags/modules/sideleft/tools/colorpicker.js b/.config/ags/modules/sideleft/tools/colorpicker.js index 31fd51f9a..b2fde2c16 100644 --- a/.config/ags/modules/sideleft/tools/colorpicker.js +++ b/.config/ags/modules/sideleft/tools/colorpicker.js @@ -12,7 +12,6 @@ import { setupCursorHover } from '../../.widgetutils/cursorhover.js'; import { ColorPickerSelection, hslToHex, hslToRgbValues, hexToHSL } from './color.js'; import { clamp } from '../../.miscutils/mathfuncs.js'; -import { getString } from '../../../i18n/i18n.js'; export default () => { const selectedColor = new ColorPickerSelection(); diff --git a/.config/ags/modules/sideleft/tools/name.js b/.config/ags/modules/sideleft/tools/name.js index 9da58aaa0..a5cca936e 100644 --- a/.config/ags/modules/sideleft/tools/name.js +++ b/.config/ags/modules/sideleft/tools/name.js @@ -3,7 +3,6 @@ import App from 'resource:///com/github/Aylur/ags/app.js'; import Widget from 'resource:///com/github/Aylur/ags/widget.js'; import * as Utils from 'resource:///com/github/Aylur/ags/utils.js'; import { setupCursorHover } from '../../.widgetutils/cursorhover.js'; -import { getString } from '../../../i18n/i18n.js'; const { execAsync, exec } = Utils; const { Box, Button, CenterBox, EventBox, Icon, Label, Scrollable } = Widget; diff --git a/.config/ags/modules/sideleft/tools/quickscripts.js b/.config/ags/modules/sideleft/tools/quickscripts.js index 161520748..e3ffafe62 100644 --- a/.config/ags/modules/sideleft/tools/quickscripts.js +++ b/.config/ags/modules/sideleft/tools/quickscripts.js @@ -9,7 +9,6 @@ import { MaterialIcon } from '../../.commonwidgets/materialicon.js'; import { setupCursorHover } from '../../.widgetutils/cursorhover.js'; import { distroID, isArchDistro, isDebianDistro, hasFlatpak } from '../../.miscutils/system.js'; -import { getString } from '../../../i18n/i18n.js'; const scripts = [ { diff --git a/.config/ags/modules/sideright/calendar.js b/.config/ags/modules/sideright/calendar.js index 2405616a2..b44090491 100644 --- a/.config/ags/modules/sideright/calendar.js +++ b/.config/ags/modules/sideright/calendar.js @@ -7,7 +7,6 @@ import { setupCursorHover } from '../.widgetutils/cursorhover.js'; import { TodoWidget } from "./todolist.js"; import { getCalendarLayout } from "./calendar_layout.js"; -import { getString } from '../../i18n/i18n.js'; let calendarJson = getCalendarLayout(undefined, true); let monthshift = 0; diff --git a/.config/ags/modules/sideright/centermodules/audiocontrols.js b/.config/ags/modules/sideright/centermodules/audiocontrols.js index 8a3c6702d..d992e1e27 100644 --- a/.config/ags/modules/sideright/centermodules/audiocontrols.js +++ b/.config/ags/modules/sideright/centermodules/audiocontrols.js @@ -5,7 +5,6 @@ const { Box, Button, Icon, Label, Revealer, Scrollable, Slider, Stack } = Widget import { MaterialIcon } from '../../.commonwidgets/materialicon.js'; import { setupCursorHover } from '../../.widgetutils/cursorhover.js'; import { iconExists } from '../../.miscutils/icons.js'; -import { getString } from '../../../i18n/i18n.js'; const AppVolume = (stream) => Box({ className: 'sidebar-volmixer-stream spacing-h-10', diff --git a/.config/ags/modules/sideright/centermodules/bluetooth.js b/.config/ags/modules/sideright/centermodules/bluetooth.js index b44260ef4..b0f410aa8 100644 --- a/.config/ags/modules/sideright/centermodules/bluetooth.js +++ b/.config/ags/modules/sideright/centermodules/bluetooth.js @@ -6,7 +6,6 @@ const { execAsync, exec } = Utils; import { MaterialIcon } from '../../.commonwidgets/materialicon.js'; import { setupCursorHover } from '../../.widgetutils/cursorhover.js'; import { ConfigToggle } from '../../.commonwidgets/configwidgets.js'; -import { getString } from '../../../i18n/i18n.js'; // can't connect: sync_problem diff --git a/.config/ags/modules/sideright/centermodules/configure.js b/.config/ags/modules/sideright/centermodules/configure.js index dde9b0383..f78608aa2 100644 --- a/.config/ags/modules/sideright/centermodules/configure.js +++ b/.config/ags/modules/sideright/centermodules/configure.js @@ -7,7 +7,6 @@ const { execAsync, exec } = Utils; import { MaterialIcon } from '../../.commonwidgets/materialicon.js'; import { setupCursorHover } from '../../.widgetutils/cursorhover.js'; import { ConfigGap, ConfigSpinButton, ConfigToggle } from '../../.commonwidgets/configwidgets.js'; -import { getString } from '../../../i18n/i18n.js'; const HyprlandToggle = ({ icon, name, desc = null, option, enableValue = 1, disableValue = 0, extraOnChange = () => { } }) => ConfigToggle({ icon: icon, diff --git a/.config/ags/modules/sideright/centermodules/notificationlist.js b/.config/ags/modules/sideright/centermodules/notificationlist.js index 052fbcfcc..c13633d60 100644 --- a/.config/ags/modules/sideright/centermodules/notificationlist.js +++ b/.config/ags/modules/sideright/centermodules/notificationlist.js @@ -8,7 +8,6 @@ import { MaterialIcon } from '../../.commonwidgets/materialicon.js'; import { setupCursorHover } from '../../.widgetutils/cursorhover.js'; import Notification from '../../.commonwidgets/notification.js'; import { ConfigToggle } from '../../.commonwidgets/configwidgets.js'; -import { getString } from '../../../i18n/i18n.js'; export default (props) => { const notifEmptyContent = Box({ diff --git a/.config/ags/modules/sideright/centermodules/wifinetworks.js b/.config/ags/modules/sideright/centermodules/wifinetworks.js index 3f65dbc7f..50b8be038 100644 --- a/.config/ags/modules/sideright/centermodules/wifinetworks.js +++ b/.config/ags/modules/sideright/centermodules/wifinetworks.js @@ -6,7 +6,6 @@ const { execAsync, exec } = Utils; import { MaterialIcon } from '../../.commonwidgets/materialicon.js'; import { setupCursorHover } from '../../.widgetutils/cursorhover.js'; import { ConfigToggle } from '../../.commonwidgets/configwidgets.js'; -import { getString } from '../../../i18n/i18n.js'; const MATERIAL_SYMBOL_SIGNAL_STRENGTH = { 'network-wireless-signal-excellent-symbolic': "signal_wifi_4_bar", diff --git a/.config/ags/modules/sideright/quicktoggles.js b/.config/ags/modules/sideright/quicktoggles.js index 96059037f..3aabca647 100644 --- a/.config/ags/modules/sideright/quicktoggles.js +++ b/.config/ags/modules/sideright/quicktoggles.js @@ -10,7 +10,6 @@ import { BluetoothIndicator, NetworkIndicator } from '../.commonwidgets/statusic import { setupCursorHover } from '../.widgetutils/cursorhover.js'; import { MaterialIcon } from '../.commonwidgets/materialicon.js'; import { sidebarOptionsStack } from './sideright.js'; -import { getString } from '../../i18n/i18n.js'; export const ToggleIconWifi = (props = {}) => Widget.Button({ className: 'txt-small sidebar-iconbutton', diff --git a/.config/ags/modules/sideright/sideright.js b/.config/ags/modules/sideright/sideright.js index bb8839440..aa922b0ab 100644 --- a/.config/ags/modules/sideright/sideright.js +++ b/.config/ags/modules/sideright/sideright.js @@ -25,7 +25,6 @@ import { getDistroIcon } from '../.miscutils/system.js'; import { MaterialIcon } from '../.commonwidgets/materialicon.js'; import { ExpandingIconTabContainer } from '../.commonwidgets/tabcontainer.js'; import { checkKeybind } from '../.widgetutils/keybind.js'; -import { getString } from '../../i18n/i18n.js'; const centerWidgets = [ { diff --git a/.config/ags/modules/sideright/todolist.js b/.config/ags/modules/sideright/todolist.js index 67467f372..39ccc500a 100644 --- a/.config/ags/modules/sideright/todolist.js +++ b/.config/ags/modules/sideright/todolist.js @@ -5,7 +5,6 @@ import { MaterialIcon } from '../.commonwidgets/materialicon.js'; import { TabContainer } from '../.commonwidgets/tabcontainer.js'; import Todo from "../../services/todo.js"; import { setupCursorHover } from '../.widgetutils/cursorhover.js'; -import { getString } from '../../i18n/i18n.js'; const TodoListItem = (task, id, isDone, isEven = false) => { const taskName = Widget.Label({ diff --git a/.config/ags/services/gpt.js b/.config/ags/services/gpt.js index c941a6566..ffe2aeea4 100644 --- a/.config/ags/services/gpt.js +++ b/.config/ags/services/gpt.js @@ -5,7 +5,6 @@ import Gio from 'gi://Gio'; import GLib from 'gi://GLib'; import Soup from 'gi://Soup?version=3.0'; import { fileExists } from '../modules/.miscutils/files.js'; -import { getString } from '../i18n/i18n.js'; const PROVIDERS = Object.assign({ // There's this list hmm https://github.com/zukixa/cool-ai-stuff/ 'openai': { @@ -58,7 +57,7 @@ const PROVIDERS = Object.assign({ // There's this list hmm https://github.com/zu // Custom prompt const initMessages = [ - { role: "user", content: "You are an assistant on a sidebar of a Wayland Linux desktop. Please always use a casual tone when answering your questions, unless requested otherwise or making writing suggestions. These are the steps you should take to respond to the user's queries:\n1. If it's a writing- or grammar-related question or a sentence in quotation marks, Please point out errors and correct when necessary using underlines, and make the writing more natural where appropriate without making too major changes. If you're given a sentence in quotes but is grammatically correct, explain briefly concepts that are uncommon.\n2. If it's a question about system tasks, give a bash command in a code block with brief explanation.\n3. Otherwise, when asked to summarize information or explaining concepts, you are should use bullet points and headings. For mathematics expressions, you *have to* use LaTeX within a code block with the language set as \"latex\". \nNote: Use casual language, be short, while ensuring the factual correctness of your response. If you are unsure or don’t have enough information to provide a confident answer, simply say “I don’t know” or “I’m not sure.”. \nThanks!", }, + { role: "user", content: getString("You are an assistant on a sidebar of a Wayland Linux desktop. Please always use a casual tone when answering your questions, unless requested otherwise or making writing suggestions. These are the steps you should take to respond to the user's queries:\n1. If it's a writing- or grammar-related question or a sentence in quotation marks, Please point out errors and correct when necessary using underlines, and make the writing more natural where appropriate without making too major changes. If you're given a sentence in quotes but is grammatically correct, explain briefly concepts that are uncommon.\n2. If it's a question about system tasks, give a bash command in a code block with brief explanation.\n3. Otherwise, when asked to summarize information or explaining concepts, you are should use bullet points and headings. For mathematics expressions, you *have to* use LaTeX within a code block with the language set as \"latex\". \nNote: Use casual language, be short, while ensuring the factual correctness of your response. If you are unsure or don’t have enough information to provide a confident answer, simply say “I don’t know” or “I’m not sure.”. \nThanks!"), }, { role: "assistant", content: "- Got it!", }, { role: "user", content: "\"He rushed to where the event was supposed to be hold, he didn't know it got calceled\"", }, { role: "assistant", content: "## Grammar correction\nErrors:\n\"He rushed to where the event was supposed to be __hold____,__ he didn't know it got calceled\"\nCorrection + minor improvements:\n\"He rushed to the place where the event was supposed to be __held____, but__ he didn't know that it got calceled\"", },