/* * Copyright 2006, 2023, Haiku. * Distributed under the terms of the MIT License. * * Authors: * Stephan Aßmus * Zardshard */ #include "AddPathsCommand.h" #include #include #include #include "VectorPath.h" #undef B_TRANSLATION_CONTEXT #define B_TRANSLATION_CONTEXT "Icon-O-Matic-AddPathsCmd" AddPathsCommand::AddPathsCommand(Container* container, const VectorPath* const* paths, int32 count, bool ownsPaths, int32 index) : AddCommand(container, paths, count, ownsPaths, index) { } AddPathsCommand::~AddPathsCommand() { } void AddPathsCommand::GetName(BString& name) { static BStringFormat addFormat(B_TRANSLATE("Add {0, plural, " "one{path} other{paths}}")); static BStringFormat assignFormat(B_TRANSLATE("Assign {0, plural, " "one{path} other{paths}}")); if (fOwnsItems) addFormat.Format(name, fCount); else assignFormat.Format(name, fCount); }