Skip to content

Commit

Permalink
fix: harmonize quotes usage in messages (#1132)
Browse files Browse the repository at this point in the history
- used double quotes everywhere Fix #1071
- also updated localized messages
  • Loading branch information
rdeltour committed Apr 29, 2020
1 parent d2728ee commit 659ab76
Show file tree
Hide file tree
Showing 154 changed files with 2,919 additions and 2,889 deletions.
332 changes: 166 additions & 166 deletions src/main/resources/com/adobe/epubcheck/messages/MessageBundle.properties

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This is the default MessageBundle.properties file

#Info
INF_001=前述規則正在審訂中,而他的嚴重性可能會在未來版本中調整變更。詳情請見 %1$s 上的討論。

#Accessibility
ACC_001=HTML元素「img」或者「area」缺少「alt」屬性。
ACC_002=HTML輸入元素「input」缺少對應的標籤元素「label」參照。
Expand Down Expand Up @@ -35,7 +38,7 @@ CHK_007=當在處理客製訊息檔案「%1$s」時遇到錯誤:「%2$s」。
CHK_008=當在處理項目「%1$s」時遇到錯誤;跳過對該項目的其他檢查。

#CSS
CSS_001=\'%1$s\' 屬性不能包含在EPUB的樣式表中。
CSS_001="%1$s" 屬性不能包含在EPUB的樣式表中。
CSS_002=發現空白或者NULL參照。
CSS_003=只允許 UTF-8 以及 UTF-16 編碼,偵測為 %1$s 。
CSS_004=只允許 UTF-8 以及 UTF-16 編碼,偵測為 %1$s BOM。
Expand All @@ -44,7 +47,7 @@ CSS_006=CSS 選擇器指定了固定位置選項
CSS_007=Font-face 參照 %1$s 指定了非標準字型檔案類型 %2$s 。
CSS_008=當在解譯 CSS 時遇到錯誤: %1$s 。
CSS_009=使用某些 CSS ,像是Columns、Transforms、Transitions、box-sizing 或者 KeyFrames 會造成分頁問題。
CSS_010=樣式表的檔案類型若不使用 'text/css' ,則必須提供 fallback 。
CSS_010=樣式表的檔案類型若不使用 "text/css" ,則必須提供 fallback 。
CSS_011=太多CSS檔案。
CSS_011_SUG=請考慮合併 CSS 檔案來減少 CSS 檔案數量。
CSS_012=文件連結到多個 CSS 檔案。
Expand Down Expand Up @@ -145,10 +148,10 @@ NAV_011_SUG.spine=書脊 spine
NAV_011_SUG.document=文件 document

#NCX EPUB v2 Table of Contents
NCX_001=NCX 識別符 ('%1$s') 與OPF識別符 ('%2$s') 不一致。
NCX_001=NCX 識別符 ("%1$s") 與OPF識別符 ("%2$s") 不一致。
NCX_002=spine 元素中沒有 toc 屬性。
NCX_003=EPUB 2版閱讀器需要一個 .NCX 檔案供目錄導覽使用。
NCX_004=NCX 識別符 ('dtb:uid' metadata) 不應包含前導與尾隨空白。
NCX_004=NCX 識別符 ("dtb:uid" metadata) 不應包含前導與尾隨空白。
NCX_005=在 .ncx 檔案中找到 ncx "page-list"
NCX_006=NCX 文件中的 "text" 標籤為空。

Expand All @@ -159,14 +162,14 @@ OPF_003=EPUB中有「%1$s」項目,但卻沒有在 OPF 的 manifest 裡宣告
OPF_004=無效的字首宣告:不能有前導與尾隨空白。
OPF_004a=無效的字首宣告:字首為空。
OPF_004b=「%1$s」是無效的字首:必須是正確的無冒號名稱(又稱為「NCName」)。
OPF_004c=無效的字首宣告:字首「%1$s」後必須要有冒號字元 (':')。
OPF_004c=無效的字首宣告:字首「%1$s」後必須要有冒號字元 (":")。
OPF_004d=無效的字首宣告:字首「%1$s」必須以空格分隔其 URI。
OPF_004e=無效的字首宣告: 在字首與 URI 間發現不正確的空白。
OPF_004f=無效的字首宣告:在字首映射發現不正確的空白。
OPF_005=無效的字首宣告:字首「%1$s」的 URI 不存在。
OPF_006=無效的字首宣告:URI「%1$s」不是正確的 URI。
OPF_007=重新宣告保留的字首「%1$s」。
OPF_007a=無效的字首映射:不得宣告字首 '_' 。  
OPF_007a=無效的字首映射:不得宣告字首 "_" 。  
OPF_007b=無效的字首映射:預設詞彙「%1$s」不得被重新宣告。
OPF_008=不允許為核心媒體類型「%1$s」綁定處理器 (handler)。
OPF_009=媒體類型「%1$s」已經指派給一個處理器 (handler),其 ID為「%2$s」。
Expand All @@ -176,8 +179,8 @@ OPF_012=item 屬性「%1$s」在媒體類型「%2$s」中沒有定義。
OPF_013=物件標籤中的 type 屬性「%1$s」與在 OPF manifest中宣告的媒體類型「%2$s」不一致。
OPF_014=「%1$s」屬性需要在 OPF 檔案中宣告。
OPF_015=「%1$s」屬性不應在 OPF 檔案中宣告。
OPF_016=\"rootfile\" 元素缺少必須的屬性 \"full-path\"
OPF_017=\"rootfile\" 元素中的 \"full-path\" 屬性不得為空。
OPF_016="rootfile" 元素缺少必須的屬性 "full-path" 。
OPF_017="rootfile" 元素中的 "full-path" 屬性不得為空。
OPF_018=打包檔(Package Document)標註有「remote-resource」(外部資源)屬性,但是沒有發現任何外部資源<br>
OPF_018b=打包檔(Package Document)標註有「remote-resource」(外部資源)屬性/property,但是沒有發現任何外部資源;請確認此處的屬性/property標註置是否有誤。
OPF_019=OPF 檔案裡找不到 Spine 標籤。
Expand All @@ -193,13 +196,13 @@ OPF_031=Guide 參照元素列表中的檔案未於 OPF manifest 中宣告: %1$
OPF_032=Guide 參照「%1$s」並非正確的「OPS 內容文件」。
OPF_033=Spine包含了 no linear 資源。
OPF_034=Spine 裡對 id 為「%1$s」的manifest 項目重複參照。
OPF_035=XHTML/OPS 並不適合使用媒體類型 'text/html'
OPF_035_SUG=使用 'application/xhtml+xml' 取代。
OPF_035=XHTML/OPS 並不適合使用媒體類型 "text/html"
OPF_035_SUG=使用 "application/xhtml+xml" 取代。
OPF_036=閱讀系統可能不支援影片類型「%1$s」。
OPF_036_SUG=使用 'video/mp4'、'video/h264''video/webm' 取代。
OPF_036_SUG=使用 "video/mp4"、"video/h264""video/webm" 取代。
OPF_037=發現已淘汰的媒體類型「%1$s」。
OPF_038=在 OEBPS 1.2 脈絡下不應該使用媒體類別「%1$s」;使用 'text/x-oeb1-document' 取代。
OPF_039=在 OEBPS 1.2 脈絡下不應該使用媒體類別「%1$s」;使用 'text/x-oeb1-css' 取代。
OPF_038=在 OEBPS 1.2 脈絡下不應該使用媒體類別「%1$s」;使用 "text/x-oeb1-document" 取代。
OPF_039=在 OEBPS 1.2 脈絡下不應該使用媒體類別「%1$s」;使用 "text/x-oeb1-css" 取代。
OPF_040=找不到 fallback 項目。
OPF_041=找不到 fallback 樣式項目。
OPF_042=「%1$s」不是允許出現在 spine 的媒體類型。
Expand All @@ -210,7 +213,7 @@ OPF_046=Scripted 屬性並未設定媒體類型處理器 (handler)。
OPF_047=OPF 檔案使用了 OEBPS 1.2 語法以提供向後相容性。
OPF_048=Package 標籤缺少必須的唯一識別碼的屬性與值。
OPF_049=在 manifest 裡找不到項目 id「%1$s」。
OPF_050=TOC 屬性所參照的資源之 mime type 不是 NCX;預期為 'application/x-dtbncx+xml'
OPF_050=TOC 屬性所參照的資源之 mime type 不是 NCX;預期為 "application/x-dtbncx+xml"
OPF_051=圖片解析度超過推薦尺寸。
OPF_052=Role 的值「%1$s」不正確。
OPF_053=日期值「%1$s」並未遵循推薦語法,如 http://www.w3.org/TR/NOTE-datetime:%2$s。
Expand All @@ -228,10 +231,10 @@ OPF_062=在 opf 檔案的 spine 元素中發現了 Adobe page-map 屬性。
OPF_063=Manifest 裡找不到所參照的 Adobe page-map 項目「%1$s」。
OPF_064=OPF 宣告類型「%1$s」,使用 profile「%2$s」進行驗證。
OPF_065=無效的 metadata 宣告,可能是因為 metadata 中的「refines」造成迴圈。
OPF_066=缺少頁面 metadata 'dc:source''source-of'。當內容包含分頁標記時,頁面來源必須使用 'dc:source''source-of' 屬性進行識別。
OPF_066=缺少頁面 metadata "dc:source""source-of"。當內容包含分頁標記時,頁面來源必須使用 "dc:source""source-of" 屬性進行識別。
OPF_067=資源「%1$s」不得同時作為 manifest 項目,又在 package metadata 中作為「link」元素。
OPF_068=未知的 collection role「%1$s」。
OPF_069=指定的 collection role URI「%1$s」不得在其主元件中使用字串 'idpf.org'
OPF_069=指定的 collection role URI「%1$s」不得在其主元件中使用字串 "idpf.org"
OPF_070=指定的 collection role「%1$s」其 URI 無效。
OPF_071=索引集合(Index collections)必須只能包含指向 XHTML 內容文件的資源。
OPF_072=Metadata 元素「%1$s」為空。
Expand All @@ -240,14 +243,14 @@ OPF_074=Package 資源「%1$s」在複數 manifest 項目中宣告。
OPF_075=預覽集合(preview collections)不得指向 EPUB 內容文件。
OPF_076=預覽集合(preview collcetions) 的 URI 連結元素不得包含 EPUB 內容片段標識符。
OPF_077=資料導覽文件不應被包含在 spine 中。
OPF_078=EPUB 字典必須至少要有一個包含字典內容 (epub:type 'dictionary') 的內容文件。
OPF_079=找到字典內容 (epub:type 'dictionary'),包裝文件應該宣告為 dc:type 'dictionary'
OPF_080=搜尋金鑰映射文件副檔名應為 '.xml'
OPF_078=EPUB 字典必須至少要有一個包含字典內容 (epub:type "dictionary") 的內容文件。
OPF_079=找到字典內容 (epub:type "dictionary"),包裝文件應該宣告為 dc:type "dictionary"
OPF_080=搜尋金鑰映射文件副檔名應為 ".xml"
OPF_081=找不到資源「%1$s」(被某個 EPUB 字典集合所參照)。
OPF_082=發現某個 EPUB 字典集合包含一個以上的搜尋金鑰映射文件。
OPF_083=發現某個 EPUB 字典集合沒有搜尋金鑰映射文件。
OPF_084=發現某個 EPUB 字典集合包含資源「%1$s」,既不是搜尋金鑰映射文件,也不是 XHTML 內容文件。
OPF_085='dc:identifier' 的值「%1$s」標註為 UUID,但是無效的 UUID。
OPF_085="dc:identifier" 的值「%1$s」標註為 UUID,但是無效的 UUID。
OPF_086=未來不再支援屬性%1$s,請考慮改用%2$s。
OPF_086_SUG.default=非預設前置屬性 a custom prefixed property
OPF_086_SUG.marc21xml-record=「record」關鍵字與媒體類型「application/marcxml+xml」
Expand All @@ -268,7 +271,7 @@ OPF_086b_SUG.sidebar=空的「aside」元件
OPF_086b_SUG.warning=「notice」屬性
OPF_087=%2$s類型的文件不允許使用%1$s的 epub:type 值。
OPF_088=%1$s不是有效的 epub:type 值。
OPF_089=找不到與 'alternate' link rel 匹配的關鍵字
OPF_089=找不到與 "alternate" link rel 匹配的關鍵字
OPF_090=建議以%1$s的 MIME 媒體類型代替%2$s。

#Package
Expand All @@ -277,11 +280,11 @@ PKG_003=無法讀到 EPUB 檔頭。這個 EPUB 檔案看來損壞了。
PKG_004=EPUB ZIP 檔頭損毀。
PKG_005=Mimetype 檔案具有額外的長度領域 %1$s。Mimetype 檔案不能使用 ZIP 格式額外的長度領域功能。
PKG_006=找不到 mimetype 檔案,或者不是卷宗中的第一個檔案。
PKG_007=Mimetype 檔案應該只包含字串 'application/epub+zip' 並且不應該被壓縮。
PKG_007=Mimetype 檔案應該只包含字串 "application/epub+zip" 並且不應該被壓縮。
PKG_008=無法讀取檔案「%1$s」。
PKG_009=OCF 檔名包含了不允許使用的字元:「%1$s」。
PKG_010=檔名包含空白,需要對 URI 進行轉義。請考慮刪除檔名中的空白。
PKG_011=檔名不允許以 '.' 結束。
PKG_011=檔名不允許以 "." 結束。
PKG_012=檔名包含非 ascii 字元「%1$s」,請考慮更改檔名。
PKG_013=EPUB 檔案包含了多個 OPS 釋義資料 (rendition) 。
PKG_014=EPUB 檔案包含空目錄「%1$s」。
Expand All @@ -301,7 +304,7 @@ PKG_024_SUG=為求最大相容性,請使用「.epub」。
#Resources
RSC_001=找不到檔案「%1$s」。
RSC_002=找不到必須的 META-INF/container.xml 資源。
RSC_003=在 container 中找不到具有媒體類型 'application/oebps-package+xml' 的 rootfile 標籤。
RSC_003=在 container 中找不到具有媒體類型 "application/oebps-package+xml" 的 rootfile 標籤。
RSC_004=檔案「%1$s」無法被解碼。
RSC_005=解譯檔案「%1$s」時遇到錯誤
RSC_006=不允許參照遠端資源;資源必須置於 OCF 內。
Expand All @@ -323,7 +326,7 @@ RSC_019=有複數釋義資料 (rendition) 的 EPUB 需要有一個 META-INF/meta
RSC_020=「%1$s」不是正確的 URI 。
RSC_021=搜尋關鍵字映射文件必須指向內容文件( spine 中找不到「%1$s」)。
RSC_022=無法確認圖片細節(需要 Java 版本 7 以上)。
RSC_023=URL%1$s」在通訊協定「%3$s:」後缺少%2$d條斜線 「/」。
RSC_023=Couldn’t parse host of URL "%1$s" (probably due to disallowed characters or missing slashes after the protocol)

#Scripting
SCP_001=在 EPUB 程式腳本中使用 JavaScript 「eval()」函數會有安全風險。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<let name="id-set" value="//*[@id]"/>
<rule context="*[@id]">
<assert test="count($id-set[normalize-space(@id) = normalize-space(current()/@id)]) = 1"
>Duplicate '<value-of select="normalize-space(current()/@id)"/>'</assert>
>Duplicate "<value-of select="normalize-space(current()/@id)"/>"</assert>
</rule>
</pattern>
</schema>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
count(//opf:reference[
normalize-space(lower-case(@type)) = $current_type_normalized and
normalize-space(lower-case(@href)) = $current_href_normalized
]) le 1">WARNING: Duplicate 'reference' elements with the same 'type' and 'href' attributes</sch:assert>
]) le 1">WARNING: Duplicate "reference" elements with the same "type" and "href" attributes</sch:assert>
</sch:rule>
</sch:pattern>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<sch:pattern name="nested_hyperlinks">
<sch:rule context="h:a">
<sch:report test="descendant::h:a">The a element cannot contain any nested a
<sch:report test="descendant::h:a">The "a" element cannot contain any nested "a"
elements.</sch:report>
</sch:rule>
</sch:pattern>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<pattern>
<rule context="h:nav[empty(ancestor::h:nav)]">
<assert test="normalize-space(@epub:type)">A 'nav' element in a Data Navigation Document
must have an 'epub:type' attribute (to identify the nature of the navigation
<assert test="normalize-space(@epub:type)">A "nav" element in a Data Navigation Document
must have an "epub:type" attribute (to identify the nature of the navigation
component it contains).</assert>
</rule>
</pattern>
Expand All @@ -21,19 +21,19 @@
<pattern>
<rule context="h:nav[tokenize(@epub:type, '\s+') = 'region-based']//h:li">
<assert test="h:*[1]/(self::h:a | self::h:span)">The first child of a region-based nav
list item must be either an 'a' or 'span' element.</assert>
list item must be either an "a" or "span" element.</assert>
<assert test="if (count(h:*) > 1) then count(h:*) = 2 and h:*[2]/self::h:ol else true()">The first child of
a region-based nav list item can only be followed by a single 'ol' element.</assert>
a region-based nav list item can only be followed by a single "ol" element.</assert>
</rule>
</pattern>
<pattern>
<rule context="h:nav[tokenize(@epub:type, '\s+') = 'region-based']//h:a">
<assert test="normalize-space(.)=''">WARNING: 'a' elements in region-based navs should not contain text labels.</assert>
<assert test="normalize-space(.)=''">WARNING: "a" elements in region-based navs should not contain text labels.</assert>
</rule>
</pattern>
<pattern>
<rule context="h:nav[tokenize(@epub:type, '\s+') = 'region-based']//h:span">
<assert test="count(h:*)=2 and count(h:a) = 2">'span'elements in region-base navs must contain exactly two 'a' elements.</assert>
<assert test="count(h:*)=2 and count(h:a) = 2">"span" elements in region-base navs must contain exactly two "a" elements.</assert>
</rule>
</pattern>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
test="
exists(/opf:package/opf:metadata/opf:meta[normalize-space(@property) = 'source-language']
| opf:metadata/opf:meta[normalize-space(@property) = 'source-language'])"
>An EPUB Dictionary must declare its source language using a 'source-language'
>An EPUB Dictionary must declare its source language using a "source-language"
metadata.</assert>
<assert
test="
exists(/opf:package/opf:metadata/opf:meta[normalize-space(@property) = 'target-language']
| opf:metadata/opf:meta[normalize-space(@property) = 'target-language'])"
>An EPUB Dictionary must declare its source language using a 'target-language'
>An EPUB Dictionary must declare its source language using a "target-language"
metadata.</assert>
<report
test="count(opf:metadata/opf:meta[normalize-space(@property)='source-language'])>1"
Expand Down
20 changes: 10 additions & 10 deletions src/main/resources/com/adobe/epubcheck/schema/30/dict/dict-opf.sch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<pattern id="dict.dctype">
<rule context="/opf:package/opf:metadata">
<assert test="child::dc:type[normalize-space(.) = 'dictionary']">The dc:type identifier
'dictionary' is required.</assert>
"dictionary" is required.</assert>
</rule>
</pattern>

Expand All @@ -22,18 +22,18 @@
]) = 1"
>An EPUB Publication consisting of a single EPUB Dictionary must contain exactly one
Search Key Map document for this dictionary (i.e. exactly one item with properties
'search-key-map' and 'dictionary').</assert>
"search-key-map" and "dictionary").</assert>
</rule>
</pattern>
<pattern id="dict.single-dict.lang">
<rule context="opf:package[empty(opf:collection[tokenize(@role, '\s+') = 'dictionary'])]">
<assert
test="exists(opf:metadata/opf:meta[normalize-space(@property) = 'source-language'])"
>An EPUB Dictionary must declare its source language using a 'source-language'
>An EPUB Dictionary must declare its source language using a "source-language"
metadata.</assert>
<assert
test="exists(opf:metadata/opf:meta[normalize-space(@property) = 'target-language'])"
>An EPUB Dictionary must declare its source language using a 'target-language'
>An EPUB Dictionary must declare its source language using a "target-language"
metadata.</assert>
<report
test="count(opf:metadata/opf:meta[normalize-space(@property)='source-language'])>1"
Expand All @@ -46,7 +46,7 @@
<report
test="count(/opf:package/opf:collection[tokenize(@role,'\s+')='dictionary']
/opf:link[normalize-space(@href)=$skm]) > 1"
>Search Key Map Document '<value-of select="$skm"/>' is referenced in more than one
>Search Key Map Document "<value-of select="$skm"/>" is referenced in more than one
dictionary collection.</report>
</rule>
</pattern>
Expand All @@ -57,8 +57,8 @@
'target-language')]">
<let name="lang" value="normalize-space(.)"/>
<assert test="exists(/opf:package/opf:metadata/dc:language[normalize-space(.) = $lang])"
>EPUB Dictionaries 'source-language' and 'target-language' must also be declared as
'dc:language' in package-level metadata.</assert>
>EPUB Dictionaries "source-language" and "target-language" must also be declared as
"dc:language" in package-level metadata.</assert>
</rule>
</pattern>
<pattern id="dict.type">
Expand All @@ -74,9 +74,9 @@
'spelling',
'pronouncing',
'etymological')"
>EPUB Dictionaries 'dictionary-type' metadata must be one of 'monolingual',
'bilingual', 'multilingual', 'thesaurus', 'encyclopedia', 'spelling', 'pronouncing',
or 'etymological'.</assert>
>EPUB Dictionaries "dictionary-type" metadata must be one of "monolingual",
"bilingual", "multilingual", "thesaurus", "encyclopedia", "spelling", "pronouncing",
or "etymological".</assert>
</rule>
</pattern>

Expand Down
Loading

0 comments on commit 659ab76

Please sign in to comment.