mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 09:04:02 +00:00
Check strings only from en.ini file
This commit is contained in:
parent
de9618b829
commit
a118eea3cd
@ -1,5 +1,5 @@
|
||||
// Aseprite Code Generator
|
||||
// Copyright (c) 2021 Igara Studio S.A.
|
||||
// Copyright (c) 2021-2023 Igara Studio S.A.
|
||||
// Copyright (c) 2016-2018 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
@ -23,6 +23,10 @@
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
// Check only the existence of strings from the main "en.ini" file
|
||||
// All other translations will be considered work-in-progress.
|
||||
#define ENGLISH_ONLY 1
|
||||
|
||||
typedef std::vector<TiXmlElement*> XmlElements;
|
||||
|
||||
static std::string find_first_id(TiXmlElement* elem)
|
||||
@ -90,7 +94,13 @@ class CheckStrings {
|
||||
public:
|
||||
|
||||
void loadStrings(const std::string& dir) {
|
||||
for (const auto& fn : base::list_files(dir)) {
|
||||
#if ENGLISH_ONLY
|
||||
std::string fn = "en.ini";
|
||||
#else
|
||||
for (const auto& fn : base::list_files(dir))
|
||||
#endif
|
||||
{
|
||||
|
||||
std::unique_ptr<cfg::CfgFile> f(new cfg::CfgFile);
|
||||
f->load(base::join_path(dir, fn));
|
||||
m_stringFiles.push_back(std::move(f));
|
||||
|
Loading…
Reference in New Issue
Block a user