mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
rebase (#1)
* Include unordered_map (fixes #104) * Make templates localizable (Closes #100) * Check/uncheck all selected cards in export window (Closes #93) Co-authored-by: Twan van Laarhoven <twanvl@gmail.com>
This commit is contained in:
+5
-5
@@ -47,8 +47,8 @@ IMPLEMENT_REFLECTION(Field) {
|
||||
REFLECT(type);
|
||||
}
|
||||
REFLECT(name);
|
||||
REFLECT(caption);
|
||||
REFLECT(description);
|
||||
REFLECT_LOCALIZED(caption);
|
||||
REFLECT_LOCALIZED(description);
|
||||
REFLECT_N("icon", icon_filename);
|
||||
REFLECT(editable);
|
||||
REFLECT(save_value);
|
||||
@@ -59,15 +59,15 @@ IMPLEMENT_REFLECTION(Field) {
|
||||
REFLECT(card_list_width);
|
||||
REFLECT(card_list_visible);
|
||||
REFLECT(card_list_allow);
|
||||
REFLECT(card_list_name);
|
||||
REFLECT_LOCALIZED(card_list_name);
|
||||
REFLECT(sort_script);
|
||||
REFLECT_N("card_list_alignment", card_list_align);
|
||||
}
|
||||
|
||||
void Field::after_reading(Version ver) {
|
||||
name = canonical_name_form(name);
|
||||
if(caption.empty()) caption = name_to_caption(name);
|
||||
if(card_list_name.empty()) card_list_name = capitalize(caption);
|
||||
if(caption.default_.empty()) caption.default_ = name_to_caption(name);
|
||||
if(card_list_name.default_.empty()) card_list_name.default_ = capitalize(caption.default_);
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
+4
-3
@@ -13,6 +13,7 @@
|
||||
#include <util/alignment.hpp>
|
||||
#include <util/age.hpp>
|
||||
#include <util/rotation.hpp>
|
||||
#include <data/localized_string.hpp>
|
||||
#include <script/scriptable.hpp>
|
||||
#include <script/dependency.hpp>
|
||||
#include <script/image.hpp>
|
||||
@@ -43,8 +44,8 @@ public:
|
||||
|
||||
size_t index; ///< Used by IndexMap
|
||||
String name; ///< Name of the field, for refering to it from scripts and files
|
||||
String caption; ///< Caption for NativeLookEditor
|
||||
String description; ///< Description, used in status bar
|
||||
LocalizedString caption; ///< Caption for NativeLookEditor
|
||||
LocalizedString description;///< Description, used in status bar
|
||||
String icon_filename; ///< Filename for an icon (for list of fields)
|
||||
bool editable; ///< Can values of this field be edited?
|
||||
bool save_value; ///< Should values of this field be written to files? Can be false for script generated fields.
|
||||
@@ -55,7 +56,7 @@ public:
|
||||
UInt card_list_width; ///< Width of the card list column (pixels).
|
||||
bool card_list_visible;///< Is this field shown in the card list?
|
||||
bool card_list_allow; ///< Is this field allowed to appear in the card list?
|
||||
String card_list_name; ///< Alternate name to use in card list.
|
||||
LocalizedString card_list_name; ///< Name to use in card list.
|
||||
Alignment card_list_align; ///< Alignment of the card list colummn.
|
||||
OptionalScript sort_script; ///< The script to use when sorting this, if not the value.
|
||||
Dependencies dependent_scripts; ///< Scripts that depend on values of this field
|
||||
|
||||
@@ -64,7 +64,7 @@ String InfoValue::toString() const {
|
||||
return value;
|
||||
}
|
||||
bool InfoValue::update(Context& ctx) {
|
||||
if (value.empty()) value = field().caption;
|
||||
if (value.empty()) value = field().caption.get();
|
||||
bool change = field().script.invokeOn(ctx, value);
|
||||
Value::update(ctx);
|
||||
return change;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <util/prec.hpp>
|
||||
#include <data/locale.hpp>
|
||||
#include <data/localized_string.hpp>
|
||||
#include <data/game.hpp>
|
||||
#include <data/stylesheet.hpp>
|
||||
#include <data/symbol_font.hpp>
|
||||
@@ -118,3 +119,23 @@ String tr(const Package& pkg, const String& subcat, const String& key, DefaultLo
|
||||
}
|
||||
return loc->tr(subcat, key, def);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : LocalizedString
|
||||
|
||||
String const& LocalizedString::get(String const& locale) const {
|
||||
auto it = translations.find(locale);
|
||||
if (it != translations.end()) {
|
||||
return it->second;
|
||||
} else {
|
||||
return default_;
|
||||
}
|
||||
}
|
||||
|
||||
String const& LocalizedString::get(Locale const& locale) const {
|
||||
return get(locale.name());
|
||||
}
|
||||
|
||||
String const& LocalizedString::get() const {
|
||||
if (translations.empty()) return default_;
|
||||
return get(the_locale->name());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
//+----------------------------------------------------------------------------+
|
||||
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
|
||||
//| Copyright: (C) Twan van Laarhoven and the other MSE developers |
|
||||
//| License: GNU General Public License 2 or later (see file COPYING) |
|
||||
//+----------------------------------------------------------------------------+
|
||||
|
||||
#pragma once
|
||||
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <util/prec.hpp>
|
||||
|
||||
class Locale;
|
||||
|
||||
// ----------------------------------------------------------------------------- : LocalizedString
|
||||
|
||||
/// Translations of a text in a template
|
||||
class LocalizedString {
|
||||
public:
|
||||
String default_; //< Value in all other locales
|
||||
unordered_map<String, String> translations;
|
||||
|
||||
/// Translate
|
||||
String const& get(Locale const& locale) const;
|
||||
String const& get(String const& locale) const;
|
||||
String const& get() const;
|
||||
|
||||
bool empty() const { return default_.empty(); }
|
||||
};
|
||||
|
||||
#define REFLECT_LOCALIZED_N(name, var) \
|
||||
do { \
|
||||
handler.handle(name, var.default_); \
|
||||
handler.handle(_("localized_") name, var.translations); \
|
||||
} while (0)
|
||||
|
||||
#define REFLECT_LOCALIZED(var) REFLECT_LOCALIZED_N(_(#var), var)
|
||||
@@ -64,7 +64,7 @@ StatsDimension::StatsDimension(const Field& field)
|
||||
IMPLEMENT_REFLECTION_NO_GET_MEMBER(StatsDimension) {
|
||||
if (!automatic) {
|
||||
REFLECT(name);
|
||||
REFLECT(description);
|
||||
REFLECT_LOCALIZED(description);
|
||||
REFLECT(position_hint);
|
||||
REFLECT_N("icon", icon_filename);
|
||||
REFLECT(script);
|
||||
@@ -98,7 +98,7 @@ StatsCategory::StatsCategory(const StatsDimensionP& dim)
|
||||
IMPLEMENT_REFLECTION_NO_GET_MEMBER(StatsCategory) {
|
||||
if (!automatic) {
|
||||
REFLECT(name);
|
||||
REFLECT(description);
|
||||
REFLECT_LOCALIZED(description);
|
||||
REFLECT(position_hint);
|
||||
REFLECT_N("icon", icon_filename);
|
||||
REFLECT(type);
|
||||
|
||||
+11
-10
@@ -11,6 +11,7 @@
|
||||
#include <util/prec.hpp>
|
||||
#include <util/reflect.hpp>
|
||||
#include <data/graph_type.hpp>
|
||||
#include <data/localized_string.hpp>
|
||||
#include <script/scriptable.hpp>
|
||||
|
||||
class Field;
|
||||
@@ -28,7 +29,7 @@ public:
|
||||
|
||||
const bool automatic; ///< Based on a card field?
|
||||
String name; ///< Name of this dimension
|
||||
String description; ///< Description, used in status bar
|
||||
LocalizedString description; ///< Description, used in status bar
|
||||
int position_hint; ///< Hint for the ordering
|
||||
String icon_filename; ///< Icon for lists
|
||||
Bitmap icon; ///< The loaded icon (optional of course)
|
||||
@@ -52,15 +53,15 @@ public:
|
||||
StatsCategory();
|
||||
StatsCategory(const StatsDimensionP&);
|
||||
|
||||
const bool automatic; ///< Automatically generated?
|
||||
String name; ///< Name/label
|
||||
String description; ///< Description, used in status bar
|
||||
int position_hint; ///< Hint for the ordering
|
||||
String icon_filename; ///< Icon for lists
|
||||
Bitmap icon; ///< The loaded icon (optional of course)
|
||||
vector<String> dimension_names;///< Names of the dimensions to use
|
||||
vector<StatsDimensionP> dimensions; ///< Actual dimensions
|
||||
GraphType type; ///< Type of graph to use
|
||||
const bool automatic; ///< Automatically generated?
|
||||
String name; ///< Name/label
|
||||
LocalizedString description; ///< Description, used in status bar
|
||||
int position_hint; ///< Hint for the ordering
|
||||
String icon_filename; ///< Icon for lists
|
||||
Bitmap icon; ///< The loaded icon (optional of course)
|
||||
vector<String> dimension_names; ///< Names of the dimensions to use
|
||||
vector<StatsDimensionP> dimensions; ///< Actual dimensions
|
||||
GraphType type; ///< Type of graph to use
|
||||
|
||||
/// Initialize dimensions from dimension_names
|
||||
void find_dimensions(const vector<StatsDimensionP>& available);
|
||||
|
||||
+21
-20
@@ -52,8 +52,8 @@ IMPLEMENT_REFLECTION(SymbolFont) {
|
||||
REFLECT_N("vertical_space", spacing.height);
|
||||
WITH_DYNAMIC_ARG(symbol_font_for_reading, this);
|
||||
REFLECT(symbols);
|
||||
REFLECT(scale_text);
|
||||
REFLECT(insert_symbol_menu);
|
||||
REFLECT(scale_text);
|
||||
REFLECT(insert_symbol_menu);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : SymbolInFont
|
||||
@@ -460,11 +460,11 @@ String InsertSymbolMenu::getCode(int id, const SymbolFont& font) const {
|
||||
} else if (id == 0 && type == Type::CODE) {
|
||||
return name;
|
||||
} else if (id == 0 && type == Type::CUSTOM) {
|
||||
String caption = tr(font, _("title"), name, capitalize_sentence);
|
||||
String message = tr(font, _("message"), name, capitalize_sentence);
|
||||
return wxGetTextFromUser(message, caption);
|
||||
String title = this->label.get();
|
||||
title.Replace(_("&"), _("")); // remove underlines
|
||||
return wxGetTextFromUser(prompt.get(), title);
|
||||
}
|
||||
return wxEmptyString;
|
||||
return String();
|
||||
}
|
||||
|
||||
wxMenu* InsertSymbolMenu::makeMenu(int id, SymbolFont& font) const {
|
||||
@@ -478,17 +478,18 @@ wxMenu* InsertSymbolMenu::makeMenu(int id, SymbolFont& font) const {
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
wxMenuItem* InsertSymbolMenu::makeMenuItem(wxMenu* parent, int first_id, SymbolFont& font) const {
|
||||
wxString menu_name = tr(font, _("menu_item"), name, capitalize);
|
||||
String label = this->label.get();
|
||||
// ensure that there is not actually an accelerator string,
|
||||
menu_name.Replace(_("\t "),_("\t"));
|
||||
label.Replace(_("\t "), _("\t"));
|
||||
#ifdef __WXMSW__
|
||||
menu_name.Replace(_("\t"),_("\t ")); // by prepending " "
|
||||
label.Replace(_("\t"), _("\t ")); // by prepending " "
|
||||
#else
|
||||
menu_name.Replace(_("\t"),_(" ")); // by simply dropping the \t
|
||||
label.Replace(_("\t"), _(" ")); // by simply dropping the \t
|
||||
#endif
|
||||
if (type == Type::SUBMENU) {
|
||||
wxMenuItem* item = new wxMenuItem(parent, wxID_ANY, menu_name,
|
||||
wxMenuItem* item = new wxMenuItem(parent, wxID_ANY, label,
|
||||
wxEmptyString, wxITEM_NORMAL,
|
||||
makeMenu(first_id, font));
|
||||
item->SetBitmap(wxNullBitmap);
|
||||
@@ -497,7 +498,7 @@ wxMenuItem* InsertSymbolMenu::makeMenuItem(wxMenu* parent, int first_id, SymbolF
|
||||
wxMenuItem* item = new wxMenuItem(parent, wxID_SEPARATOR);
|
||||
return item;
|
||||
} else {
|
||||
wxMenuItem* item = new wxMenuItem(parent, first_id, menu_name);
|
||||
wxMenuItem* item = new wxMenuItem(parent, first_id, label);
|
||||
// Generate bitmap for use on this item
|
||||
SymbolInFont* symbol = nullptr;
|
||||
if (type == Type::CUSTOM) {
|
||||
@@ -527,24 +528,24 @@ IMPLEMENT_REFLECTION_ENUM(InsertSymbolMenu::Type) {
|
||||
VALUE_N("submenu", InsertSymbolMenu::Type::SUBMENU);
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION_NO_GET_MEMBER(InsertSymbolMenu) {
|
||||
IMPLEMENT_REFLECTION(InsertSymbolMenu) {
|
||||
REFLECT_IF_READING_SINGLE_VALUE_AND(items.empty()) {
|
||||
REFLECT_NAMELESS(name);
|
||||
} else {
|
||||
// complex values are groups
|
||||
REFLECT(type);
|
||||
REFLECT(name);
|
||||
REFLECT_LOCALIZED(label);
|
||||
REFLECT_LOCALIZED(prompt);
|
||||
REFLECT(items);
|
||||
if (Handler::isReading && !items.empty()) type = Type::SUBMENU;
|
||||
}
|
||||
}
|
||||
template <> void GetDefaultMember::handle(const InsertSymbolMenu& m) {
|
||||
handle(m.name);
|
||||
}
|
||||
template <> void GetMember::handle(const InsertSymbolMenu& m) {
|
||||
handle(_("type"), m.type);
|
||||
handle(_("name"), m.name);
|
||||
handle(_("items"), m.items);
|
||||
|
||||
void after_reading(InsertSymbolMenu& m, Version ver) {
|
||||
assert(symbol_font_for_reading());
|
||||
if (m.label.empty()) m.label.default_ = tr(*symbol_font_for_reading(), _("menu_item"), m.name, capitalize);
|
||||
if (m.prompt.empty()) m.prompt.default_ = tr(*symbol_font_for_reading(), _("message"), m.name, capitalize_sentence);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : SymbolFontRef
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <util/prec.hpp>
|
||||
#include <util/alignment.hpp>
|
||||
#include <util/io/package.hpp>
|
||||
#include <data/localized_string.hpp>
|
||||
#include <data/font.hpp>
|
||||
#include <wx/regex.h>
|
||||
|
||||
@@ -124,6 +125,8 @@ public:
|
||||
};
|
||||
Type type;
|
||||
String name;
|
||||
LocalizedString label; // text of menu item
|
||||
LocalizedString prompt; // prompt for dialog box if type == CUSTOM
|
||||
vector<InsertSymbolMenuP> items;
|
||||
|
||||
/// Number of ids used (recursive)
|
||||
@@ -139,6 +142,8 @@ private:
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
void after_reading(InsertSymbolMenu&, Version ver);
|
||||
|
||||
// ----------------------------------------------------------------------------- : SymbolFontRef
|
||||
|
||||
/// A reference to an actual symbol font
|
||||
|
||||
@@ -355,7 +355,7 @@ void DataEditor::onMotion(wxMouseEvent& ev) {
|
||||
// set status text
|
||||
wxFrame* frame = dynamic_cast<wxFrame*>( wxGetTopLevelParent(this) );
|
||||
if (frame) {
|
||||
frame->SetStatusText(hovered_viewer ? hovered_viewer->getField()->description : String());
|
||||
frame->SetStatusText(hovered_viewer ? hovered_viewer->getField()->description.get() : String());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,9 +225,7 @@ void CardListBase::rebuild() {
|
||||
if (f.second->card_list_align & ALIGN_RIGHT) align = wxLIST_FORMAT_RIGHT;
|
||||
else if (f.second->card_list_align & ALIGN_CENTER) align = wxLIST_FORMAT_CENTRE;
|
||||
else align = wxLIST_FORMAT_LEFT;
|
||||
InsertColumn((long)column_fields.size(),
|
||||
tr(*set->game, f.second->card_list_name, identity),
|
||||
align, cs.width);
|
||||
InsertColumn((long)column_fields.size(), f.second->card_list_name.get(), align, cs.width);
|
||||
column_fields.push_back(f.second);
|
||||
}
|
||||
// determine sort settings
|
||||
|
||||
@@ -67,7 +67,7 @@ void CardListColumnSelectDialog::initList() {
|
||||
// Init items
|
||||
Color window_color = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
|
||||
FOR_EACH(c, columns) {
|
||||
list->Append(tr(*game, c.field->card_list_name, identity));
|
||||
list->Append(c.field->card_list_name.get());
|
||||
// check
|
||||
int i = list->GetCount() - 1;
|
||||
list->Check(i, c.settings.visible);
|
||||
@@ -80,7 +80,7 @@ void CardListColumnSelectDialog::initList() {
|
||||
|
||||
void CardListColumnSelectDialog::refreshItem(int i) {
|
||||
list->Check (i, columns[i].settings.visible);
|
||||
list->SetString(i, tr(*game, columns[i].field->card_list_name, identity) );
|
||||
list->SetString(i, columns[i].field->card_list_name.get());
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Events
|
||||
|
||||
@@ -39,9 +39,7 @@ void NativeLookEditor::drawViewer(RotatedDC& dc, ValueViewer& v) {
|
||||
// draw label
|
||||
dc.SetFont(*wxNORMAL_FONT);
|
||||
dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));
|
||||
// TODO : tr using stylesheet or using game?
|
||||
dc.DrawText(tr(getStylePackage(), v.getField()->caption, identity),
|
||||
RealPoint(margin_left - v.bounding_box.x, 1));
|
||||
dc.DrawText(v.getField()->caption.get(), RealPoint(margin_left - v.bounding_box.x, 1));
|
||||
}
|
||||
// draw viewer
|
||||
v.draw(dc);
|
||||
@@ -64,8 +62,7 @@ void NativeLookEditor::resizeViewers() {
|
||||
// width of the label string
|
||||
int w;
|
||||
Style& s = *v->getStyle();
|
||||
String text = tr(getStylePackage(), s.fieldP->caption, identity);
|
||||
dc.GetTextExtent(text,&w,nullptr);
|
||||
dc.GetTextExtent(s.fieldP->caption.get(), &w, nullptr);
|
||||
label_width = max(label_width, w + label_margin);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,17 @@ void SelectCardList::toggle(const CardP& card) {
|
||||
}
|
||||
}
|
||||
|
||||
void SelectCardList::toggleSelected(bool select) {
|
||||
for (long i = GetFirstSelected(); i != -1; i = GetNextSelected(i)) {
|
||||
if (select) {
|
||||
selected.insert(getCard(i));
|
||||
} else {
|
||||
selected.erase(getCard(i));
|
||||
}
|
||||
RefreshItem(i);
|
||||
}
|
||||
}
|
||||
|
||||
void SelectCardList::onKeyDown(wxKeyEvent& ev) {
|
||||
if (selected_item_pos == -1 || !selected_item) {
|
||||
// no selection
|
||||
@@ -82,18 +93,15 @@ void SelectCardList::onKeyDown(wxKeyEvent& ev) {
|
||||
}
|
||||
switch (ev.GetKeyCode()) {
|
||||
case WXK_SPACE: {
|
||||
toggle(getCard());
|
||||
RefreshItem(selected_item_pos);
|
||||
toggleSelected(!isSelected(getCard()));
|
||||
break;
|
||||
}
|
||||
case WXK_NUMPAD_ADD: case '+': {
|
||||
selected.insert(getCard());
|
||||
RefreshItem(selected_item_pos);
|
||||
toggleSelected(true);
|
||||
break;
|
||||
}
|
||||
case WXK_NUMPAD_SUBTRACT: case '-': {
|
||||
selected.erase(getCard());
|
||||
RefreshItem(selected_item_pos);
|
||||
toggleSelected(false);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -106,8 +114,14 @@ void SelectCardList::onLeftDown(wxMouseEvent& ev) {
|
||||
long item = HitTest(wxPoint(ev.GetX(), ev.GetY()), flags);
|
||||
if (flags == wxLIST_HITTEST_ONITEMICON) {
|
||||
// only clicking the icon toggles
|
||||
toggle(getCard(item));
|
||||
RefreshItem(item);
|
||||
if (IsSelected(item)) {
|
||||
// if multiple items are selected in the view (regardless of checkbox status), check/uncheck them all
|
||||
toggleSelected(!isSelected(getCard(item)));
|
||||
return; // don't change selection
|
||||
} else {
|
||||
toggle(getCard(item));
|
||||
RefreshItem(item);
|
||||
}
|
||||
}
|
||||
ev.Skip();
|
||||
}
|
||||
|
||||
@@ -37,8 +37,9 @@ private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
std::set<CardP> selected; ///< which cards are selected?
|
||||
|
||||
|
||||
void toggle(const CardP& card);
|
||||
void toggleSelected(bool select);
|
||||
|
||||
void onKeyDown(wxKeyEvent&);
|
||||
void onLeftDown(wxMouseEvent&);
|
||||
|
||||
@@ -145,9 +145,9 @@ private:
|
||||
|
||||
// ----------------------------------------------------------------------------- : Collections : maps
|
||||
|
||||
template <typename V>
|
||||
ScriptValueP get_member(const map<String,V>& m, const String& name) {
|
||||
typename map<String,V>::const_iterator it = m.find(name);
|
||||
template <typename Container>
|
||||
ScriptValueP get_member(const Container& m, const String& name) {
|
||||
auto it = m.find(name);
|
||||
if (it != m.end()) {
|
||||
return to_script(it->second);
|
||||
} else {
|
||||
@@ -403,6 +403,10 @@ inline ScriptValueP to_script(const map<K,V>* v) {
|
||||
return make_intrusive<ScriptMap<map<K,V>>>(v);
|
||||
}
|
||||
template <typename K, typename V>
|
||||
inline ScriptValueP to_script(const unordered_map<K,V>* v) {
|
||||
return make_intrusive<ScriptMap<unordered_map<K,V>>>(v);
|
||||
}
|
||||
template <typename K, typename V>
|
||||
inline ScriptValueP to_script(const IndexMap<K,V>* v) {
|
||||
return make_intrusive<ScriptMap<IndexMap<K,V>>>(v);
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ public:
|
||||
template <typename T> void handle(const Scriptable<T>& );
|
||||
template <typename T> void handle(const vector<T>& c) { value = to_script(&c); }
|
||||
template <typename K, typename V> void handle(const map<K,V>& c) { value = to_script(&c); }
|
||||
template <typename K, typename V> void handle(const unordered_map<K,V>& c) { value = to_script(&c); }
|
||||
template <typename K, typename V> void handle(const IndexMap<K,V>& c) { value = to_script(&c); }
|
||||
template <typename K, typename V> void handle(const DelayedIndexMaps<K,V>&) {}
|
||||
template <typename K, typename V> void handle(const DelayedIndexMapsData<K,V>& c);
|
||||
|
||||
@@ -49,9 +49,11 @@ String identity(const String&);
|
||||
String tr(LocaleCategory cat, const String& key, DefaultLocaleFun def = warn_and_identity);
|
||||
|
||||
/// Translate 'key' in the for a Package using the current locale
|
||||
[[deprecated]]
|
||||
String tr(const Package&, const String& key, DefaultLocaleFun def);
|
||||
|
||||
/// Translate 'key' in the for a Package using the current locale
|
||||
[[deprecated]]
|
||||
String tr(const Package&, const String& subcat, const String& key, DefaultLocaleFun def);
|
||||
|
||||
/// A localized string for menus
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <unordered_map>
|
||||
using namespace std;
|
||||
|
||||
#undef RGB
|
||||
|
||||
Reference in New Issue
Block a user