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:
twanvl
2008-05-18 21:10:13 +00:00
parent cf862d0eea
commit e61aed5c6b
6 changed files with 547 additions and 537 deletions
+1 -1
View File
@@ -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>
+2 -2
View File
@@ -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) {
+3
View File
@@ -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);
+6
View File
@@ -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
File diff suppressed because it is too large Load Diff
+3
View File
@@ -35,6 +35,9 @@ void mark_dependency_member(const T& value, const String& name, const Dependency
template <typename T> inline String type_name(const T&) {
return _TYPE_("object");
}
template <typename T> inline String type_name(const intrusive_ptr<T>& p) {
return type_name(*p.get());
}
template <typename K, typename V> inline String type_name(const pair<K,V>& p) {
return type_name(p.second); // for maps
}