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

Compatibility for redmine 5.x and translation Spanish #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Spanish strings go here for Rails i18n
es:
label_ok: "Aceptar"
label_dismiss: "Descartar"
label_news: "Noticias"
label_message: "Mensajes"
11 changes: 8 additions & 3 deletions init.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
require 'redmine'
require 'sticky_messages_application_hooks'

Redmine::Plugin.register :redmine_sticky_messages do
name 'Redmine Sticky Messages plugin'
author 'Jong-Ha Ahn'
description 'This is a plugin for Redmine'
version '1.0.1'
version '1.0.2'
url 'http://github.com/jongha/redmine_sticky_messages'
author_url 'http://www.mrlatte.net'
end

require File.expand_path('lib/sticky_messages_application/hooks', __dir__)

if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
Rails.autoloaders.each { |loader| loader.ignore(File.expand_path('lib/sticky_messages_application', __dir__)) }
end
end
13 changes: 13 additions & 0 deletions lib/sticky_messages_application/hooks.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module StickyMessagesHeaderHooks
class Hooks < Redmine::Hook::ViewListener
def view_layouts_base_html_head(context = {})
o = stylesheet_link_tag('sticky_messages', :plugin => 'redmine_sticky_messages')
o << stylesheet_link_tag('buttons', :plugin => 'redmine_sticky_messages')
o << javascript_include_tag('sticky_messages', :plugin => 'redmine_sticky_messages')
o << javascript_include_tag('jquery.noty.packaged.min.js', :plugin => 'redmine_sticky_messages')
return o
end

render_on :view_layouts_base_body_bottom, :partial => 'messages/after_top_menu'
end
end
14 changes: 0 additions & 14 deletions lib/sticky_messages_application_hooks.rb

This file was deleted.