redmine_apijs 6.9.5 → 6.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README +18 -14
- data/app/controllers/apijs_controller.rb +1 -1
- data/app/views/application/_browser.html.erb +1 -1
- data/app/views/attachments/_links.html.erb +1 -1
- data/app/views/settings/_apijs.html.erb +36 -18
- data/assets/javascripts/apijs-redmine.js +3 -3
- data/assets/javascripts/apijs-redmine.min.js +1 -1
- data/assets/javascripts/apijs-redmine.min.js.map +1 -1
- data/assets/javascripts/apijs.min.js +3 -3
- data/assets/javascripts/apijs.min.js.map +1 -1
- data/assets/stylesheets/apijs-print.min.css +2 -2
- data/assets/stylesheets/apijs-print.min.css.map +1 -1
- data/assets/stylesheets/apijs-redmine-rtl.min.css +2 -2
- data/assets/stylesheets/apijs-redmine-rtl.min.css.map +1 -1
- data/assets/stylesheets/apijs-redmine.css +8 -10
- data/assets/stylesheets/apijs-redmine.min.css +2 -2
- data/assets/stylesheets/apijs-redmine.min.css.map +1 -1
- data/assets/stylesheets/apijs-screen-rtl.min.css +3 -3
- data/assets/stylesheets/apijs-screen-rtl.min.css.map +1 -1
- data/assets/stylesheets/apijs-screen.min.css +3 -3
- data/assets/stylesheets/apijs-screen.min.css.map +1 -1
- data/config/locales/cs.yml +0 -2
- data/config/locales/de.yml +0 -2
- data/config/locales/el.yml +0 -2
- data/config/locales/en.yml +0 -2
- data/config/locales/es.yml +0 -2
- data/config/locales/fr.yml +0 -2
- data/config/locales/hu.yml +0 -2
- data/config/locales/it.yml +0 -2
- data/config/locales/ja.yml +0 -2
- data/config/locales/nl.yml +0 -2
- data/config/locales/pl.yml +0 -2
- data/config/locales/pt-BR.yml +0 -2
- data/config/locales/pt.yml +0 -2
- data/config/locales/ro.yml +0 -2
- data/config/locales/ru.yml +0 -2
- data/config/locales/sk.yml +0 -2
- data/config/locales/tr.yml +1 -3
- data/config/locales/uk.yml +0 -2
- data/config/locales/zh.yml +0 -2
- data/config/routes.rb +1 -1
- data/init.rb +2 -2
- data/lib/apijs_attachment.rb +1 -1
- data/lib/apijs_files.rb +1 -1
- data/lib/image.py +106 -97
- data/lib/redmine_apijs.rb +1 -1
- data/lib/useragentparser.rb +6 -6
- data/redmine_apijs.gemspec +1 -1
- metadata +3 -3
data/config/locales/cs.yml
CHANGED
@@ -6,7 +6,6 @@ cs:
|
|
6
6
|
apijs_title_download: "Stáhnout (%{v})"
|
7
7
|
apijs_title_files: "Files list"
|
8
8
|
apijs_config_apijs: "Obecné"
|
9
|
-
apijs_config_enable: "Enable apijs"
|
10
9
|
apijs_example1_title: "PHP manual"
|
11
10
|
apijs_example1_text: "It is important to note that just because the mail was accepted for delivery, it doesn't mean the mail will actually reach the intended destination."
|
12
11
|
apijs_example: "Například %{v}"
|
@@ -15,7 +14,6 @@ cs:
|
|
15
14
|
apijs_example2_link: "Webové stránky: %{v}"
|
16
15
|
apijs_config_sort_order: "Sort files alphabetically"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) Edit files description"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Remove files"
|
data/config/locales/de.yml
CHANGED
@@ -6,7 +6,6 @@ de:
|
|
6
6
|
apijs_title_download: "Download (%{v})"
|
7
7
|
apijs_title_files: "Liste der Dateien"
|
8
8
|
apijs_config_apijs: "Allgemein"
|
9
|
-
apijs_config_enable: "Apijs aktivieren"
|
10
9
|
apijs_example1_title: "PHP-Handbuch"
|
11
10
|
apijs_example1_text: "Dass eine E-Mail für den Versand akzeptiert wurde, bedeutet nicht, dass sie auch wirklich den gewünschten Empfänger erreichen wird."
|
12
11
|
apijs_example: "Beispiel %{v}"
|
@@ -15,7 +14,6 @@ de:
|
|
15
14
|
apijs_example2_link: "Website: %{v}"
|
16
15
|
apijs_config_sort_order: "Dateien alphabetisch sortieren"
|
17
16
|
apijs_config_browser: "Browser Version überprüfen"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (überprüft ebenfalls ob apijs aktiviert ist)."
|
19
17
|
permission_edit_attachments: "(apijs) Beschreibung der Datei bearbeiten"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Datei löschen"
|
data/config/locales/el.yml
CHANGED
@@ -6,7 +6,6 @@ el:
|
|
6
6
|
apijs_title_download: "Λήψη Αρχείου (%{v})"
|
7
7
|
apijs_title_files: "Files list"
|
8
8
|
apijs_config_apijs: "Γενικά"
|
9
|
-
apijs_config_enable: "Enable apijs"
|
10
9
|
apijs_example1_title: "PHP manual"
|
11
10
|
apijs_example1_text: "It is important to note that just because the mail was accepted for delivery, it doesn't mean the mail will actually reach the intended destination."
|
12
11
|
apijs_example: "Example %{v}"
|
@@ -15,7 +14,6 @@ el:
|
|
15
14
|
apijs_example2_link: "Ιστότοπος: %{v}"
|
16
15
|
apijs_config_sort_order: "Sort files alphabetically"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) Edit files description"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Remove files"
|
data/config/locales/en.yml
CHANGED
@@ -6,7 +6,6 @@ en:
|
|
6
6
|
apijs_title_download: "Download (%{v})"
|
7
7
|
apijs_title_files: "Files list"
|
8
8
|
apijs_config_apijs: "General"
|
9
|
-
apijs_config_enable: "Enable apijs"
|
10
9
|
apijs_example1_title: "PHP manual"
|
11
10
|
apijs_example1_text: "It is important to note that just because the mail was accepted for delivery, it doesn't mean the mail will actually reach the intended destination."
|
12
11
|
apijs_example: "Example %{v}"
|
@@ -15,7 +14,6 @@ en:
|
|
15
14
|
apijs_example2_link: "Website: %{v}"
|
16
15
|
apijs_config_sort_order: "Sort files alphabetically"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) Edit files description"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Remove files"
|
data/config/locales/es.yml
CHANGED
@@ -6,7 +6,6 @@ es:
|
|
6
6
|
apijs_title_download: "Descargar (%{v})"
|
7
7
|
apijs_title_files: "Listar archivos"
|
8
8
|
apijs_config_apijs: "General"
|
9
|
-
apijs_config_enable: "Activar apijs"
|
10
9
|
apijs_example1_title: "Manual de PHP"
|
11
10
|
apijs_example1_text: "Es importante tener en cuenta que si el correo es aceptado para su envío, no quiere decir que el correo haya alcanzado el destino indicado."
|
12
11
|
apijs_example: "Ejemplo %{v}"
|
@@ -15,7 +14,6 @@ es:
|
|
15
14
|
apijs_example2_link: "Sitio Web: %{v}"
|
16
15
|
apijs_config_sort_order: "Ordenar archivos alfabéticamente"
|
17
16
|
apijs_config_browser: "Comprobar la versión del navegador"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (verifica incluso si el apijs esta desactivado)."
|
19
17
|
permission_edit_attachments: "(apijs) Editar descripción de archivos"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Borrar los archivos"
|
data/config/locales/fr.yml
CHANGED
@@ -6,7 +6,6 @@ fr:
|
|
6
6
|
apijs_title_download: "Télécharger (%{v})"
|
7
7
|
apijs_title_files: "Liste des fichiers"
|
8
8
|
apijs_config_apijs: "Général"
|
9
|
-
apijs_config_enable: "Activer l'apijs"
|
10
9
|
apijs_example1_title: "Manuel PHP"
|
11
10
|
apijs_example1_text: "Il est important de noter que ce n'est pas parce que l'email a été accepté pour livraison, qu'il arrivera à destination."
|
12
11
|
apijs_example: "Exemple %{v}"
|
@@ -15,7 +14,6 @@ fr:
|
|
15
14
|
apijs_example2_link: "Site internet : %{v}"
|
16
15
|
apijs_config_sort_order: "Trier les fichiers par ordre alphabétique"
|
17
16
|
apijs_config_browser: "Vérifier la version du navigateur"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (vérifie même si l'apijs est désactivé)."
|
19
17
|
permission_edit_attachments: "(apijs) Modifier la description des fichiers"
|
20
18
|
permission_rename_attachments: "(apijs) Renommer les fichiers"
|
21
19
|
permission_delete_attachments: "(apijs) Supprimer les fichiers"
|
data/config/locales/hu.yml
CHANGED
@@ -6,7 +6,6 @@ hu:
|
|
6
6
|
apijs_title_download: "Letöltés (%{v})"
|
7
7
|
apijs_title_files: "Files list"
|
8
8
|
apijs_config_apijs: "Általános"
|
9
|
-
apijs_config_enable: "Enable apijs"
|
10
9
|
apijs_example1_title: "PHP manual"
|
11
10
|
apijs_example1_text: "It is important to note that just because the mail was accepted for delivery, it doesn't mean the mail will actually reach the intended destination."
|
12
11
|
apijs_example: "Ppéldául %{v}"
|
@@ -15,7 +14,6 @@ hu:
|
|
15
14
|
apijs_example2_link: "Weboldal: %{v}"
|
16
15
|
apijs_config_sort_order: "Sort files alphabetically"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) Edit files description"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Remove files"
|
data/config/locales/it.yml
CHANGED
@@ -6,7 +6,6 @@ it:
|
|
6
6
|
apijs_title_download: "Scaricare (%{v})"
|
7
7
|
apijs_title_files: "Lista dei file"
|
8
8
|
apijs_config_apijs: "Generale"
|
9
|
-
apijs_config_enable: "Attivare l'apijs"
|
10
9
|
apijs_example1_title: "Manuale PHP"
|
11
10
|
apijs_example1_text: "È importante notare che il fatto che la mail sia stata accettata, non significa che arriverà a destinazione."
|
12
11
|
apijs_example: "Esempio %{v}"
|
@@ -15,7 +14,6 @@ it:
|
|
15
14
|
apijs_example2_link: "Sito internet: %{v}"
|
16
15
|
apijs_config_sort_order: "Ordinare i file in ordine alfabetico"
|
17
16
|
apijs_config_browser: "Verificare la versione del browser"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (verificare se l'apijs é disattivato)."
|
19
17
|
permission_edit_attachments: "(apijs) Modificare la descrizione dei file"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Eliminare i file"
|
data/config/locales/ja.yml
CHANGED
@@ -6,7 +6,6 @@ ja:
|
|
6
6
|
apijs_title_download: "ダウンロード(%{v})"
|
7
7
|
apijs_title_files: "Files list"
|
8
8
|
apijs_config_apijs: "全般"
|
9
|
-
apijs_config_enable: "Enable apijs"
|
10
9
|
apijs_example1_title: "PHP マニュアル"
|
11
10
|
apijs_example1_text: "メールの配送が受け入れられたかどうかが基準であることに注意しましょう。メールが実際にあて先に届いたかどうかでは「ありません」。"
|
12
11
|
apijs_example: "例%{v}"
|
@@ -15,7 +14,6 @@ ja:
|
|
15
14
|
apijs_example2_link: "ウェブサイト:%{v}"
|
16
15
|
apijs_config_sort_order: "Sort files alphabetically"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) Edit files description"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Remove files"
|
data/config/locales/nl.yml
CHANGED
@@ -6,7 +6,6 @@ nl:
|
|
6
6
|
apijs_title_download: "Download (%{v})"
|
7
7
|
apijs_title_files: "Files list"
|
8
8
|
apijs_config_apijs: "Algemeen"
|
9
|
-
apijs_config_enable: "Enable apijs"
|
10
9
|
apijs_example1_title: "PHP manual"
|
11
10
|
apijs_example1_text: "It is important to note that just because the mail was accepted for delivery, it doesn't mean the mail will actually reach the intended destination."
|
12
11
|
apijs_example: "Voorbeeld %{v}"
|
@@ -15,7 +14,6 @@ nl:
|
|
15
14
|
apijs_example2_link: "Website: %{v}"
|
16
15
|
apijs_config_sort_order: "Sort files alphabetically"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) Edit files description"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Remove files"
|
data/config/locales/pl.yml
CHANGED
@@ -6,7 +6,6 @@ pl:
|
|
6
6
|
apijs_title_download: "Pobierz (%{v})"
|
7
7
|
apijs_title_files: "Files list"
|
8
8
|
apijs_config_apijs: "Ogólne"
|
9
|
-
apijs_config_enable: "Enable apijs"
|
10
9
|
apijs_example1_title: "Podręcznik PHP"
|
11
10
|
apijs_example1_text: "Ważną informacją jest to, że pomimo iż e-mail został zaakceptowany do wysłania, to nie oznacza, że będzie on już w tej chwili wysyłany do odbiorców."
|
12
11
|
apijs_example: "Przykład %{v}"
|
@@ -15,7 +14,6 @@ pl:
|
|
15
14
|
apijs_example2_link: "Witryna: %{v}"
|
16
15
|
apijs_config_sort_order: "Sort files alphabetically"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) Edit files description"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Remove files"
|
data/config/locales/pt-BR.yml
CHANGED
@@ -6,7 +6,6 @@ pt-BR:
|
|
6
6
|
apijs_title_download: "Baixar (%{v})"
|
7
7
|
apijs_title_files: "Files list"
|
8
8
|
apijs_config_apijs: "Geral"
|
9
|
-
apijs_config_enable: "Enable apijs"
|
10
9
|
apijs_example1_title: "Manual do PHP"
|
11
10
|
apijs_example1_text: "É importante notar que somente pelo o e-mail ser aceito para entrega, não significa que o e-mail alcancará o destino esperado."
|
12
11
|
apijs_example: "Exemplo %{v}"
|
@@ -15,7 +14,6 @@ pt-BR:
|
|
15
14
|
apijs_example2_link: "Sítio Web: %{v}"
|
16
15
|
apijs_config_sort_order: "Sort files alphabetically"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) Edit files description"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Remove files"
|
data/config/locales/pt.yml
CHANGED
@@ -6,7 +6,6 @@ pt:
|
|
6
6
|
apijs_title_download: "Descarregar (%{v})"
|
7
7
|
apijs_title_files: "Lista dos ficheiros"
|
8
8
|
apijs_config_apijs: "Geral"
|
9
|
-
apijs_config_enable: "Ativar apijs"
|
10
9
|
apijs_example1_title: "Manual do PHP"
|
11
10
|
apijs_example1_text: "É importante notar que somente pelo o e-mail ser aceito para entrega, não significa que o e-mail alcancará o destino esperado."
|
12
11
|
apijs_example: "Exemplo %{v}"
|
@@ -15,7 +14,6 @@ pt:
|
|
15
14
|
apijs_example2_link: "Sítio Web: %{v}"
|
16
15
|
apijs_config_sort_order: "Ordenar os ficheiros por ordem alfabética"
|
17
16
|
apijs_config_browser: "Verificar a versão do navegador"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (verifica mesmo que apijs esteja desativado)."
|
19
17
|
permission_edit_attachments: "(apijs) Modificar a descrição dos ficheiros"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Suprimir os ficheiros"
|
data/config/locales/ro.yml
CHANGED
@@ -6,7 +6,6 @@ ro:
|
|
6
6
|
apijs_title_download: "Descarcă (%{v})"
|
7
7
|
apijs_title_files: "Files list"
|
8
8
|
apijs_config_apijs: "General"
|
9
|
-
apijs_config_enable: "Enable apijs"
|
10
9
|
apijs_example1_title: "Manualul PHP"
|
11
10
|
apijs_example1_text: "Este important să știți că cu toate că mesajul a fost acceptat spre trimitere, aceasta NU înseamnă că mesajul într-adevăr va ajunge la destinație."
|
12
11
|
apijs_example: "Exemplu %{v}"
|
@@ -15,7 +14,6 @@ ro:
|
|
15
14
|
apijs_example2_link: "Site: %{v}"
|
16
15
|
apijs_config_sort_order: "Sort files alphabetically"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) Edit files description"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Remove files"
|
data/config/locales/ru.yml
CHANGED
@@ -6,7 +6,6 @@ ru:
|
|
6
6
|
apijs_title_download: "Скачать (%{v})"
|
7
7
|
apijs_title_files: "Список файлов"
|
8
8
|
apijs_config_apijs: "Основная"
|
9
|
-
apijs_config_enable: "Включить apijs"
|
10
9
|
apijs_example1_title: "Руководство по PHP"
|
11
10
|
apijs_example1_text: "Важно заметить, что то что письмо было принято для передачи вовсе не означает что оно достигло получателя."
|
12
11
|
apijs_example: "Пример %{v}"
|
@@ -15,7 +14,6 @@ ru:
|
|
15
14
|
apijs_example2_link: "Вебсайт: %{v}"
|
16
15
|
apijs_config_sort_order: "Сортировать файлы в алфавитном порядке"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) Редактировать описание файла"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Удалить файлы"
|
data/config/locales/sk.yml
CHANGED
@@ -6,7 +6,6 @@ sk:
|
|
6
6
|
apijs_title_download: "Prevziať (%{v})"
|
7
7
|
apijs_title_files: "Files list"
|
8
8
|
apijs_config_apijs: "Všeobecné"
|
9
|
-
apijs_config_enable: "Enable apijs"
|
10
9
|
apijs_example1_title: "PHP manual"
|
11
10
|
apijs_example1_text: "It is important to note that just because the mail was accepted for delivery, it doesn't mean the mail will actually reach the intended destination."
|
12
11
|
apijs_example: "Example %{v}"
|
@@ -15,7 +14,6 @@ sk:
|
|
15
14
|
apijs_example2_link: "Webstránka: %{v}"
|
16
15
|
apijs_config_sort_order: "Sort files alphabetically"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) Edit files description"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Remove files"
|
data/config/locales/tr.yml
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
tr:
|
2
2
|
apijs_check_extension: "Dosya uzantısı değiştirilemez."
|
3
3
|
apijs_clearcache_done: "Resim ön belleği temizlendi."
|
4
|
-
apijs_browser_warning: "<strong>
|
4
|
+
apijs_browser_warning: "<strong>Uyari :</strong> tarayıcınız <strong>%{n} %{v}</strong> eski, lütfen <a %{l}>güncelleyiniz</a>."
|
5
5
|
apijs_title_album: "Fotoğraf Galerisi"
|
6
6
|
apijs_title_download: "İndir (%{v})"
|
7
7
|
apijs_title_files: "Eklenti listesi"
|
8
8
|
apijs_config_apijs: "Genel"
|
9
|
-
apijs_config_enable: "Apijs etkinleştir"
|
10
9
|
apijs_example1_title: "PHP Kılavuzu"
|
11
10
|
apijs_example1_text: "Yalnız şuna dikkat edin : Epostanın sunucu tarafından teslim alınması, epostanın alıcısına ulaştığı anlamına gelmez."
|
12
11
|
apijs_example: "Örnek %{v}"
|
@@ -15,7 +14,6 @@ tr:
|
|
15
14
|
apijs_example2_link: "Web sitesi : %{v}"
|
16
15
|
apijs_config_sort_order: "Eklentileri alfabetik olarak sırala"
|
17
16
|
apijs_config_browser: "Tarayıcı versiyonunu kontrol et"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (apijs etkin değilken de kontrol edilir)."
|
19
17
|
permission_edit_attachments: "(apijs) Açıklama düzenle"
|
20
18
|
permission_rename_attachments: "(apijs) Dosya adı değiştir"
|
21
19
|
permission_delete_attachments: "(apijs) Dosya Sil"
|
data/config/locales/uk.yml
CHANGED
@@ -6,7 +6,6 @@ uk:
|
|
6
6
|
apijs_title_download: "Завантажити (%{v})"
|
7
7
|
apijs_title_files: "Files list"
|
8
8
|
apijs_config_apijs: "Загальні"
|
9
|
-
apijs_config_enable: "Enable apijs"
|
10
9
|
apijs_example1_title: "PHP manual"
|
11
10
|
apijs_example1_text: "It is important to note that just because the mail was accepted for delivery, it doesn't mean the mail will actually reach the intended destination."
|
12
11
|
apijs_example: "Example %{v}"
|
@@ -15,7 +14,6 @@ uk:
|
|
15
14
|
apijs_example2_link: "Вебсайт: %{v}"
|
16
15
|
apijs_config_sort_order: "Sort files alphabetically"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) Edit files description"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) Remove files"
|
data/config/locales/zh.yml
CHANGED
@@ -6,7 +6,6 @@ zh:
|
|
6
6
|
apijs_title_download: "下载(%{v})"
|
7
7
|
apijs_title_files: "文件列表"
|
8
8
|
apijs_config_apijs: "一般"
|
9
|
-
apijs_config_enable: "启用 apijs"
|
10
9
|
apijs_example1_title: "PHP手册"
|
11
10
|
apijs_example1_text: "值得注意的是,邮件发送完成并不意味着邮件将实际到达预定的目的地。"
|
12
11
|
apijs_example: "Example %{v}"
|
@@ -15,7 +14,6 @@ zh:
|
|
15
14
|
apijs_example2_link: "网站:%{v}"
|
16
15
|
apijs_config_sort_order: "按字母顺序排序文件"
|
17
16
|
apijs_config_browser: "Check browser version"
|
18
|
-
apijs_config_browser_help: "Firefox 36+, Chrome 32+, Opera 19+, Edge 16+, Safari 9+ (checks even if the apijs is disabled)."
|
19
17
|
permission_edit_attachments: "(apijs) 编辑文件说明"
|
20
18
|
permission_rename_attachments: "(apijs) Rename files"
|
21
19
|
permission_delete_attachments: "(apijs) 删除文件"
|
data/config/routes.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# Created J/12/12/2013
|
3
3
|
# Updated S/16/01/2021
|
4
4
|
#
|
5
|
-
# Copyright 2008-
|
5
|
+
# Copyright 2008-2024 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
|
6
6
|
# https://github.com/luigifab/redmine-apijs
|
7
7
|
#
|
8
8
|
# This program is free software, you can redistribute it or modify
|
data/init.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# Created L/21/05/2012
|
3
3
|
# Updated L/24/04/2023
|
4
4
|
#
|
5
|
-
# Copyright 2008-
|
5
|
+
# Copyright 2008-2024 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
|
6
6
|
# https://github.com/luigifab/redmine-apijs
|
7
7
|
#
|
8
8
|
# This program is free software, you can redistribute it or modify
|
@@ -46,7 +46,7 @@ Redmine::Plugin.register :redmine_apijs do
|
|
46
46
|
name 'Redmine Apijs plugin'
|
47
47
|
author 'Fabrice Creuzot'
|
48
48
|
description 'Integrate the apijs JavaScript library into Redmine. Provides a gallery for image and video attachments.'
|
49
|
-
version '6.9.
|
49
|
+
version '6.9.6-gem'
|
50
50
|
url 'https://www.luigifab.fr/redmine/apijs'
|
51
51
|
author_url 'https://www.luigifab.fr/'
|
52
52
|
|
data/lib/apijs_attachment.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# Created V/27/12/2013
|
3
3
|
# Updated V/02/09/2022
|
4
4
|
#
|
5
|
-
# Copyright 2008-
|
5
|
+
# Copyright 2008-2024 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
|
6
6
|
# https://github.com/luigifab/redmine-apijs
|
7
7
|
#
|
8
8
|
# This program is free software, you can redistribute it or modify
|
data/lib/apijs_files.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# Created L/21/05/2012
|
3
3
|
# Updated D/03/05/2020
|
4
4
|
#
|
5
|
-
# Copyright 2008-
|
5
|
+
# Copyright 2008-2024 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
|
6
6
|
# https://github.com/luigifab/redmine-apijs
|
7
7
|
#
|
8
8
|
# This program is free software, you can redistribute it or modify
|
data/lib/image.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
#!/usr/bin/python3
|
2
2
|
# -*- coding: utf8 -*-
|
3
3
|
# Created J/26/12/2013
|
4
|
-
# Updated J/
|
4
|
+
# Updated J/19/10/2023
|
5
5
|
#
|
6
|
-
# Copyright 2008-
|
6
|
+
# Copyright 2008-2024 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
|
7
7
|
# Copyright 2020-2023 | Fabrice Creuzot <fabrice~cellublue~com>
|
8
8
|
# https://github.com/luigifab/redmine-apijs https://github.com/luigifab/openmage-apijs
|
9
9
|
#
|
@@ -30,7 +30,7 @@ except:
|
|
30
30
|
print('source: all supported format by python-pil (including animated gif/png/webp),')
|
31
31
|
print(' or all supported format by ffmpegthumbnailer,')
|
32
32
|
print(' or svg')
|
33
|
-
print('destination: jpg,gif,
|
33
|
+
print('destination: jpg,png,gif,webp or svg')
|
34
34
|
exit(-1)
|
35
35
|
|
36
36
|
# https://stackoverflow.com/a/273227/2980105
|
@@ -44,7 +44,7 @@ if os.path.isfile(fileout):
|
|
44
44
|
os.close(os.open(fileout, os.O_CREAT))
|
45
45
|
|
46
46
|
|
47
|
-
#
|
47
|
+
# Tools
|
48
48
|
def versionTuple(v):
|
49
49
|
return tuple(map(int, (v.split('.'))))
|
50
50
|
|
@@ -260,104 +260,113 @@ def saveJpg(dest, fileout, quality):
|
|
260
260
|
dest.convert('RGB').save(fileout, 'JPEG', optimize=True, subsampling=0, quality=quality)
|
261
261
|
|
262
262
|
|
263
|
-
#
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
#
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
if '.ogv' in filein or '.webm' in filein or '.mp4' in filein:
|
278
|
-
# from video
|
279
|
-
source = videoToImage(filein, fileout, size)
|
280
|
-
imgext = 'VIDEO'
|
281
|
-
else:
|
282
|
-
# from image
|
283
|
-
source = Image.open(filein)
|
284
|
-
imgext = source.format
|
285
|
-
size = calcSize(source, size)
|
286
|
-
|
287
|
-
# filein = fileout = /tmp/phpA5kbkc when replace tmp image with re-sampled copy to exclude images with malicious data
|
288
|
-
# @todo for animated GIF to animated GIF (or PNG), sadly, result file is not optimized, the idea is to reprocess the file to not replace each frames by another one
|
289
|
-
# for my test image, https://github.com/kohler/gifsicle, don't do it, but https://kraken.io/web-interface do it
|
290
|
-
if imgext == 'GIF' and (same or '.gif' in fileout):
|
291
|
-
dest = resizeAnimatedGif(source, size, fixed)
|
292
|
-
saveGif(dest, fileout, quality)
|
293
|
-
elif imgext == 'GIF' and ( '.png' in fileout): # @todo
|
294
|
-
dest = resizeAnimatedGif(source, size, fixed)
|
295
|
-
savePng(dest, fileout, quality)
|
296
|
-
elif imgext == 'GIF' and ( '.webp' in fileout):
|
297
|
-
dest = resizeAnimatedGif(source, size, fixed)
|
298
|
-
saveWebp(dest, fileout, quality)
|
299
|
-
elif imgext == 'PNG' and (same or '.png' in fileout):
|
300
|
-
dest = resizeAnimatedPng(source, size, fixed)
|
301
|
-
savePng(dest, fileout, quality)
|
302
|
-
elif imgext == 'PNG' and ( '.gif' in fileout):
|
303
|
-
dest = resizeAnimatedPng(source, size, fixed)
|
304
|
-
saveGif(dest, fileout, quality)
|
305
|
-
elif imgext == 'PNG' and ( '.webp' in fileout):
|
306
|
-
dest = resizeAnimatedPng(source, size, fixed)
|
307
|
-
saveWebp(dest, fileout, quality)
|
308
|
-
elif imgext == 'WEBP' and (same or '.webp' in fileout):
|
309
|
-
dest = resizeAnimatedWebp(source, size, fixed)
|
310
|
-
saveWebp(dest, fileout, quality)
|
263
|
+
# action
|
264
|
+
# drop fileout on error (and filein if same)
|
265
|
+
try:
|
266
|
+
# python-scour
|
267
|
+
if '.svg' in fileout:
|
268
|
+
from scour.scour import sanitizeOptions, start
|
269
|
+
options = sanitizeOptions()
|
270
|
+
options.strip_xml_prolog = True # --strip-xml-prolog
|
271
|
+
options.remove_metadata = True # --remove-metadata
|
272
|
+
options.strip_comments = True # --enable-comment-stripping
|
273
|
+
options.strip_ids = True # --enable-id-stripping
|
274
|
+
options.indent_type = None # --indent=none
|
275
|
+
start(options, open(filein, 'rb'), open(fileout, 'wb'))
|
276
|
+
# python-pil
|
311
277
|
else:
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
pixels = source.getcolors(size[0] * size[1])
|
319
|
-
pixels = sorted(pixels, key=lambda t: t[0])
|
320
|
-
if (pixels[-1][1] > (127,127,127)):
|
321
|
-
dest = Image.new('RGBA', size, (255,255,255,0))
|
322
|
-
dest.paste(source, (offset_x, offset_y))
|
323
|
-
# https://stackoverflow.com/a/59082116 (replace only last lib)
|
324
|
-
# /var/lib/gems/xyz/gems/redmine_apijs-xyz/lib » /var/lib/gems/xyz/gems/redmine_apijs-xyz/assets/images/...
|
325
|
-
path = os.path.dirname(__file__)
|
326
|
-
path = ('/assets/images/apijs/player-black-' + str(size[0]) + '.png').join(path.rsplit('/lib', 1))
|
327
|
-
play = Image.open(path)
|
328
|
-
dest.paste(play, (0, 0), play)
|
329
|
-
else:
|
330
|
-
dest = Image.new('RGBA', size, (0,0,0,0))
|
331
|
-
dest.paste(source, (offset_x, offset_y))
|
332
|
-
# https://stackoverflow.com/a/59082116 (replace only last lib)
|
333
|
-
# /var/lib/gems/xyz/gems/redmine_apijs-xyz/lib » /var/lib/gems/xyz/gems/redmine_apijs-xyz/assets/images/...
|
334
|
-
path = os.path.dirname(__file__)
|
335
|
-
path = ('/assets/images/apijs/player-white-' + str(size[0]) + '.png').join(path.rsplit('/lib', 1))
|
336
|
-
play = Image.open(path)
|
337
|
-
dest.paste(play, (0, 0), play)
|
278
|
+
from PIL import Image, ImageSequence
|
279
|
+
|
280
|
+
# from video or image
|
281
|
+
if '.ogv' in filein or '.webm' in filein or '.mp4' in filein:
|
282
|
+
source = videoToImage(filein, fileout, size)
|
283
|
+
imgext = 'VIDEO'
|
338
284
|
else:
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
if hasTransparency(source) is False:
|
349
|
-
dest = dest.convert('RGB')
|
350
|
-
|
351
|
-
if '.gif' in fileout or (same and imgext == 'GIF'):
|
285
|
+
source = Image.open(filein)
|
286
|
+
imgext = source.format
|
287
|
+
size = calcSize(source, size)
|
288
|
+
|
289
|
+
# filein = fileout = /tmp/phpA5kbkc when replace tmp image with re-sampled copy to exclude images with malicious data
|
290
|
+
# @todo for animated GIF to animated GIF (or PNG), sadly, result file is not optimized, the idea is to reprocess the file to not replace each frames by another one
|
291
|
+
# for my test image, https://github.com/kohler/gifsicle, don't do it, but https://kraken.io/web-interface do it
|
292
|
+
if imgext == 'GIF' and (same or '.gif' in fileout):
|
293
|
+
dest = resizeAnimatedGif(source, size, fixed)
|
352
294
|
saveGif(dest, fileout, quality)
|
353
|
-
elif '.png' in fileout
|
295
|
+
elif imgext == 'GIF' and ( '.png' in fileout): # @todo
|
296
|
+
dest = resizeAnimatedGif(source, size, fixed)
|
354
297
|
savePng(dest, fileout, quality)
|
355
|
-
elif '.webp' in fileout
|
298
|
+
elif imgext == 'GIF' and ( '.webp' in fileout):
|
299
|
+
dest = resizeAnimatedGif(source, size, fixed)
|
300
|
+
saveWebp(dest, fileout, quality)
|
301
|
+
elif imgext == 'PNG' and (same or '.png' in fileout):
|
302
|
+
dest = resizeAnimatedPng(source, size, fixed)
|
303
|
+
savePng(dest, fileout, quality)
|
304
|
+
elif imgext == 'PNG' and ( '.gif' in fileout):
|
305
|
+
dest = resizeAnimatedPng(source, size, fixed)
|
306
|
+
saveGif(dest, fileout, quality)
|
307
|
+
elif imgext == 'PNG' and ( '.webp' in fileout):
|
308
|
+
dest = resizeAnimatedPng(source, size, fixed)
|
309
|
+
saveWebp(dest, fileout, quality)
|
310
|
+
elif imgext == 'WEBP' and (same or '.webp' in fileout):
|
311
|
+
dest = resizeAnimatedWebp(source, size, fixed)
|
356
312
|
saveWebp(dest, fileout, quality)
|
357
313
|
else:
|
358
|
-
|
314
|
+
if imgext == 'VIDEO':
|
315
|
+
# from video
|
316
|
+
offset_x = max(int((size[0] - source.size[0]) / 2), 0)
|
317
|
+
offset_y = max(int((size[1] - source.size[1]) / 2), 0)
|
318
|
+
# Color detection
|
319
|
+
# white background black player OR black background white player
|
320
|
+
pixels = source.getcolors(size[0] * size[1])
|
321
|
+
pixels = sorted(pixels, key=lambda t: t[0])
|
322
|
+
if (pixels[-1][1] > (127,127,127)):
|
323
|
+
dest = Image.new('RGBA', size, (255,255,255,0))
|
324
|
+
dest.paste(source, (offset_x, offset_y))
|
325
|
+
# https://stackoverflow.com/a/59082116 (replace only last lib)
|
326
|
+
# /var/lib/gems/xyz/gems/redmine_apijs-xyz/lib » /var/lib/gems/xyz/gems/redmine_apijs-xyz/assets/images/...
|
327
|
+
path = os.path.dirname(__file__)
|
328
|
+
path = ('/assets/images/apijs/player-black-' + str(size[0]) + '.png').join(path.rsplit('/lib', 1))
|
329
|
+
play = Image.open(path)
|
330
|
+
dest.paste(play, (0, 0), play)
|
331
|
+
else:
|
332
|
+
dest = Image.new('RGBA', size, (0,0,0,0))
|
333
|
+
dest.paste(source, (offset_x, offset_y))
|
334
|
+
# https://stackoverflow.com/a/59082116 (replace only last lib)
|
335
|
+
# /var/lib/gems/xyz/gems/redmine_apijs-xyz/lib » /var/lib/gems/xyz/gems/redmine_apijs-xyz/assets/images/...
|
336
|
+
path = os.path.dirname(__file__)
|
337
|
+
path = ('/assets/images/apijs/player-white-' + str(size[0]) + '.png').join(path.rsplit('/lib', 1))
|
338
|
+
play = Image.open(path)
|
339
|
+
dest.paste(play, (0, 0), play)
|
340
|
+
else:
|
341
|
+
# from image
|
342
|
+
# Auto rotate image
|
343
|
+
# https://github.com/python-pillow/Pillow/commit/1ba774ae7faf93355b85c7b005fbaf0b0e66d426
|
344
|
+
if hasattr(Image, '__version__') and versionTuple(Image.__version__) >= (6,0,0) and source.getexif().get(0x0112):
|
345
|
+
from PIL import ImageOps
|
346
|
+
source = ImageOps.exif_transpose(source)
|
347
|
+
# create thumbnail
|
348
|
+
dest = createThumb(source, size, fixed, True)
|
349
|
+
|
350
|
+
if hasTransparency(source) is False:
|
351
|
+
dest = dest.convert('RGB')
|
352
|
+
|
353
|
+
if '.gif' in fileout or (same and imgext == 'GIF'):
|
354
|
+
saveGif(dest, fileout, quality)
|
355
|
+
elif '.png' in fileout or (same and imgext == 'PNG'):
|
356
|
+
savePng(dest, fileout, quality)
|
357
|
+
elif '.webp' in fileout or (same and imgext == 'WEBP'):
|
358
|
+
saveWebp(dest, fileout, quality)
|
359
|
+
else:
|
360
|
+
saveJpg(dest, fileout, quality)
|
359
361
|
|
360
|
-
if os.path.isfile(fileout):
|
361
|
-
|
362
|
+
if os.path.isfile(fileout):
|
363
|
+
os.rename(fileout, fileout.replace('.save', ''))
|
364
|
+
|
365
|
+
exit(0)
|
366
|
+
except Exception as e:
|
367
|
+
if same and os.path.isfile(filein):
|
368
|
+
os.remove(filein)
|
369
|
+
if os.path.isfile(fileout):
|
370
|
+
os.remove(fileout)
|
371
|
+
raise e
|
362
372
|
|
363
|
-
exit(0)
|
data/lib/redmine_apijs.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# Created L/13/07/2020
|
3
3
|
# Updated V/05/08/2022
|
4
4
|
#
|
5
|
-
# Copyright 2008-
|
5
|
+
# Copyright 2008-2024 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
|
6
6
|
# https://github.com/luigifab/redmine-apijs
|
7
7
|
#
|
8
8
|
# This program is free software, you can redistribute it or modify
|