From 49dfc0bddb6c79022f3bbdfab67e512840ed6535 Mon Sep 17 00:00:00 2001 From: Michael Pirogov Date: Fri, 19 Jun 2009 14:02:53 +0400 Subject: [PATCH 01/16] Added Russain translation --- config/locales/ru.yml | 6 ++++++ lang/ru.yml | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 config/locales/ru.yml create mode 100644 lang/ru.yml diff --git a/config/locales/ru.yml b/config/locales/ru.yml new file mode 100644 index 0000000..58b6c76 --- /dev/null +++ b/config/locales/ru.yml @@ -0,0 +1,6 @@ +ru: + google_analytics_directions: Введите ваш JavaScript код от Google Analytics в поле ниже и выберите параметры отслеживания. + google_analytics_code_label: Код Google Analytics (включая теги SCRIPT) + google_analytics_log_anonymous_label: Отслеживать анонимных пользователей + google_analytics_log_authenticated_label: Отслеживать авторизованных пользователей + google_analytics_log_administrator_label: Отслеживать администраторов. diff --git a/lang/ru.yml b/lang/ru.yml new file mode 100644 index 0000000..66767bf --- /dev/null +++ b/lang/ru.yml @@ -0,0 +1,5 @@ +google_analytics_directions: Введите ваш JavaScript код от Google Analytics в поле ниже и выберите параметры отслеживания. +google_analytics_code_label: Код Google Analytics (включая теги SCRIPT) +google_analytics_log_anonymous_label: Отслеживать анонимных пользователей +google_analytics_log_authenticated_label: Отслеживать авторизованных пользователей +google_analytics_log_administrator_label: Отслеживать администраторов. From f8a38ae15307f699d29c15b2aaa7a36cd1692224 Mon Sep 17 00:00:00 2001 From: Marcelo Romulo Fernandes Date: Sun, 9 May 2010 17:05:53 -0300 Subject: [PATCH 02/16] Adding locales for pt and pt-BR --- config/locales/pt-BR.yml | 6 ++++++ config/locales/pt.yml | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 config/locales/pt-BR.yml create mode 100644 config/locales/pt.yml diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml new file mode 100644 index 0000000..3d4f330 --- /dev/null +++ b/config/locales/pt-BR.yml @@ -0,0 +1,6 @@ +pt-BR: + google_analytics_directions: Insira seu código JavaScript Google Analytics na área abaixo e escolha suas opções de log. + google_analytics_code_label: Código Google Analytics (incluindo script tags) + google_analytics_log_anonymous_label: Logar usuário anônimo + google_analytics_log_authenticated_label: Logar usuário autenticado + google_analytics_log_administrator_label: Logar usuário administrador diff --git a/config/locales/pt.yml b/config/locales/pt.yml new file mode 100644 index 0000000..8c3fbd8 --- /dev/null +++ b/config/locales/pt.yml @@ -0,0 +1,6 @@ +pt: + google_analytics_directions: Insira seu código JavaScript Google Analytics na área abaixo e escolha suas opções de log. + google_analytics_code_label: Código Google Analytics (incluindo script tags) + google_analytics_log_anonymous_label: Logar usuário anônimo + google_analytics_log_authenticated_label: Logar usuário autenticado + google_analytics_log_administrator_label: Logar usuário administrador From 73740ca8ae4cee491a42a36f911fe661235addfd Mon Sep 17 00:00:00 2001 From: Raphael Kallensee Date: Sun, 2 Sep 2012 16:48:20 +0200 Subject: [PATCH 03/16] Started with Redmine 2.0 compatibility fixes. Bumped version up to 0.3.0-beta. --- COPYRIGHT.txt | 2 +- VERSION | 2 +- ...gs.rhtml => _google_analytics_settings.html.erb} | 0 google_analytics_plugin.gemspec | 4 ++-- lib/google_analytics_hooks.rb | 2 +- rails/init.rb | 13 ++++++------- 6 files changed, 11 insertions(+), 12 deletions(-) rename app/views/settings/{_google_analytics_settings.rhtml => _google_analytics_settings.html.erb} (100%) diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index e0ceea9..d986301 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -1,7 +1,7 @@ Redmine Google Analytics is a Redmine plugin to insert the Google Analytics tracking code into Redmine based on user roles. -Copyright (C) 2008 Eric Davis, Little Stream Software +Copyright (C) 2008-2012 Eric Davis, Little Stream Software This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/VERSION b/VERSION index 0ea3a94..f2b3082 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.0 +0.3.0-beta diff --git a/app/views/settings/_google_analytics_settings.rhtml b/app/views/settings/_google_analytics_settings.html.erb similarity index 100% rename from app/views/settings/_google_analytics_settings.rhtml rename to app/views/settings/_google_analytics_settings.html.erb diff --git a/google_analytics_plugin.gemspec b/google_analytics_plugin.gemspec index be3eed4..e02ceed 100644 --- a/google_analytics_plugin.gemspec +++ b/google_analytics_plugin.gemspec @@ -5,7 +5,7 @@ Gem::Specification.new do |s| s.name = %q{google_analytics_plugin} - s.version = "0.2.0" + s.version = "0.3.0-beta" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Eric Davis"] @@ -22,7 +22,7 @@ Gem::Specification.new do |s| "README.rdoc", "Rakefile", "VERSION", - "app/views/settings/_google_analytics_settings.rhtml", + "app/views/settings/_google_analytics_settings.html.erb", "config/locales/en.yml", "config/locales/hu.yml", "config/locales/it.yml", diff --git a/lib/google_analytics_hooks.rb b/lib/google_analytics_hooks.rb index fd6f37f..829da1b 100644 --- a/lib/google_analytics_hooks.rb +++ b/lib/google_analytics_hooks.rb @@ -1,6 +1,6 @@ # This class hooks into Redmine's View Listeners in order to # add content to the page -class GoogleAnalyticsHooks < Redmine::Hook::ViewListener +class GoogleAnalyticsHooks < Redmine::Hook::ViewListener # Adds the Google Analytics code to the layout if the current user meets # the conditions setup by the System Administrator diff --git a/rails/init.rb b/rails/init.rb index 36d733a..da4887f 100644 --- a/rails/init.rb +++ b/rails/init.rb @@ -8,18 +8,17 @@ description 'Redmine plugin to insert the Google Analytics tracking code into Redmine based on user roles.' url 'https://projects.littlestreamsoftware.com/projects/redmine-analytics' author_url 'http://www.littlestreamsoftware.com' - - version '0.2.0' - - requires_redmine :version_or_higher => '0.8.0' - + + version '0.3.0-beta' + + requires_redmine :version_or_higher => '2.0.0' + settings :default => { 'google_analytics_code' => '', 'google_analytics_log_anonymous' => true, 'google_analytics_log_authenticated' => true, 'google_analytics_log_administrator' => true - }, :partial => 'settings/google_analytics_settings' - + }, :partial => 'google_analytics_settings' end From be09e73fac73b8eff2aae6e46192de4020ffffca Mon Sep 17 00:00:00 2001 From: Raphael Kallensee Date: Sun, 2 Sep 2012 16:49:29 +0200 Subject: [PATCH 04/16] Moved init.rb to the plugin root. --- init.rb | 25 ++++++++++++++++++++++++- rails/init.rb | 24 ------------------------ 2 files changed, 24 insertions(+), 25 deletions(-) delete mode 100644 rails/init.rb diff --git a/init.rb b/init.rb index 7c16c46..da4887f 100644 --- a/init.rb +++ b/init.rb @@ -1 +1,24 @@ -require File.dirname(__FILE__) + "/rails/init" +require 'redmine' + +require_dependency 'google_analytics_hooks' + +Redmine::Plugin.register :google_analytics_plugin do + name 'Google Analytics plugin' + author 'Eric Davis' + description 'Redmine plugin to insert the Google Analytics tracking code into Redmine based on user roles.' + url 'https://projects.littlestreamsoftware.com/projects/redmine-analytics' + author_url 'http://www.littlestreamsoftware.com' + + version '0.3.0-beta' + + requires_redmine :version_or_higher => '2.0.0' + + settings :default => { + 'google_analytics_code' => '', + 'google_analytics_log_anonymous' => true, + 'google_analytics_log_authenticated' => true, + 'google_analytics_log_administrator' => true + }, :partial => 'google_analytics_settings' + +end + diff --git a/rails/init.rb b/rails/init.rb deleted file mode 100644 index da4887f..0000000 --- a/rails/init.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'redmine' - -require_dependency 'google_analytics_hooks' - -Redmine::Plugin.register :google_analytics_plugin do - name 'Google Analytics plugin' - author 'Eric Davis' - description 'Redmine plugin to insert the Google Analytics tracking code into Redmine based on user roles.' - url 'https://projects.littlestreamsoftware.com/projects/redmine-analytics' - author_url 'http://www.littlestreamsoftware.com' - - version '0.3.0-beta' - - requires_redmine :version_or_higher => '2.0.0' - - settings :default => { - 'google_analytics_code' => '', - 'google_analytics_log_anonymous' => true, - 'google_analytics_log_authenticated' => true, - 'google_analytics_log_administrator' => true - }, :partial => 'google_analytics_settings' - -end - From 4c4d42ee7a9e1b14bd4e247b1ad5407af82ad615 Mon Sep 17 00:00:00 2001 From: Raphael Kallensee Date: Sun, 2 Sep 2012 17:23:55 +0200 Subject: [PATCH 05/16] Removed rails/init.rb from Gemspec and Rakefile. --- Rakefile | 1 - google_analytics_plugin.gemspec | 1 - 2 files changed, 2 deletions(-) diff --git a/Rakefile b/Rakefile index 5e9a2ce..4bb29d6 100755 --- a/Rakefile +++ b/Rakefile @@ -21,7 +21,6 @@ begin s.files = FileList[ "[A-Z]*", "init.rb", - "rails/init.rb", "{bin,generators,lib,test,app,assets,config,lang}/**/*", 'lib/jeweler/templates/.gitignore' ] diff --git a/google_analytics_plugin.gemspec b/google_analytics_plugin.gemspec index e02ceed..5117028 100644 --- a/google_analytics_plugin.gemspec +++ b/google_analytics_plugin.gemspec @@ -31,7 +31,6 @@ Gem::Specification.new do |s| "lang/hu.yml", "lang/it.yml", "lib/google_analytics_hooks.rb", - "rails/init.rb", "test/test_helper.rb" ] s.homepage = %q{https://projects.littlestreamsoftware.com/projects/TODO} From 0b979909dedccb0a95a466234ebaa7185376709e Mon Sep 17 00:00:00 2001 From: Raphael Kallensee Date: Sun, 2 Sep 2012 17:24:51 +0200 Subject: [PATCH 06/16] Fixed hint - requires raw output. --- app/views/settings/_google_analytics_settings.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/settings/_google_analytics_settings.html.erb b/app/views/settings/_google_analytics_settings.html.erb index 56234df..6f7008c 100644 --- a/app/views/settings/_google_analytics_settings.html.erb +++ b/app/views/settings/_google_analytics_settings.html.erb @@ -1,5 +1,5 @@

- <%= l(:google_analytics_directions) %> + <%= raw l(:google_analytics_directions) %>

From 1fcb49fbe1309c588a2845d1750252da2a0a1633 Mon Sep 17 00:00:00 2001 From: Raphael Kallensee Date: Sun, 2 Sep 2012 17:35:45 +0200 Subject: [PATCH 07/16] Updated the plugin documentation for Redmine 2.0. Modified description and mentioned Piwik - because the plugin is useful for it as well (and it's a quite popular piece of free software in its area). --- README.rdoc | 25 ++++++++++++------------- Rakefile | 4 ++-- google_analytics_plugin.gemspec | 6 +++--- init.rb | 2 +- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/README.rdoc b/README.rdoc index 297c3a4..89516cd 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,31 +1,30 @@ = Redmine Google Analytics Plugins -Redmine plugin to insert the Google Analytics tracking code into Redmine based on user roles. +Redmine plugin to insert a Google Analytics (or e.g. Piwik) tracking code into Redmine based on user roles. == Features -Adds your Google Analytics code to every pageview depending on your User roles; Anonymous user, Authenticated User, and Administrator. +Adds your Google Analytics (or e.g. Piwik) code to every pageview depending on your User roles; Anonymous user, Authenticated User, and/or Administrator. == Installation and Setup -1. Download the plugin. There are three supported ways: - * Downloading the latest archive file from Little Stream Software projects (https://projects.littlestreamsoftware.com) - * Checkout the source from Git - - git clone git://github.com/edavis10/redmine-google-analytics-plugin.git vendor/plugins/google_analytics_plugin +This plugin version requires Redmine >= 2.0.0! - * Install it using Rail's plugin installer +1. Download the plugin. There are two supported ways: + * Downloading the latest archive file from Little Stream Software projects (https://projects.littlestreamsoftware.com) + * Checkout the source from Git - script/plugin install git://github.com/edavis10/redmine-google-analytics-plugin.git + git clone git://github.com/edavis10/redmine-google-analytics-plugin.git plugins/google_analytics_plugin 2. Login to your Redmine install as an Administrator. -3. Configure your settings in Administration > Information > Configure +3. Configure your settings in Administration > Plugins > [Google Analytics plugin] - Configure + +You have to paste the complete Google Analytics or e.g. Piwik tracking code, including the HTML script tags, into the field. == License -This plugin is licensed under the GNU GPL v2. See COPYRIGHT.txt and GPL.txt for details. +This plugin is licensed under the GNU GPL v2. See COPYRIGHT.txt and GPL.txt for details. == Project help -If you need help you can contact the maintainer at the Bug Tracker. The bug tracker is located at https://projects.littlestreamsoftware.com - +If you need help you can contact the maintainer at the Bug Tracker. The bug tracker is located at https://projects.littlestreamsoftware.com diff --git a/Rakefile b/Rakefile index 4bb29d6..aaa9f7c 100755 --- a/Rakefile +++ b/Rakefile @@ -12,10 +12,10 @@ begin require 'jeweler' Jeweler::Tasks.new do |s| s.name = "google_analytics_plugin" - s.summary = "Redmine plugin to insert the Google Analytics tracking code into Redmine based on user roles." + s.summary = "Redmine plugin to insert a Google Analytics (or e.g. Piwik) tracking code into Redmine based on user roles." s.email = "edavis@littlestreamsoftware.com" s.homepage = "https://projects.littlestreamsoftware.com/projects/TODO" - s.description = "Redmine plugin to insert the Google Analytics tracking code into Redmine based on user roles." + s.description = "Redmine plugin to insert a Google Analytics (or e.g. Piwik) tracking code into Redmine based on user roles." s.authors = ["Eric Davis"] s.rubyforge_project = "google_analytics_plugin" # TODO s.files = FileList[ diff --git a/google_analytics_plugin.gemspec b/google_analytics_plugin.gemspec index 5117028..567373a 100644 --- a/google_analytics_plugin.gemspec +++ b/google_analytics_plugin.gemspec @@ -9,8 +9,8 @@ Gem::Specification.new do |s| s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Eric Davis"] - s.date = %q{2009-10-14} - s.description = %q{Redmine plugin to insert the Google Analytics tracking code into Redmine based on user roles.} + s.date = %q{2012-09-02} + s.description = %q{Redmine plugin to insert a Google Analytics (or e.g. Piwik) tracking code into Redmine based on user roles.} s.email = %q{edavis@littlestreamsoftware.com} s.extra_rdoc_files = [ "README.rdoc" @@ -38,7 +38,7 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.rubyforge_project = %q{google_analytics_plugin} s.rubygems_version = %q{1.3.5} - s.summary = %q{Redmine plugin to insert the Google Analytics tracking code into Redmine based on user roles.} + s.summary = %q{Redmine plugin to insert a Google Analytics (or e.g. Piwik) tracking code into Redmine based on user roles.} s.test_files = [ "test/test_helper.rb" ] diff --git a/init.rb b/init.rb index da4887f..1266b32 100644 --- a/init.rb +++ b/init.rb @@ -5,7 +5,7 @@ Redmine::Plugin.register :google_analytics_plugin do name 'Google Analytics plugin' author 'Eric Davis' - description 'Redmine plugin to insert the Google Analytics tracking code into Redmine based on user roles.' + description 'Redmine plugin to insert a Google Analytics (or e.g. Piwik) tracking code into Redmine based on user roles.' url 'https://projects.littlestreamsoftware.com/projects/redmine-analytics' author_url 'http://www.littlestreamsoftware.com' From 617cd2fffc0db674dc0532d9c120bb40d2e6a063 Mon Sep 17 00:00:00 2001 From: Raphael Kallensee Date: Sun, 2 Sep 2012 17:40:26 +0200 Subject: [PATCH 08/16] Removed duplicate t9n files. --- lang/en.yml | 6 ------ lang/hu.yml | 5 ----- lang/it.yml | 5 ----- 3 files changed, 16 deletions(-) delete mode 100644 lang/en.yml delete mode 100644 lang/hu.yml delete mode 100644 lang/it.yml diff --git a/lang/en.yml b/lang/en.yml deleted file mode 100644 index 41528aa..0000000 --- a/lang/en.yml +++ /dev/null @@ -1,6 +0,0 @@ -# English strings go here -google_analytics_directions: Enter your Google Analytics JavaScript code into the area below and choose your logging options. -google_analytics_code_label: Google Analytics code (including script tags) -google_analytics_log_anonymous_label: Log anonymous users -google_analytics_log_authenticated_label: Log authenticated user -google_analytics_log_administrator_label: Log administrator users diff --git a/lang/hu.yml b/lang/hu.yml deleted file mode 100644 index 2583ea0..0000000 --- a/lang/hu.yml +++ /dev/null @@ -1,5 +0,0 @@ -google_analytics_directions: 'Add meg a te Google Analytics JavaScript kódodat a lenti mezőben és válaszd ki a naplózási beállításokat.' -google_analytics_code_label: Google Analytics kód (script címkékkel együtt) -google_analytics_log_anonymous_label: Anoním felhasználók naplója -google_analytics_log_authenticated_label: Azonosított felhasználók naplója -google_analytics_log_administrator_label: Adminisztrátor felhasználók naplója diff --git a/lang/it.yml b/lang/it.yml deleted file mode 100644 index e7213b1..0000000 --- a/lang/it.yml +++ /dev/null @@ -1,5 +0,0 @@ -google_analytics_directions: Scrivi il codice JavaScript di Google Analytics nel campo qui sotto e scegli le opzioni di logging. -google_analytics_code_label: Codice Google Analytics (incluso il tag script) -google_analytics_log_anonymous_label: Traccia utenti anonimi -google_analytics_log_authenticated_label: Traccia utenti autenticati -google_analytics_log_administrator_label: Traccia amministratori From 1709fe8d27461d0a5db45fdcede1143647a3b404 Mon Sep 17 00:00:00 2001 From: Raphael Kallensee Date: Sun, 2 Sep 2012 17:47:55 +0200 Subject: [PATCH 09/16] Added German translation. --- Rakefile | 2 +- config/locales/de.yml | 6 ++++++ google_analytics_plugin.gemspec | 4 +--- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 config/locales/de.yml diff --git a/Rakefile b/Rakefile index aaa9f7c..be42e99 100755 --- a/Rakefile +++ b/Rakefile @@ -21,7 +21,7 @@ begin s.files = FileList[ "[A-Z]*", "init.rb", - "{bin,generators,lib,test,app,assets,config,lang}/**/*", + "{bin,generators,lib,test,app,assets,config}/**/*", 'lib/jeweler/templates/.gitignore' ] end diff --git a/config/locales/de.yml b/config/locales/de.yml new file mode 100644 index 0000000..99800bc --- /dev/null +++ b/config/locales/de.yml @@ -0,0 +1,6 @@ +de: + google_analytics_directions: Bitte den Google Analytics-JavaScript-Code in das Textfeld einfügen und die gewünschten Tracking-Optionen auswählen. + google_analytics_code_label: Google Analytics-Code (inklusive