Merged r1492 to r1498 from trunk.

git-svn-id: http://redmine.rubyforge.org/svn/branches/0.7-stable@1529 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2008-06-14 12:09:42 +00:00
1 parent 15ecbbf928
commit 3f62305e91
16 files changed
+98 -59

No files matched your search

+1 -1
View File
@@ -298,7 +298,7 @@ module ApplicationHelper
# source:some/file#L120 -> Link to line 120 of the file # source:some/file#L120 -> Link to line 120 of the file
# source:some/file@52#L120 -> Link to line 120 of the file's revision 52 # source:some/file@52#L120 -> Link to line 120 of the file's revision 52
# export:some/file -> Force the download of the file # export:some/file -> Force the download of the file
text = text.gsub(%r{([\s\(,-^])(!)?(attachment|document|version|commit|source|export)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*|"[^"]+"))(?=[[:punct:]]|\s|<|$)}) do |m| text = text.gsub(%r{([\s\(,\-\>]|^)(!)?(attachment|document|version|commit|source|export)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*|"[^"]+"))(?=[[:punct:]]|\s|<|$)}) do |m|
leading, esc, prefix, sep, oid = $1, $2, $3, $5 || $7, $6 || $8 leading, esc, prefix, sep, oid = $1, $2, $3, $5 || $7, $6 || $8
link = nil link = nil
if esc.nil? if esc.nil?
+1 -1
View File
@@ -45,7 +45,7 @@
<p class="other-formats"> <p class="other-formats">
<%= l(:label_export_to) %> <%= l(:label_export_to) %>
<span><%= link_to 'Atom', {:format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span> <span><%= link_to 'Atom', {:query_id => @query, :format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span>
<span><%= link_to 'CSV', {:format => 'csv'}, :class => 'csv' %></span> <span><%= link_to 'CSV', {:format => 'csv'}, :class => 'csv' %></span>
<span><%= link_to 'PDF', {:format => 'pdf'}, :class => 'pdf' %></span> <span><%= link_to 'PDF', {:format => 'pdf'}, :class => 'pdf' %></span>
</p> </p>
+2
View File
@@ -17,6 +17,7 @@
</div> </div>
<br /> <br />
<% unless @replies.empty? %>
<h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3> <h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3>
<% @replies.each do |message| %> <% @replies.each do |message| %>
<a name="<%= "message-#{message.id}" %>"></a> <a name="<%= "message-#{message.id}" %>"></a>
@@ -30,6 +31,7 @@
<%= link_to_attachments message.attachments, :no_author => true %> <%= link_to_attachments message.attachments, :no_author => true %>
</div> </div>
<% end %> <% end %>
<% end %>
<% if !@topic.locked? && authorize_for('messages', 'reply') %> <% if !@topic.locked? && authorize_for('messages', 'reply') %>
<p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p> <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
+4
View File
@@ -620,3 +620,7 @@ default_activity_development: Fejlesztés
enumeration_issue_priorities: Feladat prioritások enumeration_issue_priorities: Feladat prioritások
enumeration_doc_categories: Dokumentum kategóriák enumeration_doc_categories: Dokumentum kategóriák
enumeration_activities: Tevékenységek (idő rögzítés) enumeration_activities: Tevékenységek (idő rögzítés)
mail_body_reminder: "%d neked kiosztott feladat határidős az elkövetkező %d napban:"
mail_subject_reminder: "%d feladat határidős az elkövetkező napokban"
text_user_wrote: '%s írta:'
label_duplicated_by: duplikálta
+5 -1
View File
@@ -91,6 +91,8 @@ mail_body_account_information_external: Du kan bruke din "%s"-konto for å logge
mail_body_account_information: Informasjon om din konto mail_body_account_information: Informasjon om din konto
mail_subject_account_activation_request: %s kontoaktivering mail_subject_account_activation_request: %s kontoaktivering
mail_body_account_activation_request: 'En ny bruker (%s) er registrert, og avventer din godkjenning:' mail_body_account_activation_request: 'En ny bruker (%s) er registrert, og avventer din godkjenning:'
mail_subject_reminder: "%d sak(er) har frist de kommende dagene"
mail_body_reminder: "%d sak(er) som er tildelt deg har frist de kommende %d dager:"
gui_validation_error: 1 feil gui_validation_error: 1 feil
gui_validation_error_plural: %d feil gui_validation_error_plural: %d feil
@@ -445,7 +447,8 @@ label_loading: Laster...
label_relation_new: Ny relasjon label_relation_new: Ny relasjon
label_relation_delete: Slett relasjon label_relation_delete: Slett relasjon
label_relates_to: relatert til label_relates_to: relatert til
label_duplicates: duplikater label_duplicates: dupliserer
label_duplicated_by: duplisert av
label_blocks: blokkerer label_blocks: blokkerer
label_blocked_by: blokkert av label_blocked_by: blokkert av
label_precedes: kommer før label_precedes: kommer før
@@ -594,6 +597,7 @@ text_destroy_time_entries_question: %.02f timer er ført på sakene du er i ferd
text_destroy_time_entries: Slett førte timer text_destroy_time_entries: Slett førte timer
text_assign_time_entries_to_project: Overfør førte timer til prosjektet text_assign_time_entries_to_project: Overfør førte timer til prosjektet
text_reassign_time_entries: 'Overfør førte timer til denne saken:' text_reassign_time_entries: 'Overfør førte timer til denne saken:'
text_user_wrote: '%s skrev:'
default_role_manager: Leder default_role_manager: Leder
default_role_developper: Utvikler default_role_developper: Utvikler
+7 -2
View File
@@ -332,7 +332,7 @@ label_internal: Внутренний
label_last_changes: менее %d изменений label_last_changes: менее %d изменений
label_change_view_all: Просмотреть все изменения label_change_view_all: Просмотреть все изменения
label_personalize_page: Персонализировать данную страницу label_personalize_page: Персонализировать данную страницу
label_comment: Комментировать label_comment: комментарий
label_comment_plural: Комментарии label_comment_plural: Комментарии
label_comment_add: Оставить комментарий label_comment_add: Оставить комментарий
label_comment_added: Добавленный комментарий label_comment_added: Добавленный комментарий
@@ -621,4 +621,9 @@ label_overall_activity: Сводная активность
setting_default_projects_public: Новые проекты являются публичными setting_default_projects_public: Новые проекты являются публичными
error_scm_annotate: "Данные отсутствуют или не могут быть подписаны." error_scm_annotate: "Данные отсутствуют или не могут быть подписаны."
label_planning: Планирование label_planning: Планирование
text_subprojects_destroy_warning: 'Its subproject(s): %s will be also deleted.' text_subprojects_destroy_warning: 'Подпроекты: %s также будут удалены.'
label_and_its_subprojects: %s и все подпроекты
mail_body_reminder: "%d назначенных на вас задач на следующие %d дней:"
mail_subject_reminder: "%d назначенных на вас задач в ближайшие дни"
text_user_wrote: '%s написал:'
label_duplicated_by: duplicated by
+4
View File
@@ -91,6 +91,8 @@ mail_body_account_information_external: 您可以使用 "%s" 帳號登入 Redmin
mail_body_account_information: 您的 Redmine 帳號資訊 mail_body_account_information: 您的 Redmine 帳號資訊
mail_subject_account_activation_request: Redmine 帳號啟用需求通知 mail_subject_account_activation_request: Redmine 帳號啟用需求通知
mail_body_account_activation_request: '有位新用戶 (%s) 已經完成註冊,正等候您的審核:' mail_body_account_activation_request: '有位新用戶 (%s) 已經完成註冊,正等候您的審核:'
mail_subject_reminder: "您有 %d 個項目即將到期"
mail_body_reminder: "%d 個指派給您的項目,將於 %d 天之內到期:"
gui_validation_error: 1 個錯誤 gui_validation_error: 1 個錯誤
gui_validation_error_plural: %d 個錯誤 gui_validation_error_plural: %d 個錯誤
@@ -446,6 +448,7 @@ label_relation_new: 建立新關聯
label_relation_delete: 刪除關聯 label_relation_delete: 刪除關聯
label_relates_to: 關聯至 label_relates_to: 關聯至
label_duplicates: 已重複 label_duplicates: 已重複
label_duplicated_by: 與後面所列項目重複
label_blocks: 阻擋 label_blocks: 阻擋
label_blocked_by: 被阻擋 label_blocked_by: 被阻擋
label_precedes: 優先於 label_precedes: 優先於
@@ -594,6 +597,7 @@ text_destroy_time_entries_question: 您即將刪除的項目已報工 %.02f 小
text_destroy_time_entries: 刪除已報工的時數 text_destroy_time_entries: 刪除已報工的時數
text_assign_time_entries_to_project: 指定已報工的時數至專案中 text_assign_time_entries_to_project: 指定已報工的時數至專案中
text_reassign_time_entries: '重新指定已報工的時數至此項目:' text_reassign_time_entries: '重新指定已報工的時數至此項目:'
text_user_wrote: '%s 先前提到:'
default_role_manager: 管理人員 default_role_manager: 管理人員
default_role_developper: 開發人員 default_role_developper: 開發人員
+4 -2
View File
@@ -91,6 +91,8 @@ mail_body_account_information_external: 您可以使用您的 "%s" 帐号来登
mail_body_account_information: 您的帐号信息 mail_body_account_information: 您的帐号信息
mail_subject_account_activation_request: %s帐号激活请求 mail_subject_account_activation_request: %s帐号激活请求
mail_body_account_activation_request: '新用户(%s)已完成注册,正在等候您的审核:' mail_body_account_activation_request: '新用户(%s)已完成注册,正在等候您的审核:'
mail_subject_reminder: "%d 个问题需要尽快解决"
mail_body_reminder: "指派给您的 %d 个问题需要在 %d 天内完成:"
gui_validation_error: 1 个错误 gui_validation_error: 1 个错误
gui_validation_error_plural: %d 个错误 gui_validation_error_plural: %d 个错误
@@ -594,6 +596,7 @@ text_destroy_time_entries_question: 您要删除的问题已经上报了 %.02f
text_destroy_time_entries: 删除上报的工作量 text_destroy_time_entries: 删除上报的工作量
text_assign_time_entries_to_project: 将已上报的工作量提交到项目中 text_assign_time_entries_to_project: 将已上报的工作量提交到项目中
text_reassign_time_entries: '将已上报的工作量指定到此问题:' text_reassign_time_entries: '将已上报的工作量指定到此问题:'
text_user_wrote: '%s 写到:'
default_role_manager: 管理人员 default_role_manager: 管理人员
default_role_developper: 开发人员 default_role_developper: 开发人员
@@ -620,5 +623,4 @@ default_activity_development: 开发
enumeration_issue_priorities: 问题优先级 enumeration_issue_priorities: 问题优先级
enumeration_doc_categories: 文档类别 enumeration_doc_categories: 文档类别
enumeration_activities: 活动(时间跟踪) enumeration_activities: 活动(时间跟踪)
mail_subject_reminder: "%d issue(s) due in the next days" label_duplicated_by: duplicated by
mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d days:"
+13 -2
View File
@@ -127,11 +127,22 @@ module Redmine
block.call(io) if block_given? block.call(io) if block_given?
end end
rescue Errno::ENOENT => e rescue Errno::ENOENT => e
msg = strip_credential(e.message)
# The command failed, log it and re-raise # The command failed, log it and re-raise
logger.error("SCM command failed: #{cmd}\n with: #{e.message}") logger.error("SCM command failed: #{strip_credential(cmd)}\n with: #{msg}")
raise CommandFailed.new(e.message) raise CommandFailed.new(msg)
end end
end end
# Hides username/password in a given command
def self.hide_credential(cmd)
q = (RUBY_PLATFORM =~ /mswin/ ? '"' : "'")
cmd.to_s.gsub(/(\-\-(password|username))\s+(#{q}[^#{q}]+#{q}|[^#{q}]\S+)/, '\\1 xxxx')
end
def strip_credential(cmd)
self.class.hide_credential(cmd)
end
end end
class Entries < Array class Entries < Array
+2 -1
View File
@@ -237,7 +237,8 @@ namespace :redmine do
text = text.gsub(/\[\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"} text = text.gsub(/\[\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
text = text.gsub(/\[wiki:\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"} text = text.gsub(/\[wiki:\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
text = text.gsub(/\[wiki:\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"} text = text.gsub(/\[wiki:\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
text = text.gsub(/\[wiki:([^\s\]]+).*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"} text = text.gsub(/\[wiki:([^\s\]]+)\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
text = text.gsub(/\[wiki:([^\s\]]+)\s(.*)\]/) {|s| "[[#{$1.delete(',./?;|:')}|#{$2.delete(',./?;|:')}]]"}
# Links to pages UsingJustWikiCaps # Links to pages UsingJustWikiCaps
text = text.gsub(/([^!]|^)(^| )([A-Z][a-z]+[A-Z][a-zA-Z]+)/, '\\1\\2[[\3]]') text = text.gsub(/([^!]|^)(^| )([A-Z][a-z]+[A-Z][a-zA-Z]+)/, '\\1\\2[[\3]]')
@@ -84,13 +84,13 @@ Calendar._TT["INFO"] = "關於 calendar";
Calendar._TT["ABOUT"] = Calendar._TT["ABOUT"] =
"DHTML 日期/時間 選擇器\n" + "DHTML 日期/時間 選擇器\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"最For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "最新版本取得位址: http://www.dynarch.com/projects/calendar/\n" +
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "使用 GNU LGPL 發行. 參考 http://gnu.org/licenses/lgpl.html 以取得更多關於 LGPL 之細節。" +
"\n\n" + "\n\n" +
"Date selection:\n" + "日期選擇方式:\n" +
"- Use the \xab, \xbb buttons to select year\n" + "- 使用滑鼠點擊 \xab 、 \xbb 按鈕選擇年份\n" +
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + "- 使用滑鼠點擊 " + String.fromCharCode(0x2039) + " 、 " + String.fromCharCode(0x203a) + " 按鈕選擇月份\n" +
"- Hold mouse button on any of the above buttons for faster selection."; "- 使用滑鼠點擊上述按鈕並按住不放,可開啟快速選單。";
Calendar._TT["ABOUT_TIME"] = "\n\n" + Calendar._TT["ABOUT_TIME"] = "\n\n" +
"時間選擇方式:\n" + "時間選擇方式:\n" +
"- 「單擊」時分秒為遞增\n" + "- 「單擊」時分秒為遞增\n" +
+20 -20
View File
@@ -82,33 +82,33 @@ Calendar._TT = {};
Calendar._TT["INFO"] = "关于日历"; Calendar._TT["INFO"] = "关于日历";
Calendar._TT["ABOUT"] = Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" + "DHTML 日期/时间 选择器\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "最新版本请访问: http://www.dynarch.com/projects/calendar/\n" +
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "遵循 GNU LGPL 发布。详情请查阅 http://gnu.org/licenses/lgpl.html " +
"\n\n" + "\n\n" +
"Date selection:\n" + "日期选择:\n" +
"- Use the \xab, \xbb buttons to select year\n" + "- 使用 \xab,\xbb 按钮选择年\n" +
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + "- 使用 " + String.fromCharCode(0x2039) + "," + String.fromCharCode(0x203a) + " 按钮选择月\n" +
"- Hold mouse button on any of the above buttons for faster selection."; "- 在上述按钮上按住不放可以快速选择";
Calendar._TT["ABOUT_TIME"] = "\n\n" + Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Time selection:\n" + "时间选择:\n" +
"- Click on any of the time parts to increase it\n" + "- 点击时间的任意部分来增加\n" +
"- or Shift-click to decrease it\n" + "- Shift加点击来减少\n" +
"- or click and drag for faster selection."; "- 点击后拖动进行快速选择";
Calendar._TT["PREV_YEAR"] = "上年 (hold for menu)"; Calendar._TT["PREV_YEAR"] = "上年(按住不放显示菜单)";
Calendar._TT["PREV_MONTH"] = "上月 (hold for menu)"; Calendar._TT["PREV_MONTH"] = "上月(按住不放显示菜单)";
Calendar._TT["GO_TODAY"] = "回到今天"; Calendar._TT["GO_TODAY"] = "回到今天";
Calendar._TT["NEXT_MONTH"] = "下月 (hold for menu)"; Calendar._TT["NEXT_MONTH"] = "下月(按住不放显示菜单)";
Calendar._TT["NEXT_YEAR"] = "下年 (hold for menu)"; Calendar._TT["NEXT_YEAR"] = "下年(按住不放显示菜单)";
Calendar._TT["SEL_DATE"] = "选择日期"; Calendar._TT["SEL_DATE"] = "选择日期";
Calendar._TT["DRAG_TO_MOVE"] = "拖动"; Calendar._TT["DRAG_TO_MOVE"] = "拖动";
Calendar._TT["PART_TODAY"] = " (今日)"; Calendar._TT["PART_TODAY"] = " (今日)";
// the following is to inform that "%s" is to be the first day of week // the following is to inform that "%s" is to be the first day of week
// %s will be replaced with the day name. // %s will be replaced with the day name.
Calendar._TT["DAY_FIRST"] = "Display %s first"; Calendar._TT["DAY_FIRST"] = "一周开始于 %s";
// This may be locale-dependent. It specifies the week-end days, as an array // This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
@@ -117,11 +117,11 @@ Calendar._TT["WEEKEND"] = "0,6";
Calendar._TT["CLOSE"] = "关闭"; Calendar._TT["CLOSE"] = "关闭";
Calendar._TT["TODAY"] = "今天"; Calendar._TT["TODAY"] = "今天";
Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value"; Calendar._TT["TIME_PART"] = "Shift加点击或者拖动来变更";
// date formats // date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["TT_DATE_FORMAT"] = "星期%a %b%e日";
Calendar._TT["WK"] = "wk"; Calendar._TT["WK"] = "周";
Calendar._TT["TIME"] = "Time:"; Calendar._TT["TIME"] = "时间:";
@@ -9,6 +9,8 @@ jsToolBar.strings['Heading 2'] = '標題 2';
jsToolBar.strings['Heading 3'] = '標題 3'; jsToolBar.strings['Heading 3'] = '標題 3';
jsToolBar.strings['Unordered list'] = '項目清單'; jsToolBar.strings['Unordered list'] = '項目清單';
jsToolBar.strings['Ordered list'] = '編號清單'; jsToolBar.strings['Ordered list'] = '編號清單';
jsToolBar.strings['Preformatted text'] = '格式化文字'; jsToolBar.strings['Quote'] = '引文';
jsToolBar.strings['Unquote'] = '取消引文';
jsToolBar.strings['Preformatted text'] = '已格式文字';
jsToolBar.strings['Wiki link'] = '連結至 Wiki 頁面'; jsToolBar.strings['Wiki link'] = '連結至 Wiki 頁面';
jsToolBar.strings['Image'] = '圖片'; jsToolBar.strings['Image'] = '圖片';
@@ -1,14 +1,16 @@
jsToolBar.strings = {}; jsToolBar.strings = {};
jsToolBar.strings['Strong'] = 'Strong'; jsToolBar.strings['Strong'] = '粗体';
jsToolBar.strings['Italic'] = 'Italic'; jsToolBar.strings['Italic'] = '斜体';
jsToolBar.strings['Underline'] = 'Underline'; jsToolBar.strings['Underline'] = '下划线';
jsToolBar.strings['Deleted'] = 'Deleted'; jsToolBar.strings['Deleted'] = '删除线';
jsToolBar.strings['Code'] = 'Inline Code'; jsToolBar.strings['Code'] = '程序代码';
jsToolBar.strings['Heading 1'] = 'Heading 1'; jsToolBar.strings['Heading 1'] = '标题 1';
jsToolBar.strings['Heading 2'] = 'Heading 2'; jsToolBar.strings['Heading 2'] = '标题 2';
jsToolBar.strings['Heading 3'] = 'Heading 3'; jsToolBar.strings['Heading 3'] = '标题 3';
jsToolBar.strings['Unordered list'] = 'Unordered list'; jsToolBar.strings['Unordered list'] = '无序列表';
jsToolBar.strings['Ordered list'] = 'Ordered list'; jsToolBar.strings['Ordered list'] = '排序列表';
jsToolBar.strings['Preformatted text'] = 'Preformatted text'; jsToolBar.strings['Quote'] = '引用';
jsToolBar.strings['Wiki link'] = 'Link to a Wiki page'; jsToolBar.strings['Unquote'] = '删除引用';
jsToolBar.strings['Image'] = 'Image'; jsToolBar.strings['Preformatted text'] = '格式化文本';
jsToolBar.strings['Wiki link'] = '连接到 Wiki 页面';
jsToolBar.strings['Image'] = '图片';
+3 -1
View File
@@ -108,7 +108,9 @@ class ApplicationHelperTest < HelperTestCase
'!version:"1.0"' => 'version:"1.0"', '!version:"1.0"' => 'version:"1.0"',
'!source:/some/file' => 'source:/some/file', '!source:/some/file' => 'source:/some/file',
# invalid expressions # invalid expressions
'source:' => 'source:' 'source:' => 'source:',
# url hash
"http://foo.bar/FAQ#3" => '<a class="external" href="http://foo.bar/FAQ#3">http://foo.bar/FAQ#3</a>',
} }
@project = Project.find(1) @project = Project.find(1)
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
+8 -8
View File
@@ -189,7 +189,7 @@ module PDF_Chinese
c=s[i] c=s[i]
#Check if ASCII or MB #Check if ASCII or MB
ascii=(c<128) ascii=(c<128)
if(c=="\n") if(c.chr=="\n")
#Explicit line break #Explicit line break
Cell(w,h,s[j,i-j],b,2,align,fill) Cell(w,h,s[j,i-j],b,2,align,fill)
i+=1 i+=1
@@ -209,12 +209,12 @@ module PDF_Chinese
sep=i sep=i
ls=l ls=l
end end
l+=ascii ? (cw[c.chr] || 0) : 1000 l+=ascii ? (cw[c.chr] || 0) : 1100
if(l>wmax) if(l>wmax)
#Automatic line break #Automatic line break
if(sep==-1 or i==j) if(sep==-1 or i==j)
if(i==j) if(i==j)
i+=ascii ? 1 : 2 i+=ascii ? 1 : 3
end end
Cell(w,h,s[j,i-j],b,2,align,fill) Cell(w,h,s[j,i-j],b,2,align,fill)
else else
@@ -229,7 +229,7 @@ module PDF_Chinese
b=b2 b=b2
end end
else else
i+=ascii ? 1 : 2 i+=ascii ? 1 : 3
end end
end end
#Last chunk #Last chunk
@@ -265,7 +265,7 @@ module PDF_Chinese
c=s[i] c=s[i]
#Check if ASCII or MB #Check if ASCII or MB
ascii=(c<128) ascii=(c<128)
if(c=="\n") if(c.chr=="\n")
#Explicit line break #Explicit line break
Cell(w,h,s[j,i-j],0,2,'',0,link) Cell(w,h,s[j,i-j],0,2,'',0,link)
i+=1 i+=1
@@ -283,7 +283,7 @@ module PDF_Chinese
if(!ascii or c==' ') if(!ascii or c==' ')
sep=i sep=i
end end
l+=ascii ? cw[c.chr] : 1000 l+=ascii ? cw[c.chr] : 1100
if(l>wmax) if(l>wmax)
#Automatic line break #Automatic line break
if(sep==-1 or i==j) if(sep==-1 or i==j)
@@ -298,7 +298,7 @@ module PDF_Chinese
next next
end end
if(i==j) if(i==j)
i+=ascii ? 1 : 2 i+=ascii ? 1 : 3
end end
Cell(w,h,s[j,i-j],0,2,'',0,link) Cell(w,h,s[j,i-j],0,2,'',0,link)
else else
@@ -315,7 +315,7 @@ module PDF_Chinese
end end
nl+=1 nl+=1
else else
i+=ascii ? 1 : 2 i+=ascii ? 1 : 3
end end
end end
#Last chunk #Last chunk