]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #1852. Added admin notice on activate.
authorSem <sembrestels@riseup.net>
Fri, 6 Jul 2012 03:59:11 +0000 (05:59 +0200)
committerSem <sembrestels@riseup.net>
Fri, 6 Jul 2012 03:59:11 +0000 (05:59 +0200)
mod/tinymce/activate.php [new file with mode: 0644]
mod/tinymce/languages/en.php

diff --git a/mod/tinymce/activate.php b/mod/tinymce/activate.php
new file mode 100644 (file)
index 0000000..953e3c2
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Prompt the user to install a tinymce language after activating
+ */
+
+if (elgg_get_config('language') != tinymce_get_site_language()) {
+       $message = elgg_echo('tinymce:lang_notice', array(
+               elgg_echo(elgg_get_config('language')),
+               "http://www.tinymce.com/i18n/index.php?ctrl=lang&act=download",
+               elgg_get_plugins_path() . "tinymce/vendor/tinymce/jscripts/tiny_mce",
+               elgg_add_action_tokens_to_url(elgg_normalize_url('action/admin/site/flush_cache')),
+       ));
+       elgg_add_admin_notice('tinymce_admin_notice_no_lang', $message);
+}
index 811e934920245e59008fe552fae631cf57085bb6..293e68b35c1786fde9acc6d8e54c3cda5afb7cd1 100644 (file)
@@ -9,6 +9,7 @@ $english = array(
        'tinymce:remove' => "Remove editor",
        'tinymce:add' => "Add editor",
        'tinymce:word_count' => 'Word count: ',
+       'tinymce:lang_notice' => "Your site language is %s but it isn't installed for TinyMCE. Get it <a target=\"_blank\" href=\"%s\">here</a> and copy it in %s path. Then, <a href=\"%s\">flush the caches</a>.",
 );
 
-add_translation("en", $english);
\ No newline at end of file
+add_translation("en", $english);