// Map, wardley map editor for linux // Copyright (C) 2026 Rubén Beltrán del Río // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . use crate::tr; use wmap_renderer::StageType; /// All available stage types for rendering Wardley Maps. /// Order determines dropdown menu order. pub const ALL_STAGE_TYPES: &[StageType] = &[ StageType::Activities, StageType::Practice, StageType::Data, StageType::Knowledge, StageType::Ubiquity, StageType::Certainty, StageType::PublicationTypes, StageType::Market, StageType::KnowledgeManagement, StageType::MarketPerception, StageType::UserPerception, StageType::PerceptionInIndustry, StageType::FocusOfValue, StageType::Understanding, StageType::Comparison, StageType::Failure, StageType::MarketAction, StageType::Efficiency, StageType::DecisionDrivers, StageType::Behavior, ]; pub trait LocalizedStageType { fn localized_name(&self) -> String; fn localized_i(&self) -> String; fn localized_ii(&self) -> String; fn localized_iii(&self) -> String; fn localized_iv(&self) -> String; fn to_localized(&self) -> StageType; } impl LocalizedStageType for StageType { fn localized_name(&self) -> String { match self { StageType::Activities => tr!("Activities"), StageType::Practice => tr!("Practice"), StageType::Data => tr!("Data"), StageType::Knowledge => tr!("Knowledge"), StageType::Ubiquity => tr!("Ubiquity"), StageType::Certainty => tr!("Certainty"), StageType::PublicationTypes => tr!("Publication Types"), StageType::Market => tr!("Market"), StageType::KnowledgeManagement => tr!("Knowledge Management"), StageType::MarketPerception => tr!("Market Perception"), StageType::UserPerception => tr!("User Perception"), StageType::PerceptionInIndustry => tr!("Perception in Industry"), StageType::FocusOfValue => tr!("Focus of Value"), StageType::Understanding => tr!("Understanding"), StageType::Comparison => tr!("Comparison"), StageType::Failure => tr!("Failure"), StageType::MarketAction => tr!("Market Action"), StageType::Efficiency => tr!("Efficiency"), StageType::DecisionDrivers => tr!("Decision Drivers"), StageType::Behavior => tr!("Behavior"), StageType::Cynefin => tr!("Cynefin"), StageType::EvolutionStage => tr!("Evolution Stage"), StageType::Custom { name, i: _, ii: _, iii: _, iv: _, } => name.clone(), } } fn localized_i(&self) -> String { match self { StageType::Activities => tr!("Genesis"), StageType::Practice => tr!("Novel"), StageType::Data => tr!("Unmodelled"), StageType::Knowledge => tr!("Concept"), StageType::Ubiquity => tr!("Rare"), StageType::Certainty => tr!("Poorly Understood / exploring the unknown"), StageType::PublicationTypes => tr!("Describe the wonder of the thing / the discovery of some marvel / a new land / an unknown frontier"), StageType::Market => tr!("Undefined Market"), StageType::KnowledgeManagement => tr!("Uncertain"), StageType::MarketPerception => tr!(r#"Chaotic (non-linear) / domain of the "crazy""#), StageType::UserPerception => tr!("Different / confusing / exciting / surprising / dangerous"), StageType::PerceptionInIndustry => tr!("Future source of competitive advantage / unpredictable / unknown"), StageType::FocusOfValue => tr!("High future worth but immediate investment"), StageType::Understanding => tr!("Poorly Understood / unpredictable"), StageType::Comparison => tr!("Constantly changing / a differential / unstable"), StageType::Failure => tr!("High / tolerated / assumed to be wrong"), StageType::MarketAction => tr!("Gambling / driven by gut"), StageType::Efficiency => tr!("Reducing the cost of change (experimentation)"), StageType::DecisionDrivers => tr!("Heritage / culture"), StageType::Behavior => tr!("Uncertain when to use"), StageType::Cynefin => tr!("Chaotic"), StageType::EvolutionStage => tr!("Stage I"), StageType::Custom { name: _, i, ii: _, iii: _, iv: _, } => i.clone(), } } fn localized_ii(&self) -> String { match self { StageType::Activities => tr!("Custom"), StageType::Practice => tr!("Emerging"), StageType::Data => tr!("Divergent"), StageType::Knowledge => tr!("Hypothesis"), StageType::Ubiquity => tr!("Slowly Increasing"), StageType::Certainty => tr!("Rapid Increase In Learning / discovery becomes refining"), StageType::PublicationTypes => tr!("Focused on build / construct / awareness and learning / many models of explanation / no accepted forms / a wild west"), StageType::Market => tr!("Forming Market / an array of competing forms and models of understanding"), StageType::KnowledgeManagement => tr!("Learning on use / focused on testing prediction"), StageType::MarketPerception => tr!(r#"Domain of "experts""#), StageType::UserPerception => tr!("Leading edge / emerging / uncertainty over results"), StageType::PerceptionInIndustry => tr!("Seen as a scompetitive advantage / a differential / ROI / case examples"), StageType::FocusOfValue => tr!("Seeking ways to profit and a ROI / seeking confirmation of value"), StageType::Understanding => tr!("Increasing understanding / development of measures"), StageType::Comparison => tr!("Learning from others / testing the water / some evidential support"), StageType::Failure => tr!("Moderate / unsurprising if wrong but disappointed"), StageType::MarketAction => tr!(r#"Exploring a "found" value"#), StageType::Efficiency => tr!("Reducing cost of waste (Learning)"), StageType::DecisionDrivers => tr!("Analyses & synthesis"), StageType::Behavior => tr!("Learning when to use"), StageType::Cynefin => tr!("Complex"), StageType::EvolutionStage => tr!("Stage II"), StageType::Custom { name: _, i: _, ii, iii: _, iv: _, } => ii.clone(), } } fn localized_iii(&self) -> String { match self { StageType::Activities => tr!("Product (+rental)"), StageType::Practice => tr!("Good"), StageType::Data => tr!("Convergent"), StageType::Knowledge => tr!("Theory"), StageType::Ubiquity => tr!("Rapidly Increasing"), StageType::Certainty => tr!("Rapid increase in use / increasing fit for purpose"), StageType::PublicationTypes => tr!("Maintenance / operations / installation / comparison between competing forms / feature analysis"), StageType::Market => tr!("Growing Market / consolidation to a few competing but more accepted forms"), StageType::KnowledgeManagement => tr!("Learning on operation / using prediction / verification"), StageType::MarketPerception => tr!(r#"Increasing expectation of use / domain of "professionals""#), StageType::UserPerception => tr!("Increasingly common / disappointed if not used or available / feeling left behind"), StageType::PerceptionInIndustry => tr!("Advantage through implementation / features / this model is better than that"), StageType::FocusOfValue => tr!("High profitability per unit / a valuable model / a feeling of understanding / focus on exploitation"), StageType::Understanding => tr!("Increasing education / constant refinement of needs / measures"), StageType::Comparison => tr!("Competing models / feature difference / evidential support"), StageType::Failure => tr!("Not tolerated / focus on constant improvement / assumed to be in the right direction / resistance to changing the model"), StageType::MarketAction => tr!("Market analysis / listening to customers"), StageType::Efficiency => tr!("Reducing cost of waste (Learning)"), StageType::DecisionDrivers => tr!("Analyses & synthesis"), StageType::Behavior => tr!("Learning through use"), StageType::Cynefin => tr!("Complicated"), StageType::EvolutionStage => tr!("Stage III"), StageType::Custom { name: _, i: _, ii: _, iii, iv: _, } => iii.clone(), } } fn localized_iv(&self) -> String { match self { StageType::Activities => tr!("Commodity (+utility)"), StageType::Practice => tr!("Best"), StageType::Data => tr!("Modelled"), StageType::Knowledge => tr!("Accepted"), StageType::Ubiquity => tr!("Widespread in the applicable market / ecosystem"), StageType::Certainty => tr!("Commonly understood (in terms of use)"), StageType::PublicationTypes => tr!("Focused on use / increasingly an accepted, almost invisible component"), StageType::Market => tr!("Mature Market / stabilised to an accepted form"), StageType::KnowledgeManagement => tr!("Known / accepted"), StageType::MarketPerception => tr!("Ordered (appearance of being linear) / trivial / formula to be applied"), StageType::UserPerception => tr!("Standard / expected / feeling of shock if not used"), StageType::PerceptionInIndustry => tr!("Cost of doing business / accepted / specific defined models"), StageType::FocusOfValue => tr!("High volume / reducing margin / important but invisible / an essential component of something more complex"), StageType::Understanding => tr!("Believed to be well defined / stable / measurable"), StageType::Comparison => tr!("Essential / any advantage is operational / accepted norm"), StageType::Failure => tr!("Surprised by failure / focus on operational efficiency"), StageType::MarketAction => tr!("Metric driven / build what is needed"), StageType::Efficiency => tr!("Reducing cost of deviation (Volume)"), StageType::DecisionDrivers => tr!("Previous Experience"), StageType::Behavior => tr!("Known / common usage"), StageType::Cynefin => tr!("Clear"), StageType::EvolutionStage => tr!("Stage IV"), StageType::Custom { name: _, i: _, ii: _, iii: _, iv, } => iv.clone(), } } fn to_localized(&self) -> StageType { StageType::Custom { name: self.localized_name(), i: self.localized_i(), ii: self.localized_ii(), iii: self.localized_iii(), iv: self.localized_iv(), } } }