Checks and fixups
質量檢查有助於發現常見的翻譯錯誤,確保翻譯質量良好。如果出現誤報,則可以忽略這些檢查。
提交未通過檢查的翻譯後,將立即向用戶顯示:

自動修正
除了 質量檢查 外,Weblate 還可以自動修復翻譯字符串中的一些常見錯誤。謹慎使用它,不要使其增加翻譯錯誤。
也參考
質量檢查
Weblate 對字符串進行了廣泛的質量檢查。以下部分將對它們進行更詳細的描述。還有針對特定語言的檢查。如果有錯誤報告,請將缺陷提交。
翻譯檢查
在每次翻譯更改時執行,幫助翻譯人員保持高質量的翻譯。
BBCode 標記
- Summary
翻譯中的 BBCode 與來源不符
- 範圍
translated strings
- Check class
weblate.checks.markup.BBCodeCheck
- Flag to ignore
ignore-bbcode
BBCode 表示簡單的標記,例如以粗體或斜體突出顯示消息的重要部分。
此檢查確保在翻譯中也找到它們。
備註
當前檢測 BBCode 的方法非常簡單,因此此檢查可能會產生誤報。
連續重複單字
在 4.1 版本新加入.
- Summary
文字在同一行中有兩個相同的單字:
- 範圍
translated strings
- Check class
weblate.checks.duplicate.DuplicateCheck
- Flag to ignore
ignore-duplicate
檢查翻譯中是否沒有連續重複的單詞。這通常表示翻譯錯誤。
提示
此檢查包括特定於語言的規則,以避免誤報。如果在您的情況下錯誤觸發,請告訴我們。請參閱 在 Weblate 中匯報問題。
與詞彙表不同
在 4.5 版本新加入.
- Summary
翻譯未遵循詞彙表定義的字詞。
- 範圍
translated strings
- Check class
weblate.checks.glossary.GlossaryCheck
- Flag to enable
check-glossary
- Flag to ignore
ignore-check-glossary
此檢查必須使用“檢查詞彙表”標誌(參見:REF:“定制檢查”)。在啟用它之前請考慮以下操作:
它確實是精確的字符串匹配,預計詞彙表將包含所有變體中的術語。
檢查每個字符串針對詞彙表昂貴,它將減慢Weberate中的任何操作,涉及運行等待導入字符串或翻譯。
兩個空白
- Summary
翻譯含有兩個空白
- 範圍
translated strings
- Check class
weblate.checks.chars.DoubleSpaceCheck
- Flag to ignore
ignore-double-space
檢查翻譯中是否存在雙空格,以避免其他與空格相關的檢查出現誤報。
當在源中找到雙空格時,檢查為假,這意味著故意使用雙空格。
格式化字符串
檢查字符串格式是否在源和翻譯之間複製。在翻譯中省略格式字符串通常會導致嚴重的問題,因此字符串中的格式通常應與源匹配。
Weblate 支持檢查幾種語言的格式字符串。僅當適當地標記了字符串時(例如,C 格式為 c-format),才會自動啟用該檢查。 Gettext 會自動添加它,但是對於其他文件格式,或者如果您的 PO 文件不是由 xgettext 生成的,您可能必須手動添加它。
可以按每單位(請參閱 源字符串另外的信息)或在 組件配置 中完成此操作。為每個組件定義它比較簡單,但是如果該字符串未解釋為格式化字符串,而碰巧使用了格式化字符串語法,則可能導致誤報。
提示
如果 Weblate 中不提供特定格式的檢查,則可以使用通用 佔位符。
除了檢查,這也將高亮格式化字符串,方便將它們插入到已翻譯字符串:

AngularJS 插值字串
- Summary
AngularJS 插值字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.angularjs.AngularJSInterpolationCheck
- Flag to enable
angularjs-format
- Flag to ignore
ignore-angularjs-format
- Named format string example
你的餘額是{{ulity}} {{currency}}
也參考
:ref:check-formats,`angularjs text插值<https://angular.io/guide/interpolation>`_
C 格式
- Summary
C 格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.CFormatCheck
- Flag to enable
c-format
- Flag to ignore
ignore-c-format
- Simple format string example
There are %d apples
- Position format string example
你的餘額是%1 $ d%2 $ s
C# 格式
- Summary
C# 格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.CSharpFormatCheck
- Flag to enable
c-sharp-format
- Flag to ignore
ignore-c-sharp-format
- Position format string example
There are {0} apples
ECMAScript 模板字面值
- Summary
ECMAScript 模板字面值與來源不相符
- 範圍
translated strings
- Check class
weblate.checks.format.ESTemplateLiteralsCheck
- Flag to enable
es-format
- Flag to ignore
ignore-es-format
- Interpolation example
There are ${number} apples
也參考
i18next 插補
在 4.0 版本新加入.
- Summary
i18next 插補與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.I18NextInterpolationCheck
- Flag to enable
i18next-interpolation
- Flag to ignore
ignore-i18next-interpolation
- Interpolation example
There are {{number}} apples
- Nesting example
There are $t(number) apples
ICU MessageFormat
在 4.9 版本新加入.
- Summary
ICU MessageFormat 字串有語法錯誤或是佔位符不相符。
- 範圍
translated strings
- Check class
weblate.checks.icu.ICUMessageFormatCheck
- Flag to enable
icu-message-format
- Flag to ignore
ignore-icu-message-format
- Interpolation example
There {number, plural, one {is one apple} other {are # apples}}.
This check has support for both pure ICU MessageFormat messages as well as ICU with simple
XML tags. You can configure the behavior of this check by using icu-flags:*
, either by
opting into XML support or by disabling certain sub-checks. For example, the following flag
enables XML support while disabling validation of plural sub-messages:
|
Enable support for simple XML tags. By default, XML tags
are parsed loosely. Stray |
|
Enable support for strict XML tags. All |
|
Disable highlighting placeholders in the editor. |
|
Disable requiring sub-messages to have an |
|
Skip checking that sub-message selectors match the source. |
|
Skip checking that placeholder types match the source. |
|
Skip checking that no placeholders are present that were not present in the source string. |
|
Skip checking that no placeholders are missing that were present in the source string. |
Additionally, when strict-xml
is not enabled but xml
is enabled, you can use the
icu-tag-prefix:PREFIX
flag to require that all XML tags start with a specific string.
For example, the following flag will only allow XML tags to be matched if they start with
<x:
:
This would match <x:link>click here</x:link>
but not <strong>this</strong>
.
Java 格式
- Summary
Java 格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.JavaFormatCheck
- Flag to enable
java-format
- Flag to ignore
ignore-java-format
- Simple format string example
There are %d apples
- Position format string example
你的餘額是%1 $ d%2 $ s
也參考
:ref:check-formats,`java格式字符串<https://docs.oracle.com/javase/7/docs/api/java/util/formatter.html>`_
Java MessageFormat
- Summary
Java MessageFormat 字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.JavaMessageFormatCheck
- Flag to enable unconditionally
java-messageformat
- Flag to enable autodetection
auto-java-messageformat
enables check only if there is a format string in the source- Flag to ignore
ignore-java-messageformat
- Position format string example
There are {0} apples
也參考
JavaScript 格式
- Summary
JavaScript 格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.JavaScriptFormatCheck
- Flag to enable
javascript-format
- Flag to ignore
ignore-javascript-format
- Simple format string example
There are %d apples
Lua 格式
- Summary
Lua 格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.LuaFormatCheck
- Flag to enable
lua-format
- Flag to ignore
ignore-lua-format
- Simple format string example
There are %d apples
Object Pascal 格式
- Summary
Object Pascal 格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.ObjectPascalFormatCheck
- Flag to enable
object-pascal-format
- Flag to ignore
ignore-object-pascal-format
- Simple format string example
There are %d apples
百分比佔位符
在 4.0 版本新加入.
- Summary
百分比佔位符與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.PercentPlaceholdersCheck
- Flag to enable
percent-placeholders
- Flag to ignore
ignore-percent-placeholders
- Simple format string example
There are %number% apples
也參考
Perl 格式
- Summary
Perl 格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.PerlFormatCheck
- Flag to enable
perl-format
- Flag to ignore
ignore-perl-format
- Simple format string example
There are %d apples
- Position format string example
你的餘額是%1 $ d%2 $ s
PHP 格式
- Summary
PHP 格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.PHPFormatCheck
- Flag to enable
php-format
- Flag to ignore
ignore-php-format
- Simple format string example
There are %d apples
- Position format string example
你的餘額是%1 $ d%2 $ s
也參考
:參考:“檢查格式”,“PHP Sprintf文檔<https://www.php.net/manual/en/function.sprintf.php>`_,`php格式字符串<https://www.gnu。組織/軟件/ GetText /手動/ html_node / php_002dformat.html>`_
Python 大括號格式
- Summary
Python 大括號格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.PythonBraceFormatCheck
- Flag to enable
python-brace-format
- Flag to ignore
ignore-python-brace-format
- Simple format string
There are {} apples
- Named format string example
你的餘額是{COALE} {COMPORY}
Python 格式
- Summary
Python 格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.PythonFormatCheck
- Flag to enable
python-format
- Flag to ignore
ignore-python-format
- Simple format string
There are %d apples
- Named format string example
Your balance is %(amount)d %(currency)s
Qt 格式
- Summary
Qt 格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.qt.QtFormatCheck
- Flag to enable
qt-format
- Flag to ignore
ignore-qt-format
- Position format string example
There are %1 apples
也參考
Qt 複數格式
- Summary
Qt 複數格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.qt.QtPluralCheck
- Flag to enable
qt-plural-format
- Flag to ignore
ignore-qt-plural-format
- Plural format string example
There are %Ln apple(s)
也參考
:ref:check-formats,`qt i18n指南<https://doc.qt.io/qt-5/i18n-source-translation.html#andling-purals>`_
Ruby 格式
- Summary
Ruby 格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.ruby.RubyFormatCheck
- Flag to enable
ruby-format
- Flag to ignore
ignore-ruby-format
- Simple format string example
There are %d apples
- Position format string example
你的餘額是%1 $ f%2 $ s
- Named format string example
``你的餘額是%+。2 <COMPELL> S``的2 <金額>
- Named template string
你的餘額是%{ulity}%{currency}
Scheme 格式
- Summary
Scheme 格式字串與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.SchemeFormatCheck
- Flag to enable
scheme-format
- Flag to ignore
ignore-scheme-format
- Simple format string example
There are ~d apples
Vue I18n 格式
- Summary
Vue I18n 格式與來源不符
- 範圍
translated strings
- Check class
weblate.checks.format.VueFormattingCheck
- Flag to enable
vue-format
- Flag to ignore
ignore-vue-format
- Named formatting
There are {count} apples
- Rails i18n formatting
There are %{count} apples
- Linked locale messages
@:message.dio @:message.the_world!
也參考
:ref:check-formats,』查看i18n格式<https://kazupon.github.io/vue-i18n/guide/formatting.html>`_,查看i18n鏈接本地消息<https:// kazupon。github .io / vue-i18n / guide / messages.html#linked-locale-messages>`_
已經翻譯過
- Summary
字串之前已經有翻譯過
- 範圍
all strings
- Check class
weblate.checks.consistency.TranslatedCheck
- Flag to ignore
ignore-translated
表示已經翻譯了一個字符串。當翻譯在VCS中或否則丟失時,可能會發生這種情況。
不一致
- Summary
此專案中的這個字串有一種以上的翻譯,或是在某些組件未翻譯。
- 範圍
all strings
- Check class
weblate.checks.consistency.ConsistencyCheck
- Flag to ignore
ignore-inconsistent
Weberate檢查項目中所有翻譯中相同字符串的翻譯,以幫助您保持一致的翻譯。
檢查失敗了項目中的一個字符串的不同轉換。這也可能導致顯示檢查中的不一致。您可以在以下網站上找到此字符串的其他翻譯:Guilabel:“其他出現”選項卡。
This check applies to all components in a project that have 允許翻譯再用 turned on.
提示
For performance reasons, the check might not find all inconsistencies, it limits number of matches.
備註
This check also fires in case the string is translated in one component and not in another. It can be used as a quick way to manually handle strings which are untranslated in some components just by clicking on the Use this translation button displayed on each line in the Other occurrences tab.
You can use 自動翻譯 add-on to automate translating of newly added strings which are already translated in another component.
也參考
使用 Kashida letter
在 3.5 版本新加入.
- Summary
不應該使用裝飾性的卡希達對齊字母
- 範圍
translated strings
- Check class
weblate.checks.chars.KashidaCheck
- Flag to ignore
ignore-kashida
裝飾kashida字母不應該在翻譯中使用。這些也稱為TatWeel。
Markdown 連結
在 3.5 版本新加入.
- Summary
Markdown 連結與來源不符
- 範圍
translated strings
- Check class
weblate.checks.markup.MarkdownLinkCheck
- Flag to enable
md-text
- Flag to ignore
ignore-md-link
Markdown鏈接不匹配源。
也參考
Markdown 參照
在 3.5 版本新加入.
- Summary
Markdown 連結參照與來源不符
- 範圍
translated strings
- Check class
weblate.checks.markup.MarkdownRefLinkCheck
- Flag to enable
md-text
- Flag to ignore
ignore-md-reflink
Markdown鏈接引用不匹配源。
也參考
Markdown 語法
在 3.5 版本新加入.
- Summary
Markdown 語法與來源不符
- 範圍
translated strings
- Check class
weblate.checks.markup.MarkdownSyntaxCheck
- Flag to enable
md-text
- Flag to ignore
ignore-md-syntax
Markdown 語法與來源不符
翻譯最大長度
- Summary
翻譯不該超過指定長度
- 範圍
translated strings
- Check class
weblate.checks.chars.MaxLengthCheck
- Flag to enable
max-length
- Flag to ignore
ignore-max-length
檢查翻譯的長度是否可匹配可用的空間。這只檢查翻譯字符的長度。
與其他檢查不同,標誌應該被設置為“鍵:價值”(價值)對,如“Max-Length:100`”。
翻譯的最大長度
- Summary
翻譯的呈現文字不該超過指定長度
- 範圍
translated strings
- Check class
weblate.checks.render.MaxSizeCheck
- Flag to enable
max-size
- Flag to ignore
ignore-max-size
在 3.7 版本新加入.
翻譯渲染文本不應超過給定的大小。它呈現出線包裝的文本,並檢查它是否適合給定邊界。
此檢查需要一個或兩個參數 - 最大寬度和最大行數。如果未提供行數,則考慮一行文本。
您還可以通過``font- *``指令配置已使用的字體(請參閱:ref:``custom-check`),例如隨圖的翻譯標誌說,使用ubuntu字體大小22呈現的文本應該適合兩行和500像素:
max-size:500:2, font-family:ubuntu, font-size:22
Mismatched \n
- Summary
Number of \n in translation does not match source
- 範圍
translated strings
- Check class
weblate.checks.chars.EscapedNewlineCountingCheck
- Flag to ignore
ignore-escaped-newline
通常逃生的紐丁對於格式化程序輸出很重要。如果在翻譯中的“n`”字義不匹配源,則檢查失敗。
冒號不相符
- Summary
翻譯沒有和來源一致以冒號結尾
- 範圍
translated strings
- Check class
weblate.checks.chars.EndColonCheck
- Flag to ignore
ignore-end-colon
檢查冒號在源和翻譯之間複製冒號。還檢查了冒號的存在,以便他們不屬於哪種語言(中文或日語)。
刪節號不相符
- Summary
翻譯沒有和來源一致以刪節號結尾
- 範圍
translated strings
- Check class
weblate.checks.chars.EndEllipsisCheck
- Flag to ignore
ignore-end-ellipsis
檢查尾部橢圓在源和轉換之間複製尾部橢圓。這只檢查真正的省略號(...
)不適用於三個小點(...
)。
省略號通常比打印中的三個點更好,並且文本到語音更好地聽起來更好。
驚嘆號不相符
- Summary
翻譯沒有和來源一致以驚嘆號結尾
- 範圍
translated strings
- Check class
weblate.checks.chars.EndExclamationCheck
- Flag to ignore
ignore-end-exclamation
檢查源和翻譯之間複製的感嘆號。還檢查了感嘆號的存在,他們不屬於哪種語言(中國,日語,韓國,亞美尼亞,林欄,緬甸或NKO)。
也參考
Wikipedia的感嘆號<https://en.wikipedia.org/wiki/exclamation_mark>`_
句號不相符
- Summary
翻譯沒有和來源一致以句號結尾
- 範圍
translated strings
- Check class
weblate.checks.chars.EndStopCheck
- Flag to ignore
ignore-end-stop
檢查在源和翻譯之間複製完整停止。檢查全部停止的存在,以便他們不屬於哪種語言(中文,日語,Devanagari或Urdu)。
也參考
問號不相符
- Summary
翻譯沒有和來源一致以問號結尾
- 範圍
translated strings
- Check class
weblate.checks.chars.EndQuestionCheck
- Flag to ignore
ignore-end-question
檢查源和翻譯之間複製的問號。還檢查了問號的存在,以便他們不屬於哪些語言(亞美尼亞,阿拉伯語,中國,韓國,日語,埃塞俄比亞,vai或coptic)。
分號不相符
- Summary
翻譯沒有和來源一致以分號結尾
- 範圍
translated strings
- Check class
weblate.checks.chars.EndSemicolonCheck
- Flag to ignore
ignore-end-semicolon
Checks that semicolons at the end of sentences are replicated between both source and translation.
斷列符不相配
- Summary
譯文中的換行數和源文不符
- 範圍
translated strings
- Check class
weblate.checks.chars.NewLineCountCheck
- Flag to ignore
ignore-newline-count
通常紐丁對格式化程序輸出很重要。如果在翻譯中的“n`”字義不匹配源,則檢查失敗。
缺少複數形
- Summary
有些複數形未翻譯
- 範圍
translated strings
- Check class
weblate.checks.consistency.PluralsCheck
- Flag to ignore
ignore-plurals
檢查已翻譯所有復數形式的源字符串。可以在字符串定義中找到每個複數表單的具體細節。
在某些情況下,未能填寫複數表格將導致多種形式使用時顯示任何內容。
佔位符
在 3.9 版本新加入.
- Summary
翻譯缺少一些佔位符
- 範圍
translated strings
- Check class
weblate.checks.placeholders.PlaceholderCheck
- Flag to enable
placeholders
- Flag to ignore
ignore-placeholders
在 4.3 版本變更: You can use regular expression as placeholder.
在 4.13 版本變更: With the case-insensitive
flag, the placeholders are not case-sensitive.
翻譯缺少一些佔位符。這些是從翻譯文件中提取的,或者使用````````手動定義,更多可以用冒號分開,可以引用帶空間的字符串:
placeholders:$URL$:$TARGET$:"some long text"
如果您對占位符有一些語法,則可以使用正則表達式:
placeholders:r"%[^% ]%"
You can also have case insensitive placeholders:
placeholders:$URL$:$TARGET$,case-insensitive
標點符號間距
在 3.9 版本新加入.
- Summary
兩個標點符號前沒有不斷行空格
- 範圍
translated strings
- Check class
weblate.checks.chars.PunctuationSpacingCheck
- Flag to ignore
ignore-punctuation-spacing
檢查雙標點符號(驚嘆號,問號,分號和冒號)之前存在不可破壞的空間。此規則僅以少數選定的語言使用法語或BRETON,其中PARD標註符號前的空間是印刷規則。
正則表達式
在 3.9 版本新加入.
- Summary
翻譯不符正則表達式
- 範圍
translated strings
- Check class
weblate.checks.placeholders.RegexCheck
- Flag to enable
regex
- Flag to ignore
ignore-regex
翻譯與正則表達式不匹配。表達式要么從翻譯文件中提取,也可以使用`````````)來定義:
regex:^foo|bar$
相同複數形
- Summary
有些複數形沒有以相同方式翻譯
- 範圍
translated strings
- Check class
weblate.checks.consistency.SamePluralsCheck
- Flag to ignore
ignore-same-plurals
如果在翻譯中復制了一些複數,請檢查失敗。在大多數語言中他們必須不同。
開頭換列
- Summary
翻譯沒有和來源一致以換列符開頭
- 範圍
translated strings
- Check class
weblate.checks.chars.BeginNewlineCheck
- Flag to ignore
ignore-begin-newline
紐丁通常出現在源字符串中,有效原因,遺漏或添加可以導致翻譯文本使用時的格式化問題。
也參考
開頭空格
- Summary
翻譯沒有和來源一致以相同數目的空格開頭
- 範圍
translated strings
- Check class
weblate.checks.chars.BeginSpaceCheck
- Flag to ignore
ignore-begin-space
字符串開頭的空間通常用於界面中的縮進,因此重要地保持。
換列結尾
- Summary
翻譯沒有和來源一致以換列結尾
- 範圍
translated strings
- Check class
weblate.checks.chars.EndNewlineCheck
- Flag to ignore
ignore-end-newline
紐丁通常出現在源字符串中,有效原因,遺漏或添加可以導致翻譯文本使用時的格式化問題。
也參考
空格結尾
- Summary
翻譯沒有和來源一致以相同數目的空格結尾
- 範圍
translated strings
- Check class
weblate.checks.chars.EndSpaceCheck
- Flag to ignore
ignore-end-space
檢查尾隨空格是否在源和轉換之間複製。
尾隨空間通常用於空閒鄰居元素,因此刪除它可能會破壞佈局。
未更動的翻譯
- Summary
翻譯與來源文字相同
- 範圍
translated strings
- Check class
weblate.checks.same.SameCheck
- Flag to ignore
ignore-same
如果源和相應的轉換字符串相同,則會發生到至少一個形式中。忽略所有語言中常見的一些字符串,並剝離各種標記。這減少了誤報的數量。
此檢查可以幫助查找錯誤誤解的字符串。
此檢查的默認行為是從檢查中從內置黑名單中排除單詞。這些是經常未被翻譯的單詞。這對於避免短串上的誤報是有用的,該虛假陽性僅由單個單詞組成,該單詞具有多種語言中的相同。通過添加“嚴格的”“標記至字符串或組件,可以禁用此黑名單。
不安全的 HTML
在 3.9 版本新加入.
- Summary
翻譯使用了不安全的 HTML 標示
- 範圍
translated strings
- Check class
weblate.checks.markup.SafeHTMLCheck
- Flag to enable
safe-html
- Flag to ignore
ignore-safe-html
翻譯使用不安全的HTML標記。必須使用“安全 - HTML”標誌(參見:REF:“定制檢查”)啟用此檢查。還有伴隨的AutoFixer,可以自動消毒標記。
提示
When md-text
flag is also used, the Markdown style links are also allowed.
也參考
HTML檢查由“Mozilla開發的”裸照<https://blach.readthedocs.io/>`_庫執行。
網址
在 3.5 版本新加入.
- Summary
此譯文未包含網址
- 範圍
translated strings
- Check class
weblate.checks.markup.URLCheck
- Flag to enable
url
- Flag to ignore
ignore-url
翻譯不包含URL。僅在單位標記為包含URL時才會觸發這一點。在這種情況下,翻譯必須是有效的URL。
XML 標記
- Summary
翻譯中的 XML 標籤與來源不符
- 範圍
translated strings
- Check class
weblate.checks.markup.XMLTagsCheck
- Flag to ignore
ignore-xml-tags
這通常意味著產生的輸出看起來不同。在大多數情況下,這不是改變翻譯的所需結果,但偶爾就是。
檢查源和翻譯之間是否複製XML標記。
備註
This check is disabled by the safe-html
flag as the HTML cleanup done by
it can produce HTML markup which is not valid XML.
XML 語法
在 2.8 版本新加入.
- Summary
翻譯標記為無效 XML
- 範圍
translated strings
- Check class
weblate.checks.markup.XMLValidityCheck
- Flag to ignore
ignore-xml-invalid
XML標記無效。
備註
This check is disabled by the safe-html
flag as the HTML cleanup done by
it can produce HTML markup which is not valid XML.
零寬度空格
- Summary
翻譯中包含有額外的零寬度的空白字元
- 範圍
translated strings
- Check class
weblate.checks.chars.ZeroWidthSpaceCheck
- Flag to ignore
ignore-zero-width-space
零寬度空間(<u + 200b>)字符用於打破單詞中的消息(Word包裝)。
由於它們通常被錯誤插入,因此在翻譯中存在後觸發此檢查。使用此字符時,某些程序可能會出現問題。
也參考
Source checks
源檢查可以幫助開發人員提高源字符串的質量。
刪節號
- Summary
該字串使用三個點(…)而非刪節號(…)
- 範圍
來源字串
- Check class
weblate.checks.source.EllipsisCheck
- Flag to ignore
ignore-ellipsis
當字符串使用三個點時,這會失敗(...
)時,它應該使用省略號字符(````)。
在大多數情況下,使用Unicode字符更好的方法,看起來更好,並且文本到語音可能會更好地聽起來更好。
ICU MessageFormat 語法
在 4.9 版本新加入.
- Summary
ICU MessageFormat 字串有語法錯誤。
- 範圍
來源字串
- Check class
weblate.checks.icu.ICUSourceCheck
- Flag to enable
icu-message-format
- Flag to ignore
ignore-icu-message-format
長期未翻譯
在 4.1 版本新加入.
- Summary
字串很久都沒有翻譯
- 範圍
來源字串
- Check class
weblate.checks.source.LongUntranslatedCheck
- Flag to ignore
ignore-long-untranslated
When the string has not been translated for a long time, it can indicate a problem in a source string making it hard to translate.
多項未通過查核
- Summary
多個語言的翻譯有未通過查核的項目
- 範圍
來源字串
- Check class
weblate.checks.source.MultipleFailingCheck
- Flag to ignore
ignore-multiple-failures
此字符串的許多翻譯都沒有質量檢查。這通常是可以進行某些東西來改進源字符串的指示。
此檢查失敗通常可以在句子末尾的缺失完整停止丟失或類似的次要問題傾向於在翻譯中解決,而在源字符串中將其更好。
多個未命名變數
在 4.1 版本新加入.
- Summary
字串中有多個未命名變數,翻譯者將難以重新排序
- 範圍
來源字串
- Check class
weblate.checks.format.MultipleUnnamedFormatsCheck
- Flag to ignore
ignore-unnamed-format
字符串中有多個未命名的變量,使翻譯是不可能重新排序的轉換器。
考慮使用命名變量,而不是允許翻譯器重新排序。
未複數化
- Summary
該字串為複數,但沒有使用複數形
- 範圍
來源字串
- Check class
weblate.checks.source.OptionalPluralCheck
- Flag to ignore
ignore-optional-plural
該字符串用作複數,但不使用複數形式。如果您的翻譯系統支持此情況,您應該使用它的複數感知變體。
例如,在Python中用GetText可能是:
from gettext import ngettext
print(ngettext("Selected %d file", "Selected %d files", files) % files)