refinerycms-images 1.0.11 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/refinery/admin/images_controller.rb +110 -0
- data/app/helpers/refinery/admin/images_helper.rb +24 -0
- data/app/models/refinery/image.rb +96 -0
- data/app/views/refinery/admin/images/_actions.html.erb +15 -0
- data/app/views/{admin → refinery/admin}/images/_existing_image.html.erb +13 -26
- data/app/views/{admin → refinery/admin}/images/_form.html.erb +11 -15
- data/app/views/{admin → refinery/admin}/images/_grid_view.html.erb +7 -5
- data/app/views/refinery/admin/images/_images.html.erb +2 -0
- data/app/views/{admin → refinery/admin}/images/_list_view.html.erb +0 -0
- data/app/views/{admin → refinery/admin}/images/_list_view_image.html.erb +7 -5
- data/app/views/refinery/admin/images/_records.html.erb +18 -0
- data/app/views/refinery/admin/images/edit.html.erb +1 -0
- data/app/views/refinery/admin/images/index.html.erb +6 -0
- data/app/views/{admin → refinery/admin}/images/insert.html.erb +10 -13
- data/app/views/refinery/admin/images/new.html.erb +1 -0
- data/config/locales/bg.yml +37 -36
- data/config/locales/cs.yml +37 -36
- data/config/locales/da.yml +37 -36
- data/config/locales/de.yml +37 -36
- data/config/locales/el.yml +37 -36
- data/config/locales/en.yml +37 -36
- data/config/locales/es.yml +38 -37
- data/config/locales/fi.yml +37 -36
- data/config/locales/fr.yml +37 -36
- data/config/locales/it.yml +47 -45
- data/config/locales/ja.yml +44 -0
- data/config/locales/ko.yml +44 -0
- data/config/locales/lt.yml +37 -36
- data/config/locales/lv.yml +37 -36
- data/config/locales/nb.yml +37 -37
- data/config/locales/nl.yml +36 -35
- data/config/locales/pl.yml +38 -37
- data/config/locales/pt-BR.yml +38 -37
- data/config/locales/rs.yml +37 -37
- data/config/locales/ru.yml +37 -36
- data/config/locales/sk.yml +37 -36
- data/config/locales/sl.yml +36 -35
- data/config/locales/sv.yml +37 -36
- data/config/locales/vi.yml +37 -36
- data/config/locales/zh-CN.yml +37 -36
- data/config/locales/zh-TW.yml +37 -36
- data/config/routes.rb +4 -7
- data/db/migrate/20100913234707_create_refinerycms_images_schema.rb +10 -18
- data/lib/generators/refinery/images/images_generator.rb +10 -0
- data/lib/generators/refinery/images/templates/config/initializers/refinery/images.rb.erb +41 -0
- data/lib/refinery/images.rb +25 -0
- data/lib/refinery/images/configuration.rb +54 -0
- data/lib/refinery/images/dragonfly.rb +54 -0
- data/lib/refinery/images/engine.rb +38 -0
- data/lib/refinery/images/validators.rb +7 -0
- data/lib/refinery/images/validators/image_size_validator.rb +19 -0
- data/lib/refinerycms-images.rb +1 -76
- data/refinerycms-images.gemspec +14 -91
- data/spec/factories/image.rb +5 -0
- data/{features/uploads → spec/fixtures}/beach.jpeg +0 -0
- data/spec/fixtures/fathead.png +0 -0
- data/spec/fixtures/image-with-dashes.jpg +0 -0
- data/spec/lib/generators/refinery/images/images_generator_spec.rb +29 -0
- data/spec/models/refinery/image_spec.rb +158 -0
- data/spec/requests/refinery/admin/images_spec.rb +103 -0
- metadata +116 -106
- data/app/controllers/admin/images_controller.rb +0 -106
- data/app/helpers/admin/images_helper.rb +0 -27
- data/app/models/image.rb +0 -116
- data/app/views/admin/images/_actions.html.erb +0 -16
- data/app/views/admin/images/_images.html.erb +0 -2
- data/app/views/admin/images/_records.html.erb +0 -18
- data/app/views/admin/images/edit.html.erb +0 -1
- data/app/views/admin/images/index.html.erb +0 -6
- data/app/views/admin/images/new.html.erb +0 -1
- data/config/locales/jp.yml +0 -43
- data/config/locales/lolcat.yml +0 -43
- data/features/manage_images.feature +0 -49
- data/features/step_definitions/image_steps.rb +0 -40
- data/features/support/factories.rb +0 -7
- data/features/support/paths.rb +0 -17
- data/features/uploads/id-rather-be-here.jpg +0 -0
- data/features/uploads/refinery_is_awesome.txt +0 -1
- data/lib/gemspec.rb +0 -38
- data/lib/generators/refinerycms_images_generator.rb +0 -8
- data/spec/models/image_spec.rb +0 -115
- data/spec/uploads/beach.jpeg +0 -0
data/config/locales/es.yml
CHANGED
@@ -1,44 +1,45 @@
|
|
1
1
|
es:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: Imágenes
|
6
|
+
description: Gestionar imágenes
|
7
|
+
article: femenino
|
8
|
+
admin:
|
9
|
+
images:
|
10
|
+
delete: Borrar esta imagen para siempre
|
11
|
+
edit: Editar esta imagen
|
12
|
+
form:
|
13
|
+
image: Imagen
|
14
|
+
use_current_image: Usar imagen actual
|
15
|
+
or: o
|
16
|
+
replace_image: " reemplazarla con esta otra..."
|
17
|
+
current_image: Imagen actual
|
18
|
+
maximum_image_size: El peso máximo para una imagen son %{bytes}.
|
19
|
+
actions:
|
20
|
+
create_new_image: Crear nueva imagen
|
21
|
+
records:
|
22
|
+
no_images_yet: Aún no hay imágenes. Haz click en "Crear nueva imagen" para añadir la primera.
|
23
|
+
index:
|
24
|
+
view:
|
25
|
+
switch_to: Cambiar a vista %{view_name}
|
26
|
+
list: lista
|
27
|
+
grid: cuadrícula
|
28
|
+
grid_view:
|
29
|
+
view_live_html: Ver imagen <br/><em>Abre en ventana nueva</em>
|
30
|
+
existing_image:
|
31
|
+
button_text: Insertar
|
32
|
+
resize_image: ¿Redimensionar la imagen?
|
33
|
+
size: Tamaño
|
34
|
+
insert:
|
35
|
+
existing_image: Imagen existente
|
36
|
+
new_image: Nueva imagen
|
36
37
|
activerecord:
|
37
38
|
models:
|
38
|
-
image: imagen
|
39
|
+
refinery/image: imagen
|
39
40
|
errors:
|
40
41
|
models:
|
41
|
-
image:
|
42
|
+
refinery/image:
|
42
43
|
blank: Debes indicar qué imagen quieres subir
|
43
|
-
|
44
|
+
too_big: La imagen debe pesar menos de %{size} bytes
|
44
45
|
incorrect_format: Tu imagen debe ser un archivo JPG, PNG o GIF
|
data/config/locales/fi.yml
CHANGED
@@ -1,43 +1,44 @@
|
|
1
1
|
fi:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: Kuvat
|
6
|
+
description: Hallitse kuvia
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: Poista tämä kuva ikuisesti
|
10
|
+
edit: Muokkaa tätä kuvaa
|
11
|
+
form:
|
12
|
+
image: Kuva
|
13
|
+
use_current_image: Käytä nykyistä kuvaa
|
14
|
+
or: tai
|
15
|
+
replace_image: " korvaa se tällä..."
|
16
|
+
current_image: Nykyinen kuva
|
17
|
+
maximum_image_size: Kuvan suurin mahdollinen koko on %{bytes}.
|
18
|
+
actions:
|
19
|
+
create_new_image: Lisää uusi kuva
|
20
|
+
records:
|
21
|
+
no_images_yet: Kuvia ei ole vielä lisätty. Paina "Lisää uusi kuva-" nappia lisätäksesi ensimmäisen kuvan.
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: "%{view_name}näkymä"
|
25
|
+
list: Lista
|
26
|
+
grid: Ruudukko
|
27
|
+
grid_view:
|
28
|
+
view_live_html: Katsele tätä kuvaa <br/><em>Avautuu uudessa ikkunassa</em>
|
29
|
+
existing_image:
|
30
|
+
button_text: Lisää
|
31
|
+
resize_image: Suurenna tai pienennä kuvaa?
|
32
|
+
size: Koko
|
33
|
+
insert:
|
34
|
+
existing_image: Kirjasto
|
35
|
+
new_image: Lisää
|
35
36
|
activerecord:
|
36
37
|
models:
|
37
|
-
image: kuva
|
38
|
+
refinery/image: kuva
|
38
39
|
errors:
|
39
40
|
models:
|
40
|
-
image:
|
41
|
+
refinery/image:
|
41
42
|
blank: Sinun pitää lähettää kuva
|
42
|
-
|
43
|
+
too_big: Kuvan tulee olla pienempi kuin %{size} megatavua kooltaan
|
43
44
|
incorrect_format: 'Kuvan pitää olla joko JPG, PNG tai GIF- muodossa'
|
data/config/locales/fr.yml
CHANGED
@@ -1,43 +1,44 @@
|
|
1
1
|
fr:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: Images
|
6
|
+
description: Gestion des images
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: Supprimer définitivement cette image
|
10
|
+
edit: Modifier cette image
|
11
|
+
form:
|
12
|
+
image: Image
|
13
|
+
use_current_image: Utiliser l'image actuelle
|
14
|
+
or: ou
|
15
|
+
replace_image: " la remplacer par celle-ci..."
|
16
|
+
current_image: Image actuelle
|
17
|
+
maximum_image_size: "La taille de l'image ne doit pas excéder %{bytes}."
|
18
|
+
actions:
|
19
|
+
create_new_image: Ajouter une image
|
20
|
+
records:
|
21
|
+
no_images_yet: "Il n'y a pas encore d'image. Cliquer sur 'Ajouter une image' pour en ajouter une."
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: Afficher sous forme de %{view_name}
|
25
|
+
list: liste
|
26
|
+
grid: grille
|
27
|
+
grid_view:
|
28
|
+
view_live_html: "Voir cette image<br/><em>Ouvre une nouvelle fenêtre</em>"
|
29
|
+
existing_image:
|
30
|
+
button_text: Insérer
|
31
|
+
resize_image: Redimensionner l'image ?
|
32
|
+
size: Taille
|
33
|
+
insert:
|
34
|
+
existing_image: Image existante
|
35
|
+
new_image: Nouvelle image
|
35
36
|
activerecord:
|
36
37
|
models:
|
37
|
-
image: image
|
38
|
+
refinery/image: image
|
38
39
|
errors:
|
39
40
|
models:
|
40
|
-
image:
|
41
|
+
refinery/image:
|
41
42
|
blank: Vous devez sélectionner une image à télécharger
|
42
|
-
|
43
|
+
too_big: L'image doit être plus petite que %{size} megaoctets
|
43
44
|
incorrect_format: 'Seules les images aux formats JPG, PNG or GIF sont acceptées'
|
data/config/locales/it.yml
CHANGED
@@ -1,49 +1,51 @@
|
|
1
1
|
it:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: Immagini
|
6
|
+
description: Gestione immagini
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: "Elimina l'immagine corrente"
|
10
|
+
edit: "Modifica l'immagine corrente"
|
11
|
+
form:
|
12
|
+
image: Immagine
|
13
|
+
use_current_image: "Usa l'immagine corrente"
|
14
|
+
or: o
|
15
|
+
replace_image: Sostituirla con questa...
|
16
|
+
current_image: Immagine corrente
|
17
|
+
maximum_image_size: "La dimensione massima per l'immagine è di %{bytes}."
|
18
|
+
actions:
|
19
|
+
create_new_image: Carica una nuova immagine
|
20
|
+
records:
|
21
|
+
no_images_yet: "Nessuna immagine presente. Fare clic su \"Carica una nuova immagine\" per aggiungere un'immagine."
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: 'Passa alla modalità di visualizzazione "%{view_name}"'
|
25
|
+
list: Lista
|
26
|
+
grid: Griglia
|
27
|
+
grid_view:
|
28
|
+
edit: Modifica questa immagine
|
29
|
+
view_live_html: Visualizza questa immagine <br/><em>Apri in una nuova finestra</em>
|
30
|
+
existing_image:
|
31
|
+
button_text: Inserisci
|
32
|
+
resize_image: "Ridimensionare l'immagine?"
|
33
|
+
size: Dimensioni
|
34
|
+
list_view_image:
|
35
|
+
edit_this_image: Modifica questa immagine
|
36
|
+
insert:
|
37
|
+
existing_image: Immagine Esistente
|
38
|
+
new_image: Nuova immagine
|
39
|
+
previous: Precedente
|
40
|
+
next: Successivo
|
41
|
+
submit_insert: Inserire
|
42
|
+
or: o
|
43
|
+
cancel: Annullare
|
43
44
|
activerecord:
|
44
45
|
errors:
|
45
46
|
models:
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
refinery:
|
48
|
+
image:
|
49
|
+
blank: "Devi selezionare un'immagine da caricare"
|
50
|
+
too_big: 'I files devono essere di dimensioni inferiori a %{size} bytes'
|
51
|
+
incorrect_format: "L'immagine deve essere in formato JPEG, PNG o GIF"
|
@@ -0,0 +1,44 @@
|
|
1
|
+
ja:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: 画像
|
6
|
+
description: 画像の編集
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: この画像を削除
|
10
|
+
edit: 画像を編集
|
11
|
+
form:
|
12
|
+
image: 画像
|
13
|
+
use_current_image: この画像を使用する
|
14
|
+
or: または
|
15
|
+
replace_image: " この画像と差し替える"
|
16
|
+
current_image: 選択されている画像
|
17
|
+
maximum_image_size: '画像は最大で %{bytes} までです。'
|
18
|
+
actions:
|
19
|
+
create_new_image: 画像を追加する
|
20
|
+
records:
|
21
|
+
no_images_yet: まだ画像はありません。「画像を追加する」をクリックして下さい。
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: '%{view_name}表示に切り替え'
|
25
|
+
list: リスト
|
26
|
+
grid: グリッド
|
27
|
+
grid_view:
|
28
|
+
view_live_html: 'この画像を<br/><em>新しいウィンドウで開く</em>'
|
29
|
+
existing_image:
|
30
|
+
button_text: 挿入
|
31
|
+
resize_image: サイズ変更
|
32
|
+
size: サイズ
|
33
|
+
insert:
|
34
|
+
existing_image: ライブラリ
|
35
|
+
new_image: アップロード
|
36
|
+
activerecord:
|
37
|
+
models:
|
38
|
+
refinery/image: 画像
|
39
|
+
errors:
|
40
|
+
models:
|
41
|
+
refinery/image:
|
42
|
+
blank: アップロードする画像を選択して下さい。
|
43
|
+
too_big: '画像は最大で%{size}MBまでです。'
|
44
|
+
incorrect_format: '使用出来る画像のフォーマットはJPG、GIFまたはPNGです。'
|
@@ -0,0 +1,44 @@
|
|
1
|
+
ko:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: 이미지
|
6
|
+
description: 이미지를 관리합니다.
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: 이 이미지 삭제
|
10
|
+
edit: 이 이미지 수정
|
11
|
+
form:
|
12
|
+
image: 이미지
|
13
|
+
use_current_image: 현재 이미지 사용
|
14
|
+
or: 또는
|
15
|
+
replace_image: " 이 이미지로 대체..."
|
16
|
+
current_image: 현재 이미지
|
17
|
+
maximum_image_size: 이미지의 최대 크기는 %{bytes}입니다.
|
18
|
+
actions:
|
19
|
+
create_new_image: 새 이미지 추가
|
20
|
+
records:
|
21
|
+
no_images_yet: 이미지가 없습니다. "새 이미지 추가"를 클릭하여 이미지를 추가하세요.
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: "%{view_name} 형식으로 보기"
|
25
|
+
list: 목록
|
26
|
+
grid: 격자
|
27
|
+
grid_view:
|
28
|
+
view_live_html: 이 이미지 보기 <br/><em>새 창에서 열림</em>
|
29
|
+
existing_image:
|
30
|
+
button_text: 삽입
|
31
|
+
resize_image: 크기를 변경하시겠습니까?
|
32
|
+
size: 크기
|
33
|
+
insert:
|
34
|
+
existing_image: 기존 이미지
|
35
|
+
new_image: 새 이미지
|
36
|
+
activerecord:
|
37
|
+
models:
|
38
|
+
refinery/image: 이미지
|
39
|
+
errors:
|
40
|
+
models:
|
41
|
+
refinery/image:
|
42
|
+
blank: 업로드할 이미지를 선택해주세요.
|
43
|
+
too_big: 이미지의 크기는 %{size}MB 이하여야 합니다.
|
44
|
+
incorrect_format: 'JPG, PNG 또는 GIF 형식의 이미지만 업로드할 수 있습니다.'
|
data/config/locales/lt.yml
CHANGED
@@ -1,43 +1,44 @@
|
|
1
1
|
lt:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_images:
|
5
|
+
title: Paveikslėliai
|
6
|
+
description: Valdyti paveikslėlius
|
7
|
+
admin:
|
8
|
+
images:
|
9
|
+
delete: Pašalinti paveikslėlį visam laikui
|
10
|
+
edit: Redaguoti paveikslėlį
|
11
|
+
form:
|
12
|
+
image: Paveikslėlis
|
13
|
+
use_current_image: Naudoti pasirinktą paveikslėlį
|
14
|
+
or: arba
|
15
|
+
replace_image: " pakeisti jį šiuo..."
|
16
|
+
current_image: Pasirinktas paveikslėlis
|
17
|
+
maximum_image_size: Maksimalus paveikslėlio dydis yra %{bytes}.
|
18
|
+
actions:
|
19
|
+
create_new_image: Pridėti naują paveikslėlį
|
20
|
+
records:
|
21
|
+
no_images_yet: Dar nėra paveikslėlių. Paspauskite "Pridėti naują paveikslėlį" norėdami sukurti jūsų pirmą paveikslėlį.
|
22
|
+
index:
|
23
|
+
view:
|
24
|
+
switch_to: Persijungti į %{view_name} vaizdą
|
25
|
+
list: sąrašo
|
26
|
+
grid: tinklelio
|
27
|
+
grid_view:
|
28
|
+
view_live_html: Peržiūrėti paveikslėlį <br/><em>Atsirado naujame lange</em>
|
29
|
+
existing_image:
|
30
|
+
button_text: Pridėti
|
31
|
+
resize_image: Keisti paveikslėlio išmatavimus?
|
32
|
+
size: Dydis
|
33
|
+
insert:
|
34
|
+
existing_image: Egzistuojantis paveikslėlis
|
35
|
+
new_image: Naujas paveikslėlis
|
35
36
|
activerecord:
|
36
37
|
models:
|
37
|
-
image: paveikslėlis
|
38
|
+
refinery/image: paveikslėlis
|
38
39
|
errors:
|
39
40
|
models:
|
40
|
-
image:
|
41
|
+
refinery/image:
|
41
42
|
blank: Turite nurodyti paveikslėlį įkėlimui
|
42
|
-
|
43
|
+
too_big: "Paveikslėlio dydis turėtų būti mažesnis, nei %{size} megabaitų"
|
43
44
|
incorrect_format: 'Paveikslėlis turi būti JPG, PNG arba GIF formatu'
|