mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Names of add/remove card/keyword actions
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@868 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -91,7 +91,7 @@ GenericAddAction<T>::GenericAddAction(AddingOrRemoving ar, const vector<T>& item
|
||||
template <typename T>
|
||||
String GenericAddAction<T>::getName() const {
|
||||
String type = type_name(steps.front().item) + (steps.size() == 1 ? _("") : _("s"));
|
||||
return adding ? _ACTION_1_("add object", type) : _ACTION_1_("remove object", type);
|
||||
return adding ? _ACTION_1_("add item", type) : _ACTION_1_("remove item", type);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -357,7 +357,7 @@ AddSymbolPartAction::AddSymbolPartAction(Symbol& symbol, const SymbolPartP& part
|
||||
{}
|
||||
|
||||
String AddSymbolPartAction::getName(bool to_undo) const {
|
||||
return _ACTION_1_("add part", part->name);
|
||||
return _ACTION_1_("add item", part->name);
|
||||
}
|
||||
|
||||
void AddSymbolPartAction::perform(bool to_undo) {
|
||||
@@ -396,7 +396,7 @@ void RemoveSymbolPartsAction::check(SymbolGroup& group, const set<SymbolPartP>&
|
||||
}
|
||||
|
||||
String RemoveSymbolPartsAction::getName(bool to_undo) const {
|
||||
return _ACTION_1_("remove parts", removals.size() == 1 ? _TYPE_("shape") : _TYPE_("shapes"));
|
||||
return _ACTION_1_("remove item", removals.size() == 1 ? _TYPE_("shape") : _TYPE_("shapes"));
|
||||
}
|
||||
|
||||
void RemoveSymbolPartsAction::perform(bool to_undo) {
|
||||
|
||||
@@ -86,6 +86,9 @@ class Card : public IntrusivePtrVirtualBase {
|
||||
inline String type_name(const Card&) {
|
||||
return _TYPE_("card");
|
||||
}
|
||||
inline String type_name(const vector<CardP>&) {
|
||||
return _TYPE_("cards"); // not actually used, only for locale.pl script
|
||||
}
|
||||
|
||||
void mark_dependency_member(const Card& value, const String& name, const Dependency& dep);
|
||||
|
||||
|
||||
@@ -114,6 +114,12 @@ class Keyword : public IntrusivePtrVirtualBase {
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
inline String type_name(const Keyword&) {
|
||||
return _TYPE_("keyword");
|
||||
}
|
||||
inline String type_name(const vector<KeywordP>&) {
|
||||
return _TYPE_("keywords"); // not actually used, only for locale.pl script
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Using keywords
|
||||
|
||||
|
||||
Reference in New Issue
Block a user