Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
</p>
<p align="center">
<a href="README.md">English</a> |
<a href="README.zh.md">简体中文</a> |
<a href="README.zht.md">繁體中文</a>
<a href="README.zh.md">简体中文</a>
</p>

echo is a native desktop music player and Spotify client written in Rust. echo brings your entire Spotify library — liked songs, playlists, albums, and the artists you follow — plus your local music files into one fast, keyboard-friendly app, with full playback control, synced lyrics, and dynamic theming. A companion terminal client (`spotify`) ships in the same install for when you'd rather live in the terminal.
Expand Down
3 changes: 1 addition & 2 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
</p>
<p align="center">
<a href="README.md">English</a> |
<a href="README.zh.md">简体中文</a> |
<a href="README.zht.md">繁體中文</a>
<a href="README.zh.md">简体中文</a>
</p>

echo 是一款用 Rust 编写的原生桌面音乐播放器和 Spotify 客户端。echo 将您的整个 Spotify 库——喜欢的歌曲、播放列表、专辑以及关注的艺术家——加上本地音乐文件汇集到一个快速、键盘友好的应用中,提供完整的播放控制、同步歌词和动态主题。同一安装包还附带一个终端客户端(`spotify`),在您想待在终端里时随时可用。
Expand Down
300 changes: 0 additions & 300 deletions README.zht.md

This file was deleted.

15 changes: 3 additions & 12 deletions crates/echo-core/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub const COMMANDS: &[(&str, &str)] = &[
("vis", "Toggle the audio visualizer"),
("visbins <5-32>", "Visualizer frequency bands"),
("album", "Jump to the selected track's album"),
("lang <en|zh-CN|zh-TW>", "Switch language"),
("lang <en|zh|zh-CN>", "Switch language"),
("newplaylist <name>", "Create a Spotify playlist"),
("newlocalplaylist <name>", "Create a local playlist"),
(
Expand Down Expand Up @@ -104,12 +104,7 @@ fn generate_command_suggestions(state: &AppState) -> Vec<String> {
.collect()
}
"lang" => {
let options = vec![
"en".to_string(),
"zh".to_string(),
"zh-CN".to_string(),
"zh-TW".to_string(),
];
let options = vec!["en".to_string(), "zh".to_string(), "zh-CN".to_string()];
options
.into_iter()
.filter(|o| o.starts_with(arg_str))
Expand Down Expand Up @@ -565,11 +560,7 @@ fn execute(state: &mut AppState, cmd: &str) -> Option<AppEvent> {
}
"lang" => {
if let Some(lang_code) = args.next() {
if lang_code == "en"
|| lang_code == "zh"
|| lang_code == "zh-CN"
|| lang_code == "zh-TW"
{
if lang_code == "en" || lang_code == "zh" || lang_code == "zh-CN" {
state.ui.library_config.language = lang_code.to_string();
state.save_library_config();
state.ui.status_message = Some(
Expand Down
7 changes: 2 additions & 5 deletions crates/echo-core/src/i18n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ pub fn init() {
serde_json::from_str(include_str!("../../../locales/en.json")).unwrap();
let zh: serde_json::Value =
serde_json::from_str(include_str!("../../../locales/zh-CN.json")).unwrap();
let zh_tw: serde_json::Value =
serde_json::from_str(include_str!("../../../locales/zh-TW.json")).unwrap();

map.insert("en", en);
map.insert("zh", zh.clone());
map.insert("zh-CN", zh);
map.insert("zh-TW", zh_tw);

let _ = TRANSLATIONS.set(map);
}
Expand Down Expand Up @@ -56,7 +53,7 @@ mod tests {
fn setup_uri_keys_present_in_all_locales() {
init();
let map = TRANSLATIONS.get().unwrap();
for lang in ["en", "zh-CN", "zh-TW"] {
for lang in ["en", "zh-CN"] {
let setup = &map[lang]["desktop"]["setup"];
for key in ["step2", "copy", "copied"] {
assert!(setup[key].is_string(), "{lang} missing desktop.setup.{key}");
Expand All @@ -68,7 +65,7 @@ mod tests {
fn tray_keys_present_in_all_locales() {
init();
let map = TRANSLATIONS.get().unwrap();
for lang in ["en", "zh-CN", "zh-TW"] {
for lang in ["en", "zh-CN"] {
let desktop = &map[lang]["desktop"];
for key in ["window", "tray", "tray_desc"] {
assert!(
Expand Down
1 change: 0 additions & 1 deletion crates/echo-desktop/src/views.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5387,7 +5387,6 @@ pub fn settings_modal(
vec![
("English".into(), "lang en".into(), language == "en"),
("简体".into(), "lang zh-CN".into(), language == "zh-CN"),
("繁體".into(), "lang zh-TW".into(), language == "zh-TW"),
],
cx,
),
Expand Down
Loading
Loading