0eb5249a |
1 | <?php |
2 | /* |
3 | +--------------------------------------------------------------------+ |
fee14197 |
4 | | CiviCRM version 5 | |
0eb5249a |
5 | +--------------------------------------------------------------------+ |
6b83d5bd |
6 | | Copyright CiviCRM LLC (c) 2004-2019 | |
0eb5249a |
7 | +--------------------------------------------------------------------+ |
8 | | This file is a part of CiviCRM. | |
9 | | | |
10 | | CiviCRM is free software; you can copy, modify, and distribute it | |
11 | | under the terms of the GNU Affero General Public License | |
12 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | |
13 | | | |
14 | | CiviCRM is distributed in the hope that it will be useful, but | |
15 | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
17 | | See the GNU Affero General Public License for more details. | |
18 | | | |
19 | | You should have received a copy of the GNU Affero General Public | |
20 | | License and the CiviCRM Licensing Exception along | |
21 | | with this program; if not, contact CiviCRM LLC | |
22 | | at info[AT]civicrm[DOT]org. If you have questions about the | |
23 | | GNU Affero General Public License or the licensing of CiviCRM, | |
24 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | |
25 | +--------------------------------------------------------------------+ |
26 | */ |
27 | |
28 | /** |
29 | * |
30 | * @package CRM |
6b83d5bd |
31 | * @copyright CiviCRM LLC (c) 2004-2019 |
0eb5249a |
32 | * |
33 | * Generated from schema_structure.tpl |
34 | * DO NOT EDIT. Generated by CRM_Core_CodeGen |
35 | */ |
36 | class CRM_Core_I18n_SchemaStructure { |
37 | |
38 | /** |
39 | * Get translatable columns. |
40 | * |
41 | * @return array |
42 | * A table-indexed array of translatable columns. |
43 | */ |
44 | public static function &columns() { |
45 | static $result = null; |
46 | if (!$result) { |
47 | $result = [ |
48 | 'civicrm_location_type' => [ |
49 | 'display_name' => "varchar(64)", |
50 | ], |
51 | 'civicrm_option_group' => [ |
52 | 'title' => "varchar(255)", |
53 | 'description' => "varchar(255)", |
54 | ], |
55 | 'civicrm_relationship_type' => [ |
56 | 'label_a_b' => "varchar(64)", |
57 | 'label_b_a' => "varchar(64)", |
58 | 'description' => "varchar(255)", |
59 | ], |
60 | 'civicrm_contact_type' => [ |
61 | 'label' => "varchar(64)", |
62 | 'description' => "text", |
63 | ], |
64 | 'civicrm_batch' => [ |
65 | 'title' => "varchar(255)", |
66 | 'description' => "text", |
67 | ], |
68 | 'civicrm_premiums' => [ |
69 | 'premiums_intro_title' => "varchar(255)", |
70 | 'premiums_intro_text' => "text", |
71 | 'premiums_nothankyou_label' => "varchar(255)", |
72 | ], |
73 | 'civicrm_membership_status' => [ |
74 | 'label' => "varchar(128)", |
75 | ], |
76 | 'civicrm_survey' => [ |
77 | 'title' => "varchar(255)", |
78 | 'instructions' => "text", |
79 | 'thankyou_title' => "varchar(255)", |
80 | 'thankyou_text' => "text", |
81 | ], |
82 | 'civicrm_participant_status_type' => [ |
83 | 'label' => "varchar(255)", |
84 | ], |
85 | 'civicrm_case_type' => [ |
86 | 'title' => "varchar(64)", |
87 | 'description' => "varchar(255)", |
88 | ], |
89 | 'civicrm_tell_friend' => [ |
90 | 'title' => "varchar(255)", |
91 | 'intro' => "text", |
92 | 'suggested_message' => "text", |
93 | 'thankyou_title' => "varchar(255)", |
94 | 'thankyou_text' => "text", |
95 | ], |
96 | 'civicrm_custom_group' => [ |
97 | 'title' => "varchar(64)", |
98 | 'help_pre' => "text", |
99 | 'help_post' => "text", |
100 | ], |
101 | 'civicrm_custom_field' => [ |
102 | 'label' => "varchar(255)", |
103 | 'help_pre' => "text", |
104 | 'help_post' => "text", |
105 | ], |
106 | 'civicrm_option_value' => [ |
107 | 'label' => "varchar(512)", |
108 | 'description' => "text", |
109 | ], |
110 | 'civicrm_group' => [ |
111 | 'title' => "varchar(64)", |
112 | ], |
113 | 'civicrm_contribution_page' => [ |
114 | 'title' => "varchar(255)", |
115 | 'intro_text' => "text", |
116 | 'pay_later_text' => "text", |
117 | 'pay_later_receipt' => "text", |
118 | 'initial_amount_label' => "varchar(255)", |
119 | 'initial_amount_help_text' => "text", |
120 | 'thankyou_title' => "varchar(255)", |
121 | 'thankyou_text' => "text", |
122 | 'thankyou_footer' => "text", |
123 | 'receipt_from_name' => "varchar(255)", |
124 | 'receipt_text' => "text", |
125 | 'footer_text' => "text", |
126 | ], |
127 | 'civicrm_product' => [ |
128 | 'name' => "varchar(255)", |
129 | 'description' => "text", |
130 | 'options' => "text", |
131 | ], |
132 | 'civicrm_membership_type' => [ |
133 | 'name' => "varchar(128)", |
134 | 'description' => "varchar(255)", |
135 | ], |
136 | 'civicrm_membership_block' => [ |
137 | 'new_title' => "varchar(255)", |
138 | 'new_text' => "text", |
139 | 'renewal_title' => "varchar(255)", |
140 | 'renewal_text' => "text", |
141 | ], |
142 | 'civicrm_price_set' => [ |
143 | 'title' => "varchar(255)", |
144 | 'help_pre' => "text", |
145 | 'help_post' => "text", |
146 | ], |
147 | 'civicrm_dashboard' => [ |
148 | 'label' => "varchar(255)", |
149 | ], |
150 | 'civicrm_uf_group' => [ |
151 | 'title' => "varchar(64)", |
152 | 'frontend_title' => "varchar(64)", |
153 | 'help_pre' => "text", |
154 | 'help_post' => "text", |
155 | 'cancel_button_text' => "varchar(64)", |
156 | 'submit_button_text' => "varchar(64)", |
157 | ], |
158 | 'civicrm_uf_field' => [ |
159 | 'help_post' => "text", |
160 | 'help_pre' => "text", |
161 | 'label' => "varchar(255)", |
162 | ], |
163 | 'civicrm_price_field' => [ |
164 | 'label' => "varchar(255)", |
165 | 'help_pre' => "text", |
166 | 'help_post' => "text", |
167 | ], |
168 | 'civicrm_price_field_value' => [ |
169 | 'label' => "varchar(255)", |
170 | 'description' => "text", |
171 | 'help_pre' => "text", |
172 | 'help_post' => "text", |
173 | ], |
174 | 'civicrm_pcp_block' => [ |
175 | 'link_text' => "varchar(255)", |
176 | ], |
177 | 'civicrm_event' => [ |
178 | 'title' => "varchar(255)", |
179 | 'summary' => "text", |
180 | 'description' => "text", |
181 | 'registration_link_text' => "varchar(255)", |
182 | 'event_full_text' => "text", |
183 | 'fee_label' => "varchar(255)", |
184 | 'intro_text' => "text", |
185 | 'footer_text' => "text", |
186 | 'confirm_title' => "varchar(255)", |
187 | 'confirm_text' => "text", |
188 | 'confirm_footer_text' => "text", |
189 | 'confirm_email_text' => "text", |
190 | 'confirm_from_name' => "varchar(255)", |
191 | 'thankyou_title' => "varchar(255)", |
192 | 'thankyou_text' => "text", |
193 | 'thankyou_footer_text' => "text", |
194 | 'pay_later_text' => "text", |
195 | 'pay_later_receipt' => "text", |
196 | 'initial_amount_label' => "varchar(255)", |
197 | 'initial_amount_help_text' => "text", |
198 | 'waitlist_text' => "text", |
199 | 'approval_req_text' => "text", |
200 | 'template_title' => "varchar(255)", |
201 | ], |
202 | ]; |
203 | } |
204 | return $result; |
205 | } |
206 | |
207 | /** |
208 | * Get a table indexed array of the indices for translatable fields. |
209 | * |
210 | * @return array |
211 | * Indices for translatable fields. |
212 | */ |
213 | public static function &indices() { |
214 | static $result = null; |
215 | if (!$result) { |
216 | $result = [ |
217 | 'civicrm_custom_group' => [ |
218 | 'UI_title_extends' => [ |
219 | 'name' => 'UI_title_extends', |
220 | 'field' => [ |
221 | 'title', |
222 | 'extends', |
223 | ], |
224 | 'unique' => 1, |
225 | ], |
226 | ], |
227 | 'civicrm_custom_field' => [ |
228 | 'UI_label_custom_group_id' => [ |
229 | 'name' => 'UI_label_custom_group_id', |
230 | 'field' => [ |
231 | 'label', |
232 | 'custom_group_id', |
233 | ], |
234 | 'unique' => 1, |
235 | ], |
236 | ], |
237 | 'civicrm_group' => [ |
238 | 'UI_title' => [ |
239 | 'name' => 'UI_title', |
240 | 'field' => [ |
241 | 'title', |
242 | ], |
243 | 'unique' => 1, |
244 | ], |
245 | ], |
246 | ]; |
247 | } |
248 | return $result; |
249 | } |
250 | |
251 | /** |
252 | * Get tables with translatable fields. |
253 | * |
254 | * @return array |
255 | * Array of names of tables with fields that can be translated. |
256 | */ |
257 | static function &tables() { |
258 | static $result = null; |
259 | if (!$result) { |
260 | $result = array_keys(self::columns()); |
261 | } |
262 | return $result; |
263 | } |
264 | |
265 | /** |
266 | * Get a list of widgets for editing translatable fields. |
267 | * |
268 | * @return array |
269 | * Array of the widgets for editing translatable fields. |
270 | */ |
271 | static function &widgets() { |
272 | static $result = null; |
273 | if (!$result) { |
274 | $result = [ |
275 | 'civicrm_location_type' => [ |
276 | 'display_name' => [ |
277 | 'type' => "Text", |
278 | ], |
279 | ], |
280 | 'civicrm_option_group' => [ |
281 | 'title' => [ |
282 | 'type' => "Text", |
283 | ], |
284 | 'description' => [ |
285 | 'type' => "Text", |
286 | ], |
287 | ], |
288 | 'civicrm_relationship_type' => [ |
289 | 'label_a_b' => [ |
290 | 'type' => "Text", |
291 | ], |
292 | 'label_b_a' => [ |
293 | 'type' => "Text", |
294 | ], |
295 | 'description' => [ |
296 | 'type' => "Text", |
297 | ], |
298 | ], |
299 | 'civicrm_contact_type' => [ |
300 | 'label' => [ |
301 | 'type' => "Text", |
302 | ], |
303 | 'description' => [ |
304 | 'type' => "TextArea", |
305 | 'rows' => "2", |
306 | 'cols' => "60", |
307 | ], |
308 | ], |
309 | 'civicrm_batch' => [ |
310 | 'title' => [ |
311 | 'type' => "Text", |
312 | ], |
313 | 'description' => [ |
314 | 'type' => "TextArea", |
315 | 'rows' => "4", |
316 | 'cols' => "80", |
317 | ], |
318 | ], |
319 | 'civicrm_premiums' => [ |
320 | 'premiums_intro_title' => [ |
321 | 'type' => "Text", |
322 | ], |
323 | 'premiums_intro_text' => [ |
324 | 'type' => "Text", |
325 | ], |
326 | 'premiums_nothankyou_label' => [ |
327 | 'type' => "Text", |
328 | ], |
329 | ], |
330 | 'civicrm_membership_status' => [ |
331 | 'label' => [ |
332 | 'type' => "Text", |
333 | ], |
334 | ], |
335 | 'civicrm_survey' => [ |
336 | 'title' => [ |
337 | 'type' => "Text", |
338 | 'required' => "true", |
339 | ], |
340 | 'instructions' => [ |
341 | 'type' => "TextArea", |
342 | 'rows' => "20", |
343 | 'cols' => "80", |
344 | ], |
345 | 'thankyou_title' => [ |
346 | 'type' => "Text", |
347 | ], |
348 | 'thankyou_text' => [ |
349 | 'type' => "TextArea", |
350 | 'rows' => "8", |
351 | 'cols' => "60", |
352 | ], |
353 | ], |
354 | 'civicrm_participant_status_type' => [ |
355 | 'label' => [ |
356 | 'type' => "Text", |
357 | ], |
358 | ], |
359 | 'civicrm_case_type' => [ |
360 | 'title' => [ |
361 | 'type' => "Text", |
362 | 'required' => "true", |
363 | ], |
364 | 'description' => [ |
365 | 'type' => "Text", |
366 | ], |
367 | ], |
368 | 'civicrm_tell_friend' => [ |
369 | 'title' => [ |
370 | 'type' => "Text", |
371 | ], |
372 | 'intro' => [ |
373 | 'type' => "Text", |
374 | ], |
375 | 'suggested_message' => [ |
376 | 'type' => "Text", |
377 | ], |
378 | 'thankyou_title' => [ |
379 | 'type' => "Text", |
380 | ], |
381 | 'thankyou_text' => [ |
382 | 'type' => "Text", |
383 | ], |
384 | ], |
385 | 'civicrm_custom_group' => [ |
386 | 'title' => [ |
387 | 'type' => "Text", |
388 | 'required' => "true", |
389 | ], |
390 | 'help_pre' => [ |
391 | 'type' => "TextArea", |
392 | 'rows' => "4", |
393 | 'cols' => "80", |
394 | ], |
395 | 'help_post' => [ |
396 | 'type' => "TextArea", |
397 | 'rows' => "4", |
398 | 'cols' => "80", |
399 | ], |
400 | ], |
401 | 'civicrm_custom_field' => [ |
402 | 'label' => [ |
403 | 'type' => "Text", |
404 | 'required' => "true", |
405 | ], |
406 | 'help_pre' => [ |
407 | 'type' => "Text", |
408 | ], |
409 | 'help_post' => [ |
410 | 'type' => "Text", |
411 | ], |
412 | ], |
413 | 'civicrm_option_value' => [ |
414 | 'label' => [ |
415 | 'type' => "Text", |
416 | 'required' => "true", |
417 | ], |
418 | 'description' => [ |
419 | 'type' => "TextArea", |
420 | 'rows' => "8", |
421 | 'cols' => "60", |
422 | ], |
423 | ], |
424 | 'civicrm_group' => [ |
425 | 'title' => [ |
426 | 'type' => "Text", |
427 | ], |
428 | ], |
429 | 'civicrm_contribution_page' => [ |
430 | 'title' => [ |
431 | 'type' => "Text", |
432 | ], |
433 | 'intro_text' => [ |
434 | 'type' => "RichTextEditor", |
435 | 'rows' => "6", |
436 | 'cols' => "50", |
437 | ], |
438 | 'pay_later_text' => [ |
439 | 'type' => "Text", |
440 | ], |
441 | 'pay_later_receipt' => [ |
442 | 'type' => "Text", |
443 | ], |
444 | 'initial_amount_label' => [ |
445 | 'type' => "Text", |
446 | ], |
447 | 'initial_amount_help_text' => [ |
448 | 'type' => "Text", |
449 | ], |
450 | 'thankyou_title' => [ |
451 | 'type' => "Text", |
452 | ], |
453 | 'thankyou_text' => [ |
454 | 'type' => "RichTextEditor", |
455 | 'rows' => "8", |
456 | 'cols' => "60", |
457 | ], |
458 | 'thankyou_footer' => [ |
459 | 'type' => "RichTextEditor", |
460 | 'rows' => "8", |
461 | 'cols' => "60", |
462 | ], |
463 | 'receipt_from_name' => [ |
464 | 'type' => "Text", |
465 | ], |
466 | 'receipt_text' => [ |
467 | 'type' => "TextArea", |
468 | 'rows' => "6", |
469 | 'cols' => "50", |
470 | ], |
471 | 'footer_text' => [ |
472 | 'type' => "RichTextEditor", |
473 | 'rows' => "6", |
474 | 'cols' => "50", |
475 | ], |
476 | ], |
477 | 'civicrm_product' => [ |
478 | 'name' => [ |
479 | 'type' => "Text", |
480 | 'required' => "true", |
481 | ], |
482 | 'description' => [ |
483 | 'type' => "Text", |
484 | ], |
485 | 'options' => [ |
486 | 'type' => "Text", |
487 | ], |
488 | ], |
489 | 'civicrm_membership_type' => [ |
490 | 'name' => [ |
491 | 'type' => "Text", |
80a96508 |
492 | 'label' => "Name", |
0eb5249a |
493 | ], |
494 | 'description' => [ |
495 | 'type' => "TextArea", |
496 | 'rows' => "6", |
497 | 'cols' => "50", |
80a96508 |
498 | 'label' => "Description", |
0eb5249a |
499 | ], |
500 | ], |
501 | 'civicrm_membership_block' => [ |
502 | 'new_title' => [ |
503 | 'type' => "Text", |
504 | ], |
505 | 'new_text' => [ |
506 | 'type' => "Text", |
507 | ], |
508 | 'renewal_title' => [ |
509 | 'type' => "Text", |
510 | ], |
511 | 'renewal_text' => [ |
512 | 'type' => "Text", |
513 | ], |
514 | ], |
515 | 'civicrm_price_set' => [ |
516 | 'title' => [ |
517 | 'type' => "Text", |
518 | 'required' => "true", |
519 | ], |
520 | 'help_pre' => [ |
521 | 'type' => "TextArea", |
522 | 'rows' => "4", |
523 | 'cols' => "80", |
524 | ], |
525 | 'help_post' => [ |
526 | 'type' => "TextArea", |
527 | 'rows' => "4", |
528 | 'cols' => "80", |
529 | ], |
530 | ], |
531 | 'civicrm_dashboard' => [ |
532 | 'label' => [ |
533 | 'type' => "Text", |
534 | ], |
535 | ], |
536 | 'civicrm_uf_group' => [ |
537 | 'title' => [ |
538 | 'type' => "Text", |
539 | 'required' => "true", |
540 | ], |
541 | 'frontend_title' => [ |
542 | 'type' => "Text", |
543 | ], |
544 | 'help_pre' => [ |
545 | 'type' => "TextArea", |
546 | 'rows' => "4", |
547 | 'cols' => "80", |
548 | ], |
549 | 'help_post' => [ |
550 | 'type' => "TextArea", |
551 | 'rows' => "4", |
552 | 'cols' => "80", |
553 | ], |
554 | 'cancel_button_text' => [ |
555 | 'type' => "Text", |
556 | ], |
557 | 'submit_button_text' => [ |
558 | 'type' => "Text", |
559 | ], |
560 | ], |
561 | 'civicrm_uf_field' => [ |
562 | 'help_post' => [ |
563 | 'type' => "Text", |
564 | ], |
565 | 'help_pre' => [ |
566 | 'type' => "Text", |
567 | ], |
568 | 'label' => [ |
569 | 'type' => "Text", |
570 | 'required' => "true", |
571 | ], |
572 | ], |
573 | 'civicrm_price_field' => [ |
574 | 'label' => [ |
575 | 'type' => "Text", |
576 | 'required' => "true", |
577 | ], |
578 | 'help_pre' => [ |
579 | 'type' => "TextArea", |
580 | 'rows' => "4", |
581 | 'cols' => "80", |
582 | ], |
583 | 'help_post' => [ |
584 | 'type' => "TextArea", |
585 | 'rows' => "4", |
586 | 'cols' => "80", |
587 | ], |
588 | ], |
589 | 'civicrm_price_field_value' => [ |
590 | 'label' => [ |
591 | 'type' => "Text", |
592 | ], |
593 | 'description' => [ |
594 | 'type' => "TextArea", |
595 | 'rows' => "2", |
596 | 'cols' => "60", |
597 | ], |
598 | 'help_pre' => [ |
599 | 'type' => "TextArea", |
600 | 'rows' => "2", |
601 | 'cols' => "60", |
602 | ], |
603 | 'help_post' => [ |
604 | 'type' => "TextArea", |
605 | 'rows' => "2", |
606 | 'cols' => "60", |
607 | ], |
608 | ], |
609 | 'civicrm_pcp_block' => [ |
610 | 'link_text' => [ |
611 | 'type' => "Text", |
612 | ], |
613 | ], |
614 | 'civicrm_event' => [ |
615 | 'title' => [ |
616 | 'type' => "Text", |
617 | ], |
618 | 'summary' => [ |
619 | 'type' => "TextArea", |
620 | 'rows' => "4", |
621 | 'cols' => "60", |
622 | ], |
623 | 'description' => [ |
624 | 'type' => "TextArea", |
625 | 'rows' => "8", |
626 | 'cols' => "60", |
627 | ], |
628 | 'registration_link_text' => [ |
629 | 'type' => "Text", |
630 | ], |
631 | 'event_full_text' => [ |
632 | 'type' => "TextArea", |
633 | 'rows' => "4", |
634 | 'cols' => "60", |
635 | ], |
636 | 'fee_label' => [ |
637 | 'type' => "Text", |
638 | ], |
639 | 'intro_text' => [ |
640 | 'type' => "TextArea", |
641 | 'rows' => "6", |
642 | 'cols' => "50", |
643 | ], |
644 | 'footer_text' => [ |
645 | 'type' => "TextArea", |
646 | 'rows' => "6", |
647 | 'cols' => "50", |
648 | ], |
649 | 'confirm_title' => [ |
650 | 'type' => "Text", |
651 | ], |
652 | 'confirm_text' => [ |
653 | 'type' => "TextArea", |
654 | 'rows' => "6", |
655 | 'cols' => "50", |
656 | ], |
657 | 'confirm_footer_text' => [ |
658 | 'type' => "TextArea", |
659 | 'rows' => "6", |
660 | 'cols' => "50", |
661 | ], |
662 | 'confirm_email_text' => [ |
663 | 'type' => "TextArea", |
664 | 'rows' => "4", |
665 | 'cols' => "50", |
666 | ], |
667 | 'confirm_from_name' => [ |
668 | 'type' => "Text", |
669 | ], |
670 | 'thankyou_title' => [ |
671 | 'type' => "Text", |
672 | ], |
673 | 'thankyou_text' => [ |
674 | 'type' => "TextArea", |
675 | 'rows' => "6", |
676 | 'cols' => "50", |
677 | ], |
678 | 'thankyou_footer_text' => [ |
679 | 'type' => "TextArea", |
680 | 'rows' => "6", |
681 | 'cols' => "50", |
682 | ], |
683 | 'pay_later_text' => [ |
684 | 'type' => "Text", |
685 | ], |
686 | 'pay_later_receipt' => [ |
687 | 'type' => "Text", |
688 | ], |
689 | 'initial_amount_label' => [ |
690 | 'type' => "Text", |
691 | ], |
692 | 'initial_amount_help_text' => [ |
693 | 'type' => "Text", |
694 | ], |
695 | 'waitlist_text' => [ |
696 | 'type' => "TextArea", |
697 | 'rows' => "4", |
698 | 'cols' => "60", |
699 | ], |
700 | 'approval_req_text' => [ |
701 | 'type' => "TextArea", |
702 | 'rows' => "4", |
703 | 'cols' => "60", |
704 | ], |
705 | 'template_title' => [ |
706 | 'type' => "Text", |
707 | ], |
708 | ], |
709 | ]; |
710 | } |
711 | return $result; |
712 | } |
713 | |
714 | } |