mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
remove some reexports
This commit is contained in:
parent
c3aa4c54a9
commit
4c0b74150d
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
export VELOREN_ASSETS="$(pwd)/assets"
|
||||
rm -r target/debug/incremental/veloren_* || echo "all good" # TMP FIX FOR 2021-03-22-nightly
|
||||
time cargo test --package veloren-i18n --lib test_all_localizations -- --nocapture --ignored &&
|
||||
time cargo test --package veloren-voxygen-i18n --lib test_all_localizations -- --nocapture --ignored &&
|
||||
time cargo test --package veloren-common-assets asset_tweak::tests --features asset_tweak --lib &&
|
||||
( rm -r target/debug/incremental* || echo "all good" ) && # TMP FIX FOR 2021-03-22-nightly
|
||||
time cargo test
|
30
Cargo.lock
generated
30
Cargo.lock
generated
@ -6017,20 +6017,6 @@ dependencies = [
|
||||
"veloren-common-net",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "veloren-i18n"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"deunicode",
|
||||
"git2",
|
||||
"hashbrown 0.11.2",
|
||||
"ron",
|
||||
"serde",
|
||||
"tracing",
|
||||
"veloren-common-assets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "veloren-network"
|
||||
version = "0.3.0"
|
||||
@ -6236,10 +6222,10 @@ dependencies = [
|
||||
"veloren-common-net",
|
||||
"veloren-common-state",
|
||||
"veloren-common-systems",
|
||||
"veloren-i18n",
|
||||
"veloren-server",
|
||||
"veloren-voxygen-anim",
|
||||
"veloren-voxygen-egui",
|
||||
"veloren-voxygen-i18n",
|
||||
"veloren-world",
|
||||
"wgpu",
|
||||
"wgpu-profiler",
|
||||
@ -6295,6 +6281,20 @@ dependencies = [
|
||||
"veloren-voxygen-egui",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "veloren-voxygen-i18n"
|
||||
version = "0.10.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"deunicode",
|
||||
"git2",
|
||||
"hashbrown 0.11.2",
|
||||
"ron",
|
||||
"serde",
|
||||
"tracing",
|
||||
"veloren-common-assets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "veloren-world"
|
||||
version = "0.10.0"
|
||||
|
@ -46,7 +46,7 @@ common-systems = {package = "veloren-common-systems", path = "../common/systems"
|
||||
common-state = {package = "veloren-common-state", path = "../common/state"}
|
||||
|
||||
anim = {package = "veloren-voxygen-anim", path = "anim"}
|
||||
i18n = {package = "veloren-i18n", path = "i18n"}
|
||||
i18n = {package = "veloren-voxygen-i18n", path = "i18n"}
|
||||
voxygen-egui = {package = "veloren-voxygen-egui", path = "egui", optional = true }
|
||||
|
||||
# Graphics
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
authors = ["juliancoffee <lightdarkdaughter@gmail.com>", "Rémy Phelipot"]
|
||||
edition = "2018"
|
||||
name = "veloren-i18n"
|
||||
name = "veloren-voxygen-i18n"
|
||||
description = "Crate for internalization and diagnostic of existing localizations."
|
||||
version = "0.10.0"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
use clap::{App, Arg};
|
||||
use veloren_i18n::{analysis, verification};
|
||||
use veloren_voxygen_i18n::{analysis, verification, BasePath};
|
||||
|
||||
fn main() {
|
||||
let matches = App::new("i18n-check")
|
||||
@ -36,7 +36,7 @@ fn main() {
|
||||
|
||||
// Generate paths
|
||||
let root_path = common_assets::find_root().expect("Failed to find root of repository");
|
||||
let path = veloren_i18n::BasePath::new(&root_path);
|
||||
let path = BasePath::new(&root_path);
|
||||
let be_verbose = matches.is_present("verbose");
|
||||
let csv_enabled = matches.is_present("csv");
|
||||
|
||||
|
@ -7,7 +7,6 @@ use super::{
|
||||
};
|
||||
use crate::{
|
||||
game_input::GameInput,
|
||||
i18n::Localization,
|
||||
ui::{
|
||||
fonts::Fonts,
|
||||
slot::{ContentSize, SlotMaker},
|
||||
@ -31,6 +30,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Image, Rectangle, Scrollbar, State as ConrodState, Text},
|
||||
widget_ids, Color, Colorable, Positionable, Scalar, Sizeable, UiCell, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
|
||||
use crate::hud::slots::SlotKind;
|
||||
use specs::Entity as EcsEntity;
|
||||
|
@ -4,10 +4,10 @@ use super::{
|
||||
};
|
||||
use crate::{
|
||||
hud::{self, BuffPosition},
|
||||
i18n::Localization,
|
||||
ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable},
|
||||
GlobalState,
|
||||
};
|
||||
use i18n::Localization;
|
||||
|
||||
use common::comp::{BuffKind, Buffs, Energy, Health};
|
||||
use conrod_core::{
|
||||
|
@ -4,7 +4,6 @@ use super::{
|
||||
};
|
||||
use crate::{
|
||||
game_input::GameInput,
|
||||
i18n::Localization,
|
||||
ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable},
|
||||
window::KeyMouse,
|
||||
GlobalState,
|
||||
@ -15,6 +14,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Image, Text},
|
||||
widget_ids, Color, Colorable, Positionable, Sizeable, UiCell, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
widget_ids! {
|
||||
struct Ids {
|
||||
bag,
|
||||
|
@ -2,7 +2,7 @@ use super::{
|
||||
img_ids::Imgs, ChatTab, ERROR_COLOR, FACTION_COLOR, GROUP_COLOR, INFO_COLOR, KILL_COLOR,
|
||||
OFFLINE_COLOR, ONLINE_COLOR, REGION_COLOR, SAY_COLOR, TELL_COLOR, TEXT_COLOR, WORLD_COLOR,
|
||||
};
|
||||
use crate::{i18n::Localization, settings::chat::MAX_CHAT_TABS, ui::fonts::Fonts, GlobalState};
|
||||
use crate::{settings::chat::MAX_CHAT_TABS, ui::fonts::Fonts, GlobalState};
|
||||
use client::{cmd, Client};
|
||||
use common::comp::{
|
||||
chat::{KillSource, KillType},
|
||||
@ -22,6 +22,7 @@ use conrod_core::{
|
||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Ui, UiCell, Widget,
|
||||
WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
use std::collections::{HashSet, VecDeque};
|
||||
|
||||
widget_ids! {
|
||||
|
@ -4,12 +4,9 @@ use super::{
|
||||
item_imgs::{animate_by_pulse, ItemImgs, ItemKey::Tool},
|
||||
Show, TEXT_COLOR, TEXT_DULL_RED_COLOR, TEXT_GRAY_COLOR, UI_HIGHLIGHT_0, UI_MAIN,
|
||||
};
|
||||
use crate::{
|
||||
i18n::Localization,
|
||||
ui::{
|
||||
fonts::Fonts, ImageFrame, ItemTooltip, ItemTooltipManager, ItemTooltipable, Tooltip,
|
||||
TooltipManager, Tooltipable,
|
||||
},
|
||||
use crate::ui::{
|
||||
fonts::Fonts, ImageFrame, ItemTooltip, ItemTooltipManager, ItemTooltipable, Tooltip,
|
||||
TooltipManager, Tooltipable,
|
||||
};
|
||||
use client::{self, Client};
|
||||
use common::{
|
||||
@ -29,6 +26,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Image, Rectangle, Scrollbar, Text, TextEdit},
|
||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
use std::sync::Arc;
|
||||
|
||||
use strum::IntoEnumIterator;
|
||||
|
@ -3,16 +3,14 @@ use super::{
|
||||
item_imgs::{animate_by_pulse, ItemImgs, ItemKey::Tool},
|
||||
Show, CRITICAL_HP_COLOR, HP_COLOR, TEXT_COLOR, UI_HIGHLIGHT_0, UI_MAIN, XP_COLOR,
|
||||
};
|
||||
use crate::{
|
||||
i18n::Localization,
|
||||
ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable},
|
||||
};
|
||||
use crate::ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable};
|
||||
use conrod_core::{
|
||||
color,
|
||||
image::Id,
|
||||
widget::{self, button, Button, Image, Rectangle, Text},
|
||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, UiCell, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
|
||||
use client::{self, Client};
|
||||
use common::comp::{
|
||||
|
@ -1,9 +1,10 @@
|
||||
use super::{img_ids::Imgs, settings_window::SettingsTab, TEXT_COLOR};
|
||||
use crate::{i18n::Localization, ui::fonts::Fonts};
|
||||
use crate::ui::fonts::Fonts;
|
||||
use conrod_core::{
|
||||
widget::{self, Button, Image},
|
||||
widget_ids, Color, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
|
||||
widget_ids! {
|
||||
struct Ids {
|
||||
|
@ -9,7 +9,6 @@ use super::{
|
||||
use crate::{
|
||||
game_input::GameInput,
|
||||
hud,
|
||||
i18n::Localization,
|
||||
settings::Settings,
|
||||
ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable},
|
||||
GlobalState,
|
||||
@ -27,6 +26,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Image, Rectangle, Scrollbar, Text},
|
||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
use specs::{saveload::MarkerAllocator, WorldExt};
|
||||
|
||||
widget_ids! {
|
||||
|
@ -4,10 +4,7 @@ use super::{
|
||||
item_imgs::ItemImgs,
|
||||
Show, Windows, TEXT_COLOR,
|
||||
};
|
||||
use crate::{
|
||||
i18n::Localization,
|
||||
ui::{fonts::Fonts, ImageFrame, ItemTooltip, ItemTooltipManager, ItemTooltipable},
|
||||
};
|
||||
use crate::ui::{fonts::Fonts, ImageFrame, ItemTooltip, ItemTooltipManager, ItemTooltipable};
|
||||
use client::Client;
|
||||
use common::comp::inventory::item::{ItemDef, MaterialStatManifest, Quality};
|
||||
use conrod_core::{
|
||||
@ -16,6 +13,7 @@ use conrod_core::{
|
||||
widget::{self, Image, List, Rectangle, Scrollbar, Text},
|
||||
widget_ids, Color, Colorable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
use std::{collections::VecDeque, sync::Arc};
|
||||
|
||||
widget_ids! {
|
||||
|
@ -4,7 +4,6 @@ use super::{
|
||||
TEXT_BG, TEXT_BLUE_COLOR, TEXT_COLOR, TEXT_GRAY_COLOR, TEXT_VELORITE, UI_HIGHLIGHT_0, UI_MAIN,
|
||||
};
|
||||
use crate::{
|
||||
i18n::Localization,
|
||||
session::settings_change::{Interface as InterfaceChange, Interface::*},
|
||||
ui::{fonts::Fonts, img_ids, ImageFrame, Tooltip, TooltipManager, Tooltipable},
|
||||
GlobalState,
|
||||
@ -17,6 +16,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Image, Rectangle, Text},
|
||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
use specs::{saveload::MarkerAllocator, WorldExt};
|
||||
use vek::*;
|
||||
|
||||
|
@ -55,7 +55,6 @@ use crate::{
|
||||
ecs::{comp as vcomp, comp::HpFloaterList},
|
||||
game_input::GameInput,
|
||||
hud::{img_ids::ImgsRot, prompt_dialog::DialogOutcomeEvent},
|
||||
i18n::Localization,
|
||||
render::UiDrawer,
|
||||
scene::camera::{self, Camera},
|
||||
session::{
|
||||
@ -100,6 +99,7 @@ use conrod_core::{
|
||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget,
|
||||
};
|
||||
use hashbrown::{HashMap, HashSet};
|
||||
use i18n::Localization;
|
||||
use rand::Rng;
|
||||
use specs::{Entity as EcsEntity, Join, WorldExt};
|
||||
use std::{
|
||||
|
@ -5,7 +5,6 @@ use super::{
|
||||
};
|
||||
use crate::{
|
||||
hud::{get_buff_image, get_buff_info},
|
||||
i18n::Localization,
|
||||
settings::InterfaceSettings,
|
||||
ui::{fonts::Fonts, Ingameable},
|
||||
};
|
||||
@ -16,6 +15,7 @@ use conrod_core::{
|
||||
widget::{self, Image, Rectangle, Text},
|
||||
widget_ids, Color, Colorable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
|
||||
const MAX_BUBBLE_WIDTH: f64 = 250.0;
|
||||
widget_ids! {
|
||||
|
@ -1,6 +1,5 @@
|
||||
use crate::{
|
||||
game_input::GameInput,
|
||||
i18n::Localization,
|
||||
settings::ControlSettings,
|
||||
ui::{fonts::Fonts, Ingameable},
|
||||
};
|
||||
@ -9,6 +8,7 @@ use conrod_core::{
|
||||
widget::{self, RoundedRectangle, Text},
|
||||
widget_ids, Color, Colorable, Positionable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
use std::borrow::Cow;
|
||||
|
||||
use keyboard_keynames::key_layout::KeyLayout;
|
||||
|
@ -1,11 +1,12 @@
|
||||
use super::Show;
|
||||
use crate::{i18n::Localization, ui::fonts::Fonts};
|
||||
use crate::ui::fonts::Fonts;
|
||||
use client::{self, Client};
|
||||
use common_net::msg::Notification;
|
||||
use conrod_core::{
|
||||
widget::{self, Text},
|
||||
widget_ids, Color, Colorable, Positionable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
use std::{collections::VecDeque, time::Instant};
|
||||
|
||||
widget_ids! {
|
||||
|
@ -2,7 +2,6 @@ use super::{img_ids::Imgs, TEXT_COLOR, UI_HIGHLIGHT_0};
|
||||
use crate::{
|
||||
game_input::GameInput,
|
||||
hud::{Event, PromptDialogSettings},
|
||||
i18n::LocalizationHandle,
|
||||
settings::Settings,
|
||||
ui::fonts::Fonts,
|
||||
};
|
||||
@ -10,6 +9,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Image, Text},
|
||||
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::LocalizationHandle;
|
||||
use keyboard_keynames::key_layout::KeyLayout;
|
||||
|
||||
widget_ids! {
|
||||
|
@ -2,7 +2,6 @@ use super::{RESET_BUTTONS_HEIGHT, RESET_BUTTONS_WIDTH};
|
||||
|
||||
use crate::{
|
||||
hud::{img_ids::Imgs, ChatTab, Show, TEXT_COLOR, TEXT_GRAY_COLOR, UI_HIGHLIGHT_0, UI_MAIN},
|
||||
i18n::Localization,
|
||||
session::settings_change::{Chat as ChatChange, Chat::*},
|
||||
settings::chat::MAX_CHAT_TABS,
|
||||
ui::{fonts::Fonts, ImageSlider, ToggleButton},
|
||||
@ -14,6 +13,7 @@ use conrod_core::{
|
||||
widget::{self, Button, DropDownList, Image, Rectangle, Text, TextEdit},
|
||||
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
use std::cmp::Ordering;
|
||||
|
||||
widget_ids! {
|
||||
|
@ -3,7 +3,6 @@ use super::{RESET_BUTTONS_HEIGHT, RESET_BUTTONS_WIDTH};
|
||||
use crate::{
|
||||
game_input::GameInput,
|
||||
hud::{img_ids::Imgs, ERROR_COLOR, TEXT_BIND_CONFLICT_COLOR, TEXT_COLOR},
|
||||
i18n::Localization,
|
||||
session::settings_change::{Control as ControlChange, Control::*},
|
||||
ui::fonts::Fonts,
|
||||
GlobalState,
|
||||
@ -14,6 +13,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Rectangle, Scrollbar, Text},
|
||||
widget_ids, Borderable, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
widget_ids! {
|
||||
|
@ -2,7 +2,6 @@ use super::{RESET_BUTTONS_HEIGHT, RESET_BUTTONS_WIDTH};
|
||||
|
||||
use crate::{
|
||||
hud::{img_ids::Imgs, PressBehavior, MENU_BG, TEXT_COLOR},
|
||||
i18n::Localization,
|
||||
session::settings_change::{Gameplay as GameplayChange, Gameplay::*},
|
||||
ui::{fonts::Fonts, ImageSlider, ToggleButton},
|
||||
GlobalState,
|
||||
@ -13,6 +12,7 @@ use conrod_core::{
|
||||
widget::{self, Button, DropDownList, Rectangle, Scrollbar, Text},
|
||||
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
|
||||
widget_ids! {
|
||||
struct Ids {
|
||||
|
@ -4,7 +4,6 @@ use crate::{
|
||||
hud::{
|
||||
img_ids::Imgs, BarNumbers, BuffPosition, CrosshairType, ShortcutNumbers, Show, TEXT_COLOR,
|
||||
},
|
||||
i18n::Localization,
|
||||
session::settings_change::{Interface as InterfaceChange, Interface::*},
|
||||
ui::{fonts::Fonts, ImageSlider, ScaleMode, ToggleButton},
|
||||
GlobalState,
|
||||
@ -15,6 +14,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Image, Rectangle, Scrollbar, Text},
|
||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
|
||||
widget_ids! {
|
||||
struct Ids{
|
||||
|
@ -1,6 +1,5 @@
|
||||
use crate::{
|
||||
hud::{img_ids::Imgs, TEXT_COLOR},
|
||||
i18n::{list_localizations, Localization},
|
||||
session::settings_change::{Language as LanguageChange, Language::*},
|
||||
ui::{fonts::Fonts, ToggleButton},
|
||||
GlobalState,
|
||||
@ -10,6 +9,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Rectangle, Scrollbar, Text},
|
||||
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::{list_localizations, Localization};
|
||||
|
||||
widget_ids! {
|
||||
struct Ids {
|
||||
|
@ -8,7 +8,6 @@ mod video;
|
||||
|
||||
use crate::{
|
||||
hud::{img_ids::Imgs, Show, TEXT_COLOR, UI_HIGHLIGHT_0, UI_MAIN},
|
||||
i18n::Localization,
|
||||
session::settings_change::SettingsChange,
|
||||
ui::fonts::Fonts,
|
||||
GlobalState,
|
||||
@ -18,6 +17,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Image, Rectangle, Text},
|
||||
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
|
||||
use strum::IntoEnumIterator;
|
||||
use strum_macros::EnumIter;
|
||||
|
@ -2,7 +2,6 @@ use super::{RESET_BUTTONS_HEIGHT, RESET_BUTTONS_WIDTH};
|
||||
|
||||
use crate::{
|
||||
hud::{img_ids::Imgs, TEXT_COLOR},
|
||||
i18n::Localization,
|
||||
session::settings_change::{Audio as AudioChange, Audio::*},
|
||||
ui::{fonts::Fonts, ImageSlider},
|
||||
GlobalState,
|
||||
@ -13,6 +12,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Rectangle, Scrollbar, Text},
|
||||
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
|
||||
widget_ids! {
|
||||
struct Ids {
|
||||
|
@ -5,7 +5,6 @@ use crate::{
|
||||
img_ids::Imgs, CRITICAL_HP_COLOR, HP_COLOR, LOW_HP_COLOR, MENU_BG, STAMINA_COLOR,
|
||||
TEXT_COLOR,
|
||||
},
|
||||
i18n::Localization,
|
||||
render::{
|
||||
AaMode, CloudMode, FluidMode, LightingMode, PresentMode, RenderMode, ShadowMapMode,
|
||||
ShadowMode, UpscaleMode,
|
||||
@ -23,6 +22,7 @@ use conrod_core::{
|
||||
widget_ids, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use core::convert::TryFrom;
|
||||
use i18n::Localization;
|
||||
|
||||
use itertools::Itertools;
|
||||
use std::iter::once;
|
||||
|
@ -8,7 +8,6 @@ use super::{
|
||||
use crate::{
|
||||
game_input::GameInput,
|
||||
hud::{ComboFloater, Position, PositionSpecifier},
|
||||
i18n::Localization,
|
||||
ui::{
|
||||
fonts::Fonts,
|
||||
slot::{ContentSize, SlotMaker},
|
||||
@ -17,6 +16,7 @@ use crate::{
|
||||
},
|
||||
GlobalState,
|
||||
};
|
||||
use i18n::Localization;
|
||||
|
||||
use client::{self, Client};
|
||||
use common::comp::{
|
||||
|
@ -2,11 +2,7 @@ use super::{
|
||||
img_ids::{Imgs, ImgsRot},
|
||||
Show, TEXT_COLOR, TEXT_COLOR_3, UI_HIGHLIGHT_0, UI_MAIN,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
i18n::Localization,
|
||||
ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable},
|
||||
};
|
||||
use crate::ui::{fonts::Fonts, ImageFrame, Tooltip, TooltipManager, Tooltipable};
|
||||
use client::{self, Client};
|
||||
use common::{comp::group, uid::Uid};
|
||||
use conrod_core::{
|
||||
@ -14,6 +10,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Image, Rectangle, Scrollbar, Text, TextEdit},
|
||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
use itertools::Itertools;
|
||||
use std::time::Instant;
|
||||
|
||||
|
@ -6,7 +6,6 @@ use super::{
|
||||
};
|
||||
use crate::{
|
||||
hud::bag::{BackgroundIds, InventoryScroller},
|
||||
i18n::Localization,
|
||||
ui::{
|
||||
fonts::Fonts,
|
||||
slot::{ContentSize, SlotMaker},
|
||||
@ -28,6 +27,7 @@ use conrod_core::{
|
||||
widget::{self, Button, Image, Rectangle, State as ConrodState, Text},
|
||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, UiCell, Widget, WidgetCommon,
|
||||
};
|
||||
use i18n::Localization;
|
||||
use specs::Entity as EcsEntity;
|
||||
use vek::*;
|
||||
|
||||
|
@ -11,10 +11,9 @@ use common::{
|
||||
effect::Effect,
|
||||
trade::{Good, SitePrices},
|
||||
};
|
||||
use i18n::Localization;
|
||||
use std::{borrow::Cow, fmt::Write};
|
||||
|
||||
use crate::i18n::Localization;
|
||||
|
||||
pub fn price_desc(
|
||||
prices: &Option<SitePrices>,
|
||||
item_definition_id: &str,
|
||||
|
@ -33,10 +33,6 @@ pub mod settings;
|
||||
pub mod singleplayer;
|
||||
pub mod window;
|
||||
|
||||
// Reexports
|
||||
pub use crate::error::Error;
|
||||
pub use i18n;
|
||||
|
||||
#[cfg(feature = "singleplayer")]
|
||||
use crate::singleplayer::Singleplayer;
|
||||
#[cfg(feature = "egui-ui")]
|
||||
|
@ -2,9 +2,9 @@
|
||||
#![feature(bool_to_option)]
|
||||
#![recursion_limit = "2048"]
|
||||
|
||||
use i18n::{self, LocalizationHandle};
|
||||
use veloren_voxygen::{
|
||||
audio::AudioFrontend,
|
||||
i18n::{self, LocalizationHandle},
|
||||
profile::Profile,
|
||||
run,
|
||||
scene::terrain::SpriteRenderContext,
|
||||
|
@ -1,5 +1,4 @@
|
||||
use crate::{
|
||||
i18n::{Localization, LocalizationHandle},
|
||||
render::UiDrawer,
|
||||
ui::{
|
||||
self,
|
||||
@ -26,6 +25,7 @@ use common::{
|
||||
comp::{self, humanoid, inventory::slot::EquipSlot, Inventory, Item},
|
||||
LoadoutBuilder,
|
||||
};
|
||||
use i18n::{Localization, LocalizationHandle};
|
||||
//ImageFrame, Tooltip,
|
||||
use crate::settings::Settings;
|
||||
//use std::time::Duration;
|
||||
|
@ -6,7 +6,6 @@ use super::char_selection::CharSelectionState;
|
||||
#[cfg(feature = "singleplayer")]
|
||||
use crate::singleplayer::Singleplayer;
|
||||
use crate::{
|
||||
i18n::LocalizationHandle,
|
||||
render::{Drawer, GlobalsBindGroup},
|
||||
settings::Settings,
|
||||
window::Event,
|
||||
@ -20,6 +19,7 @@ use client::{
|
||||
use client_init::{ClientInit, Error as InitError, Msg as InitMsg};
|
||||
use common::comp;
|
||||
use common_base::span;
|
||||
use i18n::LocalizationHandle;
|
||||
use scene::Scene;
|
||||
use std::sync::Arc;
|
||||
use tokio::runtime;
|
||||
|
@ -1,13 +1,12 @@
|
||||
use super::{ConnectionState, Imgs, Message};
|
||||
use crate::{
|
||||
i18n::Localization,
|
||||
ui::{
|
||||
fonts::IcedFonts as Fonts,
|
||||
ice::{component::neat_button, style, widget::Image, Element, IcedUi as Ui, Id},
|
||||
Graphic,
|
||||
},
|
||||
|
||||
use crate::ui::{
|
||||
fonts::IcedFonts as Fonts,
|
||||
ice::{component::neat_button, style, widget::Image, Element, IcedUi as Ui, Id},
|
||||
Graphic,
|
||||
};
|
||||
use common::assets::{self, AssetExt};
|
||||
use i18n::Localization;
|
||||
use iced::{button, Align, Column, Container, Length, Row, Space, Text};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::Message;
|
||||
use i18n::{Localization};
|
||||
use crate::{
|
||||
i18n::Localization,
|
||||
ui::{
|
||||
fonts::IcedFonts as Fonts,
|
||||
ice::{component::neat_button, style, Element},
|
||||
|
@ -1,19 +1,17 @@
|
||||
use super::{Imgs, LoginInfo, Message, FILL_FRAC_ONE, FILL_FRAC_TWO};
|
||||
use crate::{
|
||||
i18n::Localization,
|
||||
ui::{
|
||||
fonts::IcedFonts as Fonts,
|
||||
ice::{
|
||||
component::neat_button,
|
||||
style,
|
||||
widget::{
|
||||
compound_graphic::{CompoundGraphic, Graphic},
|
||||
BackgroundContainer, Image, Padding,
|
||||
},
|
||||
Element,
|
||||
use crate::ui::{
|
||||
fonts::IcedFonts as Fonts,
|
||||
ice::{
|
||||
component::neat_button,
|
||||
style,
|
||||
widget::{
|
||||
compound_graphic::{CompoundGraphic, Graphic},
|
||||
BackgroundContainer, Image, Padding,
|
||||
},
|
||||
Element,
|
||||
},
|
||||
};
|
||||
use i18n::{LanguageMetadata, Localization};
|
||||
use iced::{
|
||||
button, scrollable, text_input, Align, Button, Column, Container, Length, Row, Scrollable,
|
||||
Space, Text, TextInput,
|
||||
@ -61,7 +59,7 @@ impl Screen {
|
||||
i18n: &Localization,
|
||||
is_selecting_language: bool,
|
||||
selected_language_index: Option<usize>,
|
||||
language_metadatas: &[crate::i18n::LanguageMetadata],
|
||||
language_metadatas: &[LanguageMetadata],
|
||||
button_style: style::button::Style,
|
||||
version: &str,
|
||||
) -> Element<Message> {
|
||||
@ -223,7 +221,7 @@ impl LanguageSelectBanner {
|
||||
fonts: &Fonts,
|
||||
imgs: &Imgs,
|
||||
i18n: &Localization,
|
||||
language_metadatas: &[crate::i18n::LanguageMetadata],
|
||||
language_metadatas: &[LanguageMetadata],
|
||||
selected_language_index: Option<usize>,
|
||||
button_style: style::button::Style,
|
||||
) -> Element<Message> {
|
||||
|
@ -5,7 +5,6 @@ mod login;
|
||||
mod servers;
|
||||
|
||||
use crate::{
|
||||
i18n::{LanguageMetadata, LocalizationHandle},
|
||||
render::UiDrawer,
|
||||
ui::{
|
||||
self,
|
||||
@ -16,6 +15,7 @@ use crate::{
|
||||
},
|
||||
window, GlobalState,
|
||||
};
|
||||
use i18n::{LanguageMetadata, LocalizationHandle};
|
||||
use iced::{text_input, Column, Container, HorizontalAlignment, Length, Row, Space};
|
||||
//ImageFrame, Tooltip,
|
||||
use crate::settings::Settings;
|
||||
@ -193,7 +193,7 @@ impl Controls {
|
||||
.iter()
|
||||
.position(|f| f == &login_info.server);
|
||||
|
||||
let language_metadatas = crate::i18n::list_localizations();
|
||||
let language_metadatas = i18n::list_localizations();
|
||||
let selected_language_index = language_metadatas
|
||||
.iter()
|
||||
.position(|f| f.language_identifier == settings.language.selected_language);
|
||||
@ -256,7 +256,7 @@ impl Controls {
|
||||
self.imgs.bg
|
||||
};
|
||||
|
||||
let language_metadatas = crate::i18n::list_localizations();
|
||||
let language_metadatas = i18n::list_localizations();
|
||||
|
||||
// TODO: make any large text blocks scrollable so that if the area is to
|
||||
// small they can still be read
|
||||
@ -315,7 +315,7 @@ impl Controls {
|
||||
ui: &mut Ui,
|
||||
) {
|
||||
let servers = &settings.networking.servers;
|
||||
let mut language_metadatas = crate::i18n::list_localizations();
|
||||
let mut language_metadatas = i18n::list_localizations();
|
||||
|
||||
match message {
|
||||
Message::Quit => events.push(Event::Quit),
|
||||
@ -509,7 +509,7 @@ impl MainMenuUi {
|
||||
self.ui.clear_fonts(font);
|
||||
self.controls.fonts =
|
||||
Fonts::load(i18n.fonts(), &mut self.ui).expect("Impossible to load fonts!");
|
||||
let language_metadatas = crate::i18n::list_localizations();
|
||||
let language_metadatas = i18n::list_localizations();
|
||||
self.controls.selected_language_index = language_metadatas
|
||||
.iter()
|
||||
.position(|f| f.language_identifier == settings.language.selected_language);
|
||||
|
@ -1,11 +1,9 @@
|
||||
use super::{Imgs, Message, FILL_FRAC_ONE};
|
||||
use crate::{
|
||||
i18n::Localization,
|
||||
ui::{
|
||||
fonts::IcedFonts as Fonts,
|
||||
ice::{component::neat_button, style, Element},
|
||||
},
|
||||
use crate::ui::{
|
||||
fonts::IcedFonts as Fonts,
|
||||
ice::{component::neat_button, style, Element},
|
||||
};
|
||||
use i18n::Localization;
|
||||
use iced::{
|
||||
button, scrollable, Align, Button, Column, Container, Length, Row, Scrollable, Space, Text,
|
||||
};
|
||||
|
@ -35,6 +35,7 @@ use common_net::{
|
||||
|
||||
use crate::{
|
||||
audio::sfx::SfxEvent,
|
||||
error::Error,
|
||||
game_input::GameInput,
|
||||
hud::{DebugInfo, Event as HudEvent, Hud, HudInfo, LootMessage, PromptDialogSettings},
|
||||
key_state::KeyState,
|
||||
@ -43,7 +44,7 @@ use crate::{
|
||||
scene::{camera, terrain::Interaction, CameraMode, DebugShapeId, Scene, SceneData},
|
||||
settings::Settings,
|
||||
window::{AnalogGameInput, Event},
|
||||
Direction, Error, GlobalState, PlayState, PlayStateResult,
|
||||
Direction, GlobalState, PlayState, PlayStateResult,
|
||||
};
|
||||
use hashbrown::HashMap;
|
||||
use settings_change::Language::ChangeLanguage;
|
||||
|
@ -6,7 +6,6 @@ use crate::{
|
||||
BarNumbers, BuffPosition, ChatTab, CrosshairType, Intro, PressBehavior, ScaleChange,
|
||||
ShortcutNumbers, XpBar,
|
||||
},
|
||||
i18n::{LanguageMetadata, LocalizationHandle},
|
||||
render::RenderMode,
|
||||
settings::{
|
||||
AudioSettings, ChatSettings, ControlSettings, Fps, GamepadSettings, GameplaySettings,
|
||||
@ -15,6 +14,7 @@ use crate::{
|
||||
window::FullScreenSettings,
|
||||
GlobalState,
|
||||
};
|
||||
use i18n::{LanguageMetadata, LocalizationHandle};
|
||||
use vek::*;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
@ -1,4 +1,3 @@
|
||||
use crate::i18n;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
|
@ -1,7 +1,7 @@
|
||||
use super::graphic::{Graphic, GraphicCache, Id as GraphicId};
|
||||
use crate::{
|
||||
error::Error,
|
||||
render::{Mesh, Renderer, Texture, UiTextureBindGroup, UiVertex},
|
||||
Error,
|
||||
};
|
||||
use conrod_core::{text::GlyphCache, widget::Id};
|
||||
use hashbrown::HashMap;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::{i18n, ui::ice::RawFont};
|
||||
use crate::ui::ice::RawFont;
|
||||
use common::assets::{self, AssetExt};
|
||||
|
||||
pub struct Font {
|
||||
|
@ -1,7 +1,7 @@
|
||||
use super::graphic::{Graphic, GraphicCache, Id as GraphicId};
|
||||
use crate::{
|
||||
error::Error,
|
||||
render::{Renderer, Texture, UiTextureBindGroup},
|
||||
Error,
|
||||
};
|
||||
use common::assets::{self, AssetExt};
|
||||
use glyph_brush::GlyphBrushBuilder;
|
||||
|
@ -15,9 +15,9 @@ use super::{
|
||||
scale::{Scale, ScaleMode},
|
||||
};
|
||||
use crate::{
|
||||
error::Error,
|
||||
render::{Renderer, UiDrawer},
|
||||
window::Window,
|
||||
Error,
|
||||
};
|
||||
use common::slowjob::SlowJobPool;
|
||||
use common_base::span;
|
||||
|
@ -14,11 +14,11 @@ use super::{
|
||||
Font, FontId, RawFont, Rotation,
|
||||
};
|
||||
use crate::{
|
||||
error::Error,
|
||||
render::{
|
||||
create_ui_quad, create_ui_quad_vert_gradient, DynamicModel, Mesh, Renderer, UiBoundLocals,
|
||||
UiDrawer, UiLocals, UiMode, UiVertex,
|
||||
},
|
||||
Error,
|
||||
};
|
||||
use common::{slowjob::SlowJobPool, util::srgba_to_linear};
|
||||
use common_base::span;
|
||||
|
@ -28,12 +28,12 @@ pub use widgets::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
error::Error,
|
||||
render::{
|
||||
create_ui_quad, create_ui_tri, DynamicModel, Mesh, RenderError, Renderer, UiBoundLocals,
|
||||
UiDrawer, UiLocals, UiMode, UiVertex,
|
||||
},
|
||||
window::Window,
|
||||
Error,
|
||||
};
|
||||
#[rustfmt::skip]
|
||||
use ::image::GenericImageView;
|
||||
|
@ -1,12 +1,9 @@
|
||||
use super::image_frame::ImageFrame;
|
||||
use crate::{
|
||||
hud::{
|
||||
get_quality_col,
|
||||
img_ids::Imgs,
|
||||
item_imgs::{animate_by_pulse, ItemImgs, ItemKey},
|
||||
util,
|
||||
},
|
||||
i18n::Localization,
|
||||
use crate::hud::{
|
||||
get_quality_col,
|
||||
img_ids::Imgs,
|
||||
item_imgs::{animate_by_pulse, ItemImgs, ItemKey},
|
||||
util,
|
||||
};
|
||||
use client::Client;
|
||||
use common::{
|
||||
@ -22,6 +19,7 @@ use conrod_core::{
|
||||
widget, widget_ids, Color, Colorable, FontSize, Positionable, Scalar, Sizeable, Ui, UiCell,
|
||||
Widget, WidgetCommon, WidgetStyle,
|
||||
};
|
||||
use i18n::Localization;
|
||||
use lazy_static::lazy_static;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
use crate::{
|
||||
controller::*,
|
||||
error::Error,
|
||||
game_input::GameInput,
|
||||
render::Renderer,
|
||||
settings::{ControlSettings, Settings},
|
||||
ui, Error,
|
||||
ui,
|
||||
};
|
||||
use common_base::span;
|
||||
use crossbeam_channel as channel;
|
||||
|
Loading…
Reference in New Issue
Block a user