locales_panel 0.2.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -5
- data/app/controllers/locales_controller.rb +2 -1
- data/config/routes.rb +0 -1
- data/lib/locales_panel/routes.rb +5 -0
- data/lib/locales_panel/version.rb +1 -1
- data/lib/locales_panel.rb +2 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54d5e29f5e637167a857ac61147f515432326637
|
4
|
+
data.tar.gz: 79e039d9276a82cff37696143922a5c8d42a6b63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd2e248b8c3f6d07259a0a9cdbb7a4b39cfeb102c46bc35aa811a255405b588f944be01b0e2832f891025567a2eebeeedb6144657da8199e07c55008aab3c6a5
|
7
|
+
data.tar.gz: b92f04b9edda2996963017e2e3fc6dd4e165fc29e08a759dfd280c82f79493ed865879639a33b50ab906a62e327b9e1ab78188052fb7d790048e9c578869a8cf
|
data/README.md
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
Change translations directly in a published site.
|
4
4
|
|
5
|
-
Use by visiting `http://.../locales/edit`.
|
5
|
+
Use by visiting `http://.../locales/edit`.
|
6
|
+
|
7
|
+
Saving will overwrite YAML locale files.
|
6
8
|
|
7
9
|
# Installation
|
8
10
|
|
@@ -14,13 +16,27 @@ Run in console:
|
|
14
16
|
|
15
17
|
$ bundle
|
16
18
|
|
19
|
+
Add to config/routes.rb:
|
20
|
+
|
21
|
+
locales_panel
|
22
|
+
|
23
|
+
... or customize route with a scope, like:
|
24
|
+
|
25
|
+
scope :admin do
|
26
|
+
locales_panel
|
27
|
+
end
|
28
|
+
|
29
|
+
Set authorization in config/application.rb. It can be any before_filter you like. For devise:
|
30
|
+
|
31
|
+
def locales_panel_before_filter
|
32
|
+
authenticate_user!
|
33
|
+
end
|
34
|
+
|
17
35
|
# Join
|
18
36
|
|
19
|
-
Create pull request or contact on
|
37
|
+
Create pull request or [contact on chat](http://kapustka.net/chat?user=kapustka.maciek).
|
20
38
|
|
21
39
|
**todo**
|
22
|
-
- hook for authorization
|
23
|
-
- configurable route
|
24
40
|
- download link
|
25
41
|
- add to git link
|
26
42
|
- check with rails 3
|
@@ -28,4 +44,3 @@ Create pull request or contact on [skype chat](http://kapustka.net/chat?user=kap
|
|
28
44
|
- highlight untranslated
|
29
45
|
- translate editor itself
|
30
46
|
- css
|
31
|
-
- tests for indentation fix, security fix and I18n.reload
|
@@ -1,5 +1,6 @@
|
|
1
1
|
class LocalesController < ApplicationController
|
2
|
-
|
2
|
+
before_filter { try :locales_panel_before_filter }
|
3
|
+
before_action { @paths = Rails.configuration.i18n.load_path.delete_if { |path| path['/gems/'] } }
|
3
4
|
|
4
5
|
def edit
|
5
6
|
@files = []
|
data/config/routes.rb
CHANGED
data/lib/locales_panel.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locales_panel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Kasprzyk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- config/routes.rb
|
82
82
|
- lib/locales_panel.rb
|
83
83
|
- lib/locales_panel/engine.rb
|
84
|
+
- lib/locales_panel/routes.rb
|
84
85
|
- lib/locales_panel/version.rb
|
85
86
|
- lib/tasks/locales_panel_tasks.rake
|
86
87
|
homepage: https://github.com/lokson/locales_panel
|