afalkear_translation_center 1.8.1 → 1.8.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b2b57d3659082d26b3d8b7b2cb456f830567afd
|
4
|
+
data.tar.gz: 9cd6c585174bcba3060f51995dc3a3b634d5292b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d0c12356d36d1805eac589883a577358d74214edb1478e834eae63f76e4068d0225acc78ff389b79ec823ac77c93ac3bf3039579f782c406723e5ca9b56684b
|
7
|
+
data.tar.gz: d019ced5eab1923e31e6664d402272cc07feba7e98436bc5275dfcac0b27658a6ebaf4db5d5c3b1c1fe47f983dc1a6eb20bc121a77389b5286454847ba8f1707
|
@@ -63,5 +63,15 @@ module TranslationCenter
|
|
63
63
|
params.permit!
|
64
64
|
end
|
65
65
|
|
66
|
+
def update_language
|
67
|
+
begin
|
68
|
+
TranslationCenter.db2yaml(params[:lang])
|
69
|
+
flash[:success] = "Language #{params[:lang]} updated"
|
70
|
+
rescue Exception => e
|
71
|
+
flash[:warning] = "Language #{params[:lang]} could not be updated. Reason: #{e}"
|
72
|
+
end
|
73
|
+
redirect_to dashboard_path
|
74
|
+
end
|
75
|
+
|
66
76
|
end
|
67
77
|
end
|
@@ -1,3 +1,9 @@
|
|
1
|
+
#flash-display
|
2
|
+
- flash.each do |type, msg|
|
3
|
+
%div{:class => "alert alert-#{type == :notice ? "success" : type} fadeout", "data-dismiss" => "alert"}
|
4
|
+
%button.close ×
|
5
|
+
= msg if msg.is_a?(String)
|
6
|
+
|
1
7
|
%h1
|
2
8
|
= t('.controls')
|
3
9
|
|
@@ -30,6 +36,8 @@
|
|
30
36
|
= t('.pending')
|
31
37
|
%th
|
32
38
|
= t('.untranslated')
|
39
|
+
%th
|
40
|
+
= 'Update language in page'
|
33
41
|
|
34
42
|
|
35
43
|
%tbody
|
@@ -48,6 +56,8 @@
|
|
48
56
|
= "#{@stats[lang]['pending_count']}(#{@stats[lang]['pending_percentage']}%)"
|
49
57
|
%td
|
50
58
|
= "#{@stats[lang]['untranslated_count']}(#{@stats[lang]['untranslated_percentage']}%)"
|
59
|
+
%td
|
60
|
+
= link_to "Update language", update_language_path(lang: lang.to_s)
|
51
61
|
%h1
|
52
62
|
= t('.activity')
|
53
63
|
.span12
|
data/config/routes.rb
CHANGED
@@ -23,6 +23,7 @@ TranslationCenter::Engine.routes.draw do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
get '/dashboard' => 'center#dashboard', as: :dashboard
|
26
|
+
get '/update_language' => 'center#update_language'
|
26
27
|
get '/search_activity' => 'center#search_activity', as: :search_activity
|
27
28
|
post '/manage_translations' => 'center#manage', as: :manage_translations
|
28
29
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: afalkear_translation_center
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- afalkear
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|