diff --git a/resources/l10n/template.pot b/resources/l10n/template.pot index eb5e620d..7835d457 100644 --- a/resources/l10n/template.pot +++ b/resources/l10n/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: LOOT 0.10.3\n" "Report-Msgid-Bugs-To: https://github.com/loot/loot/issues\n" -"POT-Creation-Date: 2017-01-30 08:05+0000\n" +"POT-Creation-Date: 2017-01-31 20:43+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -678,59 +678,27 @@ msgstr "" msgid "Parsing, merging and evaluating metadata..." msgstr "" -#: src/gui/query/get_game_data_query.h:79 -msgid "" -"An error occurred while parsing the masterlist: %1%. This probably happened " -"because an update to LOOT changed its metadata syntax support. Try updating " -"your masterlist to resolve the error." -msgstr "" - -#: src/gui/query/get_game_data_query.h:94 -msgid "" -"An error occurred while parsing the userlist: %1%. This probably happened " -"because an update to LOOT changed its metadata syntax support. Your user " -"metadata will have to be updated manually.\n" -"\n" -"To do so, use the 'Open Debug Log Location' in LOOT's main menu to open its " -"data folder, then open your 'userlist.yaml' file in the relevant game " -"folder. You can then edit the metadata it contains with reference to the " -"documentation, which is accessible through LOOT's main menu.\n" -"\n" -"You can also seek support on LOOT's forum thread, which is linked to on " -"[LOOT's website](https://loot.github.io/)." -msgstr "" - -#: src/gui/query/metadata_query.h:108 src/gui/query/metadata_query.h:109 +#: src/gui/query/metadata_query.h:104 src/gui/query/metadata_query.h:105 msgid "N/A: No masterlist present" msgstr "" -#: src/gui/query/metadata_query.h:112 src/gui/query/metadata_query.h:113 +#: src/gui/query/metadata_query.h:108 src/gui/query/metadata_query.h:109 msgid "Unknown: Git repository missing" msgstr "" -#: src/gui/query/metadata_query.h:137 -msgid "" -"A global message contains a condition that could not be evaluated. Details: " -"%1%" -msgstr "" - -#: src/gui/query/metadata_query.h:163 -msgid "\"%1%\" contains a condition that could not be evaluated. Details: %2%" -msgstr "" - -#: src/gui/query/metadata_query.h:195 src/gui/query/metadata_query.h:196 +#: src/gui/query/metadata_query.h:153 src/gui/query/metadata_query.h:154 msgid "(edited)" msgstr "" -#: src/gui/query/metadata_query.h:213 src/gui/query/metadata_query.h:224 +#: src/gui/query/metadata_query.h:171 src/gui/query/metadata_query.h:182 msgid "This plugin requires \"%1%\" to be installed, but it is missing." msgstr "" -#: src/gui/query/metadata_query.h:216 +#: src/gui/query/metadata_query.h:174 msgid "This plugin requires \"%1%\" to be active, but it is inactive." msgstr "" -#: src/gui/query/metadata_query.h:230 +#: src/gui/query/metadata_query.h:188 msgid "This plugin is incompatible with \"%1%\", but both are present." msgstr "" @@ -744,32 +712,48 @@ msgstr "" msgid "Loading plugin contents..." msgstr "" -#: src/gui/query/sort_plugins_query.h:70 +#: src/gui/query/sort_plugins_query.h:52 msgid "Sorting load order..." msgstr "" -#: src/gui/query/sort_plugins_query.h:78 +#: src/gui/state/game.cpp:253 msgid "" "Cyclic interaction detected between plugins \"%1%\" and \"%2%\". Back cycle: " "%3%" msgstr "" -#: src/gui/state/loot_state.cpp:131 +#: src/gui/state/game.cpp:282 +msgid "You have not sorted your load order this session." +msgstr "" + +#: src/gui/state/game.cpp:326 +msgid "" +"An error occurred while parsing the metadata list(s): %1%. Try updating your " +"masterlist to resolve the error. If the error is with your user metadata, " +"this probably happened because an update to LOOT changed its metadata syntax " +"support. Your user metadata will have to be updated manually.\n" +"\n" +"To do so, use the 'Open Debug Log Location' in LOOT's main menu to open its " +"data folder, then open your 'userlist.yaml' file in the relevant game " +"folder. You can then edit the metadata it contains with reference to the " +"documentation, which is accessible through LOOT's main menu.\n" +"\n" +"You can also seek support on LOOT's forum thread, which is linked to on " +"[LOOT's website](https://loot.github.io/)." +msgstr "" + +#: src/gui/state/loot_state.cpp:132 msgid "Error: Could not create LOOT settings file. %1%" msgstr "" -#: src/gui/state/loot_state.cpp:138 +#: src/gui/state/loot_state.cpp:139 msgid "Error: Settings parsing failed. %1%" msgstr "" -#: src/gui/state/loot_state.cpp:199 +#: src/gui/state/loot_state.cpp:205 msgid "Error: Game-specific settings could not be initialised. %1%" msgstr "" -#: src/backend/game/game_cache.cpp:120 -msgid "You have not sorted your load order this session." -msgstr "" - #: src/backend/helpers/git_helper.cpp:147 msgid "" "An error occurred while trying to clone the remote masterlist repository." diff --git a/src/api/game.cpp b/src/api/game.cpp index 40789059..a30e6032 100644 --- a/src/api/game.cpp +++ b/src/api/game.cpp @@ -73,7 +73,7 @@ std::vector Game::SortPlugins(const std::vector& plugi //Sort plugins into their load order. PluginSorter sorter; - return sorter.Sort(game_, LanguageCode::english); + return sorter.Sort(game_); } bool Game::IsPluginActive(const std::string& plugin) { diff --git a/src/backend/plugin/plugin_sorter.cpp b/src/backend/plugin/plugin_sorter.cpp index 5888134e..8a0e995a 100644 --- a/src/backend/plugin/plugin_sorter.cpp +++ b/src/backend/plugin/plugin_sorter.cpp @@ -102,13 +102,13 @@ private: vertex_t target; }; -std::vector PluginSorter::Sort(Game& game, const LanguageCode language) { +std::vector PluginSorter::Sort(Game& game) { // Clear existing data. graph_.clear(); indexMap_.clear(); oldLoadOrder_.clear(); - AddPluginVertices(game, language); + AddPluginVertices(game); // If there aren't any vertices, exit early, because sorting assumes // there is at least one plugin. @@ -164,7 +164,7 @@ std::vector PluginSorter::Sort(Game& game, const LanguageCode langu return plugins; } -void PluginSorter::AddPluginVertices(Game& game, const LanguageCode language) { +void PluginSorter::AddPluginVertices(Game& game) { BOOST_LOG_TRIVIAL(info) << "Merging masterlist, userlist into plugin list, evaluating conditions and checking for install validity."; // The resolution of tie-breaks in the plugin graph may be dependent diff --git a/src/backend/plugin/plugin_sorter.h b/src/backend/plugin/plugin_sorter.h index 5ec97746..a78679ec 100644 --- a/src/backend/plugin/plugin_sorter.h +++ b/src/backend/plugin/plugin_sorter.h @@ -58,7 +58,7 @@ typedef boost::associative_property_map> vertex_map_t class PluginSorter { public: - std::vector Sort(Game& game, const LanguageCode language); + std::vector Sort(Game& game); private: bool GetVertexByName(const std::string& name, vertex_t& vertex) const; void CheckForCycles() const; @@ -68,7 +68,7 @@ private: void PropagatePriorities(); - void AddPluginVertices(Game& game, const LanguageCode language); + void AddPluginVertices(Game& game); void AddSpecificEdges(); void AddPriorityEdges(); void AddOverlapEdges(); diff --git a/src/tests/backend/plugin/plugin_sorter_test.h b/src/tests/backend/plugin/plugin_sorter_test.h index db3530f5..dd2a1cda 100644 --- a/src/tests/backend/plugin/plugin_sorter_test.h +++ b/src/tests/backend/plugin/plugin_sorter_test.h @@ -71,7 +71,7 @@ INSTANTIATE_TEST_CASE_P(, TEST_P(PluginSorterTest, sortingWithNoLoadedPluginsShouldReturnAnEmptyList) { PluginSorter sorter; - std::vector sorted = sorter.Sort(game_, LanguageCode::english); + std::vector sorted = sorter.Sort(game_); EXPECT_TRUE(sorted.empty()); } @@ -82,11 +82,11 @@ TEST_P(PluginSorterTest, sortingShouldNotMakeUnnecessaryChangesToAnExistingLoadO PluginSorter ps; std::vector expectedSortedOrder = getLoadOrder(); - std::vector sorted = ps.Sort(game_, LanguageCode::english); + std::vector sorted = ps.Sort(game_); EXPECT_TRUE(std::equal(begin(sorted), end(sorted), begin(expectedSortedOrder))); // Check stability. - sorted = ps.Sort(game_, LanguageCode::english); + sorted = ps.Sort(game_); EXPECT_TRUE(std::equal(begin(sorted), end(sorted), begin(expectedSortedOrder))); } @@ -111,7 +111,7 @@ TEST_P(PluginSorterTest, sortingShouldEvaluateRelativeGlobalPriorities) { blankDifferentPluginDependentEsp, }); - std::vector sorted = ps.Sort(game_, LanguageCode::english); + std::vector sorted = ps.Sort(game_); EXPECT_EQ(expectedSortedOrder, sorted); } @@ -161,7 +161,7 @@ TEST_P(PluginSorterTest, sortingWithGlobalPrioritiesShouldInheritRecursivelyRega blankDifferentPluginDependentEsp, }); - std::vector sorted = ps.Sort(game_, LanguageCode::english); + std::vector sorted = ps.Sort(game_); EXPECT_EQ(expectedSortedOrder, sorted); } @@ -189,7 +189,7 @@ TEST_P(PluginSorterTest, sortingShouldUseLoadAfterMetadataWhenDecidingRelativePl blankPluginDependentEsp, }); - std::vector sorted = ps.Sort(game_, LanguageCode::english); + std::vector sorted = ps.Sort(game_); EXPECT_EQ(expectedSortedOrder, sorted); } @@ -217,7 +217,7 @@ TEST_P(PluginSorterTest, sortingShouldUseRequirementMetadataWhenDecidingRelative blankPluginDependentEsp, }); - std::vector sorted = ps.Sort(game_, LanguageCode::english); + std::vector sorted = ps.Sort(game_); EXPECT_EQ(expectedSortedOrder, sorted); } @@ -228,7 +228,7 @@ TEST_P(PluginSorterTest, sortingShouldThrowIfACyclicInteractionIsEncountered) { game_.GetUserlist().AddPlugin(plugin); PluginSorter ps; - EXPECT_THROW(ps.Sort(game_, LanguageCode::english), CyclicInteractionError); + EXPECT_THROW(ps.Sort(game_), CyclicInteractionError); } } }