1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-05 19:31:04 +00:00

Add support for translating content titles and descriptions (#12208)

This commit is contained in:
rubenwardy 2024-02-24 19:13:07 +00:00 committed by GitHub
parent 57de599a29
commit b4be483d3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 252 additions and 47 deletions

View file

@ -22,6 +22,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "convert_json.h"
#include "irrlichttypes.h"
enum class ContentType
{
UNKNOWN,
MOD,
MODPACK,
GAME,
TXP
};
struct ContentSpec
{
std::string type;
@ -37,6 +47,9 @@ struct ContentSpec
/// Short description
std::string desc;
std::string path;
std::string textdomain;
};
ContentType getContentType(const std::string &path);
void parseContentInfo(ContentSpec &spec);