radiant-globalize2-extension 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.8
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
- @stylesheets << 'admin/globalize2'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
- unless @page && @page.new_record?
|
|
4
|
+
#globalize
|
|
5
|
+
%input{:type => "hidden", :name => "locale", :value => I18n.locale.to_s }
|
|
6
|
+
.edit
|
|
7
|
+
%span
|
|
8
|
+
- Globalize2Extension.locales.map do |locale|
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
= link_to_unless(Globalize2Extension.content_locale == locale, "<img src='/images/admin/#{locale.downcase}.gif' alt='#{locale.upcase}' />", params.merge(:content_locale => locale))
|
|
11
|
+
- if !@page.nil? && Globalize2Extension.content_locale == locale
|
|
12
|
+
- if Globalize2Extension.content_locale != Globalize2Extension.default_language
|
|
13
|
+
- if @page.translated_locales.include?(locale.to_sym)
|
|
14
|
+
%span.translated
|
|
15
|
+
%label{:for => "reset_translations"}
|
|
16
|
+
%input{:type => "checkbox", :value => "true", :name => "page[reset_translations]", :id => "reset_translations"}
|
|
17
|
+
Delete
|
|
18
|
+
=Globalize2Extension.content_locale.to_s.upcase
|
|
19
|
+
translation
|
|
20
|
+
- else
|
|
21
|
+
%span.not-translated (not translated)
|
|
19
22
|
- else
|
|
20
|
-
%span
|
|
21
|
-
- else
|
|
22
|
-
%span (default)
|
|
23
|
+
%span (default)
|
data/globalize2_extension.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
require 'globalize2/form_builder_extensions'
|
|
4
4
|
|
|
5
5
|
class Globalize2Extension < Radiant::Extension
|
|
6
|
-
version "0.2.
|
|
6
|
+
version "0.2.8"
|
|
7
7
|
description "Translate content in Radiant CMS using the Globalize2 Rails plugin."
|
|
8
8
|
url "http://blog.aissac.ro/radiant/globalize2-extension/"
|
|
9
9
|
|
|
@@ -12,6 +12,14 @@ module Globalize2
|
|
|
12
12
|
|
|
13
13
|
response_for :update
|
|
14
14
|
end
|
|
15
|
+
|
|
16
|
+
def create
|
|
17
|
+
I18n.with_locale(Globalize2Extension.content_locale) do
|
|
18
|
+
model.update_attributes!(params[model_symbol])
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
response_for :create
|
|
22
|
+
end
|
|
15
23
|
|
|
16
24
|
private
|
|
17
25
|
def set_content_locale
|
|
@@ -7,7 +7,7 @@ module Globalize2
|
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def reset_locale
|
|
10
|
-
Globalize2Extension.content_locale = session[:content_locale] = Globalize2Extension.default_language
|
|
10
|
+
Globalize2Extension.content_locale = session[:content_locale] = Globalize2Extension.default_language
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: radiant-globalize2-extension
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 7
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 2
|
|
9
|
-
-
|
|
10
|
-
version: 0.2.
|
|
9
|
+
- 8
|
|
10
|
+
version: 0.2.8
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Cristi Duma
|
|
@@ -21,7 +21,7 @@ autorequire:
|
|
|
21
21
|
bindir: bin
|
|
22
22
|
cert_chain: []
|
|
23
23
|
|
|
24
|
-
date: 2011-
|
|
24
|
+
date: 2011-04-04 00:00:00 +02:00
|
|
25
25
|
default_executable:
|
|
26
26
|
dependencies:
|
|
27
27
|
- !ruby/object:Gem::Dependency
|