THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

Replace RMagick with MiniMagick (#30492).

Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18366 e93f8b46-1217-0410-a6f0-8f06a7374b81
pull/107/merge
Go MAEDA 1 month ago
parent
commit
beeacb2c2a
56 changed files with 213 additions and 172 deletions
  1. 3
    3
      Gemfile
  2. 1
    1
      app/controllers/admin_controller.rb
  3. 1
    1
      appveyor.yml
  4. 11
    13
      config/configuration.yml.example
  5. 1
    1
      config/locales/ar.yml
  6. 1
    1
      config/locales/az.yml
  7. 1
    1
      config/locales/bg.yml
  8. 1
    1
      config/locales/bs.yml
  9. 1
    1
      config/locales/ca.yml
  10. 1
    1
      config/locales/cs.yml
  11. 1
    1
      config/locales/da.yml
  12. 1
    1
      config/locales/de.yml
  13. 1
    1
      config/locales/el.yml
  14. 1
    1
      config/locales/en-GB.yml
  15. 1
    1
      config/locales/en.yml
  16. 1
    1
      config/locales/es-PA.yml
  17. 1
    1
      config/locales/es.yml
  18. 1
    1
      config/locales/et.yml
  19. 1
    1
      config/locales/eu.yml
  20. 1
    1
      config/locales/fa.yml
  21. 1
    1
      config/locales/fi.yml
  22. 1
    1
      config/locales/fr.yml
  23. 1
    1
      config/locales/gl.yml
  24. 1
    1
      config/locales/he.yml
  25. 1
    1
      config/locales/hr.yml
  26. 1
    1
      config/locales/hu.yml
  27. 1
    1
      config/locales/id.yml
  28. 1
    1
      config/locales/it.yml
  29. 1
    1
      config/locales/ja.yml
  30. 1
    1
      config/locales/ko.yml
  31. 1
    1
      config/locales/lt.yml
  32. 1
    1
      config/locales/lv.yml
  33. 1
    1
      config/locales/mk.yml
  34. 1
    1
      config/locales/mn.yml
  35. 1
    1
      config/locales/nl.yml
  36. 1
    1
      config/locales/no.yml
  37. 1
    1
      config/locales/pl.yml
  38. 1
    1
      config/locales/pt-BR.yml
  39. 1
    1
      config/locales/pt.yml
  40. 1
    1
      config/locales/ro.yml
  41. 1
    1
      config/locales/ru.yml
  42. 1
    1
      config/locales/sk.yml
  43. 1
    1
      config/locales/sl.yml
  44. 1
    1
      config/locales/sq.yml
  45. 1
    1
      config/locales/sr-YU.yml
  46. 1
    1
      config/locales/sr.yml
  47. 1
    1
      config/locales/sv.yml
  48. 1
    1
      config/locales/th.yml
  49. 1
    1
      config/locales/tr.yml
  50. 1
    1
      config/locales/uk.yml
  51. 1
    1
      config/locales/vi.yml
  52. 1
    1
      config/locales/zh-TW.yml
  53. 1
    1
      config/locales/zh.yml
  54. 2
    2
      lib/redmine.rb
  55. 145
    102
      lib/redmine/helpers/gantt.rb
  56. 1
    1
      test/functional/gantts_controller_test.rb

+ 3
- 3
Gemfile View File

@@ -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

+ 1
- 1
app/controllers/admin_controller.rb View 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?]
]

+ 1
- 1
appveyor.yml View 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

+ 11
- 13
config/configuration.yml.example View 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

+ 1
- 1
config/locales/ar.yml View 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.

+ 1
- 1
config/locales/az.yml View 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."

+ 1
- 1
config/locales/bg.yml View 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} часа са отделени на задачите, които искате да изтриете. Какво избирате?"

+ 1
- 1
config/locales/bs.yml View 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

+ 1
- 1
config/locales/ca.yml View 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"

+ 1
- 1
config/locales/cs.yml View 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

+ 1
- 1
config/locales/da.yml View 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

+ 1
- 1
config/locales/de.yml View 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

+ 1
- 1
config/locales/el.yml View 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: Ανάθεση αναφερόμενων ωρών στο έργο

+ 1
- 1
config/locales/en-GB.yml View 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

+ 1
- 1
config/locales/en.yml View 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?"

+ 1
- 1
config/locales/es-PA.yml View 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}"

+ 1
- 1
config/locales/es.yml View 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}"

+ 1
- 1
config/locales/et.yml View 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"

+ 1
- 1
config/locales/eu.yml View 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

+ 1
- 1
config/locales/fa.yml View 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: ساعت‌های گزارش شده حذف شوند

+ 1
- 1
config/locales/fi.yml View 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

+ 1
- 1
config/locales/fr.yml View 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

+ 1
- 1
config/locales/gl.yml View 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}"

+ 1
- 1
config/locales/he.yml View 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: הצב שעות שדווחו לפרויקט הזה

+ 1
- 1
config/locales/hr.yml View 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

+ 1
- 1
config/locales/hu.yml View File

@@ -693,7 +693,7 @@
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

+ 1
- 1
config/locales/id.yml View 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

+ 1
- 1
config/locales/it.yml View 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

+ 1
- 1
config/locales/ja.yml View 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: 記録された作業時間をプロジェクト自体に割り当て

+ 1
- 1
config/locales/ko.yml View 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: 보고된 시간을 프로젝트에 할당하기

+ 1
- 1
config/locales/lt.yml View 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

+ 1
- 1
config/locales/lv.yml View 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

+ 1
- 1
config/locales/mk.yml View 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: Додели ги пријавените часови на проектот

+ 1
- 1
config/locales/mn.yml View 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: Мэдэгдсэн асуудлуудыг төсөлд оноох

+ 1
- 1
config/locales/nl.yml View 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}."

+ 1
- 1
config/locales/no.yml View File

@@ -665,7 +665,7 @@
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

+ 1
- 1
config/locales/pl.yml View 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}."

+ 1
- 1
config/locales/pt-BR.yml View 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

+ 1
- 1
config/locales/pt.yml View 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

+ 1
- 1
config/locales/ro.yml View 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

+ 1
- 1
config/locales/ru.yml View 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} редакции."

+ 1
- 1
config/locales/sk.yml View 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

+ 1
- 1
config/locales/sl.yml View 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

+ 1
- 1
config/locales/sq.yml View 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

+ 1
- 1
config/locales/sr-YU.yml View 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

+ 1
- 1
config/locales/sr.yml View 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: Додели пријављене сате пројекту

+ 1
- 1
config/locales/sv.yml View 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

+ 1
- 1
config/locales/th.yml View 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: ระบุเวลาที่ใช้ในโครงการนี้

+ 1
- 1
config/locales/tr.yml View 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

+ 1
- 1
config/locales/uk.yml View 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

+ 1
- 1
config/locales/vi.yml View 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

+ 1
- 1
config/locales/zh-TW.yml View File

@@ -1217,7 +1217,7 @@
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: 刪除已報工的時數

+ 1
- 1
config/locales/zh.yml View 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: 将已上报的工作量提交到项目中

+ 2
- 2
lib/redmine.rb View 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)

+ 145
- 102
lib/redmine/helpers/gantt.rb View 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

+ 1
- 1
test/functional/gantts_controller_test.rb View 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,

Loading…
Cancel
Save