]> git.mxchange.org Git - friendica-addons.git/blobdiff - krynn/krynn.php
ES translation of the openstreetmaĆ¼ addon updated THX Senex Petrovic
[friendica-addons.git] / krynn / krynn.php
index 63418ebf26c94204d8edc095a321460a94a80d8e..88aa84ea206cbbfb439810f7c461e78e945e1927 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: Dragonlance Krynn locales
- * Description: Set a random locale from the Dragonlance Realm of Krynn when posting. Based on the planets frindica addon by Mike Macgirvin and Tony Baldwin
+ * Description: Set a random locale from the Dragonlance Realm of Krynn when posting. Based on the planets friendica addon by Mike Macgirvin and Tony Baldwin
  * Version: 1.0
  * Planets Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  * Planets Author: Tony Baldwin <https://free-haven.org/profile/tony>
@@ -10,7 +10,6 @@
  *"My body was my sacrifice... for my magic. This damage is permanent." - Raistlin Majere
  */
 use Friendica\Core\Hook;
-use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\DI;
 
@@ -39,27 +38,6 @@ function krynn_install() {
        Logger::log("installed krynn");
 }
 
-
-function krynn_uninstall() {
-
-       /**
-        *
-        * uninstall unregisters any hooks created with register_hook
-        * during install. It may also delete configuration settings
-        * and any other cleanup.
-        *
-        */
-
-       Hook::unregister('post_local',    'addon/krynn/krynn.php', 'krynn_post_hook');
-       Hook::unregister('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
-       Hook::unregister('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
-
-
-       Logger::log("removed krynn");
-}
-
-
-
 function krynn_post_hook($a, &$item) {
 
        /**
@@ -71,8 +49,6 @@ function krynn_post_hook($a, &$item) {
         *
         */
 
-       Logger::log('krynn invoked');
-
        if(! local_user())   /* non-zero if this is a logged in user of this system */
                return;
 
@@ -153,23 +129,23 @@ function krynn_settings(&$a,&$s) {
        /* Add some HTML to the existing form */
 
     $s .= '<span id="settings_krynn_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_krynn_expanded\'); openClose(\'settings_krynn_inflated\');">';
-       $s .= '<h3>' . L10n::t('Krynn') . '</h3>';
+       $s .= '<h3>' . DI::l10n()->t('Krynn') . '</h3>';
        $s .= '</span>';
        $s .= '<div id="settings_krynn_expanded" class="settings-block" style="display: none;">';
        $s .= '<span class="fakelink" onclick="openClose(\'settings_krynn_expanded\'); openClose(\'settings_krynn_inflated\');">';
-       $s .= '<h3>' . L10n::t('Krynn') . '</h3>';
+       $s .= '<h3>' . DI::l10n()->t('Krynn') . '</h3>';
        $s .= '</span>';
 
 
     $s .= '<div class="settings-block">';
-       $s .= '<h3>' . L10n::t('Krynn Settings') . '</h3>';
+       $s .= '<h3>' . DI::l10n()->t('Krynn Settings') . '</h3>';
        $s .= '<div id="krynn-enable-wrapper">';
-       $s .= '<label id="krynn-enable-label" for="krynn-checkbox">' . L10n::t('Enable Krynn Addon') . '</label>';
+       $s .= '<label id="krynn-enable-label" for="krynn-checkbox">' . DI::l10n()->t('Enable Krynn Addon') . '</label>';
        $s .= '<input id="krynn-checkbox" type="checkbox" name="krynn" value="1" ' . $checked . '/>';
         $s .= '</div><div class="clear"></div></div>';
        /* provide a submit button */
 
-       $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="krynn-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
+       $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="krynn-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div></div>';
 
 }