diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-05-09 18:12:15 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2017-10-22 12:55:03 +0200 |
commit | 12266213d098a53c5f005b9afcbbe62771fd580c (patch) | |
tree | c7adfb280272fee16a5e2011f55315f838a07395 /plugins/isso | |
parent | 72cfe44436f4316112fc4aabfe8940aa7b4adcab (diff) | |
download | Shaarli-12266213d098a53c5f005b9afcbbe62771fd580c.tar.gz Shaarli-12266213d098a53c5f005b9afcbbe62771fd580c.tar.zst Shaarli-12266213d098a53c5f005b9afcbbe62771fd580c.zip |
Shaarli's translation
* translation system and unit tests
* Translations everywhere
Dont use translation merge
It is not available with PHP builtin gettext, so it would have lead to inconsistency.
Diffstat (limited to 'plugins/isso')
-rw-r--r-- | plugins/isso/isso.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/plugins/isso/isso.php b/plugins/isso/isso.php index ce16645f..5bc1cce2 100644 --- a/plugins/isso/isso.php +++ b/plugins/isso/isso.php | |||
@@ -4,10 +4,11 @@ | |||
4 | * Plugin Isso. | 4 | * Plugin Isso. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | use Shaarli\Config\ConfigManager; | ||
8 | |||
7 | /** | 9 | /** |
8 | * Display an error everywhere if the plugin is enabled without configuration. | 10 | * Display an error everywhere if the plugin is enabled without configuration. |
9 | * | 11 | * |
10 | * @param $data array List of links | ||
11 | * @param $conf ConfigManager instance | 12 | * @param $conf ConfigManager instance |
12 | * | 13 | * |
13 | * @return mixed - linklist data with Isso plugin. | 14 | * @return mixed - linklist data with Isso plugin. |
@@ -16,8 +17,8 @@ function isso_init($conf) | |||
16 | { | 17 | { |
17 | $issoUrl = $conf->get('plugins.ISSO_SERVER'); | 18 | $issoUrl = $conf->get('plugins.ISSO_SERVER'); |
18 | if (empty($issoUrl)) { | 19 | if (empty($issoUrl)) { |
19 | $error = 'Isso plugin error: '. | 20 | $error = t('Isso plugin error: '. |
20 | 'Please define the "ISSO_SERVER" setting in the plugin administration page.'; | 21 | 'Please define the "ISSO_SERVER" setting in the plugin administration page.'); |
21 | return array($error); | 22 | return array($error); |
22 | } | 23 | } |
23 | } | 24 | } |
@@ -52,3 +53,13 @@ function hook_isso_render_linklist($data, $conf) | |||
52 | 53 | ||
53 | return $data; | 54 | return $data; |
54 | } | 55 | } |
56 | |||
57 | /** | ||
58 | * This function is never called, but contains translation calls for GNU gettext extraction. | ||
59 | */ | ||
60 | function isso_dummy_translation() | ||
61 | { | ||
62 | // meta | ||
63 | t('Let visitor comment your shaares on permalinks with Isso.'); | ||
64 | t('Isso server URL (without \'http://\')'); | ||
65 | } | ||