1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?php
- /**
- * @file
- * This is the file description for Translate Perms module.
- *
- * In this more verbose, multi-line description, you can specify what this
- * file does exactly. Make sure to wrap your documentation in column 78 so
- * that the file can be displayed nicely in default-sized consoles.
- */
- /**
- * Implements hook_permission().
- */
- function translate_perms_permission() {
- return array(
- 'access_translations_overview' => array(
- 'title' => t('Access translations overview')
- ),
- 'access_translation_table_fields' => array(
- 'title' => t('Access translation Fields table')
- ),
- 'access_translation_table_content_type' => array(
- 'title' => t('Access translation Content types table')
- ),
- 'access_translation_table_menu' => array(
- 'title' => t('Access translation menu table')
- ),
- 'access_translation_table_taxonomy' => array(
- 'title' => t('Access translation taxonomy table')
- ),
-
- 'translate_strings' => array(
- 'title' => t('Translate strings')
- ),
- 'import_translations' => array(
- 'title' => t('Import translations')
- ),
- 'refresh_strings' => array(
- 'title' => t('Refresh strings')
- ),
- 'update_modules_translations' => array(
- 'title' => t('Update modules translations')
- ),
- 'export_translations' => array(
- 'title' => t('Import translations')
- ),
- );
- }
- /**
- * Implements hook_menu_alter().
- */
- function translate_perms_menu_alter(&$items) {
- if(isset($items['admin/config/regional/translate']))
- $items['admin/config/regional/translate']['access arguments'] = array('access_translations_overview');
-
- if(isset($items['admin/config/regional/translate/table']))
- $items['admin/config/regional/translate/table']['access arguments'] = array('access_translation_table_fields');
-
- if(isset($items['admin/config/regional/translate/table/nodetype']))
- $items['admin/config/regional/translate/table/nodetype']['access arguments'] = array('access_translation_table_content_type');
- if(isset($items['admin/config/regional/translate/table/menu']))
- $items['admin/config/regional/translate/table/menu']['access arguments'] = array('access_translation_table_menu');
- if(isset($items['admin/config/regional/translate/table/taxonomy']))
- $items['admin/config/regional/translate/table/taxonomy']['access arguments'] = array('access_translation_table_taxonomy');
- if(isset($items['admin/config/regional/translate/translate']))
- $items['admin/config/regional/translate/translate']['access arguments'] = array('translate_strings');
-
- if(isset($items['admin/config/regional/translate/import']))
- $items['admin/config/regional/translate/import']['access arguments'] = array('import_translations');
- if(isset($items['admin/config/regional/translate/i18n_string']))
- $items['admin/config/regional/translate/i18n_string']['access arguments'] = array('refresh_strings');
- if(isset($items['admin/config/regional/translate/update']))
- $items['admin/config/regional/translate/update']['access arguments'] = array('update_modules_translations');
- if(isset($items['admin/config/regional/translate/export']))
- $items['admin/config/regional/translate/export']['access arguments'] = array('export_translations');
-
- }
|