1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 """
24 Provide the different Attribute Types for GRAMPS.
25 """
26
27
28
29
30
31
32 from gettext import gettext as _
33
34
35
36
37
38 from gen.lib.grampstype import GrampsType, init_map
39
41
42 UNKNOWN = -1
43 CUSTOM = 0
44 CASTE = 1
45 DESCRIPTION = 2
46 ID = 3
47 NATIONAL = 4
48 NUM_CHILD = 5
49 SSN = 6
50 NICKNAME = 7
51 CAUSE = 8
52 AGENCY = 9
53 AGE = 10
54 FATHER_AGE = 11
55 MOTHER_AGE = 12
56 WITNESS = 13
57
58 _CUSTOM = CUSTOM
59 _DEFAULT = ID
60
61 _DATAMAP = [
62 (UNKNOWN , _("Unknown"), "Unknown"),
63 (CUSTOM , _("Custom"), "Custom"),
64 (CASTE , _("Caste"), "Caste"),
65 (DESCRIPTION , _("Description"), "Description"),
66 (ID , _("Identification Number"), "Identification Number"),
67 (NATIONAL , _("National Origin"), "National Origin"),
68 (NUM_CHILD , _("Number of Children"), "Number of Children"),
69 (SSN , _("Social Security Number"), "Social Security Number"),
70 (NUM_CHILD , _("Number of Children"), "Number of Children"),
71 (NICKNAME , _("Nickname"), "Nickname"),
72 (CAUSE , _("Cause"), "Cause"),
73 (AGENCY , _("Agency"), "Agency"),
74 (AGE , _("Age"), "Age"),
75 (FATHER_AGE , _("Father's Age"), "Father Age"),
76 (MOTHER_AGE , _("Mother's Age"), "Mother Age"),
77 (WITNESS , _("Witness"), "Witness"),
78 ]
79
80 _I2SMAP = init_map(_DATAMAP, 0, 1)
81 _S2IMAP = init_map(_DATAMAP, 1, 0)
82 _I2EMAP = init_map(_DATAMAP, 0, 2)
83 _E2IMAP = init_map(_DATAMAP, 2, 0)
84
87