Archived
1
0
Fork 0

New Crowdin updates (#1083)

This commit is contained in:
Dorobot 2024-01-12 16:17:35 +08:00 committed by GitHub
parent ec7da0c2e1
commit 3fd2f23d93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 119 additions and 29 deletions

View file

@ -18,7 +18,7 @@ BASE_COST_GPT_4 = Decimal('0.03') # gpt-4-1106-preview: $0.03 / 1K tokens
THIRD_PARTY_MULTIPLIER = Decimal('1.5')
PROFIT_MULTIPLIER = Decimal('1.1') # At the time we are really just trying to break even
PRICE_PER_1K_TOKEN = BASE_COST_GPT_3_5 * THIRD_PARTY_MULTIPLIER * PROFIT_MULTIPLIER
PRICE_PER_1K_TOKEN_GPT4 = BASE_COST_GPT_4 * THIRD_PARTY_MULTIPLIER * PROFIT_MULTIPLIER
PRICE_PER_1K_TOKEN_GPT_4 = BASE_COST_GPT_4 * THIRD_PARTY_MULTIPLIER * PROFIT_MULTIPLIER
USD_TO_CNY = Decimal('7.1') # Assuming 1 USD = 7.1 CNY
CNY_TO_PETAL = 100 # 100 petal = 1 CNY
@ -56,13 +56,16 @@ async def load_or_refresh_cache():
async def count_petal(tokens: int, gpt4: bool = False):
Logger.info(f'{tokens} tokens have been consumed while calling AI.')
petal_exchange_rate = await load_or_refresh_cache()
price = tokens / ONE_K * PRICE_PER_1K_TOKEN
if gpt4:
price = tokens / ONE_K * PRICE_PER_1K_TOKEN_GPT_4
else:
price = tokens / ONE_K * PRICE_PER_1K_TOKEN
if petal_exchange_rate:
petal = price * Decimal(petal_exchange_rate).quantize(Decimal('0.00'))
else:
Logger.warn(f'Unable to obtain real-time exchange rate, use {USD_TO_CNY} to calculate petals.')
petal = price * USD_TO_CNY * CNY_TO_PETAL
return petal
return round(petal, 2)
async def gained_petal(msg: Bot.MessageSession, amount):

View file

@ -1,7 +1,7 @@
{
"ask.help": "Answer your question via ChatGPT.",
"ask.help.desc": "Ask AkariBot anything!",
"ask.help.regex": "Question:<question>? Answer your question via ChatGPT.",
"ask.message.rate_limit_exceeded": "You have been rate limited. Please try again 20 seconds later.",
"ask.message.text2img.error": "(An error occurred: Unable to correctly convert the following content into images. Here is the original text output:\n${text}) "
{
"ask.help": "Answer your question via ChatGPT.",
"ask.help.desc": "Ask AkariBot anything!",
"ask.help.regex": "Question:<question>? Answer your question via ChatGPT.",
"ask.message.rate_limit_exceeded": "You have been rate limited. Please try again 20 seconds later.",
"ask.message.text2img.error": "(An error occurred: Unable to correctly convert the following content into images. Here is the original text output:\n${text}) "
}

View file

@ -10,4 +10,4 @@
"bilibili.message.detail": "Title: ${title}${pages} | Category: ${tname}\nUploader: ${owner} | Fans: ${fans}\nDescription: ${desc}\nView: ${view} | Danmuku: ${danmaku} | Comments: ${reply}\nLike: ${like} | Coin: ${coin} | Favorite: ${favorite} | Share: ${share}\nDate: ${time}",
"bilibili.message.error.invalid": "An error occurred: Invalid video id, please check your input.",
"bilibili.message.not_found": "No corresponding video is found."
}
}

View file

@ -10,4 +10,4 @@
"bilibili.message.detail": "標題:${title}${pages} | 類型:${tname}\nUP 主:${owner} | 追隨者:${fans}\n簡介${desc}\n觀看${view} | 彈幕:${danmaku} | 留言:${reply}\n喜歡${like} | 投幣:${coin} | 收藏:${favorite} | 分享:${share}\n日期${time}",
"bilibili.message.error.invalid": "發生錯誤:影片編號無效,請校對輸入。",
"bilibili.message.not_found": "未找到對應的影片。"
}
}

View file

@ -17,4 +17,4 @@
"chemical_code.message.showid": "ID: ${id}",
"chemical_code.message.timeup": "Timeout. The correct answer is ${answer}.",
"chemical_code.stop.message": "Stopped. The correct answer is ${answer}."
}
}

View file

@ -17,4 +17,4 @@
"chemical_code.message.showid": "ID${id}",
"chemical_code.message.timeup": "回答逾時,正確答案是 ${answer}。",
"chemical_code.stop.message": "已停止,正確答案是 ${answer}。"
}
}

View file

@ -15,7 +15,7 @@
"core.help.help.legacy": "View help list. (Legacy)",
"core.help.leave": "Let the bot leave the group.",
"core.help.locale.desc": "Control bot language.",
"core.help.locale.set": "Set the bot running languages.",
"core.help.locale.set": "Set bot running language.",
"core.help.module.disable": "Disable single/multiple module(s).",
"core.help.module.disable_all": "Disable all modules.",
"core.help.module.enable": "Enable single/multiple module(s).",

View file

@ -31,7 +31,7 @@
"core.help.prefix.remove": "移除自訂指令前綴。",
"core.help.prefix.reset": "重設自訂指令前綴。",
"core.help.setup.check": "切換是否顯示指令錯誤檢查提醒。",
"core.help.setup.desc": "設定機器人行動",
"core.help.setup.desc": "設定機器人行動",
"core.help.setup.timeoffset": "設定時間偏移量。",
"core.help.setup.typing": "切換是否顯示輸入提醒。",
"core.help.version": "檢視機器人的版本號。",

View file

@ -1,6 +1,6 @@
{
"github.help.desc": "Github query tool.",
"github.help": "Trying to automatically identifying and distinguishing repo/user.",
"github.help.desc": "Github query tool.",
"github.help.repo": "Get GitHub repository information.",
"github.help.search": "Search repositories on GitHub.",
"github.help.user": "Get GitHub user or organization information.",

View file

@ -1,5 +1,4 @@
{
"github.help.desc": "GitHub 查詢工具。",
"github.help": "嘗試自動辨識並區分 repo/user。",
"github.help.desc": "GitHub 查詢工具。",
"github.help.repo": "取得 Github 儲存庫資訊。",

View file

@ -0,0 +1,84 @@
{
"chunithm.help.b30": "查询 CHUNITHM 用户的 B30 列表。Beta 版)",
"chunithm.help.desc": "查询 CHUNITHM 相关内容。",
"chunithm.help.song": "查询 CHUNITHM 歌曲或谱面信息ID 需要加入前缀“id”空格用下划线替代。",
"chunithm.message.b30.text_prompt": "以下为 ${user} (Rating ${rating}) 的 Best30 列表:",
"chunithm.message.song": "艺术家:${artist}\n分类${genre}\nBPM${bpm}\n版本${version}\n难度${level}",
"chunithm.message.song.diff": "${diff} ${level} (${ds})\n连击${combo}\n谱师${charter}",
"chunithm.message.user_unbound": "未绑定用户,请使用“${prefix}chunithm bind”绑定一个用户。",
"maimai.help.alias": "查询歌曲的别名。",
"maimai.help.b50": "查询 Maimai 用户的 B50 列表。",
"maimai.help.b50.beta": "查询 Maimai 用户的 B50 列表。Beta 版)",
"maimai.help.base": "根据定数或定数范围搜索歌曲。",
"maimai.help.bind": "绑定 Diving-Fish 查分器用户。",
"maimai.help.desc": "查询 Maimai 相关内容。",
"maimai.help.grade": "查询段位认定列表。",
"maimai.help.id": "根据 ID 查询歌曲或谱面信息。",
"maimai.help.info": "查询歌曲的相关谱面成绩ID 需要加入前缀“id”空格用下划线替代。",
"maimai.help.level": "根据等级搜索歌曲。",
"maimai.help.maimai_regex.alias": "<ID> 有什么别名 查询歌曲的别名。",
"maimai.help.maimai_regex.desc": "更方便地使用 Maimai 相关命令。",
"maimai.help.maimai_regex.grade": "<段位>段位认定表 输入段位名查询段位认定列表。",
"maimai.help.maimai_regex.info": "<ID 或别名>有什么分 [<用户名>] 输入 ID 或别名查询歌曲的相关谱面成绩ID 需要加入前缀“id”空格用下划线替代。",
"maimai.help.maimai_regex.plate": "<名牌板>进度 [<用户名>] 查看用户的名牌板完成进度。",
"maimai.help.maimai_regex.process": "<难度> <目标>进度 [<用户名>] 查看用户在对应等级的评价完成进度。",
"maimai.help.maimai_regex.random": "随个[dx|标准][绿黄红紫白]<难度> 随机一首指定条件的歌曲。",
"maimai.help.maimai_regex.song": "<ID 或别名>是什么歌 输入 ID 或别名查询歌曲信息ID 需要加入前缀“id”。",
"maimai.help.plate": "查看用户的名牌板完成进度。",
"maimai.help.process": "查看用户在对应等级的评价完成进度。",
"maimai.help.random": "随机一首歌曲。",
"maimai.help.random.filter": "随机一首指定条件的歌曲,输入星号则表示无条件。",
"maimai.help.rank": "查看用户在查分器上的分数排行。",
"maimai.help.rating": "根据定数计算 Rating。",
"maimai.help.scoreline": "查询歌曲的分数线。",
"maimai.help.scorelist": "查看用户在对应等级的分数列表。",
"maimai.help.search": "根据歌名(或一部分)搜索歌曲。",
"maimai.help.song": "查询 Maimai 歌曲或谱面信息ID 需要加入前缀“id”空格用下划线替代。",
"maimai.help.unbind": "解绑用户。",
"maimai.message.alias": "${title} 的别名:",
"maimai.message.alias.alias_not_found": "未找到符合要求的别名。",
"maimai.message.alias.file_not_found": "未找到别名文件,请使用“${prefix}maimai update”初始化文件。",
"maimai.message.b50.text_prompt": "以下为 ${user} (Rating ${rating}) 的 Best50 列表:",
"maimai.message.base": "以下为定数 ${constant} 的曲目列表:",
"maimai.message.base.range": "以下为定数 ${constant}-${constant_max} 的曲目列表:",
"maimai.message.bind.success": "绑定成功:",
"maimai.message.chart_not_found": "未找到符合要求的谱面。",
"maimai.message.error.non_digital": "发生错误:歌曲 ID 必须为数字。",
"maimai.message.forbidden": "此用户禁止了其他人获取数据。",
"maimai.message.forbidden.eula": "无法获取数据,请前往查分器并同意用户协议。\n查分器地址https://www.diving-fish.com/maimaidx/prober",
"maimai.message.goal_invalid": "无效的目标评级,请检查输入。",
"maimai.message.grade": "以下为 ${grade} 段位认定列表:\n${content}\n生命上限${life}\n${condition}",
"maimai.message.grade.grade_not_found": "无效的段位,请检查输入。",
"maimai.message.info.no_record": "未游玩过此谱面",
"maimai.message.level": "以下为 ${level} 级的曲目列表:",
"maimai.message.level_invalid": "无效的等级,请检查输入。",
"maimai.message.music_not_found": "未找到符合要求的歌曲。",
"maimai.message.pages": "(第 ${page} 页,共 ${total_pages} 页)",
"maimai.message.plate": "您的 ${plate} 剩余进度如下:\nBasic 剩余 ${song_remain_basic} 首,\nAdvanced 剩余 ${song_remain_advanced} 首,\nExpert 剩余 ${song_remain_expert} 首,\nMaster 剩余 ${song_remain_master} 首",
"maimai.message.plate.completed": "您已完成${plate}的所有进度。",
"maimai.message.plate.difficult": "您还有 ${song_remain} 首等级大于 13+ 的曲目。",
"maimai.message.plate.difficult.completed": "您已完成所有等级大于 13+ 的曲目。",
"maimai.message.plate.difficult.last": "剩余等级大于 13+ 的曲目:",
"maimai.message.plate.last": "剩余曲目:",
"maimai.message.plate.plate_not_found": "名牌板不存在,请检查输入。",
"maimai.message.plate.remaster": "\nRe:MASTER 剩余 ${song_remain_remaster} 首",
"maimai.message.process": "您还有 ${song_remain} 首 ${process} 级曲目没有达成 ${goal}。",
"maimai.message.process.completed": "您已达成 ${process} 级曲目全谱面 ${goal}。",
"maimai.message.process.last": "您的 ${process} 级歌曲全谱面 ${goal} 剩余曲目如下:",
"maimai.message.process.less_than_8": "歌曲等级必须大于 8 级。",
"maimai.message.random.error": "发生错误:随机歌曲失败,请检查输入。",
"maimai.message.rank": "截至 ${time}\n查分器共有 ${total_rank} 名用户,平均分数为 ${average_rating}。\n${user} 的分数为 ${rating},排名为 #${rank}\n已经超越了 ${surpassing_rate}% 的玩家。",
"maimai.message.scoreline": "分数线 ${scoreline}% 允许的最多 TAP GREAT 数量为 ${tap_great}(每个-${tap_great_prop}%\nBREAK 2550一共 ${brk} 个)相当于 ${b2t_2550_great} 个 TAP GREAT-${b2t_2550_great_prop}%\nBREAK 2000一共 ${brk} 个)相当于 ${b2t_2000_great} 个 TAP GREAT-${b2t_2000_great_prop}%",
"maimai.message.scoreline.error": "发生错误:计算结果失败,请检查输入。",
"maimai.message.scorelist": "以下为 ${user} 的 ${level} 级分数列表:",
"maimai.message.search": "“${keyword}”的搜索结果:",
"maimai.message.song": "艺术家:${artist}\n分类${genre}\nBPM${bpm}\n版本${version}\n难度${level}",
"maimai.message.song.dx": "${diff} ${level} (${ds})\nTAP${tap}\nHOLD${hold}\nSLIDE${slide}\nTOUCH${touch}\nBREAK${brk}\n谱师${charter}",
"maimai.message.song.prompt": "以下是可能的结果:",
"maimai.message.song.sd": "${diff} ${level} (${ds})\nTAP${tap}\nHOLD${hold}\nSLIDE${slide}\nBREAK${brk}\n谱师${charter}",
"maimai.message.too_much": "结果过多(${length} 条),请缩小搜索范围。",
"maimai.message.unbind.success": "解绑成功。",
"maimai.message.user_not_found": "未找到用户,请确保此玩家的用户名和查分器中的用户名相同。",
"maimai.message.user_unbound": "未绑定用户,请使用“${prefix}maimai bind”绑定一个用户。",
"maimai.message.user_unbound.qq": "未绑定用户,请前往查分器并绑定你的 QQ 号。\n查分器地址https://www.diving-fish.com/maimaidx/prober"
}

View file

@ -1,6 +1,6 @@
{
"chunithm.help.b30": "查詢 CHUNITHM 使用者的 B30 列表。Beta 版)",
"chunithm.help.desc": "查詢 CHUNITHM 相關內容。",
"chunithm.help.desc": "查詢 CHUNITHM 相關內容。",
"chunithm.help.song": "查詢 CHUNITHM 歌曲或譜面資訊ID 需要加入前綴「id」空白用下橫線取代。",
"chunithm.message.b30.text_prompt": "以下為 ${user} (Rating ${rating}) 的 Best30 列表:",
"chunithm.message.song": "藝術家:${artist}\n分類${genre}\nBPM${bpm}\n版本${version}\n難度${level}",
@ -41,15 +41,16 @@
"maimai.message.b50.text_prompt": "以下為 ${user} (Rating ${rating}) 的 Best50 列表:",
"maimai.message.base": "以下為定數 ${constant} 的曲目列表:",
"maimai.message.base.range": "以下為定數 ${constant}-${constant_max} 的曲目列表:",
"maimai.message.bind.success": "綁定成功:",
"maimai.message.chart_not_found": "未找到符合要求的譜面。",
"maimai.message.error.non_digital": "發生錯誤:歌曲 ID 必須為數字。",
"maimai.message.forbidden": "此使用者禁止了其他人取得資。",
"maimai.message.forbidden": "此使用者禁止了其他人取得資。",
"maimai.message.forbidden.eula": "無法取得資訊,請前往查分器並同意使用者協議。\n查分器網址https://www.diving-fish.com/maimaidx/prober",
"maimai.message.goal_invalid": "無效的目標評級,請校對輸入。",
"maimai.message.grade": "以下為 ${grade} 段位認定列表:\n${content}\n生命上限${life}\n${condition}",
"maimai.message.grade.grade_not_found": "無效的段位,請校對輸入。",
"maimai.message.info.no_record": "未遊玩過此譜面",
"maimai.message.level": "以下為 ${level} 的曲目列表:",
"maimai.message.level": "以下為難度 ${level} 的曲目列表:",
"maimai.message.level_invalid": "無效的等級,請校對輸入。",
"maimai.message.music_not_found": "未找到符合要求的歌曲。",
"maimai.message.pages": "(第 ${page} 頁,共 ${total_pages} 頁)",
@ -76,7 +77,8 @@
"maimai.message.song.prompt": "以下是可能的結果:",
"maimai.message.song.sd": "${diff} ${level} (${ds})\nTAP${tap}\nHOLD${hold}\nSLIDE${slide}\nBREAK${brk}\n譜師${charter}",
"maimai.message.too_much": "結果過多(${length} 條),請縮小搜尋範圍。",
"maimai.message.user_not_found": "未找到使用者,請確認此使用者的名稱和查分器中的名稱相同。",
"maimai.message.unbind.success": "解除綁定成功。",
"maimai.message.user_not_found": "未找到此使用者,請確認此使用者的名稱和查分器中的名稱相同。",
"maimai.message.user_unbound": "未綁定使用者,請使用「${prefix}maimai bind」綁定一個使用者。",
"maimai.message.user_unbound.qq": "未綁定使用者,請前往查分器並綁定你的 QQ 號。\n查分器網址https://www.diving-fish.com/maimaidx/prober"
}

View file

@ -6,4 +6,4 @@
"twenty_four.message.incorrect.have_solution": "Incorrect: Solution exists.",
"twenty_four.message.incorrect.error": "Incorrect: Invalid expression.",
"twenty_four.message.incorrect": "Incorrect."
}
}

View file

@ -4,11 +4,11 @@
"wiki.help": "Query a wiki page.",
"wiki.help.ab": "Get recent abuse logs for the default wiki.",
"wiki.help.ab.legacy": "Get recent abuse logs for the default wiki. (Legacy)",
"wiki.help.fandom": "Toggle whether to use Fandom global Interwiki queries.",
"wiki.help.fandom": "Toggles whether to use Fandom global Interwiki queries.",
"wiki.help.headers.remove": "Remove custom request headers.",
"wiki.help.headers.reset": "Reset custom request headers.",
"wiki.help.headers.add": "Add custom request headers.",
"wiki.help.headers.show": "View the currently set request headers.",
"wiki.help.headers.show": "Lists the currently set request headers.",
"wiki.help.id": "Query a Wiki page based on page ID.",
"wiki.help.iw.add": "Add custom Interwiki.",
"wiki.help.iw.get": "Get the API address corresponding to the set Interwiki.",
@ -30,7 +30,7 @@
"wiki.help.wiki_inline.template": "Enter a title within {{ }} to automatically query the template.",
"wiki.help.wiki_inline.url": "Send the URL of the wiki page to generate the Infobox image.",
"wiki.message.section": "章节",
"wiki.message.section.rendering": "(章节渲染中",
"wiki.message.section.rendering": "(章节渲染中……",
"wiki.message.ab.qq.title": "滥用过滤器日志",
"wiki.message.ab.qq.title.address": "滥用过滤器日志地址",
"wiki.message.ab.slice": "•${title} - ${user} at ${time}\n Filter description: ${filter_name}\n Actions taken: ${result}",
@ -39,6 +39,7 @@
"wiki.message.error.info": "Detail: ",
"wiki.message.error.query": "An error occurred: Unable to query this wiki.",
"wiki.message.error.set": "An error occurred: Unable to set up this wiki.",
"wiki.message.error.fetch_log": "发生错误:无法获取日志,可能是此 Wiki 设置了日志的查看权限。",
"wiki.message.error.unable_to_render_section": "(章节渲染失败,请联系开发者检查原因)",
"wiki.message.fandom.disable": "Disabled to use Fandom global Interwiki queries.",
"wiki.message.fandom.enable": "Enabled to use Fandom global Interwiki queries.",

View file

@ -30,7 +30,7 @@
"wiki.help.wiki_inline.template": "在 {{ }} 內輸入標題以自動查詢模板。",
"wiki.help.wiki_inline.url": "傳送 Wiki 頁面的 URL 以生成 Infobox 圖片。",
"wiki.message.section": "章節",
"wiki.message.section.rendering": "(章節成像中",
"wiki.message.section.rendering": "(章節成像中……",
"wiki.message.ab.qq.title": "防濫用過濾器日誌",
"wiki.message.ab.qq.title.address": "防濫用過濾器位址",
"wiki.message.ab.slice": "•${title} - ${user} 於 ${time}\n 過濾器描述:${filter_name}\n 採取的動作:${result}",
@ -39,7 +39,8 @@
"wiki.message.error.info": "詳細訊息:",
"wiki.message.error.query": "發生錯誤:無法查詢此 Wiki。",
"wiki.message.error.set": "發生錯誤:無法設定此 Wiki。",
"wiki.message.error.unable_to_render_section": "(章節成像失敗,請聯絡開發人員檢查原因)",
"wiki.message.error.fetch_log": "发生错误:无法获取日志,可能是此 Wiki 设置了日志的查看权限。",
"wiki.message.error.unable_to_render_section": "(章节渲染失败,请联系开发者检查原因)",
"wiki.message.fandom.disable": "已停用 Fandom 全域 Interwiki 查詢。",
"wiki.message.fandom.enable": "已啟用 Fandom 全域 Interwiki 查詢。",
"wiki.message.flies": "此頁面含有以下檔案:",

View file

@ -3,4 +3,4 @@
"wolframalpha.help.ask": "Answer the question via WolframAlpha.",
"wolframalpha.help.desc": "Use WolframAlpha.",
"wolframalpha.message.incomprehensible": "WolframAlpha can't understand your question."
}
}

View file

@ -3,4 +3,4 @@
"wolframalpha.help.ask": "透過 WolframAlpha 回答問題。",
"wolframalpha.help.desc": "使用 WolframAlpha。",
"wolframalpha.message.incomprehensible": "WolframAlpha 無法理解你的問題,請嘗試使用英語提問。"
}
}