]> source.dussan.org Git - redmine.git/commitdiff
PDF: switch FPDF ANSI or TCPDF UTF-8 with general_pdf_encoding value instead of langu...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 10 Apr 2011 08:34:52 +0000 (08:34 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 10 Apr 2011 08:34:52 +0000 (08:34 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5385 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/export/pdf.rb
lib/redmine/helpers/gantt.rb

index 3956248810369fbe439c134b463794fc636b9879..24f66cebda5a02e9f6fb4cc5624916ad15482b8f 100644 (file)
@@ -189,11 +189,7 @@ module Redmine
 
       # Returns a PDF string of a list of issues
       def issues_to_pdf(issues, project, query)
-        if ( current_language.to_s.downcase == 'ko'    ||
-             current_language.to_s.downcase == 'ja'    ||
-             current_language.to_s.downcase == 'zh'    ||
-             current_language.to_s.downcase == 'zh-tw' ||
-             current_language.to_s.downcase == 'th'    )
+        if l(:general_pdf_encoding).upcase != 'UTF-8'
           pdf = IFPDF.new(current_language)
         else
           pdf = ITCPDF.new(current_language)
@@ -269,11 +265,7 @@ module Redmine
 
       # Returns a PDF string of a single issue
       def issue_to_pdf(issue)
-        if ( current_language.to_s.downcase == 'ko'    ||
-             current_language.to_s.downcase == 'ja'    ||
-             current_language.to_s.downcase == 'zh'    ||
-             current_language.to_s.downcase == 'zh-tw' ||
-             current_language.to_s.downcase == 'th'    )
+        if l(:general_pdf_encoding).upcase != 'UTF-8'
           pdf = IFPDF.new(current_language)
         else
           pdf = ITCPDF.new(current_language)
index d6600bfe72d4ac206e328cfac34c41c2ecc69867..83fdcb025d137f68868bd42a7a6c488c25140871 100644 (file)
@@ -507,11 +507,7 @@ module Redmine
       end if Object.const_defined?(:Magick)
 
       def to_pdf
-        if ( current_language.to_s.downcase == 'ko'    ||
-             current_language.to_s.downcase == 'ja'    ||
-             current_language.to_s.downcase == 'zh'    ||
-             current_language.to_s.downcase == 'zh-tw' ||
-             current_language.to_s.downcase == 'th'    )
+        if l(:general_pdf_encoding).upcase != 'UTF-8'
           pdf = ::Redmine::Export::PDF::IFPDF.new(current_language)
         else
           pdf = ::Redmine::Export::PDF::ITCPDF.new(current_language)