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: 69646acdae5b7eabc0f728139b1b7db558b2790f
4
- data.tar.gz: 49fdadb4ee9876aaa7f6eb690615891fc876fd33
3
+ metadata.gz: 7b2b57d3659082d26b3d8b7b2cb456f830567afd
4
+ data.tar.gz: 9cd6c585174bcba3060f51995dc3a3b634d5292b
5
5
  SHA512:
6
- metadata.gz: fc157974813ccb4676582850ed8c96c648597267c4e0fe52faa8f0577935974db2fd68ac59f0b1c6fb2337c2037a59cbf5c5af4b08c21ab44b011e16e2e77279
7
- data.tar.gz: cf13aa6718f7e325b3dbcd6632080b0dbe565a9cd96308b388ce75d2a2fa760ac35b1e5de8464a4612c5b5831e97ef671505ba51fa4b45bfd79ddbf9832809fe
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
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module TranslationCenter
2
- VERSION = "1.8.1"
2
+ VERSION = "1.8.2"
3
3
  end
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.1
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-05 00:00:00.000000000 Z
11
+ date: 2014-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails