]> source.dussan.org Git - redmine.git/commitdiff
Replace RMagick with MiniMagick (#30492).
authorGo MAEDA <maeda@farend.jp>
Wed, 14 Aug 2019 02:40:56 +0000 (02:40 +0000)
committerGo MAEDA <maeda@farend.jp>
Wed, 14 Aug 2019 02:40:56 +0000 (02:40 +0000)
Patch by Yuichi HARADA.

git-svn-id: http://svn.redmine.org/redmine/trunk@18366 e93f8b46-1217-0410-a6f0-8f06a7374b81

56 files changed:
Gemfile
app/controllers/admin_controller.rb
appveyor.yml
config/configuration.yml.example
config/locales/ar.yml
config/locales/az.yml
config/locales/bg.yml
config/locales/bs.yml
config/locales/ca.yml
config/locales/cs.yml
config/locales/da.yml
config/locales/de.yml
config/locales/el.yml
config/locales/en-GB.yml
config/locales/en.yml
config/locales/es-PA.yml
config/locales/es.yml
config/locales/et.yml
config/locales/eu.yml
config/locales/fa.yml
config/locales/fi.yml
config/locales/fr.yml
config/locales/gl.yml
config/locales/he.yml
config/locales/hr.yml
config/locales/hu.yml
config/locales/id.yml
config/locales/it.yml
config/locales/ja.yml
config/locales/ko.yml
config/locales/lt.yml
config/locales/lv.yml
config/locales/mk.yml
config/locales/mn.yml
config/locales/nl.yml
config/locales/no.yml
config/locales/pl.yml
config/locales/pt-BR.yml
config/locales/pt.yml
config/locales/ro.yml
config/locales/ru.yml
config/locales/sk.yml
config/locales/sl.yml
config/locales/sq.yml
config/locales/sr-YU.yml
config/locales/sr.yml
config/locales/sv.yml
config/locales/th.yml
config/locales/tr.yml
config/locales/uk.yml
config/locales/vi.yml
config/locales/zh-TW.yml
config/locales/zh.yml
lib/redmine.rb
lib/redmine/helpers/gantt.rb
test/functional/gantts_controller_test.rb

diff --git a/Gemfile b/Gemfile
index 6ec826bc5e1891fceca5f4c9d03117524d6bf46d..4dc35ee837e614e0c630dccf5c3e048ad12ebe52 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -29,9 +29,9 @@ group :openid do
   gem "rack-openid"
 end
 
-# Optional gem for exporting the gantt to a PNG file, not supported with jruby
-group :rmagick do
-  gem "rmagick", "~> 2.16.0"
+# Optional gem for exporting the gantt to a PNG file
+group :minimagick do
+  gem "mini_magick", "~> 4.9.5"
 end
 
 # Optional Markdown support, not for JRuby
index 322f7e5fb43e2ac8c95b97e2edbea1a86f376727..ac551339512f07ee95627eea1c248e888b0f8fc0 100644 (file)
@@ -76,7 +76,7 @@ class AdminController < ApplicationController
       [:text_default_administrator_account_changed, User.default_admin_account_changed?],
       [:text_file_repository_writable, File.writable?(Attachment.storage_path)],
       ["#{l :text_plugin_assets_writable} (./public/plugin_assets)",   File.writable?(Redmine::Plugin.public_directory)],
-      [:text_rmagick_available,        Object.const_defined?(:Magick)],
+      [:text_minimagick_available,     Object.const_defined?(:MiniMagick)],
       [:text_convert_available,        Redmine::Thumbnail.convert_available?],
       [:text_gs_available,             Redmine::Thumbnail.gs_available?]
     ]
index d5ea687bb578c7f3a895d9e2c169944a83528240..c5818a60ef87383e2b59eb0b6a888e5981f91a47 100644 (file)
@@ -13,7 +13,7 @@ install:
 build: off
 
 test_script:
-  - bundle install --without rmagick
+  - bundle install --without minimagick
   - set SCMS=mercurial
   - set RUN_ON_NOT_OFFICIAL=
   - set RUBY_VER=1.9
index 2422bb09f95021ff53f08f3e0118e0afa14e014d..a8b6be83c3cab1652922a988b665c4d2b52d47f9 100644 (file)
@@ -179,27 +179,25 @@ default:
   # the ImageMagick's `convert` binary. Used to generate attachment thumbnails.
   #imagemagick_convert_command:
 
-  # Configuration of RMagick font.
+  # Configuration of MiniMagick font.
   #
-  # Redmine uses RMagick in order to export gantt png.
-  # You don't need this setting if you don't install RMagick.
+  # Redmine uses MiniMagick in order to export a gantt chart to a PNG image.
+  # This setting is necessary to properly display CJK (Chinese, Japanese,
+  # and Korean) characters in the PNG image. Please make sure that the
+  # specified font is installed in the Redmine server.
   #
-  # In CJK (Chinese, Japanese and Korean),
-  # in order to show CJK characters correctly,
-  # you need to set this configuration.
+  # This setting is necessary only when CJK characters are used in gantt.
   #
-  # Because there is no standard font across platforms in CJK,
-  # you need to set a font installed in your server.
-  #
-  # This setting is not necessary in non CJK.
+  # Note that rmagick_font_path in prior to Redmine 4.1.0 has been renamed
+  # to minimagick_font_path.
   #
   # Examples for Japanese:
   #   Windows:
-  #     rmagick_font_path: C:\windows\fonts\msgothic.ttc
+  #     minimagick_font_path: C:\windows\fonts\msgothic.ttc
   #   Linux:
-  #     rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
+  #     minimagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
   #
-  rmagick_font_path:
+  minimagick_font_path:
 
   # Maximum number of simultaneous AJAX uploads
   #max_concurrent_ajax_uploads: 2
index 75a3039f0fdee81e7ec671364971631e2fee64a5..b4f7f519e1fb5d4de5676b0141965eeefa16fbb4 100644 (file)
@@ -977,7 +977,7 @@ ar:
   description_all_columns: كل الاعمدة
   description_issue_category_reassign: اختر التصنيف
   description_wiki_subpages_reassign: اختر صفحة جديدة
-  text_rmagick_available: RMagick available (optional)
+  text_minimagick_available: MiniMagick available (optional)
   text_wiki_page_destroy_question: This page has %{descendants} child page(s) and descendant(s). What do you want to do?
   text_repository_usernames_mapping: |-
     Select or update the Redmine user mapped to each username found in the repository log.
index 6cd375a1bc2386c8ed10b04dc87c2dba359a18e4..2cf453d693ef6e1cb5dbe4c743623266e576704e 100644 (file)
@@ -897,7 +897,7 @@ az:
   text_reassign_time_entries: 'Qeydiyyata alınmış vaxtı aşağıdakı tapşırığa keçir:'
   text_regexp_info: "məsələn: ^[A-Z0-9]+$"
   text_repository_usernames_mapping: "Saxlayıcının jurnalında tapılan adlarla bağlı olan Redmine istifadəçisini seçin və ya yeniləyin.\nEyni ad və e-poçta sahib olan istifadəçilər Redmine və saxlayıcıda avtomatik əlaqələndirilir."
-  text_rmagick_available: RMagick istifadəsi mümkündür (opsional olaraq)
+  text_minimagick_available: MiniMagick istifadəsi mümkündür (opsional olaraq)
   text_select_mail_notifications: Elektron poçta bildirişlərin göndərilməsi seçim edəcəyiniz hərəkətlərdən asılıdır.
   text_select_project_modules: 'Layihədə istifadə olunacaq modulları seçin:'
   text_status_changed_by_changeset: "%{value} redaksiyada reallaşdırılıb."
index d3bf8f41c81cf482cce7905e615bab7dfc98ff3e..21e4afd6c19433addd255369b26de471061c3c83 100644 (file)
@@ -1180,7 +1180,7 @@ bg:
   text_default_administrator_account_changed: Сменен фабричния администраторски профил
   text_file_repository_writable: Възможност за писане в хранилището с файлове
   text_plugin_assets_writable: Папката на приставките е разрешена за запис
-  text_rmagick_available: Наличен RMagick (по избор)
+  text_minimagick_available: Наличен MiniMagick (по избор)
   text_convert_available: Наличен ImageMagick convert (по избор)
   text_gs_available: Налична поддръжка за ImageMagick PDF (по избор)
   text_destroy_time_entries_question: "%{hours} часа са отделени на задачите, които искате да изтриете. Какво избирате?"
index fa85d2e16835d748e2d87d0be9dc535b9fb140be..48029db0cd0566957c1cd2d8fa3fc7c3dc346286 100644 (file)
@@ -762,7 +762,7 @@ bs:
   text_default_administrator_account_changed: Tekući administratorski račun je promjenjen
   text_file_repository_writable: U direktorij sa fajlovima koji su prilozi se može pisati
   text_plugin_assets_writable: U direktorij plugin-ova se može pisati
-  text_rmagick_available: RMagick je dostupan (opciono)
+  text_minimagick_available: MiniMagick je dostupan (opciono)
   text_destroy_time_entries_question: "%{hours} sahata je prijavljeno na aktivnostima koje želite brisati. Želite li to učiniti ?"
   text_destroy_time_entries: Izbriši prijavljeno vrijeme
   text_assign_time_entries_to_project: Dodaj prijavljenoo vrijeme projektu
index fe2a896efacfed313273e935bf825d1cfe6197c3..0e2569df149e78dc98157d7a2650f52b4039595c 100644 (file)
@@ -855,7 +855,7 @@ ca:
   text_default_administrator_account_changed: "S'ha canviat el compte d'administrador predeterminat"
   text_file_repository_writable: "Es pot escriure en el repositori de fitxers"
   text_plugin_assets_writable: "Es pot escriure als complements actius"
-  text_rmagick_available: "RMagick disponible (opcional)"
+  text_minimagick_available: "MiniMagick disponible (opcional)"
   text_destroy_time_entries_question: "S'han informat %{hours} hores en els assumptes que aneu a suprimir. Què voleu fer?"
   text_destroy_time_entries: "Suprimir les hores informades"
   text_assign_time_entries_to_project: "Assignar les hores informades al projecte"
index 6ecf3274b3342a7ba90acdc90cf152c931278139..9dade6059acba32a3c24545882ecf655afeea454 100644 (file)
@@ -872,7 +872,7 @@ cs:
   text_default_administrator_account_changed: Výchozí nastavení administrátorského účtu změněno
   text_file_repository_writable: Povolen zápis do adresáře ukládání souborů
   text_plugin_assets_writable: Možnost zápisu do adresáře plugin assets
-  text_rmagick_available: RMagick k dispozici (volitelné)
+  text_minimagick_available: MiniMagick k dispozici (volitelné)
   text_destroy_time_entries_question: "U úkolů, které chcete odstranit, je evidováno %{hours} práce. Co chete udělat?"
   text_destroy_time_entries: Odstranit zaznamenané hodiny.
   text_assign_time_entries_to_project: Přiřadit zaznamenané hodiny projektu
index dcb8efa382d35438e05a4f862956e3db5454ac5a..6b03bbb6817ffbb201dc77a8e0f150dd20e6c464 100644 (file)
@@ -673,7 +673,7 @@ da:
   text_select_project_modules: 'Vælg moduler er skal være aktiveret for dette projekt:'
   text_default_administrator_account_changed: Standardadministratorkonto ændret
   text_file_repository_writable: Filarkiv er skrivbar
-  text_rmagick_available: RMagick tilgængelig (valgfri)
+  text_minimagick_available: MiniMagick tilgængelig (valgfri)
 
   default_role_manager: Leder
   default_role_developer: Udvikler
index c3647e7d0854493b9c886f1d19c984cfc9901ca3..356f4b475f92b105320201559112916c21a5e5a7 100644 (file)
@@ -1109,7 +1109,7 @@ de:
   text_regexp_info: z. B. ^[A-Z0-9]+$
   text_repository_identifier_info: 'Kleinbuchstaben (a-z), Ziffern, Binde- und Unterstriche erlaubt.<br />Einmal gespeichert, kann die Kennung nicht mehr geändert werden.'
   text_repository_usernames_mapping: "Bitte legen Sie die Zuordnung der Redmine-Benutzer zu den Benutzernamen der Commit-Nachrichten des Repositories fest.\nBenutzer mit identischen Redmine- und Repository-Benutzernamen oder -E-Mail-Adressen werden automatisch zugeordnet."
-  text_rmagick_available: RMagick verfügbar (optional)
+  text_minimagick_available: MiniMagick verfügbar (optional)
   text_scm_command: Kommando
   text_scm_command_not_available: SCM-Kommando ist nicht verfügbar. Bitte prüfen Sie die Einstellungen im Administrationspanel.
   text_scm_command_version: Version
index 438afcb054836c2930199ccfdec2e06513f36ae1..e603b2d7b7f7adf74933f2bdf663feff9555bddc 100644 (file)
@@ -774,7 +774,7 @@ el:
   text_default_administrator_account_changed: Ο προκαθορισμένος λογαριασμός του διαχειριστή άλλαξε
   text_file_repository_writable: Εγγράψιμος κατάλογος συνημμένων
   text_plugin_assets_writable: Εγγράψιμος κατάλογος plugin assets
-  text_rmagick_available: Διαθέσιμο RMagick (προαιρετικό)
+  text_minimagick_available: Διαθέσιμο MiniMagick (προαιρετικό)
   text_destroy_time_entries_question: "%{hours} δαπανήθηκαν σχετικά με τα θέματα που πρόκειται να διαγράψετε. Τι θέλετε να κάνετε ;"
   text_destroy_time_entries: Διαγραφή αναφερόμενων ωρών
   text_assign_time_entries_to_project: Ανάθεση αναφερόμενων ωρών στο έργο
index 2063dff78beaba7d8424076592007f4b27217b79..0421208c0ca18321a3b29c6eab8044e72ec489a4 100644 (file)
@@ -886,7 +886,7 @@ en-GB:
   text_default_administrator_account_changed: Default administrator account changed
   text_file_repository_writable: Attachments directory writable
   text_plugin_assets_writable: Plugin assets directory writable
-  text_rmagick_available: RMagick available (optional)
+  text_minimagick_available: MiniMagick available (optional)
   text_destroy_time_entries_question: "%{hours} hours were reported on the issues you are about to delete. What do you want to do?"
   text_destroy_time_entries: Delete reported hours
   text_assign_time_entries_to_project: Assign reported hours to the project
index f2833e65249df8ac69832d67653eb66b70c92fee..262ad1ba4402dd84212bc0e29133832cf58debd9 100644 (file)
@@ -1178,7 +1178,7 @@ en:
   text_default_administrator_account_changed: Default administrator account changed
   text_file_repository_writable: Attachments directory writable
   text_plugin_assets_writable: Plugin assets directory writable
-  text_rmagick_available: RMagick available (optional)
+  text_minimagick_available: MiniMagick available (optional)
   text_convert_available: ImageMagick convert available (optional)
   text_gs_available: ImageMagick PDF support available (optional)
   text_destroy_time_entries_question: "%{hours} hours were reported on the issues you are about to delete. What do you want to do?"
index a2a0303ca3b2172199fea711a8a68cf14a3be7fa..9d37ebe8de3509e928a7a316907ce144d3eb42de 100644 (file)
@@ -804,7 +804,7 @@ es-PA:
   text_reassign_time_entries: 'Reasignar las horas a esta incidencia:'
   text_regexp_info: ej. ^[A-Z0-9]+$
   text_repository_usernames_mapping: "Establezca la correspondencia entre los usuarios de Redmine y los presentes en el log del repositorio.\nLos usuarios con el mismo nombre o correo en Redmine y en el repositorio serán asociados automáticamente."
-  text_rmagick_available: RMagick disponible (opcional)
+  text_minimagick_available: MiniMagick disponible (opcional)
   text_select_mail_notifications: Seleccionar los eventos a notificar
   text_select_project_modules: 'Seleccione los módulos a activar para este proyecto:'
   text_status_changed_by_changeset: "Aplicado en los cambios %{value}"
index 7ea2b8a302991774f83368bb4f0ef25246a059fe..c5c592c09b1a8fd97d20bd7734c5c4c92e0fdf30 100644 (file)
@@ -802,7 +802,7 @@ es:
   text_reassign_time_entries: 'Reasignar las horas a esta petición:'
   text_regexp_info: ej. ^[A-Z0-9]+$
   text_repository_usernames_mapping: "Establezca la correspondencia entre los usuarios de Redmine y los presentes en el log del repositorio.\nLos usuarios con el mismo nombre o correo en Redmine y en el repositorio serán asociados automáticamente."
-  text_rmagick_available: RMagick disponible (opcional)
+  text_minimagick_available: MiniMagick disponible (opcional)
   text_select_mail_notifications: Seleccionar los eventos a notificar
   text_select_project_modules: 'Seleccione los módulos a activar para este proyecto:'
   text_status_changed_by_changeset: "Aplicado en los cambios %{value}"
index 450726b1e86021783a797eacd6b888300246aee6..ec507f14e6e1365a462e35bbd89b883085754df5 100644 (file)
@@ -948,7 +948,7 @@ et:
   text_default_administrator_account_changed: "Algne administraatori konto on muudetud"
   text_file_repository_writable: "Manuste kataloog on kirjutatav"
   text_plugin_assets_writable: "Lisamoodulite abifailide kataloog on kirjutatav"
-  text_rmagick_available: "RMagick on kasutatav (ei ole kohustuslik)"
+  text_minimagick_available: "MiniMagick on kasutatav (ei ole kohustuslik)"
   text_destroy_time_entries_question: "Kustutatavatele teemadele oli kirja pandud %{hours} tundi. Mis Sa soovid ette võtta?"
   text_destroy_time_entries: "Kustuta need tunnid"
   text_assign_time_entries_to_project: "Vii tunnid üle teise projekti"
index 765ecbbc5b841087701bdf70174650071bc89bc9..9658e542bac9de5ac68652ced76460eae735a668 100644 (file)
@@ -832,7 +832,7 @@ eu:
   text_default_administrator_account_changed: Lehenetsitako kudeatzaile kontua aldatuta
   text_file_repository_writable: Eranskinen direktorioan idatz daiteke
   text_plugin_assets_writable: Pluginen baliabideen direktorioan idatz daiteke
-  text_rmagick_available: RMagick eskuragarri (aukerazkoa)
+  text_minimagick_available: MiniMagick eskuragarri (aukerazkoa)
   text_destroy_time_entries_question: "%{hours} orduei buruz berri eman zen zuk ezabatzera zoazen zereginean. Zer egin nahi duzu?"
   text_destroy_time_entries: Ezabatu berri emandako orduak
   text_assign_time_entries_to_project: Berri emandako orduak proiektura esleitu
index 06b8de999106d24b64e91b28e04123de3e4ac6bb..480bb45fe454eccea1427aa0ef09e53811190b9a 100644 (file)
@@ -1131,7 +1131,7 @@ fa:
   text_default_administrator_account_changed: حساب راه‌بری پیش‌فرض تغییر کرده است
   text_file_repository_writable: پوشه پیوست‌ها نوشتنی است
   text_plugin_assets_writable: پوشه دارایی‌های افزونه‌ها نوشتنی است
-  text_rmagick_available: RMagick در دست‌رس است (اختیاری)
+  text_minimagick_available: MiniMagick در دست‌رس است (اختیاری)
   text_convert_available: ImageMagick convert در دست‌رس است (اختیاری)
   text_destroy_time_entries_question: "%{hours} ساعت روی مسأله‌هایی که می‌خواهید حذف کنید کار گزارش شده است. می‌خواهید چه کنید؟"
   text_destroy_time_entries: ساعت‌های گزارش شده حذف شوند
index aa2fcee200ede55e03cf9c85b45909d29eb7325a..e94807c272f6bb77eec6f382ca470d721f854280 100644 (file)
@@ -693,7 +693,7 @@ fi:
   project_module_time_tracking: Ajan seuranta
   text_file_repository_writable: Kirjoitettava tiedostovarasto
   text_default_administrator_account_changed: Vakio hallinoijan tunnus muutettu
-  text_rmagick_available: RMagick saatavilla (valinnainen)
+  text_minimagick_available: MiniMagick saatavilla (valinnainen)
   button_configure: Asetukset
   label_plugins: Lisäosat
   label_ldap_authentication: LDAP tunnistautuminen
index 3ef828bb1aa769d7f06749f75cfa89af793a1674..b53be70de547da6fb12c965deb95d1fed15c4c04 100644 (file)
@@ -1140,7 +1140,7 @@ fr:
   text_default_administrator_account_changed: Compte administrateur par défaut changé
   text_file_repository_writable: Répertoire de stockage des fichiers accessible en écriture
   text_plugin_assets_writable: Répertoire public des plugins accessible en écriture
-  text_rmagick_available: Bibliothèque RMagick présente (optionnelle)
+  text_minimagick_available: Bibliothèque MiniMagick présente (optionnelle)
   text_convert_available: Binaire convert de ImageMagick présent (optionel)
   text_destroy_time_entries_question: "%{hours} heures ont été enregistrées sur les demandes à supprimer. Que voulez-vous faire ?"
   text_destroy_time_entries: Supprimer les heures
index 52a6c6c067c8186f155852f3e2ced2ed4e00f064..ebcdbe6e733cf2fc2f8a81f767f372bb11fc91dc 100644 (file)
@@ -777,7 +777,7 @@ gl:
   text_reassign_time_entries: 'Reasignar as horas a esta petición:'
   text_regexp_info: ex. ^[A-Z0-9]+$
   text_repository_usernames_mapping: "Estableza a correspondencia entre os usuarios de Redmine e os presentes no historial do repositorio.\nOs usuarios co mesmo nome ou correo en Redmine e no repositorio serán asociados automaticamente."
-  text_rmagick_available: RMagick dispoñíbel (opcional)
+  text_minimagick_available: MiniMagick dispoñíbel (opcional)
   text_select_mail_notifications: Seleccionar os eventos a notificar
   text_select_project_modules: 'Seleccione os módulos a activar para este proxecto:'
   text_status_changed_by_changeset: "Aplicado nos cambios %{value}"
index 9406c05e0f9268c3ca2fa5a08105e596f592dcff..d316620bf69f3188782a3f9799cec3edbf11264d 100644 (file)
@@ -861,7 +861,7 @@ he:
   text_default_administrator_account_changed: מנהל המערכת ברירת המחדל שונה
   text_file_repository_writable: מאגר הקבצים ניתן לכתיבה
   text_plugin_assets_writable: ספרית נכסי תוספים ניתנת לכתיבה
-  text_rmagick_available: RMagick זמין (רשות)
+  text_minimagick_available: MiniMagick זמין (רשות)
   text_destroy_time_entries_question: "%{hours} שעות דווחו על הנושאים שאתה עומד למחוק. מה ברצונך לעשות?"
   text_destroy_time_entries: מחק שעות שדווחו
   text_assign_time_entries_to_project: הצב שעות שדווחו לפרויקט הזה
index 1c4fb429e0451b33a8c1234a7f540ed5659a0acd..ed83e1618f1c2a4e2f269a8fa29a1ec7585f5c54 100644 (file)
@@ -823,7 +823,7 @@ hr:
   text_default_administrator_account_changed: Default administrator account changed
   text_file_repository_writable: Dozvoljeno pisanje u direktorij za privitke
   text_plugin_assets_writable: Plugin assets directory writable
-  text_rmagick_available: RMagick dostupan (nije obavezno)
+  text_minimagick_available: MiniMagick dostupan (nije obavezno)
   text_destroy_time_entries_question: "%{hours} sati je prijavljeno za predmete koje želite obrisati. Što ćete učiniti?"
   text_destroy_time_entries: Obriši prijavljene sate
   text_assign_time_entries_to_project: Pridruži prijavljene sate projektu
index b4de1d47769d996cdea11361128b7487d475edee..7b589821a5d2fc9c2a72bfc8f2667b51cedc15f7 100644 (file)
   text_select_project_modules: 'Válassza ki az engedélyezett modulokat ehhez a projekthez:'
   text_default_administrator_account_changed: Alapértelmezett adminisztrátor fiók megváltoztatva
   text_file_repository_writable: Fájl tároló írható
-  text_rmagick_available: RMagick elérhető (nem kötelező)
+  text_minimagick_available: MiniMagick elérhető (nem kötelező)
   text_destroy_time_entries_question: "%{hours} órányi munka van rögzítve a feladatokon, amiket törölni szeretne. Mit szeretne tenni?"
   text_destroy_time_entries: A rögzített órák törlése
   text_assign_time_entries_to_project: A rögzített órák hozzárendelése a projekthez
index 7d76f220f234f9d89893ae945c948dee08b69d71..fd9b82a646c8d04577b358d662a7b37219c78e98 100644 (file)
@@ -803,7 +803,7 @@ id:
   text_default_administrator_account_changed: Akun administrator default sudah berubah
   text_file_repository_writable: Direktori yang bisa ditulisi untuk lampiran
   text_plugin_assets_writable: Direktori yang bisa ditulisi untuk plugin asset
-  text_rmagick_available: RMagick tersedia (optional)
+  text_minimagick_available: MiniMagick tersedia (optional)
   text_destroy_time_entries_question: "%{hours} jam sudah dilaporkan pada masalah yang akan anda hapus. Apa yang akan anda lakukan ?"
   text_destroy_time_entries: Hapus jam yang terlapor
   text_assign_time_entries_to_project: Tugaskan jam terlapor pada proyek
index 2cb3c099a31cf8eb737035d20157699a4020aa48..a76a4f52ee8085f647a77f33c6aa46a17d147be6 100644 (file)
@@ -675,7 +675,7 @@ it:
   project_module_time_tracking: Time tracking
   text_file_repository_writable: Repository dei file scrivibile
   text_default_administrator_account_changed: L'account amministrativo predefinito è stato modificato
-  text_rmagick_available: RMagick disponibile (opzionale)
+  text_minimagick_available: MiniMagick disponibile (opzionale)
   button_configure: Configura
   label_plugins: Plugin
   label_ldap_authentication: Autenticazione LDAP
index 5add08e0c1783631da4b82568e1dad1a1b0a3670..651ce1187f7b02c5cad92e35afbf56bc977abb06 100644 (file)
@@ -916,7 +916,7 @@ ja:
   text_default_administrator_account_changed: デフォルト管理アカウントが変更済
   text_file_repository_writable: ファイルリポジトリに書き込み可能
   text_plugin_assets_writable: Plugin assetsディレクトリに書き込み可能
-  text_rmagick_available: RMagickが利用可能 (オプション)
+  text_minimagick_available: MiniMagickが利用可能 (オプション)
   text_destroy_time_entries_question: このチケットの%{hours}時間分の作業記録の扱いを選択してください。
   text_destroy_time_entries: 記録された作業時間を含めて削除
   text_assign_time_entries_to_project: 記録された作業時間をプロジェクト自体に割り当て
index 805f9ee4915f34a2f81d48d732e2f77c7bec431e..286bc91000a8fe2c1997455d92ed61ad3de520e5 100644 (file)
@@ -814,7 +814,7 @@ ko:
   text_default_administrator_account_changed: 기본 관리자 계정이 변경
   text_file_repository_writable: 파일 저장소 쓰기 가능
   text_plugin_assets_writable: 플러그인 전용 디렉토리가 쓰기 가능
-  text_rmagick_available: RMagick 사용 가능 (선택적)
+  text_minimagick_available: MiniMagick 사용 가능 (선택적)
   text_destroy_time_entries_question: 삭제하려는 일감에 %{hours} 시간이 보고되어 있습니다. 어떻게 하시겠습니까?
   text_destroy_time_entries: 보고된 시간을 삭제하기
   text_assign_time_entries_to_project: 보고된 시간을 프로젝트에 할당하기
index 7d068dda402eb3b482a6ca3f96b1f323ff0606f5..65c9d002cc0dc0abe5a404dad5eb77e6a4f8ba6c 100644 (file)
@@ -1095,7 +1095,7 @@ lt:
   text_default_administrator_account_changed: Administratoriaus numatytoji paskyra pakeista
   text_file_repository_writable: Į failų saugyklą saugoti galima (RW)
   text_plugin_assets_writable: Į įskiepių katalogą įrašyti galima
-  text_rmagick_available: RMagick pasiekiamas (pasirinktinai)
+  text_minimagick_available: MiniMagick pasiekiamas (pasirinktinai)
   text_convert_available: ImageMagick konvertavimas galimas (pasirinktinai)
   text_destroy_time_entries_question: "Naikinamam darbui priskirta %{hours} valandų. Ką norite su jomis daryti?"
   text_destroy_time_entries: Ištrinti įrašytas valandas
index 1994912fa933d5b60aff3eaecaf3fabd7514a3db..31eb7d48f8838470a99e1d55bb808c8d20b63fb3 100644 (file)
@@ -829,7 +829,7 @@ lv:
   text_default_administrator_account_changed: Noklusētais administratora konts mainīts
   text_file_repository_writable: Pielikumu direktorijā atļauts rakstīt
   text_plugin_assets_writable: Spraudņu kataloga direktorijā atļauts rakstīt
-  text_rmagick_available: "RMagick pieejams (neobligāts)"
+  text_minimagick_available: "MiniMagick pieejams (neobligāts)"
   text_destroy_time_entries_question: "%{hours} stundas tika ziņotas par uzdevumu, ko vēlaties dzēst. Ko darīt?"
   text_destroy_time_entries: Dzēst ziņotās stundas
   text_assign_time_entries_to_project: Piešķirt ziņotās stundas projektam
index 384aeaa2319d91444f2bb3b43a0c1244827c9051..7b226da05c03d9b4bfa3895e9477fe8bb3c9328a 100644 (file)
@@ -851,7 +851,7 @@ mk:
   text_default_administrator_account_changed: Default administrator account changed
   text_file_repository_writable: Во папката за прилози може да се запишува
   text_plugin_assets_writable: Во папката за додатоци може да се запишува
-  text_rmagick_available: RMagick available (незадолжително)
+  text_minimagick_available: MiniMagick available (незадолжително)
   text_destroy_time_entries_question: "%{hours} hours were reported on the issues you are about to delete. What do you want to do ?"
   text_destroy_time_entries: Delete reported hours
   text_assign_time_entries_to_project: Додели ги пријавените часови на проектот
index 0fa18c2c64093abd8bf17deedb4a8960826367f0..0228ff72b0fba5b5dbef3538d185454ddd5b80cc 100644 (file)
@@ -835,7 +835,7 @@ mn:
   text_default_administrator_account_changed: Стандарт администраторын бүртгэл өөрчлөгдлөө
   text_file_repository_writable: Хавсралт файл хадгалах хавтас руу бичих эрхтэй
   text_plugin_assets_writable: Плагин модулийн ассет хавтас руу бичих эрхтэй
-  text_rmagick_available: RMagick суулгагдсан (заавал биш)
+  text_minimagick_available: MiniMagick суулгагдсан (заавал биш)
   text_destroy_time_entries_question: "Таны устгах гэж байгаа асуудлууд дээр нийт %{hours} цаг зарцуулсан юм байна, та яах вэ ?"
   text_destroy_time_entries: Мэдэгдсэн цагуудыг устгах
   text_assign_time_entries_to_project: Мэдэгдсэн асуудлуудыг төсөлд оноох
index 3f37a910c76183737b83af0844d6d635e36c37b5..e85b5164aa748bec2aa203ab9d2f4a51b94a2614 100644 (file)
@@ -747,7 +747,7 @@ nl:
   text_reassign_time_entries: 'Gerapporteerde uren opnieuw toewijzen:'
   text_regexp_info: bv. ^[A-Z0-9]+$
   text_repository_usernames_mapping: "Koppel de Redmine-gebruikers aan gebruikers in de repository log.\nGebruikers met dezelfde Redmine en repository gebruikersnaam of e-mail worden automatisch gekoppeld."
-  text_rmagick_available: RMagick beschikbaar (optioneel)
+  text_minimagick_available: MiniMagick beschikbaar (optioneel)
   text_select_mail_notifications: Selecteer acties waarvoor mededelingen via e-mail moeten worden verstuurd.
   text_select_project_modules: 'Selecteer de modules die u wilt gebruiken voor dit project:'
   text_status_changed_by_changeset: "Toegepast in changeset %{value}."
index 3755883b41956bc49ef2a7bf2ea43e8bf7963c56..0f8caf5a4683d4b881b58a755f4200539ba68e05 100644 (file)
   text_select_project_modules: 'Velg moduler du vil aktivere for dette prosjektet:'
   text_default_administrator_account_changed: Standard administrator-konto er endret
   text_file_repository_writable: Fil-arkivet er skrivbart
-  text_rmagick_available: RMagick er tilgjengelig (valgfritt)
+  text_minimagick_available: MiniMagick er tilgjengelig (valgfritt)
   text_destroy_time_entries_question: "%{hours} timer er ført på sakene du er i ferd med å slette. Hva vil du gjøre ?"
   text_destroy_time_entries: Slett førte timer
   text_assign_time_entries_to_project: Overfør førte timer til prosjektet
index dd4c25954cb02bebe2ffcbac7564babb204137a9..d40b608f3fe482dd3d63dbbe3a7c19faf7d807a2 100644 (file)
@@ -775,7 +775,7 @@ pl:
   text_reassign_time_entries: 'Przepnij przepracowany czas do tego zagadnienia:'
   text_regexp_info: np. ^[A-Z0-9]+$
   text_repository_usernames_mapping: "Wybierz lub uaktualnij przyporządkowanie użytkowników Redmine do użytkowników repozytorium.\nUżytkownicy z taką samą nazwą lub adresem e-mail są przyporządkowani automatycznie."
-  text_rmagick_available: RMagick dostępne (opcjonalnie)
+  text_minimagick_available: MiniMagick dostępne (opcjonalnie)
   text_select_mail_notifications: Zaznacz czynności przy których użytkownik powinien być powiadomiony e-mailem.
   text_select_project_modules: 'Wybierz moduły do aktywacji w tym projekcie:'
   text_status_changed_by_changeset: "Zastosowane w zmianach %{value}."
index ba0a70ac4da7952914cc257896531a1c2cc8ba6d..eeb76583a843e40cb8c8ac0bb92f77dec1122c2d 100644 (file)
@@ -709,7 +709,7 @@ pt-BR:
   text_select_project_modules: 'Selecione módulos para habilitar para este projeto:'
   text_default_administrator_account_changed: Conta padrão do administrador alterada
   text_file_repository_writable: Repositório com permissão de escrita
-  text_rmagick_available: RMagick disponível (opcional)
+  text_minimagick_available: MiniMagick disponível (opcional)
   text_destroy_time_entries_question: "%{hours} horas de trabalho foram registradas nas tarefas que você está excluindo. O que você deseja fazer?"
   text_destroy_time_entries: Excluir horas de trabalho
   text_assign_time_entries_to_project: Atribuir estas horas de trabalho para outro projeto
index 6348a19800d4b51543706a768eec7b9770029c73..3ffbd6ef25caa64ef7bd7d052db1bceece43e8da 100644 (file)
@@ -694,7 +694,7 @@ pt:
   text_select_project_modules: 'Selecione os módulos a ativar para este projeto:'
   text_default_administrator_account_changed: Conta por omissão de administrador alterada.
   text_file_repository_writable: Repositório de ficheiros com permissões de escrita
-  text_rmagick_available: RMagick disponível (opcional)
+  text_minimagick_available: MiniMagick disponível (opcional)
   text_destroy_time_entries_question: "%{hours} horas de trabalho foram atribuídas a estas tarefas que vai apagar. O que deseja fazer?"
   text_destroy_time_entries: Apagar as horas
   text_assign_time_entries_to_project: Atribuir as horas ao projeto
index 281fd9c994ecba9bebbe76e1bedfaaee7877805f..f732c773c4f7649bcb3faa153b0cbb63a3f55ab6 100644 (file)
@@ -752,7 +752,7 @@ ro:
   text_default_administrator_account_changed: S-a schimbat contul administratorului implicit
   text_file_repository_writable: Se poate scrie în directorul de atașamente
   text_plugin_assets_writable: Se poate scrie în directorul de plugin-uri
-  text_rmagick_available: Este disponibil RMagick (opțional)
+  text_minimagick_available: Este disponibil MiniMagick (opțional)
   text_destroy_time_entries_question: "%{hours} ore sunt înregistrate la tichetele pe care doriți să le ștergeți. Ce doriți sa faceți?"
   text_destroy_time_entries: Șterge orele înregistrate
   text_assign_time_entries_to_project: Atribuie orele la proiect
index 0a2aeb102073a15aea8e3365a4832b969345fb92..99a17cbae9fac34daf62c9e054132cbce9a4a1fb 100644 (file)
@@ -907,7 +907,7 @@ ru:
   text_reassign_time_entries: 'Перенести зарегистрированное время на следующую задачу:'
   text_regexp_info: "например: ^[A-Z0-9]+$"
   text_repository_usernames_mapping: "Выберите или обновите пользователя Redmine, связанного с найденными именами в журнале хранилища.\nПользователи с одинаковыми именами или email в Redmine и хранилище связываются автоматически."
-  text_rmagick_available: Доступно использование RMagick (опционально)
+  text_minimagick_available: Доступно использование MiniMagick (опционально)
   text_select_mail_notifications: Выберите действия, при которых будет отсылаться уведомление на электронную почту.
   text_select_project_modules: 'Выберите модули, которые будут использованы в проекте:'
   text_status_changed_by_changeset: "Реализовано в %{value} редакции."
index ab4d82df754d4e2d9081262983f60f46d334c038..0c543f7e8768ee97cdeb00c788e76e6016697dc5 100644 (file)
@@ -667,7 +667,7 @@ sk:
   text_select_project_modules: 'Vybrať moduly povolené v tomto projekte:'
   text_default_administrator_account_changed: Predvolené nastavenie administrátorského účtu bolo zmenené
   text_file_repository_writable: Povolený zápis do priečinka s prílohami
-  text_rmagick_available: RMagick k dispozícii (voliteľné)
+  text_minimagick_available: MiniMagick k dispozícii (voliteľné)
   text_destroy_time_entries_question: Pri úlohách, ktoré chcete odstrániť, je zaznamenaných %{hours} hodín práce. Čo si želáte urobiť?
   text_destroy_time_entries: Odstrániť zaznamenané hodiny
   text_assign_time_entries_to_project: Priradiť zaznamenané hodiny k projektu
index 8a7fbc8e0dcefd3b11e56888bf54c0c23edf9c10..2bfa7259ef4fc549b1dfdc6995472c40fb310449 100644 (file)
@@ -738,7 +738,7 @@ sl:
   text_select_project_modules: 'Izberite module, ki jih želite omogočiti za ta projekt:'
   text_default_administrator_account_changed: Spremenjen privzeti administratorski račun
   text_file_repository_writable: Omogočeno pisanje v shrambo datotek
-  text_rmagick_available: RMagick je na voljo(neobvezno)
+  text_minimagick_available: MiniMagick je na voljo(neobvezno)
   text_destroy_time_entries_question: "%{hours} ur je bilo opravljenih na zahtevku, ki ga želite izbrisati. Kaj želite storiti?"
   text_destroy_time_entries: Izbriši opravljene ure
   text_assign_time_entries_to_project: Predaj opravljene ure projektu
index 78f668625b08e0de77d4db9e48548bd4daf166ca..0a1988e7bc54bd5dbd489039ca5e6cf897bef2f1 100644 (file)
@@ -929,7 +929,7 @@ sq:
   text_default_administrator_account_changed: Default administrator account changed
   text_file_repository_writable: Attachments directory writable
   text_plugin_assets_writable: Plugin assets directory writable
-  text_rmagick_available: RMagick available (optional)
+  text_minimagick_available: MiniMagick available (optional)
   text_destroy_time_entries_question: "%{hours} hours were reported on the issues you are about to delete. What do you want to do?"
   text_destroy_time_entries: Delete reported hours
   text_assign_time_entries_to_project: Assign reported hours to the project
index d9c5150d62ca85b251a8059fe7c48c8095c70122..27a59be27e1b90dd0d80d82b6bf9d1f932975329 100644 (file)
@@ -851,7 +851,7 @@ sr-YU:
   text_default_administrator_account_changed: Podrazumevani administratorski nalog je promenjen
   text_file_repository_writable: Fascikla priloženih datoteka je upisiva
   text_plugin_assets_writable: Fascikla elemenata dodatnih komponenti je upisiva
-  text_rmagick_available: RMagick je dostupan (opciono)
+  text_minimagick_available: MiniMagick je dostupan (opciono)
   text_destroy_time_entries_question: "%{hours} sati je prijavljeno za ovaj problem koji želite izbrisati. Šta želite da uradite?"
   text_destroy_time_entries: Izbriši prijavljene sate
   text_assign_time_entries_to_project: Dodeli prijavljene sate projektu
index 929ee5c04034c01fb4fd71bfb21cd45367e661ab..2f2e41f51f60d1c780e81586448cd40459388c4f 100644 (file)
@@ -849,7 +849,7 @@ sr:
   text_default_administrator_account_changed: Подразумевани администраторски налог је промењен
   text_file_repository_writable: Фасцикла приложених датотека је уписива
   text_plugin_assets_writable: Фасцикла елемената додатних компоненти је уписива
-  text_rmagick_available: RMagick је доступан (опционо)
+  text_minimagick_available: MiniMagick је доступан (опционо)
   text_destroy_time_entries_question: "%{hours} сати је пријављено за овај проблем који желите избрисати. Шта желите да урадите?"
   text_destroy_time_entries: Избриши пријављене сате
   text_assign_time_entries_to_project: Додели пријављене сате пројекту
index 84bd63cbceafd3e9d51cd87242b57824af7c52a4..199f3eca61ad2beba962e89bd095ce64bf00b460 100644 (file)
@@ -1031,7 +1031,7 @@ sv:
   text_default_administrator_account_changed: Standardadministratörens konto ändrat
   text_file_repository_writable: Arkivet för bifogade filer är skrivbart
   text_plugin_assets_writable: Arkivet för plug-ins är skrivbart
-  text_rmagick_available: RMagick tillgängligt (ej obligatoriskt)
+  text_minimagick_available: MiniMagick tillgängligt (ej obligatoriskt)
   text_destroy_time_entries_question: "%{hours} timmar har rapporterats på ärendena du är på väg att ta bort. Vad vill du göra ?"
   text_destroy_time_entries: Ta bort rapporterade timmar
   text_assign_time_entries_to_project: Tilldela rapporterade timmar till projektet
index 0caa4b0f98768c6d1d9c37b5d3a527479b67912c..45094410c0849b0b66af05e4a2d6a46acac95cee 100644 (file)
@@ -669,7 +669,7 @@ th:
   text_select_project_modules: 'เลือกส่วนประกอบที่ต้องการใช้งานสำหรับโครงการนี้:'
   text_default_administrator_account_changed: ค่าเริ่มต้นของบัญชีผู้บริหารจัดการถูกเปลี่ยนแปลง
   text_file_repository_writable: ที่เก็บต้นฉบับสามารถเขียนได้
-  text_rmagick_available: RMagick มีให้ใช้ (เป็นตัวเลือก)
+  text_minimagick_available: MiniMagick มีให้ใช้ (เป็นตัวเลือก)
   text_destroy_time_entries_question: "%{hours} ชั่วโมงที่ถูกแจ้งในปัญหานี้จะโดนลบ. คุณต้องการทำอย่างไร?"
   text_destroy_time_entries: ลบเวลาที่รายงานไว้
   text_assign_time_entries_to_project: ระบุเวลาที่ใช้ในโครงการนี้
index 3e8be7e6bb858d6cf167820612c5601e5fb5a6e1..3b8a92f39fbe113f826173e91bbeaf84bd0d6773 100644 (file)
@@ -684,7 +684,7 @@ tr:
   text_select_project_modules: 'Bu proje için etkinleştirmek istediğiniz modülleri seçin:'
   text_default_administrator_account_changed: Varsayılan yönetici hesabı değişti
   text_file_repository_writable: Dosya deposu yazılabilir
-  text_rmagick_available: RMagick Kullanılabilir (isteğe bağlı)
+  text_minimagick_available: MiniMagick Kullanılabilir (isteğe bağlı)
   text_destroy_time_entries_question: Silmek üzere olduğunuz işler üzerine %{hours} saat raporlandı.Ne yapmak istersiniz ?
   text_destroy_time_entries: Raporlanmış süreleri sil
   text_assign_time_entries_to_project: Raporlanmış süreleri projeye ata
index 0b62f879ececa0c1f3077f980ea958571065fbdb..160dce887fde96e819b87a1313c112edf3318960 100644 (file)
@@ -686,7 +686,7 @@ uk:
   project_module_time_tracking: Відстеження часу
   text_file_repository_writable: Сховище файлів доступне для записів
   text_default_administrator_account_changed: Обліковий запис адміністратора по замовчуванню змінений
-  text_rmagick_available: Доступно використання RMagick (опційно)
+  text_minimagick_available: Доступно використання MiniMagick (опційно)
   button_configure: Налаштування
   label_plugins: Модулі
   label_ldap_authentication: Авторизація за допомогою LDAP
index 5a3cc89cf76d2a9a9fcbc10b7561198fbaa9a3be..d9bb74e4e2418ea57a5a6fedc5d16d73721eb49e 100644 (file)
@@ -738,7 +738,7 @@ vi:
   text_select_project_modules: 'Chọn các module cho dự án:'
   text_default_administrator_account_changed: Thay đổi tài khoản quản trị mặc định
   text_file_repository_writable: Cho phép ghi thư mục đính kèm
-  text_rmagick_available: Trạng thái RMagick
+  text_minimagick_available: Trạng thái MiniMagick
   text_destroy_time_entries_question: "Thời gian %{hours} giờ đã báo cáo trong vấn đề bạn định xóa. Bạn muốn làm gì tiếp ?"
   text_destroy_time_entries: Xóa thời gian báo cáo
   text_assign_time_entries_to_project: Gán thời gian báo cáo cho dự án
index 29581860eec2e2e8ce64606116f474e8d1916798..b2ffd29cd9fdf55083ebf05f2b7bf2c3c9d715ab 100644 (file)
   text_default_administrator_account_changed: 已變更預設管理員帳號內容
   text_file_repository_writable: 可寫入附加檔案目錄
   text_plugin_assets_writable: 可寫入外掛程式目錄
-  text_rmagick_available: 可使用 RMagick (選配)
+  text_minimagick_available: 可使用 MiniMagick (選配)
   text_convert_available: 可使用 ImageMagick 轉換圖片格式 (選配)
   text_destroy_time_entries_question: 您即將刪除的議題已報工 %{hours} 小時. 您的選擇是?
   text_destroy_time_entries: 刪除已報工的時數
index 00ce1c9a1f7f6b21cb85dffc98cd3d23df2773d5..3616c7167ee16766e266095c1fd42d9802089209 100644 (file)
@@ -872,7 +872,7 @@ zh:
   text_default_administrator_account_changed: 默认的管理员帐号已改变
   text_file_repository_writable: 附件路径可写
   text_plugin_assets_writable: 插件的附件路径可写
-  text_rmagick_available: RMagick 可用(可选的)
+  text_minimagick_available: MiniMagick 可用(可选的)
   text_destroy_time_entries_question: 您要删除的问题已经上报了 %{hours} 小时的工作量。您想进行那种操作?
   text_destroy_time_entries: 删除上报的工作量
   text_assign_time_entries_to_project: 将已上报的工作量提交到项目中
index 0aa462b697c5f6c88582503516c7cef8c3b90034..f1d5c85c5b20e1f125c583ca0e9f95da4f4ff1bb 100644 (file)
@@ -20,9 +20,9 @@
 require 'redmine/core_ext'
 
 begin
-  require 'rmagick' unless Object.const_defined?(:Magick)
+  require 'mini_magick' unless Object.const_defined?(:MiniMagick)
 rescue LoadError
-  # RMagick is not available
+  # MiniMagick is not available
 end
 begin
   require 'redcarpet' unless Object.const_defined?(:Redcarpet)
index 25cedc14f50da22596c0aa3233893039257b54f5..ef9475cea35f134e4262281a8c5ad5871bd148b9 100644 (file)
@@ -359,7 +359,7 @@ module Redmine
       end
 
       # Generates a gantt image
-      # Only defined if RMagick is avalaible
+      # Only defined if MiniMagick is avalaible
       def to_image(format='PNG')
         date_to = (@date_from >> @months) - 1
         show_weeks = @zoom > 1
@@ -372,98 +372,123 @@ module Redmine
         g_height = 20 * number_of_rows + 30
         headers_height = (show_weeks ? 2 * header_height : header_height)
         height = g_height + headers_height
-        imgl = Magick::ImageList.new
-        imgl.new_image(subject_width + g_width + 1, height)
-        gc = Magick::Draw.new
-        gc.font = Redmine::Configuration['rmagick_font_path'] || ""
-        # Subjects
-        gc.stroke('transparent')
-        subjects(:image => gc, :top => (headers_height + 20), :indent => 4, :format => :image)
-        # Months headers
-        month_f = @date_from
-        left = subject_width
-        @months.times do
-          width = ((month_f >> 1) - month_f) * zoom
-          gc.fill('white')
-          gc.stroke('grey')
-          gc.stroke_width(1)
-          gc.rectangle(left, 0, left + width, height)
-          gc.fill('black')
+        # TODO: Remove rmagick_font_path in a later version
+        Rails.logger.warn('rmagick_font_path option is deprecated. Use minimagick_font_path instead.') \
+          unless Redmine::Configuration['rmagick_font_path'].nil?
+        font_path = Redmine::Configuration['minimagick_font_path'].presence || Redmine::Configuration['rmagick_font_path'].presence
+        img = MiniMagick::Image.create(".#{format}", false)
+        MiniMagick::Tool::Convert.new do |gc|
+          gc.size('%dx%d' % [subject_width + g_width + 1, height])
+          gc.xc('white')
+          gc.font(font_path) if font_path.present?
+          # Subjects
           gc.stroke('transparent')
-          gc.stroke_width(1)
-          gc.text(left.round + 8, 14, "#{month_f.year}-#{month_f.month}")
-          left = left + width
-          month_f = month_f >> 1
-        end
-        # Weeks headers
-        if show_weeks
+          subjects(:image => gc, :top => (headers_height + 20), :indent => 4, :format => :image)
+          # Months headers
+          month_f = @date_from
           left = subject_width
-          height = header_height
-          if @date_from.cwday == 1
-            # date_from is monday
-            week_f = date_from
-          else
-            # find next monday after date_from
-            week_f = @date_from + (7 - @date_from.cwday + 1)
-            width = (7 - @date_from.cwday + 1) * zoom
-            gc.fill('white')
-            gc.stroke('grey')
-            gc.stroke_width(1)
-            gc.rectangle(left, header_height, left + width, 2 * header_height + g_height - 1)
-            left = left + width
-          end
-          while week_f <= date_to
-            width = (week_f + 6 <= date_to) ? 7 * zoom : (date_to - week_f + 1) * zoom
+          @months.times do
+            width = ((month_f >> 1) - month_f) * zoom
             gc.fill('white')
             gc.stroke('grey')
-            gc.stroke_width(1)
-            gc.rectangle(left.round, header_height, left.round + width, 2 * header_height + g_height - 1)
+            gc.strokewidth(1)
+            gc.draw('rectangle %d,%d %d,%d' % [
+              left, 0, left + width, height
+            ])
             gc.fill('black')
             gc.stroke('transparent')
-            gc.stroke_width(1)
-            gc.text(left.round + 2, header_height + 14, week_f.cweek.to_s)
+            gc.strokewidth(1)
+            gc.draw('text %d,%d %s' % [
+              left.round + 8, 14, Redmine::Utils::Shell.shell_quote("#{month_f.year}-#{month_f.month}")
+            ])
             left = left + width
-            week_f = week_f + 7
+            month_f = month_f >> 1
           end
-        end
-        # Days details (week-end in grey)
-        if show_days
-          left = subject_width
-          height = g_height + header_height - 1
-          wday = @date_from.cwday
-          (date_to - @date_from + 1).to_i.times do
-            width =  zoom
-            gc.fill(non_working_week_days.include?(wday) ? '#eee' : 'white')
-            gc.stroke('#ddd')
-            gc.stroke_width(1)
-            gc.rectangle(left, 2 * header_height, left + width, 2 * header_height + g_height - 1)
-            left = left + width
-            wday = wday + 1
-            wday = 1 if wday > 7
+          # Weeks headers
+          if show_weeks
+            left = subject_width
+            height = header_height
+            if @date_from.cwday == 1
+              # date_from is monday
+              week_f = date_from
+            else
+              # find next monday after date_from
+              week_f = @date_from + (7 - @date_from.cwday + 1)
+              width = (7 - @date_from.cwday + 1) * zoom
+              gc.fill('white')
+              gc.stroke('grey')
+              gc.strokewidth(1)
+              gc.draw('rectangle %d,%d %d,%d' % [
+                left, header_height, left + width, 2 * header_height + g_height - 1
+              ])
+              left = left + width
+            end
+            while week_f <= date_to
+              width = (week_f + 6 <= date_to) ? 7 * zoom : (date_to - week_f + 1) * zoom
+              gc.fill('white')
+              gc.stroke('grey')
+              gc.strokewidth(1)
+              gc.draw('rectangle %d,%d %d,%d' % [
+                left.round, header_height, left.round + width, 2 * header_height + g_height - 1
+              ])
+              gc.fill('black')
+              gc.stroke('transparent')
+              gc.strokewidth(1)
+              gc.draw('text %d,%d %s' % [
+                left.round + 2, header_height + 14, Redmine::Utils::Shell.shell_quote(week_f.cweek.to_s)
+              ])
+              left = left + width
+              week_f = week_f + 7
+            end
+          end
+          # Days details (week-end in grey)
+          if show_days
+            left = subject_width
+            height = g_height + header_height - 1
+            wday = @date_from.cwday
+            (date_to - @date_from + 1).to_i.times do
+              width =  zoom
+              gc.fill(non_working_week_days.include?(wday) ? '#eee' : 'white')
+              gc.stroke('#ddd')
+              gc.strokewidth(1)
+              gc.draw('rectangle %d,%d %d,%d' % [
+                left, 2 * header_height, left + width, 2 * header_height + g_height - 1
+              ])
+              left = left + width
+              wday = wday + 1
+              wday = 1 if wday > 7
+            end
+          end
+          # border
+          gc.fill('transparent')
+          gc.stroke('grey')
+          gc.strokewidth(1)
+          gc.draw('rectangle %d,%d %d,%d' % [
+            0, 0, subject_width + g_width, headers_height
+          ])
+          gc.stroke('black')
+          gc.draw('rectangle %d,%d %d,%d' % [
+            0, 0, subject_width + g_width, g_height + headers_height - 1
+          ])
+          # content
+          top = headers_height + 20
+          gc.stroke('transparent')
+          lines(:image => gc, :top => top, :zoom => zoom,
+                :subject_width => subject_width, :format => :image)
+          # today red line
+          if User.current.today >= @date_from and User.current.today <= date_to
+            gc.stroke('red')
+            x = (User.current.today - @date_from + 1) * zoom + subject_width
+            gc.draw('line %g,%g %g,%g' % [
+              x, headers_height, x, headers_height + g_height - 1
+            ])
           end
+          gc << img.path
         end
-        # border
-        gc.fill('transparent')
-        gc.stroke('grey')
-        gc.stroke_width(1)
-        gc.rectangle(0, 0, subject_width + g_width, headers_height)
-        gc.stroke('black')
-        gc.rectangle(0, 0, subject_width + g_width, g_height + headers_height - 1)
-        # content
-        top = headers_height + 20
-        gc.stroke('transparent')
-        lines(:image => gc, :top => top, :zoom => zoom,
-              :subject_width => subject_width, :format => :image)
-        # today red line
-        if User.current.today >= @date_from and User.current.today <= date_to
-          gc.stroke('red')
-          x = (User.current.today - @date_from + 1) * zoom + subject_width
-          gc.line(x, headers_height, x, headers_height + g_height - 1)
-        end
-        gc.draw(imgl)
-        imgl.format = format
-        imgl.to_blob
-      end if Object.const_defined?(:Magick)
+        img.to_blob
+      ensure
+        img.destroy! if img
+      end if Object.const_defined?(:MiniMagick)
 
       def to_pdf
         pdf = ::Redmine::Export::PDF::ITCPDF.new(current_language)
@@ -775,8 +800,10 @@ module Redmine
       def image_subject(params, subject, options={})
         params[:image].fill('black')
         params[:image].stroke('transparent')
-        params[:image].stroke_width(1)
-        params[:image].text(params[:indent], params[:top] + 2, subject)
+        params[:image].strokewidth(1)
+        params[:image].draw('text %d,%d %s' % [
+          params[:indent], params[:top] + 2, Redmine::Utils::Shell.shell_quote(subject)
+        ])
       end
 
       def issue_relations(issue)
@@ -962,23 +989,29 @@ module Redmine
         # Renders the task bar, with progress and late
         if coords[:bar_start] && coords[:bar_end]
           params[:image].fill('#aaa')
-          params[:image].rectangle(params[:subject_width] + coords[:bar_start],
-                                   params[:top],
-                                   params[:subject_width] + coords[:bar_end],
-                                   params[:top] - height)
+          params[:image].draw('rectangle %d,%d %d,%d' % [
+            params[:subject_width] + coords[:bar_start],
+            params[:top],
+            params[:subject_width] + coords[:bar_end],
+            params[:top] - height
+          ])
           if coords[:bar_late_end]
             params[:image].fill('#f66')
-            params[:image].rectangle(params[:subject_width] + coords[:bar_start],
-                                     params[:top],
-                                     params[:subject_width] + coords[:bar_late_end],
-                                     params[:top] - height)
+            params[:image].draw('rectangle %d,%d %d,%d' % [
+              params[:subject_width] + coords[:bar_start],
+              params[:top],
+              params[:subject_width] + coords[:bar_late_end],
+              params[:top] - height
+            ])
           end
           if coords[:bar_progress_end]
             params[:image].fill('#00c600')
-            params[:image].rectangle(params[:subject_width] + coords[:bar_start],
-                                     params[:top],
-                                     params[:subject_width] + coords[:bar_progress_end],
-                                     params[:top] - height)
+            params[:image].draw('rectangle %d,%d %d,%d' % [
+              params[:subject_width] + coords[:bar_start],
+              params[:top],
+              params[:subject_width] + coords[:bar_progress_end],
+              params[:top] - height
+            ])
           end
         end
         # Renders the markers
@@ -987,21 +1020,31 @@ module Redmine
             x = params[:subject_width] + coords[:start]
             y = params[:top] - height / 2
             params[:image].fill('blue')
-            params[:image].polygon(x - 4, y, x, y - 4, x + 4, y, x, y + 4)
+            params[:image].draw('polygon %d,%d %d,%d %d,%d %d,%d' % [
+              x - 4, y,
+              x, y - 4,
+              x + 4, y,
+              x, y + 4
+            ])
           end
           if coords[:end]
             x = params[:subject_width] + coords[:end] + params[:zoom]
             y = params[:top] - height / 2
             params[:image].fill('blue')
-            params[:image].polygon(x - 4, y, x, y - 4, x + 4, y, x, y + 4)
+            params[:image].draw('polygon %d,%d %d,%d %d,%d %d,%d' % [
+              x - 4, y,
+              x, y - 4,
+              x + 4, y,
+              x, y + 4
+            ])
           end
         end
         # Renders the label on the right
         if label
           params[:image].fill('black')
-          params[:image].text(params[:subject_width] + (coords[:bar_end] || 0) + 5,
-                              params[:top] + 1,
-                              label)
+          params[:image].draw('text %d,%d %s' % [
+            params[:subject_width] + (coords[:bar_end] || 0) + 5, params[:top] + 1, Redmine::Utils::Shell.shell_quote(label)
+          ])
         end
       end
     end
index 427cfe07ae498e25b77078ee4e4641ed6ad97287..2042ecf88b5750abc8673554feee8f3773c094dc 100644 (file)
@@ -155,7 +155,7 @@ class GanttsControllerTest < Redmine::ControllerTest
     assert @response.body.starts_with?('%PDF')
   end
 
-  if Object.const_defined?(:Magick)
+  if Object.const_defined?(:MiniMagick)
     def test_gantt_should_export_to_png
       get :show, :params => {
           :project_id => 1,