mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-20 20:53:06 +00:00
Merge branch 'stemfile' into 'master'
Don't use path helpers in the settings window See merge request OpenMW/openmw!5043
This commit is contained in:
commit
af7bf4e2b4
1 changed files with 3 additions and 4 deletions
|
|
@ -21,7 +21,6 @@
|
|||
#include <components/lua_ui/scriptsettings.hpp>
|
||||
#include <components/misc/constants.hpp>
|
||||
#include <components/misc/display.hpp>
|
||||
#include <components/misc/pathhelpers.hpp>
|
||||
#include <components/misc/strings/algorithm.hpp>
|
||||
#include <components/resource/resourcesystem.hpp>
|
||||
#include <components/resource/scenemanager.hpp>
|
||||
|
|
@ -414,14 +413,14 @@ namespace MWGui
|
|||
constexpr VFS::Path::NormalizedView l10n("l10n/");
|
||||
for (const auto& path : vfs->getRecursiveDirectoryIterator(l10n))
|
||||
{
|
||||
if (Misc::getFileExtension(path) == "yaml")
|
||||
if (path.extension() == "yaml")
|
||||
{
|
||||
std::string localeName(Misc::stemFile(path));
|
||||
std::string_view localeName(path.stem());
|
||||
if (localeName == "gmst")
|
||||
continue; // fake locale to get gmst strings from content files
|
||||
if (std::find(availableLanguages.begin(), availableLanguages.end(), localeName)
|
||||
== availableLanguages.end())
|
||||
availableLanguages.push_back(std::move(localeName));
|
||||
availableLanguages.emplace_back(localeName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue