source: extensions/plugin_lang_analysis/main.inc.php @ 28862

Last change on this file since 28862 was 28862, checked in by mistic100, 10 years ago

update regexes

File size: 970 bytes
Line 
1<?php 
2/*
3Plugin Name: Plugin Language Analysis
4Version: auto
5Description: Add a tool to analyse translation strings of plugins
6Plugin URI: auto
7Author: Mistic
8Author URI: http://www.strangeplanet.fr
9*/
10
11defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
12
13if (!defined('IN_ADMIN'))
14{
15  return;
16}
17
18global $conf;
19
20define('PLA_ID',    basename(dirname(__FILE__)));
21define('PLA_PATH' , PHPWG_PLUGINS_PATH . PLA_ID . '/');
22define('PLA_ADMIN', get_root_url() . 'admin.php?page=plugin-' . PLA_ID);
23define('PLA_DATA',  $conf['data_location'] . PLA_ID . '/');
24
25add_event_handler('loc_begin_admin', 'pla_begin_admin');
26
27function pla_begin_admin()
28{
29  global $template;
30  $template->set_prefilter('admin', 'pla_add_menu_item');
31}
32
33function pla_add_menu_item($content)
34{
35  $search = '{\'Updates\'|@translate}</a></li>';
36  $add = '<li><a class="icon-language" href="'.PLA_ADMIN.'">Plugin Language Analysis</a></li>';
37  return str_replace($search, $search."\n".$add, $content);
38}
Note: See TracBrowser for help on using the repository browser.