-
-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathbody_part.cpp
More file actions
21 lines (19 loc) · 693 Bytes
/
body_part.cpp
File metadata and controls
21 lines (19 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "stdafx.h"
#include "body_part.h"
#include "t_string.h"
TString getName(BodyPart part) {
switch (part) {
case BodyPart::LEG: return TStringId("LEG_BODY_PART");
case BodyPart::ARM: return TStringId("ARM_BODY_PART");
case BodyPart::WING: return TStringId("WING_BODY_PART");
case BodyPart::HEAD: return TStringId("HEAD_BODY_PART");
case BodyPart::TORSO: return TStringId("TORSO_BODY_PART");
case BodyPart::BACK: return TStringId("BACK_BODY_PART");
}
}
TString getPluralText(BodyPart part, int num) {
if (num == 1)
return TSentence("A_ARTICLE", getName(part));
else
return TSentence("BODY_PART_NUMBER", toText(num), makePlural(getName(part)));
}