xref: /haiku/src/apps/icon-o-matic/style/AddStylesCommand.cpp (revision e1c4049fed1047bdb957b0529e1921e97ef94770)
1 /*
2  * Copyright 2006, 2023, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  *		Zardshard
8  */
9 
10 #include "AddStylesCommand.h"
11 
12 #include <Catalog.h>
13 #include <Locale.h>
14 #include <StringFormat.h>
15 
16 #include "Style.h"
17 
18 #undef B_TRANSLATION_CONTEXT
19 #define B_TRANSLATION_CONTEXT "Icon-O-Matic-AddStylesCmd"
20 
21 
22 AddStylesCommand::AddStylesCommand(Container<Style>* container,
23 		const Style* const* styles, int32 count, int32 index)
24 	: AddCommand<Style>(container, styles, count, true, index)
25 {
26 }
27 
28 
29 AddStylesCommand::~AddStylesCommand()
30 {
31 }
32 
33 
34 void
35 AddStylesCommand::GetName(BString& name)
36 {
37 	static BStringFormat format(B_TRANSLATE("Add {0, plural, "
38 		"one{style} other{styles}}"));
39 	format.Format(name, fCount);
40 }
41