From 7851a407b145ce84054db6390000f33c8535730b Mon Sep 17 00:00:00 2001 From: Capucho Date: Tue, 24 Mar 2020 21:41:59 +0000 Subject: [PATCH 01/14] Fix the cursor lagging behind on password field --- Cargo.lock | 6 +++--- voxygen/Cargo.toml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 22b3939864..18e18ac0b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -557,7 +557,7 @@ dependencies = [ [[package]] name = "conrod_core" version = "0.63.0" -source = "git+https://gitlab.com/veloren/conrod.git?branch=hide_text#92925b122dfed139169c7d7687b3ca15c0cb5a2e" +source = "git+https://gitlab.com/veloren/conrod.git?branch=capucho/hide_text_cursor_fix#e8a5b312ba0e3ab64efe54985d203137a34cd17d" dependencies = [ "conrod_derive", "copypasta", @@ -572,7 +572,7 @@ dependencies = [ [[package]] name = "conrod_derive" version = "0.63.0" -source = "git+https://gitlab.com/veloren/conrod.git?branch=hide_text#92925b122dfed139169c7d7687b3ca15c0cb5a2e" +source = "git+https://gitlab.com/veloren/conrod.git?branch=capucho/hide_text_cursor_fix#e8a5b312ba0e3ab64efe54985d203137a34cd17d" dependencies = [ "proc-macro2 0.4.30", "quote 0.6.13", @@ -582,7 +582,7 @@ dependencies = [ [[package]] name = "conrod_winit" version = "0.63.0" -source = "git+https://gitlab.com/veloren/conrod.git?branch=hide_text#92925b122dfed139169c7d7687b3ca15c0cb5a2e" +source = "git+https://gitlab.com/veloren/conrod.git?branch=capucho/hide_text_cursor_fix#e8a5b312ba0e3ab64efe54985d203137a34cd17d" [[package]] name = "const-random" diff --git a/voxygen/Cargo.toml b/voxygen/Cargo.toml index 21049a4c4c..49cf4c60bf 100644 --- a/voxygen/Cargo.toml +++ b/voxygen/Cargo.toml @@ -24,8 +24,8 @@ gfx_device_gl = { version = "0.16.2", optional = true } gfx_window_glutin = "0.31.0" glutin = "0.21.1" winit = { version = "0.19.4", features = ["serde"] } -conrod_core = { git = "https://gitlab.com/veloren/conrod.git", branch = "hide_text" } -conrod_winit = { git = "https://gitlab.com/veloren/conrod.git", branch = "hide_text" } +conrod_core = { git = "https://gitlab.com/veloren/conrod.git", branch = "capucho/hide_text_cursor_fix" } +conrod_winit = { git = "https://gitlab.com/veloren/conrod.git", branch = "capucho/hide_text_cursor_fix" } euc = "0.3.0" # ECS From 70481631539a4310764004c60a78a007f4ffca6c Mon Sep 17 00:00:00 2001 From: Capucho Date: Wed, 25 Mar 2020 12:51:43 +0000 Subject: [PATCH 02/14] Fixed Some minor bugs on the password field --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 18e18ac0b9..72c53ca4d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -557,7 +557,7 @@ dependencies = [ [[package]] name = "conrod_core" version = "0.63.0" -source = "git+https://gitlab.com/veloren/conrod.git?branch=capucho/hide_text_cursor_fix#e8a5b312ba0e3ab64efe54985d203137a34cd17d" +source = "git+https://gitlab.com/veloren/conrod.git?branch=capucho/hide_text_cursor_fix#df3a5d8098687fb0addf6fdf7c9ad2ac8794997f" dependencies = [ "conrod_derive", "copypasta", @@ -572,7 +572,7 @@ dependencies = [ [[package]] name = "conrod_derive" version = "0.63.0" -source = "git+https://gitlab.com/veloren/conrod.git?branch=capucho/hide_text_cursor_fix#e8a5b312ba0e3ab64efe54985d203137a34cd17d" +source = "git+https://gitlab.com/veloren/conrod.git?branch=capucho/hide_text_cursor_fix#df3a5d8098687fb0addf6fdf7c9ad2ac8794997f" dependencies = [ "proc-macro2 0.4.30", "quote 0.6.13", @@ -582,7 +582,7 @@ dependencies = [ [[package]] name = "conrod_winit" version = "0.63.0" -source = "git+https://gitlab.com/veloren/conrod.git?branch=capucho/hide_text_cursor_fix#e8a5b312ba0e3ab64efe54985d203137a34cd17d" +source = "git+https://gitlab.com/veloren/conrod.git?branch=capucho/hide_text_cursor_fix#df3a5d8098687fb0addf6fdf7c9ad2ac8794997f" [[package]] name = "const-random" From 3c36862f4213c977181cc80100381a63a205130b Mon Sep 17 00:00:00 2001 From: Marli Frost Date: Fri, 27 Mar 2020 10:09:21 +0000 Subject: [PATCH 03/14] fix: connect to LOCALHOST address in tests Windows doesn't allow us to connect to the Any (0.0.0.0) address, instead returning the WSAEADDRNOTAVAIL error code. https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2 --- common/src/net/post2.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/common/src/net/post2.rs b/common/src/net/post2.rs index ee9e7303e5..95307ac4bd 100644 --- a/common/src/net/post2.rs +++ b/common/src/net/post2.rs @@ -332,7 +332,8 @@ mod tests { #[test] fn connect() { - let (mut postoffice, sock) = create_postoffice::<(), ()>(0).unwrap(); + let (mut postoffice, bound) = create_postoffice::<(), ()>(0).unwrap(); + let sock = (std::net::Ipv4Addr::LOCALHOST, bound.port()); let _client0 = PostBox::<(), ()>::to(sock).unwrap(); let _client1 = PostBox::<(), ()>::to(sock).unwrap(); @@ -364,7 +365,8 @@ mod tests { #[test] fn send_recv() { - let (mut postoffice, sock) = create_postoffice::<(), i32>(2).unwrap(); + let (mut postoffice, bound) = create_postoffice::<(), i32>(2).unwrap(); + let sock = (std::net::Ipv4Addr::LOCALHOST, bound.port()); let test_msgs = vec![1, 1337, 42, -48]; let mut client = PostBox::::to(sock).unwrap(); @@ -386,7 +388,8 @@ mod tests { #[test] #[ignore] fn send_recv_huge() { - let (mut postoffice, sock) = create_postoffice::<(), Vec>(3).unwrap(); + let (mut postoffice, bound) = create_postoffice::<(), Vec>(3).unwrap(); + let sock = (std::net::Ipv4Addr::LOCALHOST, bound.port()); let test_msgs: Vec> = (0..5) .map(|i| (0..100000).map(|j| i * 2 + j).collect()) .collect(); @@ -410,7 +413,8 @@ mod tests { #[test] fn send_recv_both() { - let (mut postoffice, sock) = create_postoffice::(4).unwrap(); + let (mut postoffice, bound) = create_postoffice::(4).unwrap(); + let sock = (std::net::Ipv4Addr::LOCALHOST, bound.port()); let mut client = PostBox::::to(sock).unwrap(); loop_for(Duration::from_millis(250), || ()); let mut server = postoffice.new_postboxes().next().unwrap(); From 3a989f061f0d7b9fde5d5a656261646fd7158a4c Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Fri, 27 Mar 2020 15:13:36 +0000 Subject: [PATCH 04/14] Better water shaders --- assets/voxygen/shaders/fluid-frag/cheap.glsl | 12 +----------- assets/voxygen/shaders/fluid-frag/shiny.glsl | 14 ++------------ assets/voxygen/shaders/fluid-vert.glsl | 3 +++ assets/voxygen/shaders/include/sky.glsl | 4 +++- assets/voxygen/shaders/skybox-frag.glsl | 10 +++++++++- 5 files changed, 18 insertions(+), 25 deletions(-) diff --git a/assets/voxygen/shaders/fluid-frag/cheap.glsl b/assets/voxygen/shaders/fluid-frag/cheap.glsl index b2e3d4b6ac..f3c92ab429 100644 --- a/assets/voxygen/shaders/fluid-frag/cheap.glsl +++ b/assets/voxygen/shaders/fluid-frag/cheap.glsl @@ -34,16 +34,6 @@ void main() { vec3 cam_to_frag = normalize(f_pos - cam_pos.xyz); - /* - // Round the position to the nearest triangular grid cell - vec3 hex_pos = f_pos * 2.0; - hex_pos = hex_pos + vec3(hex_pos.y * 1.4 / 3.0, hex_pos.y * 0.1, 0); - if (fract(hex_pos.x) > fract(hex_pos.y)) { - hex_pos += vec3(1.0, 1.0, 0); - } - hex_pos = floor(hex_pos); - */ - vec3 light, diffuse_light, ambient_light; get_sun_diffuse(f_norm, time_of_day.x, light, diffuse_light, ambient_light, 0.0); float point_shadow = shadow_at(f_pos,f_norm); @@ -52,7 +42,7 @@ void main() { vec3 point_light = light_at(f_pos, f_norm); light += point_light; diffuse_light += point_light; - vec3 surf_color = illuminate(srgb_to_linear(vec3(0.2, 0.2, 1.0)), light, diffuse_light, ambient_light); + vec3 surf_color = srgb_to_linear(vec3(0.4, 0.7, 2.0)) * light * diffuse_light * ambient_light; float fog_level = fog(f_pos.xyz, focus_pos.xyz, medium.x); vec4 clouds; diff --git a/assets/voxygen/shaders/fluid-frag/shiny.glsl b/assets/voxygen/shaders/fluid-frag/shiny.glsl index cb7a37544d..8d06ee468c 100644 --- a/assets/voxygen/shaders/fluid-frag/shiny.glsl +++ b/assets/voxygen/shaders/fluid-frag/shiny.glsl @@ -68,16 +68,6 @@ void main() { vec3 cam_to_frag = normalize(f_pos - cam_pos.xyz); float frag_dist = length(f_pos - cam_pos.xyz); - /* - // Round the position to the nearest triangular grid cell - vec3 hex_pos = f_pos * 2.0; - hex_pos = hex_pos + vec3(hex_pos.y * 1.4 / 3.0, hex_pos.y * 0.1, 0); - if (fract(hex_pos.x) > fract(hex_pos.y)) { - hex_pos += vec3(1.0, 1.0, 0); - } - hex_pos = floor(hex_pos); - */ - vec3 b_norm; if (f_norm.z > 0.0) { b_norm = vec3(1, 0, 0); @@ -111,7 +101,7 @@ void main() { vec3 point_light = light_at(f_pos, norm); light += point_light; diffuse_light += point_light; - vec3 surf_color = illuminate(srgb_to_linear(f_col), light, diffuse_light, ambient_light); + vec3 surf_color = srgb_to_linear(vec3(0.2, 0.5, 1.0)) * light * diffuse_light * ambient_light; float fog_level = fog(f_pos.xyz, focus_pos.xyz, medium.x); vec4 clouds; @@ -119,7 +109,7 @@ void main() { vec3 reflect_ray_dir = reflect(cam_to_frag, norm); // Hack to prevent the reflection ray dipping below the horizon and creating weird blue spots in the water - reflect_ray_dir.z = max(reflect_ray_dir.z, 0.05); + reflect_ray_dir.z = max(reflect_ray_dir.z, 0.01); vec4 _clouds; vec3 reflect_color = get_sky_color(reflect_ray_dir, time_of_day.x, f_pos, vec3(-100000), 0.25, false, _clouds) * f_light; diff --git a/assets/voxygen/shaders/fluid-vert.glsl b/assets/voxygen/shaders/fluid-vert.glsl index 2692e463a2..412b46bd80 100644 --- a/assets/voxygen/shaders/fluid-vert.glsl +++ b/assets/voxygen/shaders/fluid-vert.glsl @@ -27,6 +27,9 @@ void main() { f_pos.z *= min(1.0001 - 0.02 / pow(tick.x - load_time, 10.0), 1.0); f_pos.z -= 25.0 * pow(distance(focus_pos.xy, f_pos.xy) / view_distance.x, 20.0); + // Small waves + f_pos.z -= 0.05 + 0.05 * (sin(tick.x * 2.0 + f_pos.x * 2.0 + f_pos.y * 2.0) + 1.0) * 0.5; + f_col = vec3( float((v_col_light >> 8) & 0xFFu), float((v_col_light >> 16) & 0xFFu), diff --git a/assets/voxygen/shaders/include/sky.glsl b/assets/voxygen/shaders/include/sky.glsl index 5b3869c8ac..7ac0dbc6c9 100644 --- a/assets/voxygen/shaders/include/sky.glsl +++ b/assets/voxygen/shaders/include/sky.glsl @@ -21,6 +21,8 @@ const vec3 SKY_NIGHT_MID = vec3(0.001, 0.005, 0.02); const vec3 SKY_NIGHT_BOT = vec3(0.002, 0.004, 0.004); const vec3 NIGHT_LIGHT = vec3(0.002, 0.01, 0.03); +const float UNDERWATER_MIST_DIST = 100.0; + vec3 get_sun_dir(float time_of_day) { const float TIME_FACTOR = (PI * 2.0) / (3600.0 * 24.0); @@ -202,7 +204,7 @@ float fog(vec3 f_pos, vec3 focus_pos, uint medium) { float max_fog = 1.0; if (medium == 1u) { - mist_radius = 96.0; + mist_radius = UNDERWATER_MIST_DIST; min_fog = 0.0; } diff --git a/assets/voxygen/shaders/skybox-frag.glsl b/assets/voxygen/shaders/skybox-frag.glsl index ab39a37c3c..d537a1f9eb 100644 --- a/assets/voxygen/shaders/skybox-frag.glsl +++ b/assets/voxygen/shaders/skybox-frag.glsl @@ -14,5 +14,13 @@ out vec4 tgt_color; void main() { vec4 _clouds; - tgt_color = vec4(get_sky_color(normalize(f_pos), time_of_day.x, cam_pos.xyz, vec3(-100000), 1.0, true, _clouds), 1.0); + float fog_level = fog(f_pos.xyz, focus_pos.xyz, medium.x); + + float dist = 100000.0; + if (medium.x == 1u) { + dist = UNDERWATER_MIST_DIST; + } + vec3 wpos = cam_pos.xyz + normalize(f_pos) * dist; + + tgt_color = vec4(get_sky_color(normalize(f_pos), time_of_day.x, cam_pos.xyz, wpos, 1.0, true, _clouds), 1.0); } From 15ecdfb9b4579583a269c43a8fe7d2a233c5f99d Mon Sep 17 00:00:00 2001 From: Capucho Date: Fri, 27 Mar 2020 18:35:52 +0000 Subject: [PATCH 05/14] Added an option for hold and added everything to the settings --- assets/voxygen/i18n/en.ron | 6 ++++ voxygen/src/hud/mod.rs | 9 ++++++ voxygen/src/hud/settings_window.rs | 51 ++++++++++++++++++++++++++++-- voxygen/src/session.rs | 20 +++++++++--- voxygen/src/settings.rs | 6 ++-- 5 files changed, 83 insertions(+), 9 deletions(-) diff --git a/assets/voxygen/i18n/en.ron b/assets/voxygen/i18n/en.ron index 57ef0300db..cdcad13db1 100644 --- a/assets/voxygen/i18n/en.ron +++ b/assets/voxygen/i18n/en.ron @@ -192,6 +192,8 @@ Enjoy your stay in the World of Veloren."#, "hud.settings.general": "General", "hud.settings.none": "None", + "hud.settings.press_behavior.toggle": "Toggle", + "hud.settings.press_behavior.hold": "Hold", "hud.settings.help_window": "Help Window", "hud.settings.debug_info": "Debug Info", "hud.settings.tips_on_startup": "Tips-On-Startup", @@ -219,6 +221,7 @@ Enjoy your stay in the World of Veloren."#, "hud.settings.zoom_sensitivity": "Zoom Sensitivity", "hud.settings.invert_scroll_zoom": "Invert Scroll Zoom", "hud.settings.invert_mouse_y_axis": "Invert Mouse Y Axis", + "hud.settings.free_look_behavior": "Free look behavior", "hud.settings.view_distance": "View Distance", "hud.settings.maximum_fps": "Maximum FPS", @@ -308,6 +311,9 @@ Send Chat Message Scroll Chat +Free look + + Chat commands: /alias [Name] - Change your Chat Name diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 9a45e82156..af37606609 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -231,6 +231,7 @@ pub enum Event { Logout, Quit, ChangeLanguage(LanguageMetadata), + ChangeFreeLookBehavior(PressBehavior), } // TODO: Are these the possible layouts we want? @@ -271,6 +272,11 @@ pub enum ShortcutNumbers { On, Off, } +#[derive(Clone, Copy, Debug, Serialize, Deserialize)] +pub enum PressBehavior { + Toggle = 0, + Hold = 1, +} pub struct Show { ui: bool, @@ -1825,6 +1831,9 @@ impl Hud { settings_window::Event::AdjustWindowSize(new_size) => { events.push(Event::AdjustWindowSize(new_size)); }, + settings_window::Event::ChangeFreeLookBehavior(behavior) => { + events.push(Event::ChangeFreeLookBehavior(behavior)); + }, } } } diff --git a/voxygen/src/hud/settings_window.rs b/voxygen/src/hud/settings_window.rs index 1c63978804..d0aba49fff 100644 --- a/voxygen/src/hud/settings_window.rs +++ b/voxygen/src/hud/settings_window.rs @@ -1,6 +1,6 @@ use super::{ - img_ids::Imgs, BarNumbers, CrosshairType, Intro, ShortcutNumbers, Show, XpBar, MENU_BG, - TEXT_COLOR, + img_ids::Imgs, BarNumbers, CrosshairType, Intro, PressBehavior, ShortcutNumbers, Show, XpBar, + MENU_BG, TEXT_COLOR, }; use crate::{ i18n::{list_localizations, LanguageMetadata, VoxygenLocalization}, @@ -141,7 +141,8 @@ widget_ids! { sct_num_dur_text, sct_num_dur_slider, sct_num_dur_value, - + free_look_behavior_text, + free_look_behavior_list } } @@ -220,6 +221,7 @@ pub enum Event { SctPlayerBatch(bool), SctDamageBatch(bool), ChangeLanguage(LanguageMetadata), + ChangeFreeLookBehavior(PressBehavior), } pub enum ScaleChange { @@ -1254,6 +1256,45 @@ impl<'a> Widget for SettingsWindow<'a> { .graphics_for(state.ids.mouse_y_invert_button) .color(TEXT_COLOR) .set(state.ids.mouse_y_invert_label, ui); + + // Free look behaviour + Text::new( + &self + .localized_strings + .get("hud.settings.free_look_behavior"), + ) + .down_from(state.ids.mouse_zoom_invert_button, 10.0) + .font_size(self.fonts.cyri.scale(14)) + .font_id(self.fonts.cyri.conrod_id) + .color(TEXT_COLOR) + .set(state.ids.free_look_behavior_text, ui); + + let mode_label_list = [ + &self + .localized_strings + .get("hud.settings.press_behavior.toggle"), + &self + .localized_strings + .get("hud.settings.press_behavior.hold"), + ]; + + // Get which free look behavior is currently active + let selected = self.global_state.settings.gameplay.free_look_behavior as usize; + + if let Some(clicked) = DropDownList::new(&mode_label_list, Some(selected)) + .w_h(200.0, 30.0) + .color(MENU_BG) + .label_color(TEXT_COLOR) + .label_font_id(self.fonts.cyri.conrod_id) + .down_from(state.ids.free_look_behavior_text, 8.0) + .set(state.ids.free_look_behavior_list, ui) + { + match clicked { + 0 => events.push(Event::ChangeFreeLookBehavior(PressBehavior::Toggle)), + 1 => events.push(Event::ChangeFreeLookBehavior(PressBehavior::Hold)), + _ => unreachable!(), + } + } } // 3) Controls Tab -------------------------------- @@ -1367,6 +1408,9 @@ impl<'a> Widget for SettingsWindow<'a> { {}\n\ \n\ \n\ + {}\n\ + \n\ + \n\ \n\ \n\ \n\ @@ -1417,6 +1461,7 @@ impl<'a> Widget for SettingsWindow<'a> { controls.bag, controls.enter, "Mouse Wheel", // Scroll chat + controls.free_look )) .color(TEXT_COLOR) .right_from(state.ids.controls_text, 0.0) diff --git a/voxygen/src/session.rs b/voxygen/src/session.rs index 5e9d46b6fb..335b06b21d 100644 --- a/voxygen/src/session.rs +++ b/voxygen/src/session.rs @@ -1,6 +1,6 @@ use crate::{ ecs::MyEntity, - hud::{DebugInfo, Event as HudEvent, Hud}, + hud::{DebugInfo, Event as HudEvent, Hud, PressBehavior}, i18n::{i18n_asset_key, VoxygenLocalization}, key_state::KeyState, menu::char_selection::CharSelectionState, @@ -402,9 +402,18 @@ impl PlayState for SessionState { Event::InputUpdate(GameInput::Charge, state) => { self.inputs.charge.set_state(state); }, - Event::InputUpdate(GameInput::FreeLook, true) => { - free_look = !free_look; - self.hud.free_look(free_look); + Event::InputUpdate(GameInput::FreeLook, state) => { + match (global_state.settings.gameplay.free_look_behavior, state) { + (PressBehavior::Toggle, true) => { + free_look = !free_look; + self.hud.free_look(free_look); + }, + (PressBehavior::Hold, state) => { + free_look = state; + self.hud.free_look(free_look); + }, + _ => {}, + }; }, Event::AnalogGameInput(input) => match input { AnalogGameInput::MovementX(v) => { @@ -681,6 +690,9 @@ impl PlayState for SessionState { global_state.settings.graphics.window_size = new_size; global_state.settings.save_to_file_warn(); }, + HudEvent::ChangeFreeLookBehavior(behavior) => { + global_state.settings.gameplay.free_look_behavior = behavior; + }, } } diff --git a/voxygen/src/settings.rs b/voxygen/src/settings.rs index 5f47300544..6a7590f093 100644 --- a/voxygen/src/settings.rs +++ b/voxygen/src/settings.rs @@ -1,5 +1,5 @@ use crate::{ - hud::{BarNumbers, CrosshairType, Intro, ShortcutNumbers, XpBar}, + hud::{BarNumbers, CrosshairType, Intro, PressBehavior, ShortcutNumbers, XpBar}, i18n, render::{AaMode, CloudMode, FluidMode}, ui::ScaleMode, @@ -69,7 +69,7 @@ impl Default for ControlSettings { Self { primary: KeyMouse::Mouse(MouseButton::Left), secondary: KeyMouse::Mouse(MouseButton::Right), - toggle_cursor: KeyMouse::Key(VirtualKeyCode::Tab), + toggle_cursor: KeyMouse::Key(VirtualKeyCode::L), escape: KeyMouse::Key(VirtualKeyCode::Escape), enter: KeyMouse::Key(VirtualKeyCode::Return), command: KeyMouse::Key(VirtualKeyCode::Slash), @@ -346,6 +346,7 @@ pub struct GameplaySettings { pub shortcut_numbers: ShortcutNumbers, pub bar_numbers: BarNumbers, pub ui_scale: ScaleMode, + pub free_look_behavior: PressBehavior, } impl Default for GameplaySettings { @@ -367,6 +368,7 @@ impl Default for GameplaySettings { shortcut_numbers: ShortcutNumbers::On, bar_numbers: BarNumbers::Off, ui_scale: ScaleMode::RelativeToWindow([1920.0, 1080.0].into()), + free_look_behavior: PressBehavior::Toggle, } } } From 15d2a6d3dc3364c43fdd1398c39c09d4060f4b10 Mon Sep 17 00:00:00 2001 From: Capucho Date: Fri, 27 Mar 2020 19:36:20 +0000 Subject: [PATCH 06/14] Fix the wrong default keybind change --- voxygen/src/settings.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voxygen/src/settings.rs b/voxygen/src/settings.rs index 6a7590f093..a8ce79e0b4 100644 --- a/voxygen/src/settings.rs +++ b/voxygen/src/settings.rs @@ -69,7 +69,7 @@ impl Default for ControlSettings { Self { primary: KeyMouse::Mouse(MouseButton::Left), secondary: KeyMouse::Mouse(MouseButton::Right), - toggle_cursor: KeyMouse::Key(VirtualKeyCode::L), + toggle_cursor: KeyMouse::Key(VirtualKeyCode::Tab), escape: KeyMouse::Key(VirtualKeyCode::Escape), enter: KeyMouse::Key(VirtualKeyCode::Return), command: KeyMouse::Key(VirtualKeyCode::Slash), @@ -102,7 +102,7 @@ impl Default for ControlSettings { interact: KeyMouse::Mouse(MouseButton::Right), toggle_wield: KeyMouse::Key(VirtualKeyCode::T), charge: KeyMouse::Key(VirtualKeyCode::Key1), - free_look: KeyMouse::Key(VirtualKeyCode::LAlt), + free_look: KeyMouse::Key(VirtualKeyCode::L), } } } From 1cb93b92ed89f60af0be6981b05ea1f212e00074 Mon Sep 17 00:00:00 2001 From: S Handley Date: Sun, 29 Mar 2020 01:47:18 +0000 Subject: [PATCH 07/14] Add Italian translation --- assets/voxygen/i18n/it.ron | 559 +++++++++++++++++++++++++++++++++++++ 1 file changed, 559 insertions(+) create mode 100644 assets/voxygen/i18n/it.ron diff --git a/assets/voxygen/i18n/it.ron b/assets/voxygen/i18n/it.ron new file mode 100644 index 0000000000..7099e32f5c --- /dev/null +++ b/assets/voxygen/i18n/it.ron @@ -0,0 +1,559 @@ +/// Translation document instructions +/// +/// In order to keep localization documents readible please follow the following +/// rules: +/// - separate the string map sections using a commentary describing the purpose +/// of the next section +/// - prepend multi-line strings with a commentary +/// - append one blank lines after a multi-line strings and two after sections +/// +/// To add a new language in Veloren, just write an additional `.ron` file in +/// `assets/voxygen/i18n` and that's it! + + + + +/// Localization for "global" Italian +VoxygenLocalization( + metadata: ( + language_name: "Italiano", + language_identifier: "it", + ), + convert_utf8_to_ascii: false, + fonts: { + "opensans": Font ( + asset_key: "voxygen.font.OpenSans-Regular", + scale_ratio: 1.0, + ), + "metamorph": Font ( + asset_key: "voxygen.font.Metamorphous-Regular", + scale_ratio: 1.0, + ), + "alkhemi": Font ( + asset_key: "voxygen.font.Alkhemikal", + scale_ratio: 1.0, + ), + "wizard": Font ( + asset_key: "voxygen.font.wizard", + scale_ratio: 1.0, + ), + "cyri": Font ( + asset_key: "voxygen.font.haxrcorp_4089_cyrillic_altgr_extended", + scale_ratio: 1.0, + ), + }, + string_map: { + /// Start Common section + // Texts used in multiple locations with the same formatting + "common.username": "Nome Utente", + "common.singleplayer": "Giocatore Singolo", + "common.multiplayer": "Multigiocatore", + "common.servers": "Server", + "common.quit": "Esci", + "common.settings": "Impostazioni", + "common.languages": "Lingue", + "common.interface": "Interfaccia", + "common.gameplay": "Gameplay", + "common.controls": "Controlli", + "common.video": "Video", + "common.sound": "Audio", + "common.resume": "Riprendi", + "common.characters": "Personaggi", + "common.close": "Chiudi", + "common.yes": "Si", + "common.no": "No", + "common.back": "Indietro", + "common.create": "Crea", + "common.okay": "Ok", + "common.disclaimer": "Disclaimer", + "common.cancel": "Cancella", + "common.none": "Nessuno", + "common.error": "Errore", + "common.fatal_error": "Errore Fatale", + + + + + + // Message when connection to the server is lost + "common.connection_lost": r#"Connessione persa! +Si è riavviato il server? +Il client è aggiornato?"#, + + + + + + + + + "common.races.orc": "Orco", + "common.races.human": "Umano", + "common.races.dwarf": "Nano", + "common.races.elf": "Elfo", + "common.races.undead": "Non-Morto", + "common.races.danari": "Danari", + + + + + "common.weapons.axe": "Ascia", + "common.weapons.sword": "Spada", + "common.weapons.staff": "Bastone", + "common.weapons.bow": "Arco", + "common.weapons.hammer": "Martello", + /// End Common section + + + + + + + + + /// Start Main screen section + "main.connecting": "Connessione in corso", + "main.creating_world": "Creazione del mondo", + + + + + // Welcome notice that appears the first time Veloren is started + "main.notice": r#"Benvenuto nella versione Alpha di Veloren! + + + + +Prima di tuffarti nel divertimento, ti preghiamo di tenere a mente che: + + + + +- Questa è un’Alpha molto prematura. Aspettati errori, gameplay non completo, meccaniche non rifinite, e funzioni mancanti. +- Se hai critiche costruttive o errori da segnalare, ci puoi contattare tramite Reddit, GitLab, o il server Discord della nostra community. +- Veloren è concesso in licenza con la licenza open-source GPL 3. Il che vuol dire che sei libero di giocare, modificare, e ridistribuire il gioco come tu desideri (purché il lavoro che ne derivi sia sempre sotto licenza GPL 3). +- Veloren è un progetto comunitario no-profit, e chiunque ci lavori sopra è un volontario. +Se ti piace ciò che vedi, sei il benvenuto ad unirti ai team di sviluppo e artistico! +- 'Voxel RPG' è un genere a sé stante. Gli sparatutto-in-prima-persona venivano considerati cloni di Doom. + + + + +Come loro, stiamo cercando di costruire una nicchia. Il gioco non è un clone, e il suo sviluppo divergerà dai giochi esistenti in futuro. + + + + +Grazie per aver dedicato del tempo a leggere questo avviso, speriamo che ti divertirai col gioco! + + + + +~ Il team di sviluppo di Veloren"#, + + + + + // Login process description + "main.login_process": r#"Informazioni sul processo del Login: + + +Se stai avendo problemi nell'accedere: + +Notare che hai bisogno di un account +per giocare su server con autenticazione abilitata. + +Puoi creare un account su + +https://account.veloren.net."#, + "main.login.server_not_found": "Server non trovato", + "main.login.authentication_error": "Errore di autenticazione server", + "main.login.server_full": "Il server è pieno", + "main.login.untrusted_auth_server": "Server di autenticazione non affidabile", + "main.login.outdated_client_or_server": "Il server è impazzito: Probabilmente le versioni sono incompatibili, controlla per degli aggiornamenti", + "main.login.timeout": "Tempo scaduto: Il server non ha risposto in tempo. (In sovraccarico o problemi di rete)", + "main.login.server_shut_down": "Il server è stato chiuso", + "main.login.already_logged_in": "Hai già effettuato l'accesso al server", + "main.login.network_error": "Errore di rete", + "main.login.failed_sending_request": "Richiesta ai server di autenticazione fallita", + "main.login.client_crashed": "Il client si è arrestato", + + + + + + + + + + /// End Main screen section + + + + + + + + + /// Start HUD Section + "hud.do_not_show_on_startup": "Non mostrare all’avvio", + "hud.show_tips": "Mostra consigli", + "hud.quests": "Missioni", + "hud.you_died": "Sei Morto", + + "hud.press_key_to_show_keybindings_fmt": "Premi {key} per mostrare le scorciatoie da tastiera", + "hud.press_key_to_show_debug_info_fmt": "Premi {key} per mostrare le informazioni di debug", + "hud.press_key_to_toggle_keybindings_fmt": "Premi {key} per attivare/disattivare le scorciatoie da tastiera", + "hud.press_key_to_toggle_debug_info_fmt": "Premi {key} per attivare/disattivare le informazioni di debug", + + + + + // Respawn message + "hud.press_key_to_respawn": r#"Premi {key} per rinascere al tuo Waypoint. + + + + +Premi Invio, scrivi /waypoint e conferma per impostarlo qui."#, + + + + + // Welcome message + "hud.welcome": r#"Benvenuto nell’Alpha di Veloren! + + + + +Alcuni consigli prima di cominciare: + + +MOLTO IMPORTANTE: Per impostare il tuo punto di rinascita scrivi /waypoint + + +nella chat. + + +Ciò può essere fatto anche se sei già morto! + + + + +Premi F1 per vedere i comandi chiave disponibili. + + +Scrivi /help nella chat per vedere i comandi della chat. + + + + +Ci sono forzieri e altri oggetti che appaiono casualmente nel Mondo! + + +Clicca col tasto destro del mouse per raccoglierli. + + +Per usare qualsiasi cosa tu ottenga da quei forzieri apri il tuo inventario con 'B'. + + +Fai doppio click sugli oggetti nella tua borsa per usarli o equipaggiarli. + + +Gettali via cliccandoci una volta sopra e una volta fuori dall’inventario. + + + + +Le notti possono essere molto buie in Veloren. + + +Accendi la tua lanterna scrivendo /lantern nella chat. + + + + +Vuoi sbloccare il cursore per chiudere questa finestra? Premi TAB! + + + + +Goditi il tuo soggiorno nel Mondo di Veloren."#, + + + + + "hud.settings.general": "Generale", + "hud.settings.none": "Nessuno", + "hud.settings.press_behavior.toggle": "Attiva/Disattiva" + "hud.settings.press_behavior.hold": "Tieni Premuto", + "hud.settings.help_window": "Finestra di Aiuto", + "hud.settings.debug_info": "Informazioni di Debug", + "hud.settings.tips_on_startup": "Consigli all’Avvio", + "hud.settings.ui_scale": "Proporzione Interfaccia", + "hud.settings.relative_scaling": "Proporzione Relativa", + "hud.settings.custom_scaling": "Proporzione Person.", + "hud.settings.crosshair": "Mirino", + "hud.settings.transparency": "Trasparenza", + "hud.settings.hotbar": "Barra Veloce", + "hud.settings.toggle_shortcuts": "Attivare/Disattivare Scorciatoie", + "hud.settings.toggle_bar_experience": "Attivare/Disattivare Barra dell’Esperienza", + "hud.settings.scrolling_combat_text": "Testo di Combattimento Scorrevole", + "hud.settings.single_damage_number": "Danno Nemico (Singolo)", + "hud.settings.cumulated_damage": "Danno Nemico (Cumulativo)", + "hud.settings.incoming_damage": "Danno Giocatore (Singolo)", + "hud.settings.cumulated_incoming_damage": "Danno Giocatore (Cumulativo)", + "hud.settings.energybar_numbers": "Numeri Barra dell’Energia", + "hud.settings.values": "Valori", + "hud.settings.percentages": "Percentuali", + "hud.settings.chat": "Chat", + "hud.settings.background_transparency": "Trasparenza dello Sfondo", + "hud.settings.none": "Nessuno", + + + + + "hud.settings.pan_sensitivity": "Sensibilità Camera", + "hud.settings.zoom_sensitivity": "Sensibilità Zoom", + "hud.settings.invert_scroll_zoom": "Zoom Invertito", + "hud.settings.invert_mouse_y_axis": "Asse Y del Mouse Invertito", + "hud.settings.free_look_behavior": "Comportamento Visuale Libera" + + + + + "hud.settings.view_distance": "Distanza Oggetto", + "hud.settings.maximum_fps": "FPS Massimi", + "hud.settings.fov": "Campo Visivo (gradi)", + "hud.settings.gamma": "Gamma", + "hud.settings.antialiasing_mode": "Modalità AntiAliasing", + "hud.settings.cloud_rendering_mode": "Modalità Renderizzazione Nuvole", + "hud.settings.fluid_rendering_mode": "Modalità Renderizzazione Fluido", + "hud.settings.fluid_rendering_mode.cheap": "Economico", + "hud.settings.fluid_rendering_mode.shiny": "Lucente", + "hud.settings.cloud_rendering_mode.regular": "Regolare", + "hud.settings.fullscreen": "Schermo Intero", + "hud.settings.save_window_size": "Salva dimensione finestra", + + + + + "hud.settings.music_volume": "Volume Musica", + "hud.settings.sound_effect_volume": "Volume Effetti Sonori", + "hud.settings.audio_device": "Dispositivo Audio", + + + + + // Control list + "hud.settings.control_names": r#"Cursore Libero +Attiva/Disattiva Finestra di Aiuto +Attiva/Disattiva Interfaccia +Attiva/Disattiva FPS e Informazioni di Debug +Scatta Screenshot +Attiva/Disattiva Nomi +Attiva/Disattiva Schermo Intero + + + + +Movimento in Avanti +Movimento a Sinistra +Movimento a Destra +Movimento all’Indietro + + +Salto + + +Aliante + + +Schivata + + +Rotolata + + +Scalata + + +Discesa + + +Camminata Automatica + + +Riporre/Sfoderare Armi + + +Mettere/Rimuovere Elmo + + +Sedersi + + +Cavalcatura + + +Interagire + + + + +Attacco Base +Attacco Secondario/Parata/Mira + + + + +Slot 1 Barra delle Abilità +Slot 2 Barra delle Abilità +Slot 3 Barra delle Abilità +Slot 4 Barra delle Abilità +Slot 5 Barra delle Abilità +Slot 6 Barra delle Abilità +Slot 7 Barra delle Abilità +Slot 8 Barra delle Abilità +Slot 9 Barra delle Abilità +Slot 10 Barra delle Abilità + + + + +Menù di Pausa +Impostazioni +Social +Mappa +Libro degli Incantesimi +Personaggio +Diario delle Missioni +Borsa + + + + + + +Invia Messaggio nella Chat +Scorrimento della Chat + + + +Camera Libera + + + +Comandi della Chat: + + + + +/alias [Name] - Cambia il tuo Nome nella Chat +/tp [Name] - Ti teleporta da un altro giocatore +/jump - Devia la tua posizione +/goto - Ti teleporta in una posizione +/kill - Suicidati +/pig - Fai apparire un maiale PNG +/wolf - Fai apparire un lupo PNG +/help - Mostra comandi della Chat + + +"#, + + + + + "hud.social": "Social", + "hud.social.online": "Online", + "hud.social.friends": "Amici", + "hud.social.not_yet_available": "Non ancora disponibile", + "hud.social.Faction": "Fazione", + "hud.social.play_online_fmt": "{nb_player} giocatore/i online", + + + + + "hud.spell": "Incantesimo", + + "hud.free_look_indicator": "Visuale Libera Attiva" + /// End HUD section + + + + + + + + + /// Start character selection section + "char_selection.delete_permanently": "Eliminare permanente questo Personaggio?", + "char_selection.change_server": "Cambia Server", + "char_selection.enter_world": "Unisciti al Mondo", + "char_selection.logout": "Disconnettiti", + "char_selection.create_new_charater": "Crea un nuovo Personaggio", + "char_selection.character_creation": "Creazione Personaggio", + + + + + "char_selection.human_default": "Umano Predefinito", + "char_selection.level_fmt": "Livello {level_nb}", + "char_selection.uncanny_valley": "Valle Perturbante", + "char_selection.plains_of_uncertainty": "Pianure dell'Incertezza", + "char_selection.beard": "Barba", + "char_selection.hair_style": "Stile Capelli", + "char_selection.hair_color": "Colore Capelli", + "char_selection.chest_color": "Colore Torace", + "char_selection.eye_color": "Colore Occhi", + "char_selection.skin": "Pelle", + "char_selection.eyebrows": "Sopracciglia", + "char_selection.accessories": "Accessori", + + + + + /// End chracter selection section + + + + + + + + + /// Start character window section + "character_window.character_name": "Nome Personaggio", + // Charater stats + "character_window.character_stats": r#"Stamina + + + + +Vitalità + + + + +Volontà +"#, + + + + + + + + + /// Start character window section + + + + + + /// Start Escape Menu Section + "esc_menu.logout": "Disconnettiti", + "esc_menu.quit_game": "Esci dal Gioco", + /// End Escape Menu Section + } +) \ No newline at end of file From bb293c44426c349805767ce134af15f34ab3bb55 Mon Sep 17 00:00:00 2001 From: Jack Rubino Date: Sun, 1 Mar 2020 16:07:35 +0000 Subject: [PATCH 08/14] Add Italian translation --- .../haxrcorp_4089_cyrillic_altgr_extended.ttf | 4 +- assets/voxygen/i18n/it.ron | 45 +++---------------- 2 files changed, 9 insertions(+), 40 deletions(-) diff --git a/assets/voxygen/font/haxrcorp_4089_cyrillic_altgr_extended.ttf b/assets/voxygen/font/haxrcorp_4089_cyrillic_altgr_extended.ttf index 28a2f56603..55115781c0 100644 --- a/assets/voxygen/font/haxrcorp_4089_cyrillic_altgr_extended.ttf +++ b/assets/voxygen/font/haxrcorp_4089_cyrillic_altgr_extended.ttf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9fe6b6694620909217869f4f3fdce28d9ce9e5f0720c5a601903c95669dc428 -size 22120 +oid sha256:a926033dce94d9b8f86011fbdf2e32c07fc952363cbcd1d840939c47bf74f386 +size 23628 diff --git a/assets/voxygen/i18n/it.ron b/assets/voxygen/i18n/it.ron index 7099e32f5c..75d8b7a9de 100644 --- a/assets/voxygen/i18n/it.ron +++ b/assets/voxygen/i18n/it.ron @@ -20,7 +20,7 @@ VoxygenLocalization( language_identifier: "it", ), convert_utf8_to_ascii: false, - fonts: { + fonts: { "opensans": Font ( asset_key: "voxygen.font.OpenSans-Regular", scale_ratio: 1.0, @@ -285,7 +285,7 @@ Goditi il tuo soggiorno nel Mondo di Veloren."#, "hud.settings.general": "Generale", "hud.settings.none": "Nessuno", - "hud.settings.press_behavior.toggle": "Attiva/Disattiva" + "hud.settings.press_behavior.toggle": "Attiva/Disattiva", "hud.settings.press_behavior.hold": "Tieni Premuto", "hud.settings.help_window": "Finestra di Aiuto", "hud.settings.debug_info": "Informazioni di Debug", @@ -317,7 +317,7 @@ Goditi il tuo soggiorno nel Mondo di Veloren."#, "hud.settings.zoom_sensitivity": "Sensibilità Zoom", "hud.settings.invert_scroll_zoom": "Zoom Invertito", "hud.settings.invert_mouse_y_axis": "Asse Y del Mouse Invertito", - "hud.settings.free_look_behavior": "Comportamento Visuale Libera" + "hud.settings.free_look_behavior": "Comportamento Visuale Libera", @@ -355,58 +355,40 @@ Attiva/Disattiva Nomi Attiva/Disattiva Schermo Intero - - Movimento in Avanti Movimento a Sinistra Movimento a Destra Movimento all’Indietro - Salto - Aliante - Schivata - Rotolata - Scalata - Discesa - Camminata Automatica - Riporre/Sfoderare Armi - Mettere/Rimuovere Elmo - Sedersi - Cavalcatura - Interagire - - Attacco Base Attacco Secondario/Parata/Mira - - Slot 1 Barra delle Abilità Slot 2 Barra delle Abilità Slot 3 Barra delle Abilità @@ -419,8 +401,6 @@ Slot 9 Barra delle Abilità Slot 10 Barra delle Abilità - - Menù di Pausa Impostazioni Social @@ -432,23 +412,15 @@ Borsa - - - Invia Messaggio nella Chat Scorrimento della Chat - - Camera Libera Comandi della Chat: - - - /alias [Name] - Cambia il tuo Nome nella Chat /tp [Name] - Ti teleporta da un altro giocatore /jump - Devia la tua posizione @@ -456,10 +428,7 @@ Comandi della Chat: /kill - Suicidati /pig - Fai apparire un maiale PNG /wolf - Fai apparire un lupo PNG -/help - Mostra comandi della Chat - - -"#, +/help - Mostra comandi della Chat"#, @@ -468,7 +437,7 @@ Comandi della Chat: "hud.social.online": "Online", "hud.social.friends": "Amici", "hud.social.not_yet_available": "Non ancora disponibile", - "hud.social.Faction": "Fazione", + "hud.social.faction": "Fazione", "hud.social.play_online_fmt": "{nb_player} giocatore/i online", @@ -476,7 +445,7 @@ Comandi della Chat: "hud.spell": "Incantesimo", - "hud.free_look_indicator": "Visuale Libera Attiva" + "hud.free_look_indicator": "Visuale Libera Attiva", /// End HUD section @@ -556,4 +525,4 @@ Volontà "esc_menu.quit_game": "Esci dal Gioco", /// End Escape Menu Section } -) \ No newline at end of file +) From abc1a041faaa4e0c08a846127f61938a04bbad55 Mon Sep 17 00:00:00 2001 From: Capucho Date: Fri, 27 Mar 2020 16:11:47 +0000 Subject: [PATCH 09/14] Added a portuguese translation --- CHANGELOG.md | 2 + .../haxrcorp_4089_cyrillic_altgr_extended.ttf | 4 +- assets/voxygen/i18n/en.ron | 1 + assets/voxygen/i18n/pt_PT.ron | 372 ++++++++++++++++++ voxygen/src/menu/main/ui.rs | 2 +- 5 files changed, 378 insertions(+), 3 deletions(-) create mode 100644 assets/voxygen/i18n/pt_PT.ron diff --git a/CHANGELOG.md b/CHANGELOG.md index a579276f06..341d89117a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added gamepad/controller support - Added player feedback when attempting to pickup an item with a full inventory - Added free look +- Added Italian translation +- Added Portuguese translation ### Changed diff --git a/assets/voxygen/font/haxrcorp_4089_cyrillic_altgr_extended.ttf b/assets/voxygen/font/haxrcorp_4089_cyrillic_altgr_extended.ttf index 55115781c0..8a611f6cfa 100644 --- a/assets/voxygen/font/haxrcorp_4089_cyrillic_altgr_extended.ttf +++ b/assets/voxygen/font/haxrcorp_4089_cyrillic_altgr_extended.ttf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a926033dce94d9b8f86011fbdf2e32c07fc952363cbcd1d840939c47bf74f386 -size 23628 +oid sha256:63aa82d178492b48fadb3ed79c2d508dcf3f4cb1297bdb8450eb6fe3278c6a42 +size 25284 diff --git a/assets/voxygen/i18n/en.ron b/assets/voxygen/i18n/en.ron index cdcad13db1..cafbce0178 100644 --- a/assets/voxygen/i18n/en.ron +++ b/assets/voxygen/i18n/en.ron @@ -62,6 +62,7 @@ VoxygenLocalization( "common.back": "Back", "common.create": "Create", "common.okay": "Okay", + "common.accept": "Accept", "common.disclaimer": "Disclaimer", "common.cancel": "Cancel", "common.none": "None", diff --git a/assets/voxygen/i18n/pt_PT.ron b/assets/voxygen/i18n/pt_PT.ron new file mode 100644 index 0000000000..a29d45f147 --- /dev/null +++ b/assets/voxygen/i18n/pt_PT.ron @@ -0,0 +1,372 @@ +/// Localization for portuguese (Portugal) +VoxygenLocalization( + metadata: ( + language_name: "Português", + language_identifier: "pt_PT", + ), + convert_utf8_to_ascii: false, + fonts: { + "opensans": Font ( + asset_key: "voxygen.font.OpenSans-Regular", + scale_ratio: 1.0, + ), + "metamorph": Font ( + asset_key: "voxygen.font.Metamorphous-Regular", + scale_ratio: 1.0, + ), + "alkhemi": Font ( + asset_key: "voxygen.font.Alkhemikal", + scale_ratio: 1.0, + ), + "wizard": Font ( + asset_key: "voxygen.font.wizard", + scale_ratio: 1.0, + ), + "cyri": Font ( + asset_key: "voxygen.font.haxrcorp_4089_cyrillic_altgr_extended", + scale_ratio: 1.0, + ), + }, + string_map: { + /// Start Common section + // Texts used in multiple locations with the same formatting + "common.username": "nome de utilizador", + "common.singleplayer": "Um jogador", + "common.multiplayer": "Multijogador", + "common.servers": "Servidores", + "common.quit": "Sair", + "common.settings": "Definições", + "common.languages": "Linguagens", + "common.interface": "Interface", + "common.gameplay": "Jogabilidade", + "common.controls": "Controlos", + "common.video": "Video", + "common.sound": "Som", + "common.resume": "Resumir", + "common.characters": "Personagens", + "common.close": "Fechar", + "common.yes": "Sim", + "common.no": "Não", + "common.back": "Voltar", + "common.create": "Criar", + "common.okay": "Okay", + "common.accept": "Aceitar", + "common.disclaimer": "Aviso", + "common.cancel": "Cancelar", + "common.none": "Nenhum", + "common.error": "Erro", + "common.fatal_error": "Erro fatal", + + // Message when connection to the server is lost + "common.connection_lost": r#"Conexâo perdida! +Será que o server reiniciou? +O cliente está atualizado?"#, + + + "common.races.orc": "Ogre", + "common.races.human": "Humano", + "common.races.dwarf": "Anão", + "common.races.elf": "Elfo", + "common.races.undead": "Morto-vivo", + "common.races.danari": "Danari", + + "common.weapons.axe": "Machado", + "common.weapons.sword": "Espada", + "common.weapons.staff": "Cajado", + "common.weapons.bow": "Arco", + "common.weapons.hammer": "Martelo", + /// End Common section + + + /// Start Main screen section + "main.connecting": "Conectando", + "main.creating_world": "Criando o mundo", + + // Welcome notice that appears the first time Veloren is started + "main.notice": r#"Bem vindo a versão alpha de Veloren! + +Antes de começar a jogar, por favor tenha em mente que: + +- Isto é uma versão muito experimental. Prepare-se para defeitos, jogabilidade muito inacabada, mecanismos por polir e funcionalidades por +adicionar. +- Se tiver comentários construtivos ou defeitos para reportar, pode contactar-nos através do Reddit, GitLab ou o nosso servidor comunitário de +Discord. +- Veloren está licenciado sob a licensa código aberto GPL 3. Isto significa que pode jogar, modificar e redistribuir como quiser + (Contanto que o trabalho derivado seja também GPL 3). +- Veloren é um projeto comunitário sem lucro, e toda a gente que trabalha nele é um voluntário. Se gostar do que ve, considere juntar-se a equipa +de desenvolvimento ou a de artes! +- 'Voxel RPG' é um género em si mesmo. First-person shooters costumavam ser chamados de clones do DOOM. + +Tal como eles, nós estamos a tentar construir um género. Este jogo não é um clone e o seu desenvolvimento vai divergir de jogos existentes no +futuro. + +Obrigado por ler este aviso, nós esperamos que goste do jogo! + +~ A equipa do Veloren"#, + + // Login process description + "main.login_process": r#"Informação sobre o processo de Login: + +Se tiver problemas a logar: + +Tenha em atenção que é necessário uma conta +para jogar em servidores com autenticação. + +Para criar uma conta navegue até + +https://account.veloren.net."#, + "main.login.server_not_found": "Servidor não encontrado", + "main.login.authentication_error": "Erro de autenticação", + "main.login.server_full": "Servidor está cheio", + "main.login.untrusted_auth_server": "Server de autenticação não confiado", + "main.login.outdated_client_or_server": "Servidor endoideceu: Provavelmente as versões são incompativéis, verifique se há versões mais recentes.", + "main.login.timeout": "Tempo esgotado: O servidor não respondeu a tempo. (Sobrecarregado ou problemas de rede).", + "main.login.server_shut_down": "O servidor encerrou", + "main.login.already_logged_in": "Vocé ja está logado neste servidor.", + "main.login.network_error": "Error de rede", + "main.login.failed_sending_request": "Pedido ao servidor de autenticação falhou", + "main.login.client_crashed": "O cliente crashou", + + /// End Main screen section + + + /// Start HUD Section + "hud.do_not_show_on_startup": "Não mostre no início", + "hud.show_tips": "Mostrar dicas", + "hud.quests": "Missões", + "hud.you_died": "Você Morreu", + + "hud.press_key_to_show_keybindings_fmt": "Clique em {key} para mostrar as teclas mapeadas", + "hud.press_key_to_show_debug_info_fmt": "Clique em {key} para mostrar a informação de depuração", + "hud.press_key_to_toggle_keybindings_fmt": "Clique em {key} para mostrar/ocultar as teclas mapeadas", + "hud.press_key_to_toggle_debug_info_fmt": "Clique em {key} para mostrar/ocultar a informação de depuração", + + // Respawn message + "hud.press_key_to_respawn": r#"Clique em {key} para renascer na última fogueira visitada."#, + + // Welcome message + "hud.welcome": r#"Bem vindo a Alpha do Veloren!, + + +Algumas dicas antes de começar: + + +MAIS IMPORTANTE: Para definir o seu local de renascimento escreva /waypoint no chat. + +Isto também pode ser realizado depois de morto! + + +Clique em F1 para ver as teclas mapeadas. + +Escreva /help no chat para ver os comandos de chat + + +A muitos baús e outros objetos a aperecer no mundo aleatoriamente! + +Pressione o botão direito do mouse pare coletá-los. + +Para usar o que coletou basta abrir o inventário pressionando a tecla 'B'. + +Faça duplo clique nos items para usá-los ou equipá-los. + +Deite-os fora cliquando uma vez neles e depois outra fora do inventário. + + +As noites podem ser bastante escuras. + +Acenda a lanterna escrevendo /lantern no chat. + + +Quer libertar o mouse para fechar esta janela? Clique em TAB! + + +Aprecie a sua estadia no mundo de Veloren."#, + + "hud.settings.general": "Geral", + "hud.settings.none": "Nenhum", + "hud.settings.press_behavior.toggle": "Alternar", + "hud.settings.press_behavior.hold": "Segurar", + "hud.settings.help_window": "Janela de ajuda", + "hud.settings.debug_info": "Informação de depuração", + "hud.settings.tips_on_startup": "Dicas no início", + "hud.settings.ui_scale": "Escala da interface", + "hud.settings.relative_scaling": "Escala relativa", + "hud.settings.custom_scaling": "Escala customizada", + "hud.settings.crosshair": "Crosshair", + "hud.settings.transparency": "Transparência", + "hud.settings.hotbar": "Hotbar", + "hud.settings.toggle_shortcuts": "Mostar/Ocultar atalhos", + "hud.settings.toggle_bar_experience": "Mostar/Ocultar barra de experiência", + "hud.settings.scrolling_combat_text": "Texto de combate deslizante", + "hud.settings.single_damage_number": "Números de dano únicos", + "hud.settings.cumulated_damage": "Dano acumulado", + "hud.settings.incoming_damage": "Dano recebido", + "hud.settings.cumulated_incoming_damage": "Dano recebido acumulado", + "hud.settings.energybar_numbers": "Números da barra de energia", + "hud.settings.values": "Valores", + "hud.settings.percentages": "Percentagens", + "hud.settings.chat": "Chat", + "hud.settings.background_transparency": "Transparência do fundo", + + "hud.settings.pan_sensitivity": "Sensibilidade de rotação", + "hud.settings.zoom_sensitivity": "Sensibilidade de zoom", + "hud.settings.invert_scroll_zoom": "Inverter scroll zoom", + "hud.settings.invert_mouse_y_axis": "Inverter o eixo Y do mouse", + "hud.settings.free_look_behavior": "Ativação de rotação livre", + + "hud.settings.view_distance": "Alcance de visão", + "hud.settings.maximum_fps": "FPS máximo", + "hud.settings.fov": "Campo de visão(graus)", + "hud.settings.gamma": "Luminosidade", + "hud.settings.antialiasing_mode": "Modo de antialiasing", + "hud.settings.cloud_rendering_mode": "Modo de representação de nuvens", + "hud.settings.fluid_rendering_mode": "Modo de representação de fluídos", + "hud.settings.fluid_rendering_mode.cheap": "Barato", + "hud.settings.fluid_rendering_mode.shiny": "Brilhante", + "hud.settings.cloud_rendering_mode.regular": "Normal", + "hud.settings.fullscreen": "Tela cheia", + "hud.settings.save_window_size": "Gravar dimensões", + + "hud.settings.music_volume": "Volume da música", + "hud.settings.sound_effect_volume": "Volume dos efeitos sonoros", + "hud.settings.audio_device": "Dispositivo de aúdio", + + // Control list + "hud.settings.control_names": r#"Libertar mouse +Mostar/Ocultar janela de ajuda +Mostar/Ocultar interface +Mostar/Ocultar FPS e informação de depuração +Gravar captura de ecrã +Mostar/Ocultar nomes +Mostar/Ocultar tela cheia + + +Mover para frente +Mover para a esquerda +Mover para a direita +Mover para trás + +Saltar + +Planador + +Desviar + +Rolar + +Trepar + +Descer + +Auto caminhar + +Embainhar/sacar armas + +Equipar/remover capacete + +Sentar + +Montar + +Interagir + + +Ataque básico +Ataque/bloquear/apontar secundário + + +Habilidade 1 +Habilidade 2 +Habilidade 3 +Habilidade 4 +Habilidade 5 +Habilidade 6 +Habilidade 7 +Habilidade 8 +Habilidade 9 +Habilidade 10 + + +Menu de pausa +Definições +Social +Mapa +Livro de feitiços +Personagem +Registo de missões +Inventário + + + +Enviar mensagem de chat +Scroll chat + + +Comandos de chat: + +/alias [nome] - Mudar o seu nome de chat +/tp [nome] - Teletransporta-te para outro player +/jump - Deslocar a posição +/goto - Teletransporta-te para a posição +/kill - Suicidar +/pig - Invocar NPC de porco +/wolf - Invocar NPC do lobo +/help - Mostrar comandos de chat"#, + + "hud.social": "Social", + "hud.social.online": "Online", + "hud.social.friends": "Amigos", + "hud.social.not_yet_available": "Indisponível de momento", + "hud.social.faction": "Facção", + "hud.social.play_online_fmt": "{nb_player} jogador(es) online", + + "hud.spell": "Feitiço", + + "hud.free_look_indicator": "Rotação livre ativada", + /// End HUD section + + + /// Start chracter selection section + "char_selection.delete_permanently": "Deletar esta personagem permanentemente?", + "char_selection.change_server": "Mudar de servidor", + "char_selection.enter_world": "Entrar no mundo", + "char_selection.logout": "Desconectar", + "char_selection.create_new_charater": "Criar nova personagem", + "char_selection.character_creation": "Criação de personagem", + + "char_selection.human_default": "Humano padrão", + "char_selection.level_fmt": "Nível {level_nb}", + "char_selection.uncanny_valley": "Vale da estranheza", + "char_selection.plains_of_uncertainty": "Planícies da incerteza", + "char_selection.beard": "Barba", + "char_selection.hair_style": "Estilo do cabelo", + "char_selection.hair_color": "Cor do cabelo", + "char_selection.chest_color": "Cor do peitoral", + "char_selection.eye_color": "Cor dos olhos", + "char_selection.skin": "Cor da pele", + "char_selection.eyebrows": "Pestanas", + "char_selection.accessories": "Acessórios", + + /// End chracter selection section + + + /// Start character window section + "character_window.character_name": "Nome da personagem", + // Charater stats + "character_window.character_stats": r#"Resistência + +Aptidão fisíca + +Força de vontade +"#, + + + /// Start character window section + + + /// Start Escape Menu Section + "esc_menu.logout": "Desconectar", + "esc_menu.quit_game": "Sair do jogo", + /// End Escape Menu Section + } +) diff --git a/voxygen/src/menu/main/ui.rs b/voxygen/src/menu/main/ui.rs index 8832cc7e59..25ed23f3df 100644 --- a/voxygen/src/menu/main/ui.rs +++ b/voxygen/src/menu/main/ui.rs @@ -428,7 +428,7 @@ impl MainMenuUi { .hover_image(self.imgs.button_hover) .press_image(self.imgs.button_press) .label_y(Relative::Scalar(2.0)) - .label("Accept") + .label(&self.voxygen_i18n.get("common.accept")) .label_font_size(self.fonts.cyri.scale(22)) .label_color(TEXT_COLOR) .label_font_id(self.fonts.cyri.conrod_id) From 3f1f9b9ab0eb374e9479bb1b7b97e191adf1f824 Mon Sep 17 00:00:00 2001 From: Capucho Date: Mon, 30 Mar 2020 22:00:46 +0100 Subject: [PATCH 10/14] Make so that the resume button doesn't eject the mouse --- voxygen/src/hud/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index af37606609..8147eef49b 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -1948,8 +1948,8 @@ impl Hud { }, Some(esc_menu::Event::Close) => { self.show.esc_menu = false; - self.show.want_grab = false; - self.force_ungrab = true; + self.show.want_grab = true; + self.force_ungrab = false; // Unpause the game if we are on singleplayer if let Some(singleplayer) = global_state.singleplayer.as_ref() { From c5331cbabe35bbd3b409d2641e4608e66077b37d Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Fri, 27 Mar 2020 20:28:46 +0300 Subject: [PATCH 11/14] Add Turkish (Turkey) translation file --- CHANGELOG.md | 1 + .../haxrcorp_4089_cyrillic_altgr_extended.ttf | 4 +- assets/voxygen/i18n/tr_TR.ron | 388 ++++++++++++++++++ 3 files changed, 391 insertions(+), 2 deletions(-) create mode 100644 assets/voxygen/i18n/tr_TR.ron diff --git a/CHANGELOG.md b/CHANGELOG.md index 341d89117a..c397eafe55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added free look - Added Italian translation - Added Portuguese translation +- Added Turkish translation ### Changed diff --git a/assets/voxygen/font/haxrcorp_4089_cyrillic_altgr_extended.ttf b/assets/voxygen/font/haxrcorp_4089_cyrillic_altgr_extended.ttf index 8a611f6cfa..f1287a32c0 100644 --- a/assets/voxygen/font/haxrcorp_4089_cyrillic_altgr_extended.ttf +++ b/assets/voxygen/font/haxrcorp_4089_cyrillic_altgr_extended.ttf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:63aa82d178492b48fadb3ed79c2d508dcf3f4cb1297bdb8450eb6fe3278c6a42 -size 25284 +oid sha256:4d2fcb65f9c3956f91ddebc350729221704c75b3559d120772d4c9bd1898d720 +size 26232 diff --git a/assets/voxygen/i18n/tr_TR.ron b/assets/voxygen/i18n/tr_TR.ron new file mode 100644 index 0000000000..8aaff2eef4 --- /dev/null +++ b/assets/voxygen/i18n/tr_TR.ron @@ -0,0 +1,388 @@ +/// Translation document instructions +/// +/// In order to keep localization documents readible please follow the following +/// rules: +/// - separate the string map sections using a commentary describing the purpose +/// of the next section +/// - prepend multi-line strings with a commentary +/// - append one blank lines after a multi-line strings and two after sections +/// +/// To add a new language in Veloren, just write an additional `.ron` file in +/// `assets/voxygen/i18n` and that's it! + +/// Localization for Turkish (Turkey) +VoxygenLocalization( + metadata: ( + language_name: "Türkçe (Türkiye)", + language_identifier: "tr_TR", + ), + convert_utf8_to_ascii: false, + fonts: { + "opensans": Font ( + asset_key: "voxygen.font.OpenSans-Regular", + scale_ratio: 1.0, + ), + "metamorph": Font ( + asset_key: "voxygen.font.Metamorphous-Regular", + scale_ratio: 1.0, + ), + "alkhemi": Font ( + asset_key: "voxygen.font.Alkhemikal", + scale_ratio: 1.0, + ), + "wizard": Font ( + asset_key: "voxygen.font.wizard", + scale_ratio: 1.0, + ), + "cyri": Font ( + asset_key: "voxygen.font.haxrcorp_4089_cyrillic_altgr_extended", + scale_ratio: 1.0, + ), + }, + string_map: { + /// Start Common section + // Texts used in multiple locations with the same formatting + "common.username": "kullanıcı adı", + "common.singleplayer": "Tek oyuncu", + "common.multiplayer": "Çok oyunculu", + "common.servers": "Sunucular", + "common.quit": "Çık", + "common.settings": "Ayarlar", + "common.languages": "Diller", + "common.interface": "Arayüz", + "common.gameplay": "Oynanış", + "common.controls": "Kontroller", + "common.video": "Video", + "common.sound": "Ses", + "common.resume": "Devam Et", + "common.characters": "Karakterler", + "common.close": "Kapat", + "common.yes": "Evet", + "common.no": "Hayır", + "common.back": "Geri", + "common.create": "Oluştur", + "common.okay": "Tamam", + "common.disclaimer": "Uyarı", + "common.cancel": "İptal Et", + "common.none": "Yok", + "common.error": "Hata", + "common.fatal_error": "Ölümcül hata", + "common.accept": "Kabul Et", + + // Message when connection to the server is lost + "common.connection_lost": r#"Bağlantı koptu! +Sunucu yeniden mi başladı? +İstemci güncel mi?"#, + + + "common.races.orc": "Ork", + "common.races.human": "İnsan", + "common.races.dwarf": "Cüce", + "common.races.elf": "Elf", + "common.races.undead": "Hortlak", + "common.races.danari": "Danari", + + "common.weapons.axe": "Balta", + "common.weapons.sword": "Kılıç", + "common.weapons.staff": "Asa", + "common.weapons.bow": "Yay", + "common.weapons.hammer": "Çekiç", + /// End Common section + + + /// Start Main screen section + "main.connecting": "Bağlanılıyor", + "main.creating_world": "Dünya oluşturuluyor", + + // Welcome notice that appears the first time Veloren is started + "main.notice": r#"Veloren Alfa sürümüne hoşgeldin! + +Eğlenmeye başlamadan önce, lütfen bir kaç şeyi aklında tut: + +- Bu alfa sürümü daha çok yeni. Hatalar, bitmemiş oynanış, elden geçirilmemiş mekanikler ve eksik özellikler bulunuyor. +- Yapıcı geri bildirim veya hata raporların varsa, bize Reddit, GitLab veya Discord sunucumuzdan ulaşabilirsin. +- Veloren GPL 3 açık kaynak lisansı ile lisanslıdır. Bunun anlamı, oyunu istediğin gibi oynayabilir, değiştirebilir ve dağıtabilirsin +(türetilmiş çalışmalarda GPL 3 ile lisanslanmış olduğu sürece) +- Veloren kar gütmeyen bir topluluk projesidir ve üzerinde çalışan herkes birer gönüllüdür. +Gördüklerini beğendiysen, geliştirme veya sanat takımlarına katılabilirsin! +- 'Voxel RPG' kendi başına bir tür. Birinci şahıs nişancı oyunları önceden Doom kopyaları olarak adlandırılıyordu. + +Bizde onlar gibi bir niş inşa etmeye çalışıyoruz. Bu oyun bir kopya değil ve gelecekte gelişimi mevcut oyunlardan ayrılacak. + +Bu bildiriyi okumaya zaman ayırdığın için teşekkür ederiz, umarız ki oyundan memnun kalırsın! + +~ Veloren Geliştiricileri"#, + + // Login process description + "main.login_process": r#"Giriş işlemi hakkında bilgi: + +Eğer giriş yaparken sorunlarla karşılaşıyorsan: + +Lütfen kimlik doğrulaması gerektiren sunucularda +oynamak için bir hesaba ihtiyacın olduğunu hatırla. + +https://account.veloren.net adresinden + +bir hesap oluşturabilirsin."#, + "main.login.server_not_found": "Sunucu bulunamadı", + "main.login.authentication_error": "Sunucuda kimlik doğrulama hatası", + "main.login.server_full": "Sunucu dolu", + "main.login.untrusted_auth_server": "Kimlik doğrulama sunucusu güvenilir değil", + "main.login.outdated_client_or_server": "SunucuÇılgınaDöndü: Muhtemelen versiyonlar uyuşmuyor, güncellemeler için kontrol et.", + "main.login.timeout": "Zamanaşımı: Sunucu zamanında cevap vermedi. (Aşırı yüklenme veya ağ sorunları).", + "main.login.server_shut_down": "Sunucu kapandı", + "main.login.already_logged_in": "Zaten sunucuya giriş yapmışsın.", + "main.login.network_error": "Ağ hatası", + "main.login.failed_sending_request": "Kimlik doğrulama sunucusuna istek gönderilemedi", + "main.login.client_crashed": "İstemci çöktü", + + /// End Main screen section + + + /// Start HUD Section + "hud.do_not_show_on_startup": "Bunu açılışta gösterme", + "hud.show_tips": "Öneriler", + "hud.quests": "Görevler", + "hud.you_died": "Öldün", + + "hud.press_key_to_show_keybindings_fmt": "Kontrolleri göstermek için {key}'e bas", + "hud.press_key_to_show_debug_info_fmt": "Hata ayıklama bilgilerini göstermek için {key}'e bas", + "hud.press_key_to_toggle_keybindings_fmt": "Kontrolleri açmak veya kapamak için {key}'e bas", + "hud.press_key_to_toggle_debug_info_fmt": "Hata ayıklama bilgilerini açmak veya kapamak için {key}'e bas", + + // Respawn message + "hud.press_key_to_respawn": r#"Ziyaret ettiğin en son kamp ateşinde yeniden doğmak için {key}'e bas."#, + + // Welcome message + "hud.welcome": r#"Veloren Alfa sürümüne hoşgeldin!, + + +Başlamadan önce bazı ipuçları: + + +EN ÖNEMLİSİ: Yeniden doğma noktanı ayarlamak için sohbete /waypoint yaz. + +Bu ölmüşsen bile yapılabilir! + + +Kontrolleri görmek için F1'e bas. + +Sohbet komutlarını görmek için sohbete /help yaz. + + +Dünyada rastgele oluşan sandıklar ve başka objeler var! + +Onları toplamak için Sağ-Tık kullan. + +Topladıklarını kullanmak için 'B'ye basarak envanterini aç. + +Envanterindeki eşyaları kullanmak veya kuşanmak için iki kere üzerlerine tıkla. + +Üzerlerine bir kere tıklayıp ve sonra envaterin dışına tıklayarak onları at. + + +Veloren'de geceler oldukça karanlık olabiliyor. + +Sohbete /lantern yazarak fenerini yak. + + +Bu pencereyi kapatmak için imlecini serbest bırakmak mı istiyorsun? TAB'a bas! + + +Veloren'in Dünyasında sana iyi eğlenceler!"#, + + "hud.settings.general": "Genel", + "hud.settings.none": "Yok", + "hud.settings.press_behavior.toggle": "Aç/kapa", + "hud.settings.press_behavior.hold": "Basılı tut", + "hud.settings.help_window": "Yardım Penceresi", + "hud.settings.debug_info": "Hata Ayıklama Bilgileri", + "hud.settings.tips_on_startup": "Açılışta İpuçlarını Göster", + "hud.settings.ui_scale": "Arayüz Ölçeği", + "hud.settings.relative_scaling": "Otomatik Ölçek", + "hud.settings.custom_scaling": "Özel Ölçek", + "hud.settings.crosshair": "İmleç tipi", + "hud.settings.transparency": "Şeffaflık", + "hud.settings.hotbar": "Hotbar", + "hud.settings.toggle_shortcuts": "Kısayolları aç/kapa", + "hud.settings.toggle_bar_experience": "Tecrübe çubuğunu aç/kapa", + "hud.settings.scrolling_combat_text": "Verilen/Alınan Hasar Yazısı", + "hud.settings.single_damage_number": "Verilen Hasarı Tek Tek Göster", + "hud.settings.cumulated_damage": "Toplam Verilen Hasarı Göster", + "hud.settings.incoming_damage": "Alınan Hasarı Tek Tek Göster", + "hud.settings.cumulated_incoming_damage": "Toplam Alınan Hasarı Göster", + "hud.settings.energybar_numbers": "Enerji çubuğu değerleri", + "hud.settings.values": "Sayılar", + "hud.settings.percentages": "Yüzdeler", + "hud.settings.chat": "Sohbet", + "hud.settings.background_transparency": "Arkaplan Şeffaflığı", + "hud.settings.none": "Yok", + + "hud.settings.pan_sensitivity": "Kaydırma Hassaslığı", + "hud.settings.zoom_sensitivity": "Büyütme Hassaslığı", + "hud.settings.invert_scroll_zoom": "Kaydırma Büyütmesini ters çevir", + "hud.settings.invert_mouse_y_axis": "Fare Y eksenini ters çevir", + "hud.settings.free_look_behavior": "Serbest bakış davranışı", + + "hud.settings.view_distance": "Görüş Mesafesi", + "hud.settings.maximum_fps": "Maksimum FPS", + "hud.settings.fov": "Görüş alanı (derece)", + "hud.settings.gamma": "Gama", + "hud.settings.antialiasing_mode": "Kenar Yumuşatma Modu", + "hud.settings.cloud_rendering_mode": "Bulut Render Modu", + "hud.settings.fluid_rendering_mode": "Su Render Modu", + "hud.settings.fluid_rendering_mode.cheap": "Ucuz", + "hud.settings.fluid_rendering_mode.shiny": "Güzel", + "hud.settings.cloud_rendering_mode.regular": "Normal", + "hud.settings.fullscreen": "Tam ekran", + "hud.settings.save_window_size": "Pencere boyutunu kaydet", + + "hud.settings.music_volume": "Müzik Sesi", + "hud.settings.sound_effect_volume": "Efekt Sesi", + "hud.settings.audio_device": "Ses Aygıtı", + + // Control list + "hud.settings.control_names": r#"İmleci serbest bırak +Yardım Pencerisini aç/kapa +Arayüzü aç/kapa +FPS ve hata ayıklama bilgilerini aç/kapa +Ekran görüntüsü al +İsim etiketlerini aç/kapa +Tam ekranı aç/kapa + + +İleri Git +Sola Git +Sağa Git +Geriye Git + +Zıpla + +Planör + +Sıçra + +Yuvarlan + +Tırman + +İn + +Otomatik yürüme + +Silahları koy/çıkar + +Kaskı kuşan/çıkar + +Otur + +Bin + +Etkileşim + + +Basit Saldırı +İkincil Saldırı/Blok/Nişan Alma + + +Yetenek çubuğu Slot 1 +Yetenek çubuğu Slot 2 +Yetenek çubuğu Slot 3 +Yetenek çubuğu Slot 4 +Yetenek çubuğu Slot 5 +Yetenek çubuğu Slot 6 +Yetenek çubuğu Slot 7 +Yetenek çubuğu Slot 8 +Yetenek çubuğu Slot 9 +Yetenek çubuğu Slot 10 + + +Duraklatma Menüsü +Ayarlar +Sosyal +Harita +Büyü kitabı +Karakter +Görev kaydı +Çanta + + + +Sohbet Mesajı Gönder +Sohbeti Kaydır + + +Serbest bakış + + +Sohbet komutları: + +/alias [İsim] - Sohbet İsmini değiştir +/tp [İsim] - Seni başka bir oyuncuya ışınlar +/jump - Pozisyonunu kaydır +/goto - Bir pozisyona ışınlan +/kill - Kendini öldür +/pig - Domuz NPC'si oluştur +/wolf - Kurt NPC'si oluştur +/help - Sohbet komutlarını göster"#, + + "hud.social": "Sosyal", + "hud.social.online": "Çevrimiçi", + "hud.social.friends": "Arkadaşlar", + "hud.social.not_yet_available": "Şu anda kullanılabilir değil", + "hud.social.faction": "Klan", + "hud.social.play_online_fmt": "{nb_player} oyuncu çevrimiçi", + + "hud.spell": "Büyü", + + "hud.free_look_indicator": "Serbest bakış açık", + /// End HUD section + + + /// Start chracter selection section + // Character delete question + "char_selection.delete_permanently": r#"Bu karakteri kalıcı olarak +silmek istediğinden emin misin?"#, + + "char_selection.change_server": "Sunucu Değiştir", + "char_selection.enter_world": "Dünyaya Gir", + "char_selection.logout": "Çıkış yap", + "char_selection.create_new_charater": "Yeni Karakter Oluştur", + "char_selection.character_creation": "Karakter Oluşumu", + + "char_selection.human_default": "İnsan Varsayılanı", + "char_selection.level_fmt": "Seviye {level_nb}", + "char_selection.uncanny_valley": "Esrarengiz Vadi", + "char_selection.plains_of_uncertainty": "Belirsizlik Ovaları", + "char_selection.beard": "Sakal", + "char_selection.hair_style": "Saç Stili", + "char_selection.hair_color": "Saç Rengi", + "char_selection.chest_color": "Göğüs Rengi", + "char_selection.eye_color": "Göz Rengi", + "char_selection.skin": "Deri", + "char_selection.eyebrows": "Kaşlar", + "char_selection.accessories": "Aksesuarlar", + + /// End chracter selection section + + + /// Start character window section + "character_window.character_name": "Karakter Adı", + // Charater stats + "character_window.character_stats": r#"Dayanıklılık + +Fiziksel yetenek + +İrade gücü +"#, + + + /// Start character window section + + + /// Start Escape Menu Section + "esc_menu.logout": "Çıkış yap", + "esc_menu.quit_game": "Oyundan çık", + /// End Escape Menu Section + } +) From c82d1b9316900e955320b79b3a33c654003b37b5 Mon Sep 17 00:00:00 2001 From: Marli Frost Date: Sat, 28 Mar 2020 13:12:35 +0000 Subject: [PATCH 12/14] allow the game to start without an audio device --- voxygen/src/audio/mod.rs | 7 ++----- voxygen/src/main.rs | 17 +++++++++-------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/voxygen/src/audio/mod.rs b/voxygen/src/audio/mod.rs index 1709649c89..299a8c53fe 100644 --- a/voxygen/src/audio/mod.rs +++ b/voxygen/src/audio/mod.rs @@ -238,11 +238,8 @@ impl AudioFrontend { /// Returns the default audio device. /// Does not return rodio Device struct in case our audio backend changes. -pub fn get_default_device() -> String { - rodio::default_output_device() - .expect("No audio output devices detected.") - .name() - .expect("Unable to get device name") +pub fn get_default_device() -> Option { + rodio::default_output_device().map(|dev| dev.name().expect("Unable to get device name")) } /// Returns a vec of the audio devices available. diff --git a/voxygen/src/main.rs b/voxygen/src/main.rs index 43b6726ab6..f27beab1ff 100644 --- a/voxygen/src/main.rs +++ b/voxygen/src/main.rs @@ -44,15 +44,16 @@ fn main() { panic!("Failed to save settings: {:?}", err); } - let audio_device = || match &settings.audio.audio_device { - Some(d) => d.to_string(), - None => audio::get_default_device(), - }; + let audio_device = settings + .audio + .audio_device + .as_ref() + .map(|s| s.clone()) + .or_else(audio::get_default_device); - let mut audio = if settings.audio.audio_on { - AudioFrontend::new(audio_device(), settings.audio.max_sfx_channels) - } else { - AudioFrontend::no_audio() + let mut audio = match (audio_device, settings.audio.audio_on) { + (Some(dev), true) => AudioFrontend::new(dev, settings.audio.max_sfx_channels), + _ => AudioFrontend::no_audio() }; audio.set_music_volume(settings.audio.music_volume); From a83f09bd606b8bc1154fc54d291a54336996cb93 Mon Sep 17 00:00:00 2001 From: Marli Frost Date: Tue, 31 Mar 2020 18:02:26 +0100 Subject: [PATCH 13/14] fix: avoid rodio API when audio is disabled --- voxygen/src/main.rs | 24 ++++++++++++++---------- voxygen/src/settings.rs | 5 +++++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/voxygen/src/main.rs b/voxygen/src/main.rs index f27beab1ff..f874529d10 100644 --- a/voxygen/src/main.rs +++ b/voxygen/src/main.rs @@ -1,4 +1,5 @@ #![deny(unsafe_code)] +#![feature(bool_to_option)] #![recursion_limit = "2048"] use veloren_voxygen::{ @@ -44,17 +45,20 @@ fn main() { panic!("Failed to save settings: {:?}", err); } - let audio_device = settings + let mut audio = settings .audio - .audio_device - .as_ref() - .map(|s| s.clone()) - .or_else(audio::get_default_device); - - let mut audio = match (audio_device, settings.audio.audio_on) { - (Some(dev), true) => AudioFrontend::new(dev, settings.audio.max_sfx_channels), - _ => AudioFrontend::no_audio() - }; + .audio_on + .then(|| { + settings + .audio + .audio_device + .as_ref() + .map(Clone::clone) + .or_else(audio::get_default_device) + }) + .flatten() + .map(|dev| AudioFrontend::new(dev, settings.audio.max_sfx_channels)) + .unwrap_or_else(AudioFrontend::no_audio); audio.set_music_volume(settings.audio.music_volume); audio.set_sfx_volume(settings.audio.sfx_volume); diff --git a/voxygen/src/settings.rs b/voxygen/src/settings.rs index a8ce79e0b4..59583661e4 100644 --- a/voxygen/src/settings.rs +++ b/voxygen/src/settings.rs @@ -474,6 +474,11 @@ pub struct AudioSettings { /// Audio Device that Voxygen will use to play audio. pub audio_device: Option, + /// Veloren's audio system wont work on some systems, + /// so you can use this to disable it, and allow the + /// game to function + // If this option is disabled, functions in the rodio + // library MUST NOT be called. pub audio_on: bool, } From 3806f08eb00b51d78cd1ce9ff1dc38cc189b2591 Mon Sep 17 00:00:00 2001 From: Marli Frost Date: Tue, 31 Mar 2020 19:12:49 +0100 Subject: [PATCH 14/14] feat: configure audio output using an enum --- voxygen/src/main.rs | 23 ++++++++--------------- voxygen/src/menu/main/mod.rs | 2 +- voxygen/src/session.rs | 3 ++- voxygen/src/settings.rs | 30 +++++++++++++++++++++--------- 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/voxygen/src/main.rs b/voxygen/src/main.rs index f874529d10..72382f5ecd 100644 --- a/voxygen/src/main.rs +++ b/voxygen/src/main.rs @@ -8,7 +8,7 @@ use veloren_voxygen::{ logging, menu::main::MainMenuState, meta::Meta, - settings::Settings, + settings::{AudioOutput, Settings}, window::Window, Direction, GlobalState, PlayState, PlayStateResult, }; @@ -45,20 +45,13 @@ fn main() { panic!("Failed to save settings: {:?}", err); } - let mut audio = settings - .audio - .audio_on - .then(|| { - settings - .audio - .audio_device - .as_ref() - .map(Clone::clone) - .or_else(audio::get_default_device) - }) - .flatten() - .map(|dev| AudioFrontend::new(dev, settings.audio.max_sfx_channels)) - .unwrap_or_else(AudioFrontend::no_audio); + let mut audio = match settings.audio.output { + AudioOutput::Off => None, + AudioOutput::Automatic => audio::get_default_device(), + AudioOutput::Device(ref dev) => Some(dev.clone()), + } + .map(|dev| AudioFrontend::new(dev, settings.audio.max_sfx_channels)) + .unwrap_or_else(AudioFrontend::no_audio); audio.set_music_volume(settings.audio.music_volume); audio.set_sfx_volume(settings.audio.sfx_volume); diff --git a/voxygen/src/menu/main/mod.rs b/voxygen/src/menu/main/mod.rs index 145d8e9b16..3e873f048d 100644 --- a/voxygen/src/menu/main/mod.rs +++ b/voxygen/src/menu/main/mod.rs @@ -36,7 +36,7 @@ impl PlayState for MainMenuState { let mut client_init: Option = None; // Kick off title music - if global_state.settings.audio.audio_on && global_state.audio.music_enabled() { + if global_state.settings.audio.output.is_enabled() && global_state.audio.music_enabled() { global_state.audio.play_title_music(); } diff --git a/voxygen/src/session.rs b/voxygen/src/session.rs index 335b06b21d..2f1220c070 100644 --- a/voxygen/src/session.rs +++ b/voxygen/src/session.rs @@ -6,6 +6,7 @@ use crate::{ menu::char_selection::CharSelectionState, render::Renderer, scene::{camera, Scene, SceneData}, + settings::AudioOutput, window::{AnalogGameInput, Event, GameInput}, Direction, Error, GlobalState, PlayState, PlayStateResult, }; @@ -613,7 +614,7 @@ impl PlayState for SessionState { HudEvent::ChangeAudioDevice(name) => { global_state.audio.set_device(name.clone()); - global_state.settings.audio.audio_device = Some(name); + global_state.settings.audio.output = AudioOutput::Device(name); global_state.settings.save_to_file_warn(); }, HudEvent::ChangeMaxFPS(fps) => { diff --git a/voxygen/src/settings.rs b/voxygen/src/settings.rs index 59583661e4..e28132f592 100644 --- a/voxygen/src/settings.rs +++ b/voxygen/src/settings.rs @@ -461,7 +461,26 @@ impl Default for GraphicsSettings { } } } +#[derive(Clone, Debug, Serialize, Deserialize)] +pub enum AudioOutput { + /// Veloren's audio system wont work on some systems, + /// so you can use this to disable it, and allow the + /// game to function + // If this option is disabled, functions in the rodio + // library MUST NOT be called. + Off, + Automatic, + Device(String), +} +impl AudioOutput { + pub fn is_enabled(&self) -> bool { + match self { + Self::Off => false, + _ => true, + } + } +} /// `AudioSettings` controls the volume of different audio subsystems and which /// device is used. #[derive(Clone, Debug, Serialize, Deserialize)] @@ -473,13 +492,7 @@ pub struct AudioSettings { pub max_sfx_channels: usize, /// Audio Device that Voxygen will use to play audio. - pub audio_device: Option, - /// Veloren's audio system wont work on some systems, - /// so you can use this to disable it, and allow the - /// game to function - // If this option is disabled, functions in the rodio - // library MUST NOT be called. - pub audio_on: bool, + pub output: AudioOutput, } impl Default for AudioSettings { @@ -489,8 +502,7 @@ impl Default for AudioSettings { music_volume: 0.4, sfx_volume: 0.6, max_sfx_channels: 10, - audio_device: None, - audio_on: true, + output: AudioOutput::Automatic, } } }