From 924c24fa78e4f8502666aff9a4c77d49d2f9d54b Mon Sep 17 00:00:00 2001 From: Vincent Foulon Date: Sun, 27 Dec 2020 20:59:03 +0100 Subject: [PATCH] (PoC)(WIP) Convert single translation file to a folder --- assets/voxygen/i18n/en.ron | 664 --------------------- assets/voxygen/i18n/en/_self.ron | 154 +++++ assets/voxygen/i18n/en/buff.ron | 62 ++ assets/voxygen/i18n/en/char_selection.ron | 72 +++ assets/voxygen/i18n/en/common.ron | 110 ++++ assets/voxygen/i18n/en/debuff.ron | 52 ++ assets/voxygen/i18n/en/esc_menu.ron | 52 ++ assets/voxygen/i18n/en/gameinput.ron | 106 ++++ assets/voxygen/i18n/en/hud.ron | 329 ++++++++++ assets/voxygen/i18n/en/hud/_self.ron | 114 ++++ assets/voxygen/i18n/en/hud/bag.ron | 71 +++ assets/voxygen/i18n/en/hud/char_window.ron | 60 ++ assets/voxygen/i18n/en/hud/chat.ron | 76 +++ assets/voxygen/i18n/en/hud/crafting.ron | 55 ++ assets/voxygen/i18n/en/hud/group.ron | 62 ++ assets/voxygen/i18n/en/hud/map.ron | 66 ++ assets/voxygen/i18n/en/hud/sct.ron | 53 ++ assets/voxygen/i18n/en/hud/social.ron | 61 ++ assets/voxygen/i18n/en/main.ron | 106 ++++ assets/voxygen/i18n/en/template.ron | 51 ++ voxygen/src/hud/mod.rs | 32 +- voxygen/src/i18n.rs | 22 +- voxygen/src/lib.rs | 2 +- voxygen/src/main.rs | 9 +- voxygen/src/menu/char_selection/mod.rs | 4 +- voxygen/src/menu/char_selection/ui/mod.rs | 8 +- voxygen/src/menu/main/mod.rs | 14 +- voxygen/src/menu/main/ui/mod.rs | 19 +- voxygen/src/session.rs | 26 +- 29 files changed, 1786 insertions(+), 726 deletions(-) delete mode 100644 assets/voxygen/i18n/en.ron create mode 100644 assets/voxygen/i18n/en/_self.ron create mode 100644 assets/voxygen/i18n/en/buff.ron create mode 100644 assets/voxygen/i18n/en/char_selection.ron create mode 100644 assets/voxygen/i18n/en/common.ron create mode 100644 assets/voxygen/i18n/en/debuff.ron create mode 100644 assets/voxygen/i18n/en/esc_menu.ron create mode 100644 assets/voxygen/i18n/en/gameinput.ron create mode 100644 assets/voxygen/i18n/en/hud.ron create mode 100644 assets/voxygen/i18n/en/hud/_self.ron create mode 100644 assets/voxygen/i18n/en/hud/bag.ron create mode 100644 assets/voxygen/i18n/en/hud/char_window.ron create mode 100644 assets/voxygen/i18n/en/hud/chat.ron create mode 100644 assets/voxygen/i18n/en/hud/crafting.ron create mode 100644 assets/voxygen/i18n/en/hud/group.ron create mode 100644 assets/voxygen/i18n/en/hud/map.ron create mode 100644 assets/voxygen/i18n/en/hud/sct.ron create mode 100644 assets/voxygen/i18n/en/hud/social.ron create mode 100644 assets/voxygen/i18n/en/main.ron create mode 100644 assets/voxygen/i18n/en/template.ron diff --git a/assets/voxygen/i18n/en.ron b/assets/voxygen/i18n/en.ron deleted file mode 100644 index 52aebd2bb0..0000000000 --- a/assets/voxygen/i18n/en.ron +++ /dev/null @@ -1,664 +0,0 @@ -/// 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! -/// -/// WARNING: Localization files shall be saved in UTF-8 format without BOM - -/// Localization for "global" English -( - metadata: ( - language_name: "English", - language_identifier: "en", - ), - 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": "username", - "common.singleplayer": "Singleplayer", - "common.multiplayer": "Multiplayer", - "common.servers": "Servers", - "common.quit": "Quit", - "common.settings": "Settings", - "common.languages": "Languages", - "common.interface": "Interface", - "common.gameplay": "Gameplay", - "common.controls": "Controls", - "common.video": "Graphics", - "common.sound": "Sound", - "common.resume": "Resume", - "common.characters": "Characters", - "common.close": "Close", - "common.yes": "Yes", - "common.no": "No", - "common.back": "Back", - "common.create": "Create", - "common.okay": "Okay", - "common.add": "Add", - "common.accept": "Accept", - "common.decline": "Decline", - "common.disclaimer": "Disclaimer", - "common.cancel": "Cancel", - "common.none": "None", - "common.error": "Error", - "common.fatal_error": "Fatal Error", - "common.you": "You", - "common.automatic": "Auto", - "common.random": "Random", - // Settings Window title - "common.interface_settings": "Interface Settings", - "common.gameplay_settings": "Gameplay Settings", - "common.controls_settings": "Controls Settings", - "common.video_settings": "Graphics Settings", - "common.sound_settings": "Sound Settings", - "common.language_settings": "Language Settings", - - // Message when connection to the server is lost - "common.connection_lost": r#"Connection lost! -Did the server restart? -Is the client up to date?"#, - - - "common.species.orc": "Orc", - "common.species.human": "Human", - "common.species.dwarf": "Dwarf", - "common.species.elf": "Elf", - "common.species.undead": "Undead", - "common.species.danari": "Danari", - - "common.weapons.axe": "Axe", - "common.weapons.sword": "Sword", - "common.weapons.staff": "Staff", - "common.weapons.bow": "Bow", - "common.weapons.hammer": "Hammer", - "common.weapons.sceptre": "Healing Sceptre", - "common.rand_appearance": "Random appearance and name", - /// End Common section - - - /// Start Main screen section - "main.username": "Username", - "main.server": "Server", - "main.password": "Password", - "main.connecting": "Connecting", - "main.creating_world": "Creating world", - "main.tip": "Tip:", - - // Welcome notice that appears the first time Veloren is started - "main.notice": r#"Welcome to the alpha version of Veloren! - -Before you dive into the fun, please keep a few things in mind: - -- This is a very early alpha. Expect bugs, extremely unfinished gameplay, unpolished mechanics, and missing features. - -- If you have constructive feedback or bug reports, you can contact us via Reddit, GitLab, or our community Discord server. - -- Veloren is licensed under the GPL 3 open-source licence. That means you're free to play, modify, and redistribute the game however - you wish (provided derived work is also under GPL 3). - -- Veloren is a non-profit community project, and everybody working on it is a volunteer. -If you like what you see, you're welcome to join the development or art teams! - -Thanks for taking the time to read this notice, we hope you enjoy the game! - -~ The Veloren Devs"#, - - // Login process description - "main.login_process": r#"Information on the Login Process: - -Please note that you now need an account -to play on auth-enabled servers. - -You can create an account over at - -https://veloren.net/account/."#, - "main.login.server_not_found": "Server not found", - "main.login.authentication_error": "Auth error on server", - "main.login.server_full": "Server is full", - "main.login.untrusted_auth_server": "Auth server not trusted", - "main.login.outdated_client_or_server": "ServerWentMad: Probably versions are incompatible, check for updates.", - "main.login.timeout": "Timeout: Server did not respond in time. (Overloaded or network issues).", - "main.login.server_shut_down": "Server shut down", - "main.login.already_logged_in": "You are already logged into the server.", - "main.login.network_error": "Network error", - "main.login.failed_sending_request": "Request to Auth server failed", - "main.login.invalid_character": "The selected character is invalid", - "main.login.client_crashed": "Client crashed", - "main.login.not_on_whitelist": "You need a Whitelist entry by an Admin to join", - "main.login.banned": "You have been banned with the following reason", - "main.login.kicked": "You have been kicked with the following reason", - "main.login.select_language": "Select a language", - - "main.servers.select_server": "Select a server", - - /// End Main screen section - - - /// Start HUD Section - "hud.do_not_show_on_startup": "Don't show this on Startup", - "hud.show_tips": "Show Tips", - "hud.quests": "Quests", - "hud.you_died": "You Died", - "hud.waypoint_saved": "Waypoint Saved", - - "hud.press_key_to_show_keybindings_fmt": "[{key}] Keybindings", - "hud.press_key_to_toggle_lantern_fmt": "[{key}] Lantern", - "hud.press_key_to_show_debug_info_fmt": "Press {key} to show debug info", - "hud.press_key_to_toggle_keybindings_fmt": "Press {key} to toggle keybindings", - "hud.press_key_to_toggle_debug_info_fmt": "Press {key} to toggle debug info", - - // Chat outputs - "hud.chat.online_msg": "[{name}] is online now", - "hud.chat.offline_msg": "{name} went offline", - - "hud.chat.default_death_msg": "[{name}] died", - "hud.chat.environmental_kill_msg": "[{name}] died in {environment}", - "hud.chat.fall_kill_msg": "[{name}] died from fall damage", - "hud.chat.suicide_msg": "[{name}] died from self-inflicted wounds", - - "hud.chat.pvp_melee_kill_msg": "[{attacker}] defeated [{victim}]", - "hud.chat.pvp_ranged_kill_msg": "[{attacker}] shot [{victim}]", - "hud.chat.pvp_explosion_kill_msg": "[{attacker}] blew up [{victim}]", - "hud.chat.pvp_energy_kill_msg": "[{attacker}] killed [{victim}] with magic", - "hud.chat.pvp_buff_kill_msg": "[{attacker}] killed [{victim}]", - - - "hud.chat.npc_melee_kill_msg": "{attacker} killed [{victim}]", - "hud.chat.npc_ranged_kill_msg": "{attacker} shot [{victim}]", - "hud.chat.npc_explosion_kill_msg": "{attacker} blew up [{victim}]", - "hud.chat.npc_energy_kill_msg": "[{attacker}] killed [{victim}] with magic", - "hud.chat.npc_other_kill_msg": "[{attacker}] killed [{victim}]", - - "hud.chat.loot_msg": "You picked up [{item}]", - "hud.chat.loot_fail": "Your Inventory is full!", - "hud.chat.goodbye": "Goodbye!", - "hud.chat.connection_lost": "Connection lost. Kicking in {time} seconds.", - - // SCT outputs - "hud.sct.experience": "{amount} Exp", - "hud.sct.block": "BLOCKED", - - // Respawn message - "hud.press_key_to_respawn": r#"Press {key} to respawn at the last campfire you visited."#, - - // Welcome message - "hud.welcome": r#"Welcome to the Veloren Alpha! - - -Some tips before you start: - - -Press F1 to see the available key commands. - -Type /help into the chat to see chat commands - - -There are chests and other objects randomly spawning in the World! - -Right-Click to collect them. - -To actually use whatever you loot from those chests open your inventory with 'B'. - -Double click the items in your bag to use or equip them. - -Throw them away by clicking them once and clicking outside of the bag - - -Nights can get pretty dark in Veloren. - -Light your lantern by pressing 'G' - - -Want to free your cursor to close this window? Press TAB! - - -Enjoy your stay in the World of Veloren."#, - -"hud.temp_quest_headline": r#"Please, help us Traveller!"#, -"hud.temp_quest_text": r#"Dungeons filled with evil cultists -have emerged all around our peaceful towns! - - -Gather some company, stack up on food -and defeat their vile leaders and acolytes. - - -Maybe you can even obtain one of their -magically infused items?"#, - - - - // Inventory - "hud.bag.inventory": "{playername}'s Inventory", - "hud.bag.stats_title": "{playername}'s Stats", - "hud.bag.exp": "Exp", - "hud.bag.armor": "Armor", - "hud.bag.stats": "Stats", - "hud.bag.head": "Head", - "hud.bag.neck": "Neck", - "hud.bag.tabard": "Tabard", - "hud.bag.shoulders": "Shoulders", - "hud.bag.chest": "Chest", - "hud.bag.hands": "Hands", - "hud.bag.lantern": "Lantern", - "hud.bag.glider": "Glider", - "hud.bag.belt": "Belt", - "hud.bag.ring": "Ring", - "hud.bag.back": "Back", - "hud.bag.legs": "Legs", - "hud.bag.feet": "Feet", - "hud.bag.mainhand": "Mainhand", - "hud.bag.offhand": "Offhand", - - - // Map and Questlog - "hud.map.map_title": "Map", - "hud.map.qlog_title": "Quests", - - // Settings - "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", - "hud.settings.ui_scale": "UI-Scale", - "hud.settings.relative_scaling": "Relative Scaling", - "hud.settings.custom_scaling": "Custom Scaling", - "hud.settings.crosshair": "Crosshair", - "hud.settings.transparency": "Transparency", - "hud.settings.hotbar": "Hotbar", - "hud.settings.toggle_shortcuts": "Toggle Shortcuts", - "hud.settings.buffs_skillbar": "Buffs at Skillbar", - "hud.settings.buffs_mmap": "Buffs at Minimap", - "hud.settings.toggle_bar_experience": "Toggle Experience Bar", - "hud.settings.scrolling_combat_text": "Scrolling Combat Text", - "hud.settings.single_damage_number": "Single Damage Numbers", - "hud.settings.cumulated_damage": "Cumulated Damage", - "hud.settings.incoming_damage": "Incoming Damage", - "hud.settings.cumulated_incoming_damage": "Cumulated Incoming Damage", - "hud.settings.speech_bubble": "Speech Bubble", - "hud.settings.speech_bubble_dark_mode": "Speech Bubble Dark Mode", - "hud.settings.speech_bubble_icon": "Speech Bubble Icon", - "hud.settings.energybar_numbers": "Energybar Numbers", - "hud.settings.values": "Values", - "hud.settings.percentages": "Percentages", - "hud.settings.chat": "Chat", - "hud.settings.background_transparency": "Background Transparency", - "hud.settings.chat_character_name": "Character Names in chat", - "hud.settings.loading_tips": "Loading Screen Tips", - - "hud.settings.pan_sensitivity": "Pan Sensitivity", - "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.enable_mouse_smoothing": "Camera Smoothing", - "hud.settings.free_look_behavior": "Free look behavior", - "hud.settings.auto_walk_behavior": "Auto walk behavior", - "hud.settings.stop_auto_walk_on_input": "Stop auto walk on movement", - - "hud.settings.view_distance": "View Distance", - "hud.settings.sprites_view_distance": "Sprites View Distance", - "hud.settings.figures_view_distance": "Entities View Distance", - "hud.settings.maximum_fps": "Maximum FPS", - "hud.settings.fov": "Field of View (deg)", - "hud.settings.gamma": "Gamma", - "hud.settings.exposure": "Exposure", - "hud.settings.ambiance": "Ambiance Brightness", - "hud.settings.antialiasing_mode": "AntiAliasing Mode", - "hud.settings.upscale_factor": "Upscale Factor", - "hud.settings.cloud_rendering_mode": "Cloud Rendering Mode", - "hud.settings.fluid_rendering_mode": "Fluid Rendering Mode", - "hud.settings.fluid_rendering_mode.cheap": "Cheap", - "hud.settings.fluid_rendering_mode.shiny": "Shiny", - "hud.settings.cloud_rendering_mode.minimal": "Minimal", - "hud.settings.cloud_rendering_mode.low": "Low", - "hud.settings.cloud_rendering_mode.medium": "Medium", - "hud.settings.cloud_rendering_mode.high": "High", - "hud.settings.cloud_rendering_mode.ultra": "Ultra", - "hud.settings.fullscreen": "Fullscreen", - "hud.settings.fullscreen_mode": "Fullscreen Mode", - "hud.settings.fullscreen_mode.exclusive": "Exclusive", - "hud.settings.fullscreen_mode.borderless": "Borderless", - "hud.settings.particles": "Particles", - "hud.settings.resolution": "Resolution", - "hud.settings.bit_depth": "Bit Depth", - "hud.settings.refresh_rate": "Refresh Rate", - "hud.settings.lighting_rendering_mode": "Lighting Rendering Mode", - "hud.settings.lighting_rendering_mode.ashikhmin": "Type A - High ", - "hud.settings.lighting_rendering_mode.blinnphong": "Type B - Medium", - "hud.settings.lighting_rendering_mode.lambertian": "Type L - Cheap", - "hud.settings.shadow_rendering_mode": "Shadow Rendering Mode", - "hud.settings.shadow_rendering_mode.none": "None", - "hud.settings.shadow_rendering_mode.cheap": "Cheap", - "hud.settings.shadow_rendering_mode.map": "Map", - "hud.settings.shadow_rendering_mode.map.resolution": "Resolution", - "hud.settings.lod_detail": "LoD Detail", - "hud.settings.save_window_size": "Save window size", - - - "hud.settings.music_volume": "Music Volume", - "hud.settings.sound_effect_volume": "Sound Effects Volume", - "hud.settings.audio_device": "Audio Device", - - "hud.settings.awaitingkey": "Press a key...", - "hud.settings.unbound": "None", - "hud.settings.reset_keybinds": "Reset to Defaults", - - "hud.social": "Other Players", - "hud.social.online": "Online:", - "hud.social.friends": "Friends", - "hud.social.not_yet_available": "Not yet available", - "hud.social.faction": "Faction", - "hud.social.play_online_fmt": "{nb_player} player(s) online", - "hud.social.name": "Name", - "hud.social.level": "Level", - "hud.social.zone": "Zone", - "hud.social.account": "Account", - - - "hud.crafting": "Crafting", - "hud.crafting.recipes": "Recipes", - "hud.crafting.ingredients": "Ingredients:", - "hud.crafting.craft": "Craft", - "hud.crafting.tool_cata": "Requires:", - - "hud.group": "Group", - "hud.group.invite_to_join": "{name} invited you to their group!", - "hud.group.invite": "Invite", - "hud.group.kick": "Kick", - "hud.group.assign_leader": "Assign Leader", - "hud.group.leave": "Leave Group", - "hud.group.dead" : "Dead", - "hud.group.out_of_range": "Out of range", - "hud.group.add_friend": "Add to Friends", - "hud.group.link_group": "Link Groups", - "hud.group.in_menu": "In Menu", - "hud.group.members": "Group Members", - - "hud.spell": "Spells", - - "hud.free_look_indicator": "Free look active. Press {key} to disable.", - "hud.auto_walk_indicator": "Auto walk active", - - "hud.map.difficulty": "Difficulty", - "hud.map.towns": "Towns", - "hud.map.castles": "Castles", - "hud.map.dungeons": "Dungeons", - "hud.map.caves": "Caves", - "hud.map.cave": "Cave", - "hud.map.town": "Town", - "hud.map.castle": "Castle", - "hud.map.dungeon": "Dungeon", - "hud.map.difficulty_dungeon": "Dungeon\n\nDifficulty: {difficulty}", - "hud.map.drag": "Drag", - "hud.map.zoom": "Zoom", - "hud.map.recenter": "Recenter", - - /// End HUD section - - - /// Start GameInput section - - "gameinput.primary": "Basic Attack", - "gameinput.secondary": "Secondary Attack/Block/Aim", - "gameinput.slot1": "Hotbar Slot 1", - "gameinput.slot2": "Hotbar Slot 2", - "gameinput.slot3": "Hotbar Slot 3", - "gameinput.slot4": "Hotbar Slot 4", - "gameinput.slot5": "Hotbar Slot 5", - "gameinput.slot6": "Hotbar Slot 6", - "gameinput.slot7": "Hotbar Slot 7", - "gameinput.slot8": "Hotbar Slot 8", - "gameinput.slot9": "Hotbar Slot 9", - "gameinput.slot10": "Hotbar Slot 10", - "gameinput.swaploadout": "Swap Loadout", - "gameinput.togglecursor": "Toggle Cursor", - "gameinput.help": "Toggle Help Window", - "gameinput.toggleinterface": "Toggle Interface", - "gameinput.toggledebug": "Toggle FPS and Debug Info", - "gameinput.screenshot": "Take Screenshot", - "gameinput.toggleingameui": "Toggle Nametags", - "gameinput.fullscreen": "Toggle Fullscreen", - "gameinput.moveforward": "Move Forward", - "gameinput.moveleft": "Move Left", - "gameinput.moveright": "Move Right", - "gameinput.moveback": "Move Backwards", - "gameinput.jump": "Jump", - "gameinput.glide": "Glider", - "gameinput.roll": "Roll", - "gameinput.climb": "Climb", - "gameinput.climbdown": "Climb Down", - "gameinput.wallleap": "Wall Leap", - "gameinput.togglelantern": "Toggle Lantern", - "gameinput.mount": "Mount", - "gameinput.chat": "Chat", - "gameinput.command": "Command", - "gameinput.escape": "Escape", - "gameinput.map": "Map", - "gameinput.bag": "Bag", - "gameinput.social": "Social", - "gameinput.sit": "Sit", - "gameinput.spellbook": "Spells", - "gameinput.settings": "Settings", - "gameinput.respawn": "Respawn", - "gameinput.charge": "Charge", - "gameinput.togglewield": "Toggle Wield", - "gameinput.interact": "Interact", - "gameinput.freelook": "Free Look", - "gameinput.autowalk": "Auto Walk", - "gameinput.dance": "Dance", - "gameinput.select": "Select Entity", - "gameinput.acceptgroupinvite": "Accept Group Invite", - "gameinput.declinegroupinvite": "Decline Group Invite", - "gameinput.crafting": "Crafting", - "gameinput.fly": "Fly", - "gameinput.sneak": "Sneak", - "gameinput.swimdown": "Swim downwards", - "gameinput.swimup": "Swim upwards", - - /// End GameInput section - - - /// Start chracter selection section - "char_selection.loading_characters": "Loading characters...", - "char_selection.delete_permanently": "Permanently delete this Character?", - "char_selection.deleting_character": "Deleting Character...", - "char_selection.change_server": "Change Server", - "char_selection.enter_world": "Enter World", - "char_selection.logout": "Logout", - "char_selection.create_new_character": "Create New Character", - "char_selection.creating_character": "Creating Character...", - "char_selection.character_creation": "Character Creation", - - "char_selection.human_default": "Human Default", - "char_selection.level_fmt": "Level {level_nb}", - "char_selection.uncanny_valley": "Wilderness", - "char_selection.plains_of_uncertainty": "Plains of Uncertainty", - "char_selection.beard": "Beard", - "char_selection.hair_style": "Hair Style", - "char_selection.hair_color": "Hair Color", - "char_selection.eye_color": "Eye Color", - "char_selection.skin": "Skin", - "char_selection.eyeshape": "Eye Details", - "char_selection.accessories": "Accessories", - "char_selection.create_info_name": "Your Character needs a name!", - - /// End character selection section - - - /// Start character window section - "character_window.character_name": "Character Name", - // Character stats - "character_window.character_stats": r#"Endurance - -Fitness - -Willpower - -Protection -"#, - /// End character window section - - - /// Start Escape Menu Section - "esc_menu.logout": "Logout", - "esc_menu.quit_game": "Quit Game", - /// End Escape Menu Section - - /// Buffs and Debuffs - "buff.remove": "Click to remove", - "buff.title.missing": "Missing Title", - "buff.desc.missing": "Missing Description", - // Buffs - "buff.title.heal": "Heal", - "buff.desc.heal": "Gain health over time.", - "buff.title.potion": "Potion", - "buff.desc.potion": "Drinking...", - "buff.title.saturation": "Saturation", - "buff.desc.saturation": "Gain health over time from consumables.", - "buff.title.campfire_heal": "Campfire Heal", - "buff.desc.campfire_heal": "Resting at a campfire heals 1% per second.", - // Debuffs - "debuff.title.bleed": "Bleeding", - "debuff.desc.bleed": "Inflicts regular damage.", - }, - - - vector_map: { - "loading.tips": [ - "Press 'G' to light your lantern.", - "Press 'F1' to see all default keybindings.", - "You can type /say or /s to only chat with players directly around you.", - "You can type /region or /r to only chat with players a couple of hundred blocks around you.", - "You can type /group or /g to only chat with players in your current group.", - "To send private messages type /tell followed by a player name and your message.", - "NPCs with the same level can have a different difficulty.", - "Keep an eye out for food, chests and other loot spread all around the world!", - "Inventory filled with food? Try crafting better food from it!", - "Wondering what's there to do? Try out one of the dungeons marked on the map!", - "Don't forget to adjust the graphics for your system. Press 'N' to open the settings.", - "Playing with others is fun! Press 'O' to see who is online.", - "An NPC with a skull beneath their healthbar is quite powerful compared to yourself.", - "Press 'J' to dance. Party!", - "Press 'L-Shift' to open your Glider and conquer the skies.", - "Veloren is still in Pre-Alpha. We do our best to improve it every day!", - "If you want to join the Dev-Team or just have a chat with us join our Discord-Server.", - "You can toggle showing your amount of health on the healthbar in the settings.", - "In order to see your stats click the 'Stats' button in the inventory.", - "Sit near a campfire (with the 'K' key) to rest - receiving a slow heal-over-time.", - ], - "npc.speech.villager_under_attack": [ - "Help, I'm under attack!", - "Help! I'm under attack!", - "Ouch! I'm under attack!", - "Ouch! I'm under attack! Help!", - "Help me! I'm under attack!", - "I'm under attack! Help!", - "I'm under attack! Help me!", - "Help!", - "Help! Help!", - "Help! Help! Help!", - "I'm under attack!", - "AAAHHH! I'm under attack!", - "AAAHHH! I'm under attack! Help!", - "Help! We're under attack!", - "Help! Murderer!", - "Help! There's a murderer on the loose!", - "Help! They're trying to kill me!", - "Guards, I'm under attack!", - "Guards! I'm under attack!", - "I'm under attack! Guards!", - "Help! Guards! I'm under attack!", - "Guards! Come quick!", - "Guards! Guards!", - "Guards! There's a villain attacking me!", - "Guards, slay this foul villain!", - "Guards! There's a murderer!", - "Guards! Help me!", - "You won't get away with this! Guards!", - "You fiend!", - "Help me!", - "Help! Please!", - "Ouch! Guards! Help!", - "They're coming for me!", - "Help! Help! I'm being repressed!", - "Ah, now we see the violence inherent in the system.", - "Tis but a scratch!", - "Stop that!", - "What did I ever do to you?!", - "Please stop attacking me!", - "Hey! Watch where you point that thing!", - "Heinous wretch, be gone with you!", - "Stop it! Go away!", - "Now you're making me mad!", - "Oi! Who do you think you are?!", - "I'll have your head for that!", - "Stop, please! I carry nothing of value!", - "I'll set my brother on you, he's bigger than I am!", - "Nooo, I'm telling mother!", - "Curse you!", - "Please don't do that.", - "That wasn't very nice!", - "Your weapon works, you can put it away now!", - "Spare me!", - "Please, I have a family!", - "I'm too young to die!", - "Can we talk about this?", - "Violence is never the answer!", - "Today is turning out to be a very bad day...", - "Hey, that hurt!", - "Eek!", - "How rude!", - "Stop, I beg you!", - "A pox upon you!", - "This isn't fun.", - "How dare you?!", - "You'll pay for that!", - "Keep that up and you'll be sorry!", - "Don't make me hurt you!", - "There must be some misunderstanding!", - "You don't need to do this!", - "Be gone, fiend!", - "That really hurt!", - "Why would you do that?", - "By the spirits, cease!", - "You must have me confused with someone else!", - "I don't deserve this!", - "Please don't do that again.", - "Guards, throw this monster in the lake!", - "I'll set my tarrasque on you!", - ], - } -) diff --git a/assets/voxygen/i18n/en/_self.ron b/assets/voxygen/i18n/en/_self.ron new file mode 100644 index 0000000000..6cb244755e --- /dev/null +++ b/assets/voxygen/i18n/en/_self.ron @@ -0,0 +1,154 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + + }, + + + vector_map: { + "loading.tips": [ + "Press 'G' to light your lantern.", + "Press 'F1' to see all default keybindings.", + "You can type /say or /s to only chat with players directly around you.", + "You can type /region or /r to only chat with players a couple of hundred blocks around you.", + "You can type /group or /g to only chat with players in your current group.", + "To send private messages type /tell followed by a player name and your message.", + "NPCs with the same level can have a different difficulty.", + "Keep an eye out for food, chests and other loot spread all around the world!", + "Inventory filled with food? Try crafting better food from it!", + "Wondering what's there to do? Try out one of the dungeons marked on the map!", + "Don't forget to adjust the graphics for your system. Press 'N' to open the settings.", + "Playing with others is fun! Press 'O' to see who is online.", + "An NPC with a skull beneath their healthbar is quite powerful compared to yourself.", + "Press 'J' to dance. Party!", + "Press 'L-Shift' to open your Glider and conquer the skies.", + "Veloren is still in Pre-Alpha. We do our best to improve it every day!", + "If you want to join the Dev-Team or just have a chat with us join our Discord-Server.", + "You can toggle showing your amount of health on the healthbar in the settings.", + "In order to see your stats click the 'Stats' button in the inventory.", + "Sit near a campfire (with the 'K' key) to rest - receiving a slow heal-over-time.", + ], + "npc.speech.villager_under_attack": [ + "Help, I'm under attack!", + "Help! I'm under attack!", + "Ouch! I'm under attack!", + "Ouch! I'm under attack! Help!", + "Help me! I'm under attack!", + "I'm under attack! Help!", + "I'm under attack! Help me!", + "Help!", + "Help! Help!", + "Help! Help! Help!", + "I'm under attack!", + "AAAHHH! I'm under attack!", + "AAAHHH! I'm under attack! Help!", + "Help! We're under attack!", + "Help! Murderer!", + "Help! There's a murderer on the loose!", + "Help! They're trying to kill me!", + "Guards, I'm under attack!", + "Guards! I'm under attack!", + "I'm under attack! Guards!", + "Help! Guards! I'm under attack!", + "Guards! Come quick!", + "Guards! Guards!", + "Guards! There's a villain attacking me!", + "Guards, slay this foul villain!", + "Guards! There's a murderer!", + "Guards! Help me!", + "You won't get away with this! Guards!", + "You fiend!", + "Help me!", + "Help! Please!", + "Ouch! Guards! Help!", + "They're coming for me!", + "Help! Help! I'm being repressed!", + "Ah, now we see the violence inherent in the system.", + "Tis but a scratch!", + "Stop that!", + "What did I ever do to you?!", + "Please stop attacking me!", + "Hey! Watch where you point that thing!", + "Heinous wretch, be gone with you!", + "Stop it! Go away!", + "Now you're making me mad!", + "Oi! Who do you think you are?!", + "I'll have your head for that!", + "Stop, please! I carry nothing of value!", + "I'll set my brother on you, he's bigger than I am!", + "Nooo, I'm telling mother!", + "Curse you!", + "Please don't do that.", + "That wasn't very nice!", + "Your weapon works, you can put it away now!", + "Spare me!", + "Please, I have a family!", + "I'm too young to die!", + "Can we talk about this?", + "Violence is never the answer!", + "Today is turning out to be a very bad day...", + "Hey, that hurt!", + "Eek!", + "How rude!", + "Stop, I beg you!", + "A pox upon you!", + "This isn't fun.", + "How dare you?!", + "You'll pay for that!", + "Keep that up and you'll be sorry!", + "Don't make me hurt you!", + "There must be some misunderstanding!", + "You don't need to do this!", + "Be gone, fiend!", + "That really hurt!", + "Why would you do that?", + "By the spirits, cease!", + "You must have me confused with someone else!", + "I don't deserve this!", + "Please don't do that again.", + "Guards, throw this monster in the lake!", + "I'll set my tarrasque on you!", + ], + } +) diff --git a/assets/voxygen/i18n/en/buff.ron b/assets/voxygen/i18n/en/buff.ron new file mode 100644 index 0000000000..d2581f4f38 --- /dev/null +++ b/assets/voxygen/i18n/en/buff.ron @@ -0,0 +1,62 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + "buff.remove": "Click to remove", + "buff.title.missing": "Missing Title", + "buff.desc.missing": "Missing Description", + // Buffs + "buff.title.heal": "Heal", + "buff.desc.heal": "Gain health over time.", + "buff.title.potion": "Potion", + "buff.desc.potion": "Drinking...", + "buff.title.saturation": "Saturation", + "buff.desc.saturation": "Gain health over time from consumables.", + "buff.title.campfire_heal": "Campfire Heal", + "buff.desc.campfire_heal": "Resting at a campfire heals 1% per second.", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/char_selection.ron b/assets/voxygen/i18n/en/char_selection.ron new file mode 100644 index 0000000000..29d401bf36 --- /dev/null +++ b/assets/voxygen/i18n/en/char_selection.ron @@ -0,0 +1,72 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + "char_selection.loading_characters": "Loading characters...", + "char_selection.delete_permanently": "Permanently delete this Character?", + "char_selection.deleting_character": "Deleting Character...", + "char_selection.change_server": "Change Server", + "char_selection.enter_world": "Enter World", + "char_selection.logout": "Logout", + "char_selection.create_new_character": "Create New Character", + "char_selection.creating_character": "Creating Character...", + "char_selection.character_creation": "Character Creation", + + "char_selection.human_default": "Human Default", + "char_selection.level_fmt": "Level {level_nb}", + "char_selection.uncanny_valley": "Wilderness", + "char_selection.plains_of_uncertainty": "Plains of Uncertainty", + "char_selection.beard": "Beard", + "char_selection.hair_style": "Hair Style", + "char_selection.hair_color": "Hair Color", + "char_selection.eye_color": "Eye Color", + "char_selection.skin": "Skin", + "char_selection.eyeshape": "Eye Details", + "char_selection.accessories": "Accessories", + "char_selection.create_info_name": "Your Character needs a name!", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/common.ron b/assets/voxygen/i18n/en/common.ron new file mode 100644 index 0000000000..7ed4bb01cd --- /dev/null +++ b/assets/voxygen/i18n/en/common.ron @@ -0,0 +1,110 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + // Texts used in multiple locations with the same formatting + "common.username": "username", + "common.singleplayer": "Singleplayer", + "common.multiplayer": "Multiplayer", + "common.servers": "Servers", + "common.quit": "Quit", + "common.settings": "Settings", + "common.languages": "Languages", + "common.interface": "Interface", + "common.gameplay": "Gameplay", + "common.controls": "Controls", + "common.video": "Graphics", + "common.sound": "Sound", + "common.resume": "Resume", + "common.characters": "Characters", + "common.close": "Close", + "common.yes": "Yes", + "common.no": "No", + "common.back": "Back", + "common.create": "Create", + "common.okay": "Okay", + "common.add": "Add", + "common.accept": "Accept", + "common.decline": "Decline", + "common.disclaimer": "Disclaimer", + "common.cancel": "Cancel", + "common.none": "None", + "common.error": "Error", + "common.fatal_error": "Fatal Error", + "common.you": "You", + "common.automatic": "Auto", + "common.random": "Random", + // Settings Window title + "common.interface_settings": "Interface Settings", + "common.gameplay_settings": "Gameplay Settings", + "common.controls_settings": "Controls Settings", + "common.video_settings": "Graphics Settings", + "common.sound_settings": "Sound Settings", + "common.language_settings": "Language Settings", + + // Message when connection to the server is lost + "common.connection_lost": r#"Connection lost! +Did the server restart? +Is the client up to date?"#, + + + "common.species.orc": "Orc", + "common.species.human": "Human", + "common.species.dwarf": "Dwarf", + "common.species.elf": "Elf", + "common.species.undead": "Undead", + "common.species.danari": "Danari", + + "common.weapons.axe": "Axe", + "common.weapons.sword": "Sword", + "common.weapons.staff": "Staff", + "common.weapons.bow": "Bow", + "common.weapons.hammer": "Hammer", + "common.weapons.sceptre": "Healing Sceptre", + "common.rand_appearance": "Random appearance and name", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/debuff.ron b/assets/voxygen/i18n/en/debuff.ron new file mode 100644 index 0000000000..be8b51e970 --- /dev/null +++ b/assets/voxygen/i18n/en/debuff.ron @@ -0,0 +1,52 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + "debuff.title.bleed": "Bleeding", + "debuff.desc.bleed": "Inflicts regular damage.", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/esc_menu.ron b/assets/voxygen/i18n/en/esc_menu.ron new file mode 100644 index 0000000000..fd0f15c2cf --- /dev/null +++ b/assets/voxygen/i18n/en/esc_menu.ron @@ -0,0 +1,52 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + "esc_menu.logout": "Logout", + "esc_menu.quit_game": "Quit Game", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/gameinput.ron b/assets/voxygen/i18n/en/gameinput.ron new file mode 100644 index 0000000000..63ae40cecb --- /dev/null +++ b/assets/voxygen/i18n/en/gameinput.ron @@ -0,0 +1,106 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + "gameinput.primary": "Basic Attack", + "gameinput.secondary": "Secondary Attack/Block/Aim", + "gameinput.slot1": "Hotbar Slot 1", + "gameinput.slot2": "Hotbar Slot 2", + "gameinput.slot3": "Hotbar Slot 3", + "gameinput.slot4": "Hotbar Slot 4", + "gameinput.slot5": "Hotbar Slot 5", + "gameinput.slot6": "Hotbar Slot 6", + "gameinput.slot7": "Hotbar Slot 7", + "gameinput.slot8": "Hotbar Slot 8", + "gameinput.slot9": "Hotbar Slot 9", + "gameinput.slot10": "Hotbar Slot 10", + "gameinput.swaploadout": "Swap Loadout", + "gameinput.togglecursor": "Toggle Cursor", + "gameinput.help": "Toggle Help Window", + "gameinput.toggleinterface": "Toggle Interface", + "gameinput.toggledebug": "Toggle FPS and Debug Info", + "gameinput.screenshot": "Take Screenshot", + "gameinput.toggleingameui": "Toggle Nametags", + "gameinput.fullscreen": "Toggle Fullscreen", + "gameinput.moveforward": "Move Forward", + "gameinput.moveleft": "Move Left", + "gameinput.moveright": "Move Right", + "gameinput.moveback": "Move Backwards", + "gameinput.jump": "Jump", + "gameinput.glide": "Glider", + "gameinput.roll": "Roll", + "gameinput.climb": "Climb", + "gameinput.climbdown": "Climb Down", + "gameinput.wallleap": "Wall Leap", + "gameinput.togglelantern": "Toggle Lantern", + "gameinput.mount": "Mount", + "gameinput.chat": "Chat", + "gameinput.command": "Command", + "gameinput.escape": "Escape", + "gameinput.map": "Map", + "gameinput.bag": "Bag", + "gameinput.social": "Social", + "gameinput.sit": "Sit", + "gameinput.spellbook": "Spells", + "gameinput.settings": "Settings", + "gameinput.respawn": "Respawn", + "gameinput.charge": "Charge", + "gameinput.togglewield": "Toggle Wield", + "gameinput.interact": "Interact", + "gameinput.freelook": "Free Look", + "gameinput.autowalk": "Auto Walk", + "gameinput.dance": "Dance", + "gameinput.select": "Select Entity", + "gameinput.acceptgroupinvite": "Accept Group Invite", + "gameinput.declinegroupinvite": "Decline Group Invite", + "gameinput.crafting": "Crafting", + "gameinput.fly": "Fly", + "gameinput.sneak": "Sneak", + "gameinput.swimdown": "Swim downwards", + "gameinput.swimup": "Swim upwards", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/hud.ron b/assets/voxygen/i18n/en/hud.ron new file mode 100644 index 0000000000..697411ab94 --- /dev/null +++ b/assets/voxygen/i18n/en/hud.ron @@ -0,0 +1,329 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + // Misc. Messages + "hud.do_not_show_on_startup": "Don't show this on Startup", + "hud.show_tips": "Show Tips", + "hud.quests": "Quests", + "hud.you_died": "You Died", + "hud.waypoint_saved": "Waypoint Saved", + + "hud.press_key_to_show_keybindings_fmt": "[{key}] Keybindings", + "hud.press_key_to_toggle_lantern_fmt": "[{key}] Lantern", + "hud.press_key_to_show_debug_info_fmt": "Press {key} to show debug info", + "hud.press_key_to_toggle_keybindings_fmt": "Press {key} to toggle keybindings", + "hud.press_key_to_toggle_debug_info_fmt": "Press {key} to toggle debug info", + + // Respawn message + "hud.press_key_to_respawn": r#"Press {key} to respawn at the last campfire you visited."#, + + // Welcome message + "hud.welcome": r#"Welcome to the Veloren Alpha! + + +Some tips before you start: + + +Press F1 to see the available key commands. + +Type /help into the chat to see chat commands + + +There are chests and other objects randomly spawning in the World! + +Right-Click to collect them. + +To actually use whatever you loot from those chests open your inventory with 'B'. + +Double click the items in your bag to use or equip them. + +Throw them away by clicking them once and clicking outside of the bag + + +Nights can get pretty dark in Veloren. + +Light your lantern by pressing 'G' + + +Want to free your cursor to close this window? Press TAB! + + +Enjoy your stay in the World of Veloren."#, + +"hud.temp_quest_headline": r#"Please, help us Traveller!"#, +"hud.temp_quest_text": r#"Dungeons filled with evil cultists +have emerged all around our peaceful towns! + + +Gather some company, stack up on food +and defeat their vile leaders and acolytes. + + +Maybe you can even obtain one of their +magically infused items?"#, + + "hud.spell": "Spells", + + "hud.free_look_indicator": "Free look active. Press {key} to disable.", + "hud.auto_walk_indicator": "Auto walk active", + + + // Inventory + "hud.bag.inventory": "{playername}'s Inventory", + "hud.bag.stats_title": "{playername}'s Stats", + "hud.bag.exp": "Exp", + "hud.bag.armor": "Armor", + "hud.bag.stats": "Stats", + "hud.bag.head": "Head", + "hud.bag.neck": "Neck", + "hud.bag.tabard": "Tabard", + "hud.bag.shoulders": "Shoulders", + "hud.bag.chest": "Chest", + "hud.bag.hands": "Hands", + "hud.bag.lantern": "Lantern", + "hud.bag.glider": "Glider", + "hud.bag.belt": "Belt", + "hud.bag.ring": "Ring", + "hud.bag.back": "Back", + "hud.bag.legs": "Legs", + "hud.bag.feet": "Feet", + "hud.bag.mainhand": "Mainhand", + "hud.bag.offhand": "Offhand", + + // Character name + "character_window.character_name": "Character Name", + // Character stats + "character_window.character_stats": r#"Endurance + +Fitness + +Willpower + +Protection +"#, + + + // Chat outputs + "hud.chat.online_msg": "[{name}] is online now", + "hud.chat.offline_msg": "{name} went offline", + + "hud.chat.default_death_msg": "[{name}] died", + "hud.chat.environmental_kill_msg": "[{name}] died in {environment}", + "hud.chat.fall_kill_msg": "[{name}] died from fall damage", + "hud.chat.suicide_msg": "[{name}] died from self-inflicted wounds", + + "hud.chat.pvp_melee_kill_msg": "[{attacker}] defeated [{victim}]", + "hud.chat.pvp_ranged_kill_msg": "[{attacker}] shot [{victim}]", + "hud.chat.pvp_explosion_kill_msg": "[{attacker}] blew up [{victim}]", + "hud.chat.pvp_energy_kill_msg": "[{attacker}] killed [{victim}] with magic", + "hud.chat.pvp_buff_kill_msg": "[{attacker}] killed [{victim}]", + + + "hud.chat.npc_melee_kill_msg": "{attacker} killed [{victim}]", + "hud.chat.npc_ranged_kill_msg": "{attacker} shot [{victim}]", + "hud.chat.npc_explosion_kill_msg": "{attacker} blew up [{victim}]", + "hud.chat.npc_energy_kill_msg": "[{attacker}] killed [{victim}] with magic", + "hud.chat.npc_other_kill_msg": "[{attacker}] killed [{victim}]", + + "hud.chat.loot_msg": "You picked up [{item}]", + "hud.chat.loot_fail": "Your Inventory is full!", + "hud.chat.goodbye": "Goodbye!", + "hud.chat.connection_lost": "Connection lost. Kicking in {time} seconds.", + + + // Crafting + "hud.crafting": "Crafting", + "hud.crafting.recipes": "Recipes", + "hud.crafting.ingredients": "Ingredients:", + "hud.crafting.craft": "Craft", + "hud.crafting.tool_cata": "Requires:", + + + // Groups + "hud.group": "Group", + "hud.group.invite_to_join": "{name} invited you to their group!", + "hud.group.invite": "Invite", + "hud.group.kick": "Kick", + "hud.group.assign_leader": "Assign Leader", + "hud.group.leave": "Leave Group", + "hud.group.dead" : "Dead", + "hud.group.out_of_range": "Out of range", + "hud.group.add_friend": "Add to Friends", + "hud.group.link_group": "Link Groups", + "hud.group.in_menu": "In Menu", + "hud.group.members": "Group Members", + + + // Map and Questlog + "hud.map.map_title": "Map", + "hud.map.qlog_title": "Quests", + "hud.map.difficulty": "Difficulty", + "hud.map.towns": "Towns", + "hud.map.castles": "Castles", + "hud.map.dungeons": "Dungeons", + "hud.map.caves": "Caves", + "hud.map.cave": "Cave", + "hud.map.town": "Town", + "hud.map.castle": "Castle", + "hud.map.dungeon": "Dungeon", + "hud.map.difficulty_dungeon": "Dungeon\n\nDifficulty: {difficulty}", + "hud.map.drag": "Drag", + "hud.map.zoom": "Zoom", + "hud.map.recenter": "Recenter", + + + // SCT outputs + "hud.sct.experience": "{amount} Exp", + "hud.sct.block": "BLOCKED", + + + // Settings + "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", + "hud.settings.ui_scale": "UI-Scale", + "hud.settings.relative_scaling": "Relative Scaling", + "hud.settings.custom_scaling": "Custom Scaling", + "hud.settings.crosshair": "Crosshair", + "hud.settings.transparency": "Transparency", + "hud.settings.hotbar": "Hotbar", + "hud.settings.toggle_shortcuts": "Toggle Shortcuts", + "hud.settings.buffs_skillbar": "Buffs at Skillbar", + "hud.settings.buffs_mmap": "Buffs at Minimap", + "hud.settings.toggle_bar_experience": "Toggle Experience Bar", + "hud.settings.scrolling_combat_text": "Scrolling Combat Text", + "hud.settings.single_damage_number": "Single Damage Numbers", + "hud.settings.cumulated_damage": "Cumulated Damage", + "hud.settings.incoming_damage": "Incoming Damage", + "hud.settings.cumulated_incoming_damage": "Cumulated Incoming Damage", + "hud.settings.speech_bubble": "Speech Bubble", + "hud.settings.speech_bubble_dark_mode": "Speech Bubble Dark Mode", + "hud.settings.speech_bubble_icon": "Speech Bubble Icon", + "hud.settings.energybar_numbers": "Energybar Numbers", + "hud.settings.values": "Values", + "hud.settings.percentages": "Percentages", + "hud.settings.chat": "Chat", + "hud.settings.background_transparency": "Background Transparency", + "hud.settings.chat_character_name": "Character Names in chat", + "hud.settings.loading_tips": "Loading Screen Tips", + + "hud.settings.pan_sensitivity": "Pan Sensitivity", + "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.enable_mouse_smoothing": "Camera Smoothing", + "hud.settings.free_look_behavior": "Free look behavior", + "hud.settings.auto_walk_behavior": "Auto walk behavior", + "hud.settings.stop_auto_walk_on_input": "Stop auto walk on movement", + + "hud.settings.view_distance": "View Distance", + "hud.settings.sprites_view_distance": "Sprites View Distance", + "hud.settings.figures_view_distance": "Entities View Distance", + "hud.settings.maximum_fps": "Maximum FPS", + "hud.settings.fov": "Field of View (deg)", + "hud.settings.gamma": "Gamma", + "hud.settings.exposure": "Exposure", + "hud.settings.ambiance": "Ambiance Brightness", + "hud.settings.antialiasing_mode": "AntiAliasing Mode", + "hud.settings.upscale_factor": "Upscale Factor", + "hud.settings.cloud_rendering_mode": "Cloud Rendering Mode", + "hud.settings.fluid_rendering_mode": "Fluid Rendering Mode", + "hud.settings.fluid_rendering_mode.cheap": "Cheap", + "hud.settings.fluid_rendering_mode.shiny": "Shiny", + "hud.settings.cloud_rendering_mode.minimal": "Minimal", + "hud.settings.cloud_rendering_mode.low": "Low", + "hud.settings.cloud_rendering_mode.medium": "Medium", + "hud.settings.cloud_rendering_mode.high": "High", + "hud.settings.cloud_rendering_mode.ultra": "Ultra", + "hud.settings.fullscreen": "Fullscreen", + "hud.settings.fullscreen_mode": "Fullscreen Mode", + "hud.settings.fullscreen_mode.exclusive": "Exclusive", + "hud.settings.fullscreen_mode.borderless": "Borderless", + "hud.settings.particles": "Particles", + "hud.settings.resolution": "Resolution", + "hud.settings.bit_depth": "Bit Depth", + "hud.settings.refresh_rate": "Refresh Rate", + "hud.settings.lighting_rendering_mode": "Lighting Rendering Mode", + "hud.settings.lighting_rendering_mode.ashikhmin": "Type A - High ", + "hud.settings.lighting_rendering_mode.blinnphong": "Type B - Medium", + "hud.settings.lighting_rendering_mode.lambertian": "Type L - Cheap", + "hud.settings.shadow_rendering_mode": "Shadow Rendering Mode", + "hud.settings.shadow_rendering_mode.none": "None", + "hud.settings.shadow_rendering_mode.cheap": "Cheap", + "hud.settings.shadow_rendering_mode.map": "Map", + "hud.settings.shadow_rendering_mode.map.resolution": "Resolution", + "hud.settings.lod_detail": "LoD Detail", + "hud.settings.save_window_size": "Save window size", + + + "hud.settings.music_volume": "Music Volume", + "hud.settings.sound_effect_volume": "Sound Effects Volume", + "hud.settings.audio_device": "Audio Device", + + "hud.settings.awaitingkey": "Press a key...", + "hud.settings.unbound": "None", + "hud.settings.reset_keybinds": "Reset to Defaults", + + + // Social + "hud.social": "Other Players", + "hud.social.online": "Online:", + "hud.social.friends": "Friends", + "hud.social.not_yet_available": "Not yet available", + "hud.social.faction": "Faction", + "hud.social.play_online_fmt": "{nb_player} player(s) online", + "hud.social.name": "Name", + "hud.social.level": "Level", + "hud.social.zone": "Zone", + "hud.social.account": "Account", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/hud/_self.ron b/assets/voxygen/i18n/en/hud/_self.ron new file mode 100644 index 0000000000..2461105552 --- /dev/null +++ b/assets/voxygen/i18n/en/hud/_self.ron @@ -0,0 +1,114 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + "hud.do_not_show_on_startup": "Don't show this on Startup", + "hud.show_tips": "Show Tips", + "hud.quests": "Quests", + "hud.you_died": "You Died", + "hud.waypoint_saved": "Waypoint Saved", + + "hud.press_key_to_show_keybindings_fmt": "[{key}] Keybindings", + "hud.press_key_to_toggle_lantern_fmt": "[{key}] Lantern", + "hud.press_key_to_show_debug_info_fmt": "Press {key} to show debug info", + "hud.press_key_to_toggle_keybindings_fmt": "Press {key} to toggle keybindings", + "hud.press_key_to_toggle_debug_info_fmt": "Press {key} to toggle debug info", + + // Respawn message + "hud.press_key_to_respawn": r#"Press {key} to respawn at the last campfire you visited."#, + + // Welcome message + "hud.welcome": r#"Welcome to the Veloren Alpha! + + +Some tips before you start: + + +Press F1 to see the available key commands. + +Type /help into the chat to see chat commands + + +There are chests and other objects randomly spawning in the World! + +Right-Click to collect them. + +To actually use whatever you loot from those chests open your inventory with 'B'. + +Double click the items in your bag to use or equip them. + +Throw them away by clicking them once and clicking outside of the bag + + +Nights can get pretty dark in Veloren. + +Light your lantern by pressing 'G' + + +Want to free your cursor to close this window? Press TAB! + + +Enjoy your stay in the World of Veloren."#, + +"hud.temp_quest_headline": r#"Please, help us Traveller!"#, +"hud.temp_quest_text": r#"Dungeons filled with evil cultists +have emerged all around our peaceful towns! + + +Gather some company, stack up on food +and defeat their vile leaders and acolytes. + + +Maybe you can even obtain one of their +magically infused items?"#, + + "hud.spell": "Spells", + + "hud.free_look_indicator": "Free look active. Press {key} to disable.", + "hud.auto_walk_indicator": "Auto walk active", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/hud/bag.ron b/assets/voxygen/i18n/en/hud/bag.ron new file mode 100644 index 0000000000..3140b4fc21 --- /dev/null +++ b/assets/voxygen/i18n/en/hud/bag.ron @@ -0,0 +1,71 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + // Inventory + "hud.bag.inventory": "{playername}'s Inventory", + "hud.bag.stats_title": "{playername}'s Stats", + "hud.bag.exp": "Exp", + "hud.bag.armor": "Armor", + "hud.bag.stats": "Stats", + "hud.bag.head": "Head", + "hud.bag.neck": "Neck", + "hud.bag.tabard": "Tabard", + "hud.bag.shoulders": "Shoulders", + "hud.bag.chest": "Chest", + "hud.bag.hands": "Hands", + "hud.bag.lantern": "Lantern", + "hud.bag.glider": "Glider", + "hud.bag.belt": "Belt", + "hud.bag.ring": "Ring", + "hud.bag.back": "Back", + "hud.bag.legs": "Legs", + "hud.bag.feet": "Feet", + "hud.bag.mainhand": "Mainhand", + "hud.bag.offhand": "Offhand", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/hud/char_window.ron b/assets/voxygen/i18n/en/hud/char_window.ron new file mode 100644 index 0000000000..4c84faca2e --- /dev/null +++ b/assets/voxygen/i18n/en/hud/char_window.ron @@ -0,0 +1,60 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + "character_window.character_name": "Character Name", + // Character stats + "character_window.character_stats": r#"Endurance + +Fitness + +Willpower + +Protection +"#, + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/hud/chat.ron b/assets/voxygen/i18n/en/hud/chat.ron new file mode 100644 index 0000000000..7942c0c975 --- /dev/null +++ b/assets/voxygen/i18n/en/hud/chat.ron @@ -0,0 +1,76 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + // Chat outputs + "hud.chat.online_msg": "[{name}] is online now", + "hud.chat.offline_msg": "{name} went offline", + + "hud.chat.default_death_msg": "[{name}] died", + "hud.chat.environmental_kill_msg": "[{name}] died in {environment}", + "hud.chat.fall_kill_msg": "[{name}] died from fall damage", + "hud.chat.suicide_msg": "[{name}] died from self-inflicted wounds", + + "hud.chat.pvp_melee_kill_msg": "[{attacker}] defeated [{victim}]", + "hud.chat.pvp_ranged_kill_msg": "[{attacker}] shot [{victim}]", + "hud.chat.pvp_explosion_kill_msg": "[{attacker}] blew up [{victim}]", + "hud.chat.pvp_energy_kill_msg": "[{attacker}] killed [{victim}] with magic", + "hud.chat.pvp_buff_kill_msg": "[{attacker}] killed [{victim}]", + + + "hud.chat.npc_melee_kill_msg": "{attacker} killed [{victim}]", + "hud.chat.npc_ranged_kill_msg": "{attacker} shot [{victim}]", + "hud.chat.npc_explosion_kill_msg": "{attacker} blew up [{victim}]", + "hud.chat.npc_energy_kill_msg": "[{attacker}] killed [{victim}] with magic", + "hud.chat.npc_other_kill_msg": "[{attacker}] killed [{victim}]", + + "hud.chat.loot_msg": "You picked up [{item}]", + "hud.chat.loot_fail": "Your Inventory is full!", + "hud.chat.goodbye": "Goodbye!", + "hud.chat.connection_lost": "Connection lost. Kicking in {time} seconds.", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/hud/crafting.ron b/assets/voxygen/i18n/en/hud/crafting.ron new file mode 100644 index 0000000000..4fd52fda3b --- /dev/null +++ b/assets/voxygen/i18n/en/hud/crafting.ron @@ -0,0 +1,55 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + "hud.crafting": "Crafting", + "hud.crafting.recipes": "Recipes", + "hud.crafting.ingredients": "Ingredients:", + "hud.crafting.craft": "Craft", + "hud.crafting.tool_cata": "Requires:", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/hud/group.ron b/assets/voxygen/i18n/en/hud/group.ron new file mode 100644 index 0000000000..d674f0cad9 --- /dev/null +++ b/assets/voxygen/i18n/en/hud/group.ron @@ -0,0 +1,62 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + "hud.group": "Group", + "hud.group.invite_to_join": "{name} invited you to their group!", + "hud.group.invite": "Invite", + "hud.group.kick": "Kick", + "hud.group.assign_leader": "Assign Leader", + "hud.group.leave": "Leave Group", + "hud.group.dead" : "Dead", + "hud.group.out_of_range": "Out of range", + "hud.group.add_friend": "Add to Friends", + "hud.group.link_group": "Link Groups", + "hud.group.in_menu": "In Menu", + "hud.group.members": "Group Members", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/hud/map.ron b/assets/voxygen/i18n/en/hud/map.ron new file mode 100644 index 0000000000..e257f95340 --- /dev/null +++ b/assets/voxygen/i18n/en/hud/map.ron @@ -0,0 +1,66 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + // Map and Questlog + "hud.map.map_title": "Map", + "hud.map.qlog_title": "Quests", + "hud.map.difficulty": "Difficulty", + "hud.map.towns": "Towns", + "hud.map.castles": "Castles", + "hud.map.dungeons": "Dungeons", + "hud.map.caves": "Caves", + "hud.map.cave": "Cave", + "hud.map.town": "Town", + "hud.map.castle": "Castle", + "hud.map.dungeon": "Dungeon", + "hud.map.difficulty_dungeon": "Dungeon\n\nDifficulty: {difficulty}", + "hud.map.drag": "Drag", + "hud.map.zoom": "Zoom", + "hud.map.recenter": "Recenter", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/hud/sct.ron b/assets/voxygen/i18n/en/hud/sct.ron new file mode 100644 index 0000000000..2d691e0595 --- /dev/null +++ b/assets/voxygen/i18n/en/hud/sct.ron @@ -0,0 +1,53 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + // SCT outputs + "hud.sct.experience": "{amount} Exp", + "hud.sct.block": "BLOCKED", + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/hud/social.ron b/assets/voxygen/i18n/en/hud/social.ron new file mode 100644 index 0000000000..dd1474a5f7 --- /dev/null +++ b/assets/voxygen/i18n/en/hud/social.ron @@ -0,0 +1,61 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + "hud.social": "Other Players", + "hud.social.online": "Online:", + "hud.social.friends": "Friends", + "hud.social.not_yet_available": "Not yet available", + "hud.social.faction": "Faction", + "hud.social.play_online_fmt": "{nb_player} player(s) online", + "hud.social.name": "Name", + "hud.social.level": "Level", + "hud.social.zone": "Zone", + "hud.social.account": "Account", + }, + + + vector_map: { + } +) + diff --git a/assets/voxygen/i18n/en/main.ron b/assets/voxygen/i18n/en/main.ron new file mode 100644 index 0000000000..18ebabec0a --- /dev/null +++ b/assets/voxygen/i18n/en/main.ron @@ -0,0 +1,106 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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 Main screen section + "main.username": "Username", + "main.server": "Server", + "main.password": "Password", + "main.connecting": "Connecting", + "main.creating_world": "Creating world", + "main.tip": "Tip:", + + // Welcome notice that appears the first time Veloren is started + "main.notice": r#"Welcome to the alpha version of Veloren! + +Before you dive into the fun, please keep a few things in mind: + +- This is a very early alpha. Expect bugs, extremely unfinished gameplay, unpolished mechanics, and missing features. + +- If you have constructive feedback or bug reports, you can contact us via Reddit, GitLab, or our community Discord server. + +- Veloren is licensed under the GPL 3 open-source licence. That means you're free to play, modify, and redistribute the game however + you wish (provided derived work is also under GPL 3). + +- Veloren is a non-profit community project, and everybody working on it is a volunteer. +If you like what you see, you're welcome to join the development or art teams! + +Thanks for taking the time to read this notice, we hope you enjoy the game! + +~ The Veloren Devs"#, + + // Login process description + "main.login_process": r#"Information on the Login Process: + +Please note that you now need an account +to play on auth-enabled servers. + +You can create an account over at + +https://veloren.net/account/."#, + "main.login.server_not_found": "Server not found", + "main.login.authentication_error": "Auth error on server", + "main.login.server_full": "Server is full", + "main.login.untrusted_auth_server": "Auth server not trusted", + "main.login.outdated_client_or_server": "ServerWentMad: Probably versions are incompatible, check for updates.", + "main.login.timeout": "Timeout: Server did not respond in time. (Overloaded or network issues).", + "main.login.server_shut_down": "Server shut down", + "main.login.already_logged_in": "You are already logged into the server.", + "main.login.network_error": "Network error", + "main.login.failed_sending_request": "Request to Auth server failed", + "main.login.invalid_character": "The selected character is invalid", + "main.login.client_crashed": "Client crashed", + "main.login.not_on_whitelist": "You need a Whitelist entry by an Admin to join", + "main.login.banned": "You have been banned with the following reason", + "main.login.kicked": "You have been kicked with the following reason", + "main.login.select_language": "Select a language", + + "main.servers.select_server": "Select a server", + + /// End Main screen section + }, + + + vector_map: { + } +) diff --git a/assets/voxygen/i18n/en/template.ron b/assets/voxygen/i18n/en/template.ron new file mode 100644 index 0000000000..d1651f8a3f --- /dev/null +++ b/assets/voxygen/i18n/en/template.ron @@ -0,0 +1,51 @@ +/// 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! +/// +/// WARNING: Localization files shall be saved in UTF-8 format without BOM + +/// Localization for "global" English +( + metadata: ( + language_name: "English", + language_identifier: "en", + ), + 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: { + + }, + + + vector_map: { + } +) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 3662b0695d..e9718c1033 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -659,7 +659,7 @@ impl Hud { // Load item images. let item_imgs = ItemImgs::new(&mut ui, imgs.not_found); // Load fonts. - let fonts = Fonts::load(&global_state.i18n.read().fonts, &mut ui) + let fonts = Fonts::load(&global_state.i18n.fonts, &mut ui) .expect("Impossible to load fonts!"); // Get the server name. let server = &client.server_info().name; @@ -751,7 +751,7 @@ impl Hud { // FPS let fps = global_state.clock.stats().average_tps; let version = common::util::DISPLAY_VERSION_LONG.clone(); - let i18n = &*global_state.i18n.read(); + let i18n = global_state.i18n.clone(); if self.show.ingame { let ecs = client.state().ecs(); @@ -1260,7 +1260,7 @@ impl Hud { in_group, &global_state.settings.gameplay, self.pulse, - i18n, + &i18n, &self.imgs, &self.fonts, ) @@ -1788,7 +1788,7 @@ impl Hud { global_state, &self.rot_imgs, tooltip_manager, - i18n, + &i18n, &player_stats, ) .set(self.ids.buttons, ui_widgets) @@ -1810,7 +1810,7 @@ impl Hud { &self.fonts, &self.rot_imgs, tooltip_manager, - i18n, + &i18n, &player_buffs, self.pulse, &global_state, @@ -1830,7 +1830,7 @@ impl Hud { &self.imgs, &self.rot_imgs, &self.fonts, - i18n, + &i18n, self.pulse, &global_state, tooltip_manager, @@ -1847,7 +1847,7 @@ impl Hud { } // Popup (waypoint saved and similar notifications) Popup::new( - i18n, + &i18n, client, &self.new_notifications, &self.fonts, @@ -1883,7 +1883,7 @@ impl Hud { tooltip_manager, &mut self.slot_manager, self.pulse, - i18n, + &i18n, &player_stats, &self.show, ) @@ -1951,7 +1951,7 @@ impl Hud { &self.hotbar, tooltip_manager, &mut self.slot_manager, - i18n, + &i18n, &self.show, &ability_map, ) @@ -1966,7 +1966,7 @@ impl Hud { client, &self.imgs, &self.fonts, - i18n, + &i18n, &self.rot_imgs, tooltip_manager, &self.item_imgs, @@ -2005,7 +2005,7 @@ impl Hud { global_state, &self.imgs, &self.fonts, - i18n, + &i18n, ) .and_then(self.force_chat_input.take(), |c, input| c.input(input)) .and_then(self.tab_complete.take(), |c, input| { @@ -2042,7 +2042,7 @@ impl Hud { &self.show, &self.imgs, &self.fonts, - i18n, + &i18n, fps as f32, ) .set(self.ids.settings_window, ui_widgets) @@ -2198,7 +2198,7 @@ impl Hud { client, &self.imgs, &self.fonts, - i18n, + &i18n, info.selected_entity, &self.rot_imgs, tooltip_manager, @@ -2226,7 +2226,7 @@ impl Hud { // Spellbook if self.show.spell { - match Spell::new(&self.show, client, &self.imgs, &self.fonts, i18n) + match Spell::new(&self.show, client, &self.imgs, &self.fonts, &i18n) .set(self.ids.spell, ui_widgets) { Some(spell::Event::Close) => { @@ -2246,7 +2246,7 @@ impl Hud { &self.world_map, &self.fonts, self.pulse, - i18n, + &i18n, &global_state, tooltip_manager, ) @@ -2290,7 +2290,7 @@ impl Hud { } if self.show.esc_menu { - match EscMenu::new(&self.imgs, &self.fonts, i18n).set(self.ids.esc_menu, ui_widgets) { + match EscMenu::new(&self.imgs, &self.fonts, &i18n).set(self.ids.esc_menu, ui_widgets) { Some(esc_menu::Event::OpenSettings(tab)) => { self.show.open_setting_tab(tab); }, diff --git a/voxygen/src/i18n.rs b/voxygen/src/i18n.rs index d55f81637c..bde22be3fb 100644 --- a/voxygen/src/i18n.rs +++ b/voxygen/src/i18n.rs @@ -43,7 +43,7 @@ impl Font { pub type Fonts = HashMap; /// Store internationalization data -#[derive(Debug, PartialEq, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)] pub struct Localization { /// A map storing the localized texts /// @@ -93,7 +93,7 @@ impl Localization { /// Return the missing keys compared to the reference language fn list_missing_entries(&self) -> (HashSet, HashSet) { let reference_localization = - Localization::load_expect(&i18n_asset_key(REFERENCE_LANG)).read(); + init_localization(&i18n_asset_key(REFERENCE_LANG)).unwrap(); let reference_string_keys: HashSet<_> = reference_localization.string_map.keys().cloned().collect(); @@ -160,6 +160,24 @@ impl assets::Loader for LocalizationLoader { } } +pub fn init_localization(asset_key: &str) -> Result { + let mut asked_localization = Localization::load(&(asset_key.to_string() + "._self"))?.cloned(); + for localization_asset in assets::load_dir::(asset_key)?.iter_all() { + println!("{:?}", localization_asset.0); + // handle localization files + if let Ok(localization) = localization_asset.1 { + asked_localization.string_map.extend(localization.read().string_map.clone()); + asked_localization.vector_map.extend(localization.read().vector_map.clone()); + } + } + // handle folders + // if let Ok(sub_localization) = init_localization(localization_asset.0) { + // asked_localization.string_map.extend(sub_localization.string_map.clone()); + // asked_localization.vector_map.extend(sub_localization.vector_map.clone()); + // } + // Ok(asked_localization) +} + /// Load all the available languages located in the voxygen asset directory pub fn list_localizations() -> Vec { assets::load_dir::("voxygen.i18n") diff --git a/voxygen/src/lib.rs b/voxygen/src/lib.rs index c79d3cd8c6..b556d88a6a 100644 --- a/voxygen/src/lib.rs +++ b/voxygen/src/lib.rs @@ -53,7 +53,7 @@ pub struct GlobalState { #[cfg(feature = "singleplayer")] pub singleplayer: Option, // TODO: redo this so that the watcher doesn't have to exist for reloading to occur - pub i18n: AssetHandle, + pub i18n: Localization, pub clipboard: Option, // NOTE: This can be removed from GlobalState if client state behavior is refactored to not // enter the game before confirmation of successful character load diff --git a/voxygen/src/main.rs b/voxygen/src/main.rs index 16e58b0505..eb80828489 100644 --- a/voxygen/src/main.rs +++ b/voxygen/src/main.rs @@ -5,7 +5,7 @@ use veloren_voxygen::{ audio::AudioFrontend, - i18n::{self, i18n_asset_key, Localization}, + i18n::{self, i18n_asset_key, init_localization, Localization}, logging, profile::Profile, run, @@ -157,7 +157,8 @@ fn main() { // Load the profile. let profile = Profile::load(); - let i18n = Localization::load(&i18n_asset_key(&settings.language.selected_language)) + + let i18n = init_localization(&i18n_asset_key(&settings.language.selected_language)) .unwrap_or_else(|error| { let selected_language = &settings.language.selected_language; warn!( @@ -166,9 +167,9 @@ fn main() { "Impossible to load language: change to the default language (English) instead.", ); settings.language.selected_language = i18n::REFERENCE_LANG.to_owned(); - Localization::load_expect(&i18n_asset_key(&settings.language.selected_language)) + init_localization(&i18n_asset_key(&settings.language.selected_language)).unwrap() }); - i18n.read().log_missing_entries(); + i18n.log_missing_entries(); // Create window let (window, event_loop) = Window::new(&settings).expect("Failed to create window!"); diff --git a/voxygen/src/menu/char_selection/mod.rs b/voxygen/src/menu/char_selection/mod.rs index cc836594a5..41a79353c1 100644 --- a/voxygen/src/menu/char_selection/mod.rs +++ b/voxygen/src/menu/char_selection/mod.rs @@ -63,7 +63,7 @@ impl PlayState for CharSelectionState { self.client.borrow_mut().load_character_list(); // Updated localization in case the selected language was changed - self.char_selection_ui.update_language(global_state.i18n); + self.char_selection_ui.update_language(global_state.i18n.clone()); // Set scale mode in case it was change self.char_selection_ui .set_scale_mode(global_state.settings.gameplay.ui_scale); @@ -162,7 +162,7 @@ impl PlayState for CharSelectionState { } // Tick the client (currently only to keep the connection alive). - let localized_strings = &*global_state.i18n.read(); + let localized_strings = &global_state.i18n; match self.client.borrow_mut().tick( comp::ControllerInputs::default(), diff --git a/voxygen/src/menu/char_selection/ui/mod.rs b/voxygen/src/menu/char_selection/ui/mod.rs index a126c2e1ef..18f5fea14e 100644 --- a/voxygen/src/menu/char_selection/ui/mod.rs +++ b/voxygen/src/menu/char_selection/ui/mod.rs @@ -1395,7 +1395,7 @@ impl CharSelectionUi { let selected_character = global_state.profile.get_selected_character(server_name); // Load language - let i18n = global_state.i18n.read(); + let i18n = &global_state.i18n; // TODO: don't add default font twice let font = ui::ice::load_font(&i18n.fonts.get("cyri").unwrap().asset_key); @@ -1458,8 +1458,8 @@ impl CharSelectionUi { } } - pub fn update_language(&mut self, i18n: AssetHandle) { - let i18n = i18n.read(); + pub fn update_language(&mut self, i18n: Localization) { + let i18n = i18n; let font = ui::ice::load_font(&i18n.fonts.get("cyri").unwrap().asset_key); self.ui.clear_fonts(font); @@ -1478,7 +1478,7 @@ impl CharSelectionUi { // TODO: do we need whole client here or just character list? pub fn maintain(&mut self, global_state: &mut GlobalState, client: &Client) -> Vec { let mut events = Vec::new(); - let i18n = global_state.i18n.read(); + let i18n = &global_state.i18n; let (mut messages, _) = self.ui.maintain( self.controls diff --git a/voxygen/src/menu/main/mod.rs b/voxygen/src/menu/main/mod.rs index 8567047987..caf9aa3a3d 100644 --- a/voxygen/src/menu/main/mod.rs +++ b/voxygen/src/menu/main/mod.rs @@ -5,7 +5,7 @@ use super::char_selection::CharSelectionState; #[cfg(feature = "singleplayer")] use crate::singleplayer::Singleplayer; use crate::{ - i18n::{i18n_asset_key, Localization}, + i18n::{i18n_asset_key, init_localization, Localization}, render::Renderer, settings::Settings, window::Event, @@ -49,7 +49,7 @@ impl PlayState for MainMenuState { // Updated localization in case the selected language was changed self.main_menu_ui - .update_language(global_state.i18n, &global_state.settings); + .update_language(global_state.i18n.clone(), &global_state.settings); // Set scale mode in case it was change self.main_menu_ui .set_scale_mode(global_state.settings.gameplay.ui_scale); @@ -113,7 +113,7 @@ impl PlayState for MainMenuState { ))); }, Some(InitMsg::Done(Err(err))) => { - let localized_strings = global_state.i18n.read(); + let localized_strings = &global_state.i18n; self.client_init = None; global_state.info_message = Some({ let err = match err { @@ -261,12 +261,10 @@ impl PlayState for MainMenuState { MainMenuEvent::ChangeLanguage(new_language) => { global_state.settings.language.selected_language = new_language.language_identifier; - global_state.i18n = Localization::load_expect(&i18n_asset_key( - &global_state.settings.language.selected_language, - )); - global_state.i18n.read().log_missing_entries(); + global_state.i18n = init_localization(&i18n_asset_key(&global_state.settings.language.selected_language)).unwrap(); + global_state.i18n.log_missing_entries(); self.main_menu_ui - .update_language(global_state.i18n, &global_state.settings); + .update_language(global_state.i18n.clone(), &global_state.settings); }, #[cfg(feature = "singleplayer")] MainMenuEvent::StartSingleplayer => { diff --git a/voxygen/src/menu/main/ui/mod.rs b/voxygen/src/menu/main/ui/mod.rs index f394c4ee9c..e6604e8c40 100644 --- a/voxygen/src/menu/main/ui/mod.rs +++ b/voxygen/src/menu/main/ui/mod.rs @@ -131,7 +131,7 @@ struct Controls { fonts: Fonts, imgs: Imgs, bg_img: widget::image::Handle, - i18n: AssetHandle, + i18n: Localization, // Voxygen version version: String, // Alpha disclaimer @@ -176,7 +176,7 @@ impl Controls { fonts: Fonts, imgs: Imgs, bg_img: widget::image::Handle, - i18n: AssetHandle, + i18n: Localization, settings: &Settings, ) -> Self { let version = common::util::DISPLAY_VERSION_LONG.clone(); @@ -280,7 +280,7 @@ impl Controls { &self.imgs, &self.login_info, error.as_deref(), - &self.i18n.read(), + &self.i18n, self.is_selecting_language, self.selected_language_index, &language_metadatas, @@ -292,7 +292,7 @@ impl Controls { &self.imgs, &settings.networking.servers, self.selected_server_index, - &self.i18n.read(), + &self.i18n, button_style, ), Screen::Connecting { @@ -303,7 +303,7 @@ impl Controls { &self.imgs, &connection_state, self.time, - &self.i18n.read(), + &self.i18n, button_style, settings.gameplay.loading_tips, ), @@ -481,7 +481,7 @@ pub struct MainMenuUi { impl<'a> MainMenuUi { pub fn new(global_state: &mut GlobalState) -> Self { // Load language - let i18n = &*global_state.i18n.read(); + let i18n = &global_state.i18n; // TODO: don't add default font twice let font = load_font(&i18n.fonts.get("cyri").unwrap().asset_key); @@ -501,16 +501,15 @@ impl<'a> MainMenuUi { fonts, Imgs::load(&mut ui).expect("Failed to load images"), ui.add_graphic(Graphic::Image(bg_img, None)), - global_state.i18n, + global_state.i18n.clone(), &global_state.settings, ); Self { ui, controls } } - pub fn update_language(&mut self, i18n: AssetHandle, settings: &Settings) { - self.controls.i18n = i18n; - let i18n = &*i18n.read(); + pub fn update_language(&mut self, i18n: Localization, settings: &Settings) { + self.controls.i18n = i18n.clone(); let font = load_font(&i18n.fonts.get("cyri").unwrap().asset_key); self.ui.clear_fonts(font); self.controls.fonts = diff --git a/voxygen/src/session.rs b/voxygen/src/session.rs index bc9c464650..b72a8823ea 100644 --- a/voxygen/src/session.rs +++ b/voxygen/src/session.rs @@ -2,7 +2,7 @@ use crate::{ audio::sfx::SfxEvent, ecs::MyEntity, hud::{DebugInfo, Event as HudEvent, Hud, HudInfo, PressBehavior}, - i18n::{i18n_asset_key, Localization}, + i18n::{i18n_asset_key, init_localization, Localization}, key_state::KeyState, menu::char_selection::CharSelectionState, render::Renderer, @@ -124,7 +124,7 @@ impl SessionState { let sfx_trigger_item = sfx_triggers.get_key_value(&SfxEvent::from(&inv_event)); global_state.audio.emit_sfx_item(sfx_trigger_item); - let i18n = global_state.i18n.read(); + let i18n = &global_state.i18n; match inv_event { InventoryUpdateEvent::CollectFailed => { @@ -146,7 +146,7 @@ impl SessionState { }, client::Event::Disconnect => return Ok(TickAction::Disconnect), client::Event::DisconnectionNotification(time) => { - let i18n = global_state.i18n.read(); + let i18n = &global_state.i18n; let message = match time { 0 => String::from(i18n.get("hud.chat.goodbye")), @@ -165,7 +165,6 @@ impl SessionState { "{}: {}", global_state .i18n - .read() .get("main.login.kicked") .to_string(), reason @@ -679,7 +678,6 @@ impl PlayState for SessionState { global_state.info_message = Some( global_state .i18n - .read() .get("common.connection_lost") .to_owned(), ); @@ -759,11 +757,11 @@ impl PlayState for SessionState { ); // Look for changes in the localization files - if global_state.i18n.reloaded() { - hud_events.push(HudEvent::ChangeLanguage(Box::new( - global_state.i18n.read().metadata.clone(), - ))); - } + // if global_state.i18n.reloaded() { + // hud_events.push(HudEvent::ChangeLanguage(Box::new( + // global_state.i18n.metadata.clone(), + // ))); + // } // Maintain the UI. for event in hud_events { @@ -1017,11 +1015,9 @@ impl PlayState for SessionState { HudEvent::ChangeLanguage(new_language) => { global_state.settings.language.selected_language = new_language.language_identifier; - global_state.i18n = Localization::load_expect(&i18n_asset_key( - &global_state.settings.language.selected_language, - )); - global_state.i18n.read().log_missing_entries(); - self.hud.update_fonts(&global_state.i18n.read()); + global_state.i18n = init_localization(&i18n_asset_key(&global_state.settings.language.selected_language)).unwrap(); + global_state.i18n.log_missing_entries(); + self.hud.update_fonts(&global_state.i18n); }, HudEvent::ChangeFullscreenMode(new_fullscreen_settings) => { global_state