-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from hashworks/2.x-englishTelegram
Use ctl10n to provide english localization
- Loading branch information
Showing
10 changed files
with
190 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
target | ||
ctl10n_macros.rs |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use ctl10n; | ||
use std::env; | ||
|
||
fn main() { | ||
println!("cargo:rerun-if-changed=build.rs"); | ||
println!("cargo:rerun-if-changed=locales/*.toml"); | ||
if let Err(err) = ctl10n::convert_strings_file( | ||
format!( | ||
"locales/{}.toml", | ||
&env::var("LOCALE").unwrap_or("ch".to_string()) | ||
), | ||
"ctl10n_macros.rs", | ||
) { | ||
panic!("{}", err); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
rss_size_limit_exceeded = "RSS 超出大小限制({size})" | ||
continuous_fetch_error = "《<a href=\"{link}\">{title}</a>》已经连续 5 天拉取出错 ({error}), 可能已经关闭, 请取消订阅" | ||
feed_renamed = "<a href=\"{link}\">{title}</a> 已更名为 {new_title}" | ||
network_error = "网络错误({source})" | ||
parsing_error = "解析错误({source})" | ||
commands_in_private_channel = "请在私聊中使用命令为频道管理订阅" | ||
start_message = """命令列表: | ||
/rss - 显示当前订阅的 RSS 列表 | ||
/sub - 订阅一个 RSS:`/sub http://example.com/feed.xml` | ||
/unsub - 退订一个 RSS:`/unsub http://example.com/feed.xml` | ||
/export - 导出为 OPML | ||
所有命令均可在后面跟上频道 ID 来管理频道订阅 | ||
例如 `/sub @BotNews http://example.com/feed.xml`""" | ||
subscription_list = "订阅列表:" | ||
subscription_list_empty = "订阅列表为空" | ||
sub_how_to_use = "使用方法: /sub [Channel ID] <RSS URL>" | ||
subscribed_to_rss = "已订阅过的 RSS" | ||
subscription_rate_limit = """已达到全局最大订阅数量, 为防止服务器压力过大请退订不需要的 RSS 或者 | ||
[自己搭建服务](https://github.com/iovxw/rssbot) | ||
注: 本机器人主要用于提供即时提醒功能, 例如服务器状态监控和社区论坛提醒 | ||
默认更新频率为 5 分钟, 不建议用于其他类型的 RSS 订阅 | ||
如有相关需求推荐使用其他 RSS 机器人实现""" | ||
processing_please_wait = "处理中,请稍候" | ||
subscription_succeeded = "《<a href=\"{link}\">{title}</a>》 订阅成功" | ||
subscription_failed = "订阅失败: {error}" | ||
unsub_how_to_use = "使用方法: /unsub [Channel ID] <RSS URL>" | ||
unsubscription_succeeded = "《<a href=\"{link}\">{title}</a>》 退订成功" | ||
unsubscribed_from_rss = "未订阅过的 RSS" | ||
verifying_channel = "正在验证 Channel" | ||
unable_to_find_target_channel = "无法找到目标 Channel:{desc}" | ||
target_must_be_a_channel = "目标需为 Channel" | ||
unable_to_get_channel_info = "无法获取频道信息({desc}),请将本 Bot 设为管理员" | ||
admin_only_command = "该命令只能由 Channel 管理员使用" | ||
make_bot_admin = "请将本 Bot 设为管理员" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
rss_size_limit_exceeded = "RSS size limit exceeded ({size})" | ||
continuous_fetch_error = "《<a href=\"{link}\">{title}</a>》has been pulled unsuccessfully for 5 consecutive days ({error}). It may have been closed, please unsubscribe." | ||
feed_renamed = "<a href=\"{link}\">{title}</a> has been renamed to {new_title}" | ||
network_error = "Network error ({source})" | ||
parsing_error = "Parsing error ({source})" | ||
commands_in_private_channel = "Please use commands in private chat to manage subscriptions for the channel" | ||
start_message = """Command list: | ||
/rss - Display a list of currently subscribed RSS feeds | ||
/sub - Subscribe to an RSS: `/sub http://example.com/feed.xml` | ||
/unsub - Unsubscribe from an RSS: `/unsub http://example.com/feed.xml` | ||
/export - Export to OPML | ||
All commands can be followed by the channel ID to manage channel subscriptions, | ||
f.e. `/sub @BotNews http://example.com/feed.xml`""" | ||
subscription_list = "Subscription list:" | ||
subscription_list_empty = "Subscription list is empty" | ||
sub_how_to_use = "How to use: /sub [Channel ID] <RSS URL>" | ||
subscribed_to_rss = "Subscribed to RSS" | ||
subscription_rate_limit = """The global maximum number of subscriptions has been reached. | ||
To prevent excessive server pressure, please unsubscribe from unnecessary RSS or | ||
[Build your own service](https://github.com/iovxw/rssbot). | ||
Note: This bot is mainly used to provide instant reminder functions, | ||
such as server status monitoring and community forum reminders. | ||
The default update frequency is 5 minutes, not recommended for other types of RSS subscriptions. | ||
If there are related requirements, it is recommended to use other RSS bots to achieve those.""" | ||
processing_please_wait = "Processing, please wait" | ||
subscription_succeeded = "《<a href=\"{link}\">{title}</a>》 Subscription succeeded" | ||
subscription_failed = "Subscription failed ({error})" | ||
unsub_how_to_use = "How to use: /unsub [Channel ID] <RSS URL>" | ||
unsubscription_succeeded = "《<a href=\"{link}\">{title}</a>》 Unsubscription succeeded" | ||
unsubscribed_from_rss = "Unsubscribed from RSS" | ||
verifying_channel = "Verifying channel" | ||
unable_to_find_target_channel = "Unable to find the target channel: {desc}" | ||
target_must_be_a_channel = "Target must be a channel" | ||
unable_to_get_channel_info = "Unable to get channel information ({desc}), please grant this bot administrator rights" | ||
admin_only_command = "This command can only be used by Channel administrators" | ||
make_bot_admin = "Please grant this bot administrator rights" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.