Commit 2a00565b authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Added chinese simplified translation (Andy Wu)

Fixed rfpdf chinese.rb

git-svn-id: http://redmine.rubyforge.org/svn/trunk@393 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 5e0e9518
......@@ -33,6 +33,11 @@ module IfpdfHelper
AddSJISFont()
@font_for_content = 'SJIS'
@font_for_footer = 'SJIS'
when :zh
extend(PDF_Chinese)
AddBig5Font()
@font_for_content = 'Big5'
@font_for_footer = 'Big5'
else
@font_for_content = 'Arial'
@font_for_footer = 'Helvetica'
......
<%= @added_to %>
<%= @attachments.size %> files(s) added.
<% @attachments.each do |attachment | %>
- <%= attachment.filename %><% end %>
<%= @url %>
\ No newline at end of file
A document has been added to <%= @document.project.name %> (<%= @document.category.name %>):
<%= l(:field_title) %>: <%= @document.title %>
http://<%= Setting.host_name %>/documents/show/<%= @document.id %>
\ No newline at end of file
Issue #<%= @issue.id %> has been reported.
----------------------------------------
<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %>
\ No newline at end of file
Issue #<%= @issue.id %> has been updated.
<%= @journal.user.name %>
<% for detail in @journal.details %>
<%= show_detail(detail, true) %>
<% end %>
<%= @journal.notes if @journal.notes? %>
----------------------------------------
<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %>
\ No newline at end of file
To change your password, use the following link:
http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
\ No newline at end of file
To activate your redMine account, use the following link:
http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
\ No newline at end of file
This diff is collapsed.
......@@ -30,7 +30,7 @@ class ApplicationControllerTest < Test::Unit::TestCase
# check that all 6 supported languages are valid
def test_localization
assert_equal 6, GLoc.valid_languages.size
assert_equal 7, GLoc.valid_languages.size
GLoc.valid_languages.each do |lang|
assert set_language_if_valid(lang)
end
......
......@@ -132,7 +132,7 @@ module PDF_Chinese
while(i<nb)
c=s[i]
if(c<128)
l+=cw[c.chr]
l+=cw[c.chr] if cw[c.chr]
i+=1
else
l+=1000
......@@ -170,13 +170,13 @@ module PDF_Chinese
b2='LR'
else
b2=''
if(border.index('L').nil?)
if(border.to_s.index('L'))
b2+='L'
end
if(border.index('R').nil?)
if(border.to_s.index('R'))
b2+='R'
end
b=border.index('T').nil? ? b2+'T' : b2
b=border.to_s.index('T') ? b2+'T' : b2
end
end
sep=-1
......@@ -209,7 +209,7 @@ module PDF_Chinese
sep=i
ls=l
end
l+=ascii ? cw[c.chr] : 1000
l+=ascii ? (cw[c.chr] || 0) : 1000
if(l>wmax)
#Automatic line break
if(sep==-1 or i==j)
......@@ -233,7 +233,7 @@ module PDF_Chinese
end
end
#Last chunk
if(border and not border.index('B').nil?)
if(border and not border.to_s.index('B').nil?)
b+='B'
end
Cell(w,h,s[j,i-j],b,2,align,fill)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment