Made more text translateble. References #171.

This commit is contained in:
IQuant 2024-09-28 10:26:59 +03:00
parent 43c9e1900c
commit 89a1a6ced4
6 changed files with 157 additions and 36 deletions

View file

@ -86,14 +86,44 @@ connect_settings_autostart = Start the game automatically
## Game settings
Enable-friendly-fire = Enable friendly fire
Have-perk-pools-be-independent-of-each-other = Have perk pools be independent of each other
Amount-of-chunks-host-has-loaded-at-once-synced-enemies-and-physics-objects-need-to-be-loaded-in-by-host-to-be-rendered-by-clients = Amount of chunks host has loaded at once, synced enemies and physics objects need to be loaded in by host to be rendered by clients
local_health_desc_1 = Every player has their own health, run ends when all player are dead.
local_health_desc_2 = There is a respawn mechanic.
shared_health_desc_1 = Health is shared, but scales with player count.
shared_health_desc_2 = Percentage-based damage and full heals are adjusted.
shared_health_desc_3 = The original mode.
Local-health = Local health
Shared-health = Shared health
Game-mode = Game mode
world-sync-is-pixel-sync-note = Note: World sync refers to the part that syncs pixels(materials) of the world. Enemies and other entities aren't affected by this.
Higher-values-result-in-less-performance-impact = Higher values result in less performance impact.
World-will-be-synced-every-this-many-frames = World will be synced every this many frames.
## Savestate
New-game = New game
Continue = Continue
savestate_desc = Savestate from a previous run has been detected. Do you wish to continue that run, or to start a new game (and reset the savestate)?
An-in-progress-run-has-been-detected = An in-progress run has been detected.
## Player appearance
Gem = Gem
Amulet = Amulet
Crown = Crown
Cape-edge-color = Cape edge color
Cape-color = Cape color
Forearm-color = Forearm color
Arm-color = Arm color
Alt-color = Alt color
Main-color = Main color
Reset-colors-to-default = Reset colors to default
Shift-hue = Shift hue
## Connected
Show-debug-info = Show debug info
hint_spectate = Use [',' or d-pad-left] and ['.' or d-pad-right] keys to spectate over other players.
hint_ping = [Middle mouse button or right thumb stick] spawns a ping

View file

@ -86,14 +86,44 @@ connect_settings_autostart = ゲームを自動的に開始する
## Game settings
Enable-friendly-fire = Enable friendly fire
Have-perk-pools-be-independent-of-each-other = Have perk pools be independent of each other
Amount-of-chunks-host-has-loaded-at-once-synced-enemies-and-physics-objects-need-to-be-loaded-in-by-host-to-be-rendered-by-clients = Amount of chunks host has loaded at once, synced enemies and physics objects need to be loaded in by host to be rendered by clients
local_health_desc_2 = There is a respawn mechanic.
local_health_desc_1 = Every player has their own health, run ends when all player are dead.
shared_health_desc_3 = The original mode.
shared_health_desc_2 = Percentage-based damage and full heals are adjusted.
shared_health_desc_1 = Health is shared, but scales with player count.
Local-health = Local health
Shared-health = Shared health
Game-mode = Game mode
world-sync-is-pixel-sync-note = Note: World sync refers to the part that syncs pixels(materials) of the world. Enemies and other entities aren't affected by this.
Higher-values-result-in-less-performance-impact = Higher values result in less performance impact.
World-will-be-synced-every-this-many-frames = World will be synced every this many frames.
## Savestate
New-game = New game
Continue = Continue
savestate_desc = Savestate from a previous run has been detected. Do you wish to continue that run, or to start a new game (and reset the savestate)?
An-in-progress-run-has-been-detected = An in-progress run has been detected.
## Player appearance
Gem = Gem
Amulet = Amulet
Crown = Crown
Cape-edge-color = Cape edge color
Cape-color = Cape color
Forearm-color = Forearm color
Arm-color = Arm color
Alt-color = Alt color
Main-color = Main color
Reset-colors-to-default = Reset colors to default
Shift-hue = Shift hue
## Connected
Show-debug-info = Show debug info
hint_spectate = Use [',' or d-pad-left] and ['.' or d-pad-right] keys to spectate over other players.
hint_ping = [Middle mouse button or right thumb stick] spawns a ping

View file

@ -69,12 +69,44 @@ error_lobby_does_not_exist = Лобби не существует.
## Game settings
Enable-friendly-fire = Enable friendly fire
Have-perk-pools-be-independent-of-each-other = Have perk pools be independent of each other
Amount-of-chunks-host-has-loaded-at-once-synced-enemies-and-physics-objects-need-to-be-loaded-in-by-host-to-be-rendered-by-clients = Amount of chunks host has loaded at once, synced enemies and physics objects need to be loaded in by host to be rendered by clients
local_health_desc_2 = There is a respawn mechanic.
local_health_desc_1 = Every player has their own health, run ends when all player are dead.
shared_health_desc_3 = The original mode.
shared_health_desc_2 = Percentage-based damage and full heals are adjusted.
shared_health_desc_1 = Health is shared, but scales with player count.
Local-health = Local health
Shared-health = Shared health
Game-mode = Game mode
world-sync-is-pixel-sync-note = Note: World sync refers to the part that syncs pixels(materials) of the world. Enemies and other entities aren't affected by this.
Higher-values-result-in-less-performance-impact = Higher values result in less performance impact
World-will-be-synced-every-this-many-frames = World will be synced every this many frames
## Savestate
New-game = New game
Continue = Continue
savestate_desc = Savestate from a previous run has been detected. Do you wish to continue that run, or to start a new game (and reset the savestate)?
An-in-progress-run-has-been-detected = An in-progress run has been detected.
## Player appearance
Gem = Gem
Amulet = Amulet
Crown = Crown
Cape-edge-color = Cape edge color
Cape-color = Cape color
Forearm-color = Forearm color
Arm-color = Arm color
Alt-color = Alt color
Main-color = Main color
Reset-colors-to-default = Reset colors to default
Shift-hue = Shift hue
## Connected
Show-debug-info = Show debug info
hint_spectate = Use [',' or d-pad-left] and ['.' or d-pad-right] keys to spectate over other players.
hint_ping = [Middle mouse button or right thumb stick] spawns a ping

View file

@ -84,16 +84,46 @@ connect_settings_enemy_hp_scale = 敌人血量比例
connect_settings_local = 本地设置
connect_settings_autostart = 自动启动游戏
## 游戏设置
## Game settings
Enable-friendly-fire = Enable friendly fire
Have-perk-pools-be-independent-of-each-other = Have perk pools be independent of each other
Amount-of-chunks-host-has-loaded-at-once-synced-enemies-and-physics-objects-need-to-be-loaded-in-by-host-to-be-rendered-by-clients = Amount of chunks host has loaded at once, synced enemies and physics objects need to be loaded in by host to be rendered by clients
local_health_desc_2 = There is a respawn mechanic.
local_health_desc_1 = Every player has their own health, run ends when all player are dead.
shared_health_desc_3 = The original mode.
shared_health_desc_2 = Percentage-based damage and full heals are adjusted.
shared_health_desc_1 = Health is shared, but scales with player count.
Local-health = Local health
Shared-health = Shared health
Game-mode = Game mode
world-sync-is-pixel-sync-note = 注意:世界同步是指同步世界像素(材质)的部分。敌人和其他实体不受此影响。
Higher-values-result-in-less-performance-impact = 该值越大,对性能影响越小。
World-will-be-synced-every-this-many-frames = 该值将作为世界同步的间隔(帧)。
## 存档状态
## Savestate
New-game = 新的游戏
Continue = 继续游戏
savestate_desc = 检测到上一次的存档。你想要继续启动该存档还是开启一局新游戏(并重置存档)
An-in-progress-run-has-been-detected = 检查到正在运行的存档。
## Player appearance
Gem = Gem
Amulet = Amulet
Crown = Crown
Cape-edge-color = Cape edge color
Cape-color = Cape color
Forearm-color = Forearm color
Arm-color = Arm color
Alt-color = Alt color
Main-color = Main color
Reset-colors-to-default = Reset colors to default
Shift-hue = Shift hue
## Connected
Show-debug-info = Show debug info
hint_spectate = Use [',' or d-pad-left] and ['.' or d-pad-right] keys to spectate over other players.
hint_ping = [Middle mouse button or right thumb stick] spawns a ping

View file

@ -589,16 +589,16 @@ impl App {
fn show_game_settings(&mut self, ui: &mut Ui, show_local: bool) {
heading_with_underline(ui, tr("connect_settings"));
let game_settings = &mut self.app_saved_state.game_settings;
ui.label("Game mode");
ui.label(tr("Game-mode"));
ui.radio_value(
&mut game_settings.game_mode,
GameMode::SharedHealth,
"Shared health",
tr("Shared-health"),
);
ui.radio_value(
&mut game_settings.game_mode,
GameMode::LocalHealth,
"Local health",
tr("Local-health"),
);
ui.scope(|ui| {
@ -606,15 +606,13 @@ impl App {
match game_settings.game_mode {
GameMode::SharedHealth => {
ui.label("Health is shared, but scales with player count.");
ui.label("Percentage-based damage and full heals are adjusted.");
ui.label("The original mode.");
ui.label(tr("shared_health_desc_1"));
ui.label(tr("shared_health_desc_2"));
ui.label(tr("shared_health_desc_3"));
}
GameMode::LocalHealth => {
ui.label(
"Every player has their own health, run ends when all player are dead.",
);
ui.label("There is a respawn mechanic.");
ui.label(tr("local_health_desc_1"));
ui.label(tr("local_health_desc_2"));
}
}
});
@ -634,7 +632,7 @@ impl App {
ui.add(DragValue::new(&mut game_settings.seed));
});
ui.add_space(10.0);
ui.label("Amount of chunks host has loaded at once, synced enemies and physics objects need to be loaded in by host to be rendered by clients");
ui.label(tr("Amount-of-chunks-host-has-loaded-at-once-synced-enemies-and-physics-objects-need-to-be-loaded-in-by-host-to-be-rendered-by-clients"));
ui.add(Slider::new(&mut game_settings.chunk_target, 1..=64));
/*if game_settings.world_sync_version == 2 {
ui.add_space(10.0);
@ -666,7 +664,7 @@ impl App {
ui.add_space(20.0);
ui.checkbox(
&mut game_settings.randomize_perks,
"have perk pools be independent of each other",
tr("Have-perk-pools-be-independent-of-each-other"),
);
ui.add_space(20.0);
ui.add(
@ -675,7 +673,7 @@ impl App {
.text(tr("connect_settings_enemy_hp_scale")),
);
ui.add_space(20.0);
ui.checkbox(&mut game_settings.friendly_fire, "Friendly fire");
ui.checkbox(&mut game_settings.friendly_fire, tr("Enable-friendly-fire"));
if show_local {
heading_with_underline(ui, tr("connect_settings_local"));
ui.checkbox(
@ -690,7 +688,7 @@ impl App {
.into_rgba8();
}
let old_hue = self.appearance.hue;
ui.add(Slider::new(&mut self.appearance.hue, 0.0..=360.0).text("Shift hue"));
ui.add(Slider::new(&mut self.appearance.hue, 0.0..=360.0).text(tr("Shift-hue")));
if old_hue != self.appearance.hue {
let diff = self.appearance.hue - old_hue;
shift_hue(diff, &mut self.appearance.player_color.player_main);
@ -709,7 +707,7 @@ impl App {
&self.appearance.player_picker,
);
});
if ui.button("Reset colors to default").clicked() {
if ui.button(tr("Reset-colors-to-default")).clicked() {
self.appearance.player_color = PlayerColor::default();
self.appearance.hue = 0.0
}
@ -925,10 +923,10 @@ impl eframe::App for App {
}
ui.add_space(15.0);
ui.checkbox(&mut self.app_saved_state.show_extra_debug_stuff, "Show debug stuff");
ui.checkbox(&mut self.app_saved_state.show_extra_debug_stuff, tr("Show-debug-info"));
ui.add_space(15.0);
ui.label("[Middle mouse button or right thumb stick] spawns a ping");
ui.label("Use [',' or d-pad-left] and ['.' or d-pad-right] keys to spectate over other players.");
ui.label(tr("hint_ping"));
ui.label(tr("hint_spectate"));
if self.app_saved_state.show_extra_debug_stuff {

View file

@ -1,3 +1,4 @@
use crate::lang::tr;
use crate::{App, PlayerColor, PlayerPicker};
use eframe::egui;
use eframe::egui::color_picker::{color_picker_color32, Alpha};
@ -139,27 +140,27 @@ pub fn player_select_current_color_slot(ui: &mut Ui, app: &mut App) {
ui.scope(|ui| {
ui.set_max_width(100.0);
ui.vertical_centered_justified(|ui| {
if ui.button("Main color").clicked() {
if ui.button(tr("Main-color")).clicked() {
clicked = true;
app.appearance.player_picker = PlayerPicker::PlayerMain
}
if ui.button("Alt color").clicked() {
if ui.button(tr("Alt-color")).clicked() {
clicked = true;
app.appearance.player_picker = PlayerPicker::PlayerAlt
}
if ui.button("Arm color").clicked() {
if ui.button(tr("Arm-color")).clicked() {
clicked = true;
app.appearance.player_picker = PlayerPicker::PlayerArm
}
if ui.button("Forearm color").clicked() {
if ui.button(tr("Forearm-color")).clicked() {
clicked = true;
app.appearance.player_picker = PlayerPicker::PlayerForearm
}
if ui.button("Cape color").clicked() {
if ui.button(tr("Cape-color")).clicked() {
clicked = true;
app.appearance.player_picker = PlayerPicker::PlayerCape
}
if ui.button("Cape edge color").clicked() {
if ui.button(tr("Cape-edge-color")).clicked() {
clicked = true;
app.appearance.player_picker = PlayerPicker::PlayerCapeEdge
}
@ -169,13 +170,13 @@ pub fn player_select_current_color_slot(ui: &mut Ui, app: &mut App) {
let amulet = flags.join("secret_amulet").exists();
let gem = flags.join("secret_amulet_gem").exists();
if hat {
ui.checkbox(&mut app.appearance.cosmetics.0, "Crown");
ui.checkbox(&mut app.appearance.cosmetics.0, tr("Crown"));
}
if amulet {
ui.checkbox(&mut app.appearance.cosmetics.1, "Amulet");
ui.checkbox(&mut app.appearance.cosmetics.1, tr("Amulet"));
}
if gem {
ui.checkbox(&mut app.appearance.cosmetics.2, "Gem");
ui.checkbox(&mut app.appearance.cosmetics.2, tr("Gem"));
}
}
});