Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/locale.views.inc | ||
---|---|---|
12 | 12 |
*/ |
13 | 13 |
function locale_views_data() { |
14 | 14 |
// Basic table information. |
15 |
|
|
16 | 15 |
// Define the base group of this table. |
17 | 16 |
$data['locales_source']['table']['group'] = t('Locale source'); |
18 | 17 |
|
... | ... | |
23 | 22 |
'help' => t('A source string for translation, in English or the default site language.'), |
24 | 23 |
); |
25 | 24 |
|
26 |
// lid
|
|
25 |
// Locale ID / 'lid'.
|
|
27 | 26 |
$data['locales_source']['lid'] = array( |
28 | 27 |
'title' => t('LID'), |
29 | 28 |
'help' => t('The ID of the source string.'), |
... | ... | |
44 | 43 |
), |
45 | 44 |
); |
46 | 45 |
|
47 |
// location
|
|
46 |
// Location.
|
|
48 | 47 |
$data['locales_source']['location'] = array( |
49 | 48 |
'group' => t('Locale source'), |
50 | 49 |
'title' => t('Location'), |
... | ... | |
52 | 51 |
'field' => array( |
53 | 52 |
'handler' => 'views_handler_field', |
54 | 53 |
'click sortable' => TRUE, |
55 |
),
|
|
54 |
), |
|
56 | 55 |
'sort' => array( |
57 | 56 |
'handler' => 'views_handler_sort', |
58 | 57 |
), |
... | ... | |
64 | 63 |
), |
65 | 64 |
); |
66 | 65 |
|
67 |
// Group field |
|
66 |
// Group field.
|
|
68 | 67 |
$data['locales_source']['textgroup'] = array( |
69 | 68 |
'group' => t('Locale source'), |
70 | 69 |
'title' => t('Group'), |
... | ... | |
81 | 80 |
), |
82 | 81 |
); |
83 | 82 |
|
84 |
// Source field |
|
83 |
// Source field.
|
|
85 | 84 |
$data['locales_source']['source'] = array( |
86 | 85 |
'group' => t('Locale source'), |
87 | 86 |
'title' => t('Source'), |
... | ... | |
94 | 93 |
), |
95 | 94 |
); |
96 | 95 |
|
97 |
// Version field |
|
96 |
// Version field.
|
|
98 | 97 |
$data['locales_source']['version'] = array( |
99 | 98 |
'group' => t('Locale source'), |
100 | 99 |
'title' => t('Version'), |
... | ... | |
121 | 120 |
); |
122 | 121 |
|
123 | 122 |
// ---------------------------------------------------------------------- |
124 |
// Locales target table |
|
125 |
|
|
126 |
// Define the base group of this table. Fields that don't |
|
127 |
// have a group defined will go into this field by default. |
|
123 |
// 'locales_target' table. |
|
124 |
// Define the base group of this table. Fields that don't have a group |
|
125 |
// defined will go into this field by default. |
|
128 | 126 |
$data['locales_target']['table']['group'] = t('Locale target'); |
129 | 127 |
|
130 |
// Join information |
|
128 |
// Join information.
|
|
131 | 129 |
$data['locales_target']['table']['join'] = array( |
132 | 130 |
'locales_source' => array( |
133 | 131 |
'left_field' => 'lid', |
... | ... | |
135 | 133 |
), |
136 | 134 |
); |
137 | 135 |
|
138 |
// Translation field |
|
136 |
// Translation field.
|
|
139 | 137 |
$data['locales_target']['translation'] = array( |
140 | 138 |
'group' => t('Locale target'), |
141 | 139 |
'title' => t('Translation'), |
... | ... | |
148 | 146 |
), |
149 | 147 |
); |
150 | 148 |
|
151 |
// Language field |
|
149 |
// Language field.
|
|
152 | 150 |
$data['locales_target']['language'] = array( |
153 | 151 |
'group' => t('Locale target'), |
154 | 152 |
'title' => t('Language'), |
... | ... | |
174 | 172 |
), |
175 | 173 |
); |
176 | 174 |
|
177 |
// Plural |
|
175 |
// Plural.
|
|
178 | 176 |
$data['locales_target']['plural'] = array( |
179 | 177 |
'group' => t('Locale target'), |
180 | 178 |
'title' => t('Plural'), |
... | ... | |
200 | 198 |
* Implements hook_views_data_alter(). |
201 | 199 |
*/ |
202 | 200 |
function locale_views_data_alter(&$data) { |
203 |
// Language field |
|
201 |
// Language field.
|
|
204 | 202 |
$data['node']['language'] = array( |
205 | 203 |
'title' => t('Language'), |
206 | 204 |
'help' => t('The language the content is in.'), |
Formats disponibles : Unified diff
Weekly update of contrib modules