rte_words.lib.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Helper functions for RTE
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. if (! defined('PHPMYADMIN')) {
  9. exit;
  10. }
  11. /**
  12. * This function is used to retreive some language strings that are used
  13. * in functionalities that are common to routines, triggers and events.
  14. *
  15. * @param string $index The index of the string to get
  16. *
  17. * @return string The requested string or an empty string, if not available
  18. */
  19. function PMA_RTE_getWord($index)
  20. {
  21. global $_PMA_RTE;
  22. switch ($_PMA_RTE) {
  23. case 'RTN':
  24. $words = array(
  25. 'add' => __('Add routine'),
  26. 'docu' => 'STORED_ROUTINES',
  27. 'export' => __('Export of routine %s'),
  28. 'human' => __('routine'),
  29. 'no_create' => __(
  30. 'You do not have the necessary privileges to create a routine'
  31. ),
  32. 'not_found' => __('No routine with name %1$s found in database %2$s'),
  33. 'nothing' => __('There are no routines to display.'),
  34. 'title' => __('Routines'),
  35. );
  36. break;
  37. case 'TRI':
  38. $words = array(
  39. 'add' => __('Add trigger'),
  40. 'docu' => 'TRIGGERS',
  41. 'export' => __('Export of trigger %s'),
  42. 'human' => __('trigger'),
  43. 'no_create' => __(
  44. 'You do not have the necessary privileges to create a trigger'
  45. ),
  46. 'not_found' => __('No trigger with name %1$s found in database %2$s'),
  47. 'nothing' => __('There are no triggers to display.'),
  48. 'title' => __('Triggers'),
  49. );
  50. break;
  51. case 'EVN':
  52. $words = array(
  53. 'add' => __('Add event'),
  54. 'docu' => 'EVENTS',
  55. 'export' => __('Export of event %s'),
  56. 'human' => __('event'),
  57. 'no_create' => __(
  58. 'You do not have the necessary privileges to create an event'
  59. ),
  60. 'not_found' => __('No event with name %1$s found in database %2$s'),
  61. 'nothing' => __('There are no events to display.'),
  62. 'title' => __('Events'),
  63. );
  64. break;
  65. default:
  66. $words = array();
  67. break;
  68. }
  69. return isset($words[$index]) ? $words[$index] : '';
  70. } // end PMA_RTE_getWord()
  71. ?>