Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localization problems #52

Open
Luckyvb opened this issue Jun 8, 2020 · 0 comments
Open

Localization problems #52

Luckyvb opened this issue Jun 8, 2020 · 0 comments

Comments

@Luckyvb
Copy link

Luckyvb commented Jun 8, 2020

translation missing: ru.redmine_chat_telegram.bot.authorize.success
and more

diff --git a/app/controllers/redmine_telegram_setup_controller.rb b/app/controllers/redmine_telegram_setup_controller.rb
index 790ad58..5982f11 100644
--- a/app/controllers/redmine_telegram_setup_controller.rb
+++ b/app/controllers/redmine_telegram_setup_controller.rb
@@ -41,14 +41,14 @@ class RedmineTelegramSetupController < ApplicationController
     bot = RedmineBots::Telegram.init_bot
     bot.api.setWebhook(url: web_hook_url)

-    redirect_to plugin_settings_path('redmine_bots'), notice: t('redmine_chat_telegram.bot.authorize.success')
+    redirect_to plugin_settings_path('redmine_bots'), notice: t('redmine_bots.telegram.bot.authorize.success')
   end

   def bot_deinit
     token = Setting.plugin_redmine_bots['telegram_bot_token']
     bot   = Telegram::Bot::Client.new(token)
     bot.api.setWebhook(url: '')
-    redirect_to plugin_settings_path('redmine_bots'), notice: t('redmine_chat_telegram.bot.deauthorize.success')
+    redirect_to plugin_settings_path('redmine_bots'), notice: t('redmine_bots.telegram.bot.deauthorize.success')
   end

   private
diff --git a/app/views/settings/redmine_bots/_telegram.erb b/app/views/settings/redmine_bots/_telegram.erb
index 1effdf6..c77af62 100644
--- a/app/views/settings/redmine_bots/_telegram.erb
+++ b/app/views/settings/redmine_bots/_telegram.erb
@@ -23,9 +23,9 @@
     <td>TDlib</td>
     <td>
       <% if tdlib_path = (TD::Api::Dl.find_lib rescue nil) %>
-      <%= t 'redmine_bots.requirements.yes' %>
+      <%= t 'redmine_bots.requirements.telegram.true' %>
       <% else %>
-      <%= t 'redmine_bots.requirements.no' %>
+      <%= t 'redmine_bots.requirements.telegram.no' %>
       <% end %>
     </td>
     <td><%= tdlib_path || t('redmine_bots.requirements.telegram.tdlib_installation').html_safe %></td>
diff --git a/lib/redmine_bots/telegram/tdlib/command.rb b/lib/redmine_bots/telegram/tdlib/command.rb
index fe34769..0d42f68 100644
--- a/lib/redmine_bots/telegram/tdlib/command.rb
+++ b/lib/redmine_bots/telegram/tdlib/command.rb
@@ -19,7 +19,7 @@ module RedmineBots::Telegram::Tdlib
             client = RedmineBots::Telegram.tdlib_client
             new(client).call(*args).wait
           ensure
-            client.dispose
+            client.dispose unless client.nil?
           end
         end
       end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant