i18n_gui 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README +2 -0
- data/app/controllers/translations_controller.rb +10 -0
- data/app/views/translations/index.html.erb +21 -0
- data/config/initializers/i18n_backend.rb +2 -0
- data/config/routes.rb +3 -0
- data/lib/i18n_gui/engine.rb +8 -0
- data/lib/i18n_gui.rb +1 -0
- metadata +70 -0
data/README
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
class TranslationsController < ApplicationController
|
2
|
+
def index
|
3
|
+
@translations = TRANSLATION_STORE
|
4
|
+
end
|
5
|
+
|
6
|
+
def create
|
7
|
+
I18n.backend.store_translations(params[:locale], {params[:key] => params[:value]}, :escape => false)
|
8
|
+
redirect_to translations_url, :notice => "Added translation"
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<h1>Translations</h1>
|
2
|
+
|
3
|
+
<ul>
|
4
|
+
<% @translations.keys.each do |key| %>
|
5
|
+
<li><%= key %>: <%= @translations[key] %></li>
|
6
|
+
<% end %>
|
7
|
+
</ul>
|
8
|
+
|
9
|
+
<h2>Add Translation</h2>
|
10
|
+
|
11
|
+
<%= form_tag translations_path do %>
|
12
|
+
<p>
|
13
|
+
<%= label_tag :locale %><br/>
|
14
|
+
<%= text_field_tag :key %>
|
15
|
+
</p>
|
16
|
+
<p>
|
17
|
+
<%= label_tag :value %> <br/>
|
18
|
+
<%= text_field_tag :value %>
|
19
|
+
</p>
|
20
|
+
<p><%= submit_tag "Submit" %></p>
|
21
|
+
<% end %>
|
data/config/routes.rb
ADDED
data/lib/i18n_gui.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'i18n_gui/engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
|
metadata
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: i18n_gui
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.3
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Louis Wrobel
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-05-19 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: redis
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
type: :runtime
|
25
|
+
version_requirements: *id001
|
26
|
+
description:
|
27
|
+
email:
|
28
|
+
executables: []
|
29
|
+
|
30
|
+
extensions: []
|
31
|
+
|
32
|
+
extra_rdoc_files:
|
33
|
+
- README
|
34
|
+
files:
|
35
|
+
- app/controllers/translations_controller.rb
|
36
|
+
- app/views/translations/index.html.erb
|
37
|
+
- config/initializers/i18n_backend.rb
|
38
|
+
- config/routes.rb
|
39
|
+
- lib/i18n_gui.rb
|
40
|
+
- lib/i18n_gui/engine.rb
|
41
|
+
- README
|
42
|
+
homepage:
|
43
|
+
licenses: []
|
44
|
+
|
45
|
+
post_install_message:
|
46
|
+
rdoc_options: []
|
47
|
+
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: "0"
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: "0"
|
62
|
+
requirements: []
|
63
|
+
|
64
|
+
rubyforge_project:
|
65
|
+
rubygems_version: 1.8.2
|
66
|
+
signing_key:
|
67
|
+
specification_version: 3
|
68
|
+
summary: Graphic interface for i18n
|
69
|
+
test_files: []
|
70
|
+
|