Commit | Line | Data |
---|---|---|
fd1ea018 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <add>5.39</add> | |
5 | <base>CRM/Core</base> | |
6 | <class>Translation</class> | |
7 | <name>civicrm_translation</name> | |
8 | <title>Translated String</title> | |
9 | <titlePlural>Translated Strings</titlePlural> | |
10 | <comment>Each string record is an alternate translation of some displayable string in the database.</comment> | |
11 | <log>true</log> | |
12 | ||
13 | <field> | |
14 | <add>5.39</add> | |
15 | <name>id</name> | |
9fa6bb0b | 16 | <title>Translated String ID</title> |
fd1ea018 TO |
17 | <type>int unsigned</type> |
18 | <required>true</required> | |
19 | <comment>Unique String ID</comment> | |
20 | </field> | |
21 | <primaryKey> | |
22 | <name>id</name> | |
23 | <autoincrement>true</autoincrement> | |
24 | </primaryKey> | |
25 | ||
26 | <field> | |
27 | <add>5.39</add> | |
28 | <name>entity_table</name> | |
9fa6bb0b | 29 | <title>Translated Entity</title> |
fd1ea018 TO |
30 | <type>varchar</type> |
31 | <length>64</length> | |
32 | <required>true</required> | |
33 | <pseudoconstant> | |
34 | <callback>CRM_Core_BAO_Translation::getEntityTables</callback> | |
35 | </pseudoconstant> | |
36 | <comment>Table where referenced item is stored</comment> | |
37 | </field> | |
38 | ||
39 | <field> | |
40 | <add>5.39</add> | |
41 | <name>entity_field</name> | |
9fa6bb0b | 42 | <title>Translated Field</title> |
fd1ea018 TO |
43 | <type>varchar</type> |
44 | <length>64</length> | |
45 | <required>true</required> | |
46 | <pseudoconstant> | |
47 | <callback>CRM_Core_BAO_Translation::getEntityFields</callback> | |
48 | </pseudoconstant> | |
49 | <comment>Field where referenced item is stored</comment> | |
50 | </field> | |
51 | ||
52 | <field> | |
53 | <add>5.39</add> | |
54 | <name>entity_id</name> | |
9fa6bb0b | 55 | <title>Translated Entity ID</title> |
fd1ea018 TO |
56 | <type>int</type> |
57 | <length>64</length> | |
58 | <required>true</required> | |
59 | <comment>ID of the relevant entity.</comment> | |
60 | </field> | |
61 | ||
62 | <field> | |
63 | <add>5.39</add> | |
64 | <name>language</name> | |
9fa6bb0b | 65 | <title>Language</title> |
fd1ea018 TO |
66 | <type>varchar</type> |
67 | <length>5</length> | |
68 | <required>true</required> | |
69 | <comment>Relevant language</comment> | |
70 | <html> | |
71 | <type>Select</type> | |
72 | </html> | |
73 | <pseudoconstant> | |
74 | <optionGroupName>languages</optionGroupName> | |
75 | <keyColumn>name</keyColumn> | |
76 | <optionEditPath>civicrm/admin/options/languages</optionEditPath> | |
77 | </pseudoconstant> | |
78 | </field> | |
79 | ||
80 | <field> | |
81 | <add>5.39</add> | |
82 | <name>status_id</name> | |
83 | <type>tinyint</type> | |
9fa6bb0b | 84 | <title>Status</title> |
fd1ea018 TO |
85 | <length>3</length> |
86 | <default>1</default> | |
87 | <required>true</required> | |
88 | <pseudoconstant> | |
89 | <callback>CRM_Core_BAO_Translation::getStatuses</callback> | |
90 | </pseudoconstant> | |
91 | <comment>Specify whether the string is active, draft, etc</comment> | |
92 | </field> | |
93 | ||
94 | <field> | |
95 | <add>5.39</add> | |
9fa6bb0b | 96 | <title>Translated String</title> |
fd1ea018 TO |
97 | <name>string</name> |
98 | <type>longtext</type> | |
99 | <required>true</required> | |
100 | <comment>Translated string</comment> | |
101 | </field> | |
102 | ||
103 | <dynamicForeignKey> | |
104 | <add>5.39</add> | |
105 | <idColumn>entity_id</idColumn> | |
106 | <typeColumn>entity_table</typeColumn> | |
107 | </dynamicForeignKey> | |
108 | ||
109 | <index> | |
110 | <add>5.39</add> | |
111 | <!-- Expected queries: | |
112 | "Admin UI: I'm editing a record. Show me all relevant translations." | |
113 | "Public UI: I'm browsing a list of records. Show this page-worth of records in my preferred language." | |
114 | --> | |
115 | <name>index_entity_lang</name> | |
116 | <!-- Prediction: In a large DB with many events/contribution-pages/groups/mailings/etc, entity ID will have best selectivity. --> | |
117 | <!-- Prediction: Over diverse set of deployments, the selectivity of 'table' and 'language' will be similar. --> | |
118 | <fieldName>entity_id</fieldName> | |
119 | <fieldName>entity_table</fieldName> | |
120 | <fieldName>language</fieldName> | |
121 | </index> | |
122 | </table> |