From af76f3e9badf08e493890602385d79f0e90ddc5c Mon Sep 17 00:00:00 2001 From: deanxizian <491106791x@gmail.com> Date: Sun, 16 Apr 2023 13:44:59 +0000 Subject: [PATCH] Add Chinese(cn) support --- README.md | 4 ++-- translations.json | 44 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 12eb67cf..44d8eb3e 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ A [Telegram bot](https://core.telegram.org/bots/api) that integrates with OpenAI - [x] (NEW!) GPT-4 support - If you have access to the GPT-4 API, simply change the `OPENAI_MODEL` parameter to `gpt-4` - [x] (NEW!) Localized bot language - - Available languages :gb: :de: :ru: :tr: :it: :es: :indonesia: + - Available languages :gb: :de: :ru: :tr: :it: :es: :indonesia: :cn: - [x] (NEW!) Improved inline queries support for group and private chats - by [@bugfloyd](https://github.com/bugfloyd) - To use this feature, enable inline queries for your bot in BotFather via the `/setinline` [command](https://core.telegram.org/bots/inline) @@ -89,7 +89,7 @@ Check out the [Budget Manual](https://github.com/n3d1117/chatgpt-telegram-bot/di | `IMAGE_SIZE` | The DALL·E generated image size. Allowed values: `256x256`, `512x512` or `1024x1024` | `512x512` | | `GROUP_TRIGGER_KEYWORD` | If set, the bot in group chats will only respond to messages that start with this keyword | - | | `IGNORE_GROUP_TRANSCRIPTIONS` | If set to true, the bot will not process transcriptions in group chats | `true` | -| `BOT_LANGUAGE` | Language of general bot messages. Currently available: `en`, `de`, `ru`, `tr`, `it`, `es`, `id`. **Note** [Contribute additional translations](https://github.com/n3d1117/chatgpt-telegram-bot/discussions/219) | `en` | +| `BOT_LANGUAGE` | Language of general bot messages. Currently available: `en`, `de`, `ru`, `tr`, `it`, `es`, `id`, `cn`. **Note** [Contribute additional translations](https://github.com/n3d1117/chatgpt-telegram-bot/discussions/219) | `en` | Check out the [official API reference](https://platform.openai.com/docs/api-reference/chat) for more details. diff --git a/translations.json b/translations.json index a50c3e7a..f17eac3d 100644 --- a/translations.json +++ b/translations.json @@ -4,7 +4,7 @@ "reset_description":"Reset the conversation. Optionally pass high-level instructions (e.g. /reset You are a helpful assistant)", "image_description":"Generate image from prompt (e.g. /image cat)", "stats_description":"Get your current usage statistics", - "resend_description":"Resend the latest massage", + "resend_description":"Resend the latest message", "chat_description":"Chat with the bot!", "disallowed":"Sorry, you are not allowed to use this bot. You can check out the source code at https://github.com/n3d1117/chatgpt-telegram-bot", "budget_limit":"Sorry, you have reached your usage limit.", @@ -292,5 +292,47 @@ "answer_with_chatgpt": "Jawaban dengan ChatGPT", "ask_chatgpt": "Tanya ChatGPT", "loading": "Sedang memuat..." + }, + "cn": { + "help_description":"显示帮助信息", + "reset_description":"重置对话。可以选择传递高级指令(例如/reset 你是一个有用的助手)", + "image_description":"根据提示生成图像(例如/image 猫)", + "stats_description":"获取您当前的使用统计", + "resend_description":"重新发送最近的消息", + "chat_description":"与机器人聊天!", + "disallowed":"对不起,您不被允许使用该机器人。您可以查看源代码:https://github.com/n3d1117/chatgpt-telegram-bot", + "budget_limit":"对不起,您已经达到了使用限制。", + "help_text":["我是一个ChatGPT机器人,请和我交谈!", "发送语音消息或文件,我会为您进行转录。", "源代码:https://github.com/n3d1117/chatgpt-telegram-bot"], + "stats_conversation":["当前对话", "历史聊天消息", "历史聊天token"], + "usage_today":"今日使用情况", + "usage_month":"本月使用情况", + "stats_tokens":"使用的token", + "stats_images":"生成图像的数量", + "stats_transcribe":["分钟", "秒转录时长"], + "stats_total":"💰 总计金额 $", + "stats_budget":"您的剩余预算", + "monthly":"本月", + "daily":"今日", + "all-time":"", + "stats_openai":"本月您的OpenAI账户已使用 $", + "resend_failed":"没有消息需要重发", + "reset_done":"完成!", + "image_no_prompt":"请提供提示!(例如/image 猫)", + "image_fail":"生成图像失败", + "media_download_fail":["下载音频文件失败", "请确保文件不要太大(最大20MB)"], + "media_type_fail":"不支持的文件类型", + "transcript":"转录", + "answer":"回答", + "transcribe_fail":"转录文本失败", + "chat_fail":"获取响应失败", + "prompt":"提示", + "completion":"补全", + "openai_rate_limit":"OpenAI请求频率超限", + "openai_invalid":"OpenAI请求无效", + "error":"发生错误", + "try_again":"请稍后再试", + "answer_with_chatgpt":"使用ChatGPT回答", + "ask_chatgpt":"询问ChatGPT", + "loading":"载入中..." } }