mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
Added 'insert symbol' menu for SymbolFonts;
Added scriptable 'enabled' to symbols in symbol font, used instead of scripted filenames. This means changing the tap symbol style now works; Added localisation for games, stylesheets and symbolfonts; Warnings from Reader are now shown onIdle; git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@198 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+16
-6
@@ -15,14 +15,20 @@
|
||||
#include <util/io/package.hpp>
|
||||
|
||||
DECLARE_POINTER_TYPE(Locale);
|
||||
DECLARE_POINTER_TYPE(GameLocale);
|
||||
DECLARE_POINTER_TYPE(SubLocale);
|
||||
|
||||
// ----------------------------------------------------------------------------- : Locale class
|
||||
|
||||
/// Translations of the texts of a game
|
||||
class GameLocale {
|
||||
/// Translations of the texts of a game/stylesheet/symbolfont
|
||||
class SubLocale {
|
||||
public:
|
||||
map<String,String> translations;
|
||||
|
||||
/// Translate a key
|
||||
String tr(const String& key);
|
||||
/// Translate a key with a default value
|
||||
String tr(const String& key, const String& def);
|
||||
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
@@ -30,9 +36,13 @@ class GameLocale {
|
||||
class Locale : public Packaged {
|
||||
public:
|
||||
/// Translations of UI strings in each category
|
||||
map<String,String> translations[LOCALE_CAT_MAX];
|
||||
/// Translations of game specific texts, by game name
|
||||
map<String,GameLocaleP> game_translations;
|
||||
SubLocale translations[LOCALE_CAT_MAX];
|
||||
/// Translations of Game specific texts, by game name
|
||||
map<String,SubLocaleP> game_translations;
|
||||
/// Translations of StyleSheet specific texts, by stylesheet name
|
||||
map<String,SubLocaleP> stylesheet_translations;
|
||||
/// Translations of SymbolFont specific texts, by symbol font name
|
||||
map<String,SubLocaleP> symbol_font_translations;
|
||||
|
||||
/// Open a locale with the given name
|
||||
static LocaleP byName(const String& name);
|
||||
|
||||
Reference in New Issue
Block a user