檢查和修復#

品質檢查有助於發現常見的翻譯錯誤,確保翻譯品質良好。如果出現誤報,則可以忽略這些檢查。

提交未通過查核的翻譯後,將立即向使用者顯示:

../_images/checks.webp

自動修正#

除了 品質檢查 外,Weblate 還可以自動修復翻譯字串中的一些常見錯誤。謹慎使用它,不要使其增加翻譯錯誤。

也參考

AUTOFIX_LIST

Trailing ellipsis replacer#

Replace trailing dots (...) with an ellipsis () to make it consistent with the source string.

Zero-width space removal#

Zero width space is typically not desired in the translation. This fix will remove it unless it is present in the source string as well.

Control characters removal#

Removes any control characters from the translation.

天城文 danda#

Replaces wrong full stop in Devanagari by Devanagari danda ().

標點符號間距#

在 5.3 版新加入.

Ensures French and Breton use correct punctuation spacing.

This fixup can be disabled via ignore-punctuation-spacing flag (which also disables 標點符號間距).

Unsafe HTML cleanup#

When turned on using a safe-html flag it sanitizes HTML markup.

也參考

不安全的 HTML

Trailing and leading whitespace fixer#

Makes leading and trailing whitespace consistent with the source string. The behavior can be fine-tuned using ignore-begin-space and ignore-end-space flags to skip processing parts of the string.

品質檢查#

Weblate 對字串進行了廣泛的品質檢查。以下部分將對它們進行更詳細的描述。還有針對特定語言的檢查。如果有錯誤報告,請將缺陷送交。

翻譯檢查#

在每次翻譯更改時執行,幫助翻譯人員保持高品質的翻譯。

BBCode 標記#

摘要:

翻譯中的 BBCode 與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.markup.BBCodeCheck

檢查標識符:

bbcode

忽略的標誌:

ignore-bbcode

BBCode 表示簡單的標記,例如以粗體或斜體突出顯示消息的重要部分。

此檢查確保在翻譯中也找到它們。

備註

目前檢測 BBCode 的方法非常簡單,因此此檢查可能會產生誤報。

連續重複單字#

在 4.1 版新加入.

摘要:

文字在同一行中有兩個相同的單字:

範圍:

已翻譯好的字串

檢查類:

weblate.checks.duplicate.DuplicateCheck

檢查標識符:

duplicate

忽略的標誌:

ignore-duplicate

檢查翻譯中是否沒有連續重複的單詞。這通常表示翻譯錯誤。

提示

此檢查包括特定於語言的規則,以避免誤報。如果在您的情況下錯誤觸發,請告訴我們。請參閱 在 Weblate 中匯報問題

與詞彙表不同#

在 4.5 版新加入.

摘要:

翻譯未遵循詞彙表定義的字詞。

範圍:

已翻譯好的字串

檢查類:

weblate.checks.glossary.GlossaryCheck

檢查標識符:

check_glossary

Flag to enable:

check-glossary

忽略的標誌:

ignore-check-glossary

此檢查必須使用“檢查詞彙表”標誌(參見:ref:“客製檢查”)。在啟用它之前請考慮以下操作:

  • 它確實是精確的字串匹配,預計詞彙表將包含所有變體中的術語。

  • 檢查每個字串針對詞彙表昂貴,它將減慢Weberate中的任何操作,涉及執行等待導入字串或翻譯。

  • It also utilizes untranslatable glossary terms in 未更動的翻譯.

兩個空白#

摘要:

翻譯含有兩個空白

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.DoubleSpaceCheck

檢查標識符:

double_space

忽略的標誌:

ignore-double-space

檢查翻譯中是否存在雙空格,以避免其他與空格相關的檢查出現誤報。

當在源中找到雙空格時,檢查為假,這意味著故意使用雙空格。

Fluent 部分#

在 5.0 版新加入.

摘要:

Fluent 部分應當配對

範圍:

已翻譯好的字串

檢查類:

weblate.checks.fluent.parts.FluentPartsCheck

檢查標識符:

fluent-parts

Flag to enable:

fluent-parts

忽略的標誌:

ignore-fluent-parts

Each Fluent Message can have an optional value (the main text content), and optional attributes, each of which is a 「part」 of the Message. In Weblate, all these parts appear within the same block, using Fluent-like syntax to specify the attributes. For example:

This is the Message value
.title = This is the title attribute
.alt = This is the alt attribute

This check ensures that the translated Message also has a value if the source Message has one, or no value if the source has none. This also checks that the same attributes used in the source Message also appear in the translation, with no additions.

備註

This check is not applied to Fluent Terms since Terms always have a value, and Term attributes tend to be locale-specific (used for grammar rules, etc.), and are not expected to appear in all translations.

也參考

Fluent Attributes

Fluent 引用#

在 5.0 版新加入.

摘要:

Fluent 引用應當配對

範圍:

已翻譯好的字串

檢查類:

weblate.checks.fluent.references.FluentReferencesCheck

檢查標識符:

fluent-references

Flag to enable:

fluent-references

忽略的標誌:

ignore-fluent-references

A Fluent Message or Term can reference another Message, Term, Attribute, or a variable. For example:

Here is a { message }, a { message.attribute } a { -term } and a { $variable }.
Within a function { NUMBER($num, minimumFractionDigits: 2) }

Generally, translated Messages or Terms are expected to contain the same references as the source, although not necessarily in the same order of appearance. So this check ensures that translations use the same references in their value as the source value, the same number of times, and with no additions. For Messages, this will also check that each Attribute in the translation uses the same references as the matching Attribute in the source.

When the source or translation contains Fluent Select Expressions, then each possible variant in the source must be matched with at least one variant in the translation with the same references, and vice versa.

Moreover, if a variable reference appears both in the Select Expression’s selector and within one of its variants, then all variants may also be considered as if they also contain that reference. The assumption being that the variant’s key may have made the reference redundant for that variant. For example:

{ $num ->
    [one] an apple
   *[other] { $num } apples
}

Here, for the purposes of this check, the [one] variant will also be considered to contain the $num reference.

However, a reference within the Select Expression’s selector, which can only be a variable of a Term Attribute in Fluent’s syntax, will not by itself count as a required reference because they do not form the actual text content of the string that the end-user will see, and the presence of a Select Expression is considered locale-specific. For example:

{ -term.starts-with-vowel ->
    [yes] an { -term }
   *[no] a { -term }
}

Here a reference to -term.starts-with-vowel is not expected to appear in translations, but a reference to -term is.

Fluent 翻譯 inner HTML#

在 5.0 版新加入.

摘要:

Fluent 目標應為配對的有效 inner HTML

範圍:

已翻譯好的字串

檢查類:

weblate.checks.fluent.inner_html.FluentTargetInnerHTMLCheck

檢查標識符:

fluent-target-inner-html

Flag to enable:

fluent-target-inner-html

忽略的標誌:

ignore-fluent-target-inner-html

This check will verify that the translated value of a Message or Term contains the same HTML elements as the source value.

First, if the source value fails the Fluent 來源內部 HTML check, then this check will do nothing. Otherwise, the translated value will also be checked under the same conditions.

Second, the HTML elements found in the translated value will be compared against the HTML elements found in the source value. Two elements will match if they share the exact same tag name, the exact same attributes and values, and all their ancestors match in the same way. This check will ensure that all the elements in the source appear somewhere in the translation, with the same number of appearances, and with no additional elements added. When there are multiple elements in the value, they need not appear in the same order in the translation value.

When the source or translation contains Fluent Select Expressions, then each possible variant in the source must be matched with at least one variant in the translation with the same HTML elements, and vice versa.

When using Fluent in combination with the Fluent DOM package, this check will ensure that the translation also includes any required data-l10n-name elements that appear in the source, or any of the allowed inline elements like <br>.

For example, the following source:

Source message <img data-l10n-name="icon"/> with icon

would match with:

Translated message <img data-l10n-name="icon"/> with icon

but not:

Translated message <img data-l10n-name="new-val"/> with icon

nor

Translated message <br data-l10n-name="icon"/> with no icon

Fluent 譯文語法#

在 5.0 版新加入.

摘要:

譯文中 Fluent 的語法有錯

範圍:

已翻譯好的字串

檢查類:

weblate.checks.fluent.syntax.FluentTargetSyntaxCheck

檢查標識符:

fluent-target-syntax

Flag to enable:

fluent-target-syntax

忽略的標誌:

ignore-fluent-target-syntax

In Weblate, Fluent strings use Fluent syntax for references and variables, but also for more complex features like defining attributes and selector variants, including plurals. This check ensures that the syntax used in the translation will be valid for Fluent.

格式化字串#

Checks that the formatting in strings is replicated between both source and translation. Omitting format strings in translation usually causes severe problems, so the formatting in strings should usually match the source.

Weblate 支援檢查幾種語言的格式字串。僅當適當地標記了字串時(例如,C 格式為 c-format),才會自動啟用該檢查。 Gettext 會自動新增它,但是對於其他文件格式,或者如果您的 PO 文件不是由 xgettext 產生的,您可能必須手動新增它。

Most of the format checks allow omitting format strings for plural forms having a single count. This allows translators to write nicer strings for these cases (One apple instead of %d apple). Turn this off by adding strict-format flag.

The flags can be customized per string (see 源字串另外的資訊) or in a 組件組態. Having it defined per component is simpler, but it can lead to false positives in case the string is not interpreted as a formatting string, but format string syntax happens to be used.

提示

如果 Weblate 中不提供特定格式的檢查,則可以使用通用 佔位符

除了檢查,這也將高亮格式化字串,方便將它們插入到已翻譯字串:

../_images/format-highlight.webp

AngularJS 插值字串#

摘要:

AngularJS 插值字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.angularjs.AngularJSInterpolationCheck

檢查標識符:

angularjs_format

Flag to enable:

angularjs-format

忽略的標誌:

ignore-angularjs-format

Named format string example:

您的餘額是{{ulity}} {{currency}}

C 格式#

摘要:

C 格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.CFormatCheck

檢查標識符:

c_format

Flag to enable:

c-format

忽略的標誌:

ignore-c-format

Simple format string example:

這裡有 %d 顆蘋果

Position format string example:

您的餘額是%1 $ d%2 $ s

C# 格式#

摘要:

C# 格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.CSharpFormatCheck

檢查標識符:

c_sharp_format

Flag to enable:

c-sharp-format

忽略的標誌:

ignore-c-sharp-format

Position format string example:

這裡有 {0} 顆蘋果

ECMAScript 模板字面值#

摘要:

ECMAScript 模板字面值與來源不相符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.ESTemplateLiteralsCheck

檢查標識符:

es_format

Flag to enable:

es-format

忽略的標誌:

ignore-es-format

Interpolation example:

這裡有 ${number} 顆蘋果

i18next 插補#

在 4.0 版新加入.

摘要:

i18next 插補與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.I18NextInterpolationCheck

檢查標識符:

i18next_interpolation

Flag to enable:

i18next-interpolation

忽略的標誌:

ignore-i18next-interpolation

Interpolation example:

這裡有 {{number}} 顆蘋果

Nesting example:

這裡有 $t(number) 顆蘋果

ICU MessageFormat#

在 4.9 版新加入.

摘要:

ICU MessageFormat 字串有語法錯誤或是佔位符不相符。

範圍:

已翻譯好的字串

檢查類:

weblate.checks.icu.ICUMessageFormatCheck

檢查標識符:

icu_message_format

Flag to enable:

icu-message-format

忽略的標誌:

ignore-icu-message-format

Interpolation example:

這裡有 {數量, 複數, {一顆蘋果} 其他 {# 顆蘋果}}。

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:

icu-message-format, icu-flags:xml:-plural_selectors

xml

Enable support for simple XML tags. By default, XML tags are parsed loosely. Stray < characters are ignored if they are not reasonably part of a tag.

strict-xml

Enable support for strict XML tags. All < characters must be escaped if they are not part of a tag.

-highlight

Disable highlighting placeholders in the editor.

-require_other

Disable requiring sub-messages to have an other selector.

-submessage_selectors

Skip checking that sub-message selectors match the source.

-types

Skip checking that placeholder types match the source.

-extra

Skip checking that no placeholders are present that were not present in the source string.

-missing

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::

icu-message-format, icu-flags:xml, icu-tag-prefix:"x:"

This would match <x:link>click here</x:link> but not <strong>this</strong>.

Java 格式#

摘要:

Java 格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.JavaFormatCheck

檢查標識符:

java_printf_format

Flag to enable:

java-printf-format

忽略的標誌:

ignore-java-printf-format

Simple format string example:

這裡有 %d 顆蘋果

Position format string example:

您的餘額是%1 $ d%2 $ s

在 4.14 版的變更: This used to be toggled by java-format flag, it was changed for consistency with GNU gettext.

Java MessageFormat#

摘要:

Java MessageFormat 字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.JavaMessageFormatCheck

檢查標識符:

java_format

Flag to enable unconditionally:

java-format

Flag to enable autodetection:

auto-java-messageformat enables check only if there is a format string in the source

忽略的標誌:

ignore-java-format

Position format string example:

這裡有 {0} 顆蘋果

在 4.14 版的變更: This used to be toggled by java-messageformat flag, it was changed for consistency with GNU gettext.

This check validates that format string is valid for the Java MessageFormat class. Besides matching format strings in the curly braces, it also verifies single quotes as they have a special meaning. Whenever writing single quote, it should be written as ''. When not paired, it is treated as beginning of quoting and will not be shown when rendering the string.

JavaScript 格式#

摘要:

JavaScript 格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.JavaScriptFormatCheck

檢查標識符:

javascript_format

Flag to enable:

javascript-format

忽略的標誌:

ignore-javascript-format

Simple format string example:

這裡有 %d 顆蘋果

Lua 格式#

摘要:

Lua 格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.LuaFormatCheck

檢查標識符:

lua_format

Flag to enable:

lua-format

忽略的標誌:

ignore-lua-format

Simple format string example:

這裡有 %d 顆蘋果

Object Pascal 格式#

摘要:

Object Pascal 格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.ObjectPascalFormatCheck

檢查標識符:

object_pascal_format

Flag to enable:

object-pascal-format

忽略的標誌:

ignore-object-pascal-format

Simple format string example:

這裡有 %d 顆蘋果

百分比佔位符#

在 4.0 版新加入.

摘要:

百分比佔位符與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.PercentPlaceholdersCheck

檢查標識符:

percent_placeholders

Flag to enable:

percent-placeholders

忽略的標誌:

ignore-percent-placeholders

Simple format string example:

這裡有 %number% 顆蘋果

也參考

格式化字串,

Perl 大括號格式#

摘要:

Perl 大括號格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.PerlBraceFormatCheck

檢查標識符:

perl_brace_format

Flag to enable:

perl-brace-format

忽略的標誌:

ignore-perl-brace-format

Named format string example:

There are {number} apples

Perl 格式#

摘要:

Perl 格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.PerlFormatCheck

檢查標識符:

perl_format

Flag to enable:

perl-format

忽略的標誌:

ignore-perl-format

Simple format string example:

這裡有 %d 顆蘋果

Position format string example:

您的餘額是%1 $ d%2 $ s

PHP 格式#

摘要:

PHP 格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.PHPFormatCheck

檢查標識符:

php_format

Flag to enable:

php-format

忽略的標誌:

ignore-php-format

Simple format string example:

這裡有 %d 顆蘋果

Position format string example:

您的餘額是%1 $ d%2 $ s

Python 大括號格式#

摘要:

Python 大括號格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.PythonBraceFormatCheck

檢查標識符:

python_brace_format

Flag to enable:

python-brace-format

忽略的標誌:

ignore-python-brace-format

Simple format string:

這裡有 {} 顆蘋果

Named format string example:

您的餘額是{COALE} {COMPORY}

Python 格式#

摘要:

Python 格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.PythonFormatCheck

檢查標識符:

python_format

Flag to enable:

python-format

忽略的標誌:

ignore-python-format

Simple format string:

這裡有 %d 顆蘋果

Named format string example:

Your balance is %(amount)d %(currency)s

Qt 格式#

摘要:

Qt 格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.qt.QtFormatCheck

檢查標識符:

qt_format

Flag to enable:

qt-format

忽略的標誌:

ignore-qt-format

Position format string example:

這裡有 %1 顆蘋果

Qt 複數格式#

摘要:

Qt 複數格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.qt.QtPluralCheck

檢查標識符:

qt_plural_format

Flag to enable:

qt-plural-format

忽略的標誌:

ignore-qt-plural-format

Plural format string example:

``There are %Ln apple(s)``(譯註:無中文使用情境,因為蘋果我們不用加 s)

Ruby 格式#

摘要:

Ruby 格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.ruby.RubyFormatCheck

檢查標識符:

ruby_format

Flag to enable:

ruby-format

忽略的標誌:

ignore-ruby-format

Simple format string example:

這裡有 %d 顆蘋果

Position format string example:

您的餘額是%1 $ f%2 $ s

Named format string example:

``您的餘額是%+。2 <COMPELL> S``的2 <金額>

Named template string:

您的餘額是%{ulity}%{currency}

Scheme 格式#

摘要:

Scheme 格式字串與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.SchemeFormatCheck

檢查標識符:

scheme_format

Flag to enable:

scheme-format

忽略的標誌:

ignore-scheme-format

Simple format string example:

這裡有 ~d 顆蘋果

Vue I18n 格式#

摘要:

Vue I18n 格式與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.format.VueFormattingCheck

檢查標識符:

vue_format

Flag to enable:

vue-format

忽略的標誌:

ignore-vue-format

Named formatting:

這裡有 {count} 顆蘋果

Rails i18n formatting:

這裡有 %{count} 顆蘋果

Linked locale messages:

@:message.dio @:message.the_world!

也參考

格式化字串,』查看i18n格式<https://kazupon.github.io/vue-i18n/guide/formatting.html>`_,查看i18n連結本地消息<https:// kazupon。github .io / vue-i18n / guide / messages.html#linked-locale-messages>`_

已經翻譯過#

摘要:

字串之前已經有翻譯過

範圍:

all strings

檢查類:

weblate.checks.consistency.TranslatedCheck

檢查標識符:

translated

忽略的標誌:

ignore-translated

表示已經翻譯了一個字串。當翻譯在VCS中或否則遺失時,可能會發生這種情況。

不一致#

摘要:

此專案中的這個字串有一種以上的翻譯,或是在某些組件未翻譯。

範圍:

all strings

檢查類:

weblate.checks.consistency.ConsistencyCheck

檢查標識符:

inconsistent

忽略的標誌:

ignore-inconsistent

Weberate檢查項目中所有翻譯中相同字串的翻譯,以幫助您保持一致的翻譯。

檢查失敗了專案中的一個字串的不同翻譯。這也可能導致顯示檢查中的不一致。您可以在以下網站上找到此字串的其他翻譯其他出現選項卡。

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.

您可以使用 自動翻譯 附加元件來自動翻譯從另一個元件中已翻譯字串到新新增而未翻譯的字串。

使用 Kashida letter#

摘要:

不應該使用裝飾性的卡希達對齊字母

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.KashidaCheck

檢查標識符:

kashida

忽略的標誌:

ignore-kashida

裝飾kashida字母不應該在翻譯中使用。這些也稱為TatWeel。

Markdown 參照#

摘要:

Markdown 連結參照與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.markup.MarkdownRefLinkCheck

檢查標識符:

md-reflink

Flag to enable:

md-text

忽略的標誌:

ignore-md-reflink

Markdown連結引用不匹配源。

也參考

Markdown links

Markdown 語法#

摘要:

Markdown 語法與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.markup.MarkdownSyntaxCheck

檢查標識符:

md-syntax

Flag to enable:

md-text

忽略的標誌:

ignore-md-syntax

Markdown 語法與來源不符

也參考

Markdown inlines

翻譯最大長度#

摘要:

翻譯不該超過指定長度

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.MaxLengthCheck

檢查標識符:

max-length

Flag to enable:

max-length

忽略的標誌:

ignore-max-length

檢查翻譯的長度是否可匹配可用的空間。這只檢查翻譯字元的長度。

與其他檢查不同,標誌應該被設定為“鍵:價值”(價值)對,如“Max-Length:100`”。

提示

此檢查查看字元數,使用比例字體呈現文本時可能不是最佳度量。:Ref:“Check-Max-size`檢查確實檢查了文本的實際渲染。

“替換:```````標誌可能也很有用,在檢查字串之前展開PLATEABLE。

When xml-text flag is also used, the length calculation ignores XML tags.

翻譯的最大長度#

摘要:

翻譯的呈現文字不該超過指定長度

範圍:

已翻譯好的字串

檢查類:

weblate.checks.render.MaxSizeCheck

檢查標識符:

max-size

Flag to enable:

max-size

忽略的標誌:

ignore-max-size

翻譯渲染文本不應超過給定的大小。它呈現出線包裝的文本,並檢查它是否適合給定邊界。

此檢查需要一個或兩個參數 - 最大寬度和最大行數。如果未提供行數,則考慮一行文本。

您還可以通過``font- *``指令組態已使用的字體(請參閱:ref:``custom-check`),例如隨圖的翻譯標誌說,使用ubuntu字體大小22呈現的文本應該適合兩行和500像素:

max-size:500:2, font-family:ubuntu, font-size:22

提示

您可能希望設定“字體 - *`指令:ref:“組件”(Component)以具有為組件中的所有字串組態的相同字體。您可以每字串覆蓋每個字串的值,以防每個字串自定義它。

“替換:```````標誌可能也很有用,在檢查字串之前展開PLATEABLE。

When xml-text flag is also used, the length calculation ignores XML tags.

Mismatched \n#

摘要:

譯文中的換行數 \n 和源文不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.EscapedNewlineCountingCheck

檢查標識符:

escaped_newline

忽略的標誌:

ignore-escaped-newline

Usually escaped newlines are important for formatting program output. Check fails if the number of \n literals in translation does not match the source.

冒號不相符#

摘要:

翻譯沒有和來源一致以冒號結尾

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.EndColonCheck

檢查標識符:

end_colon

忽略的標誌:

ignore-end-colon

檢查冒號在源和翻譯之間複製冒號。還檢查了冒號的存在,以便他們不屬於哪種語言(中文或日語)。

也參考

Colon on Wikipedia

刪節號不相符#

摘要:

翻譯沒有和來源一致以刪節號結尾

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.EndEllipsisCheck

檢查標識符:

end_ellipsis

忽略的標誌:

ignore-end-ellipsis

檢查尾部橢圓在源和轉換之間複製尾部橢圓。這只檢查真正的省略號(...)不適用於三個小點(...)。

省略號通常比打印中的三個點更好,並且文本到語音更好地聽起來更好。

驚嘆號不相符#

摘要:

翻譯沒有和來源一致以驚嘆號結尾

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.EndExclamationCheck

檢查標識符:

end_exclamation

忽略的標誌:

ignore-end-exclamation

檢查源和翻譯之間複製的感嘆號。還檢查了感嘆號的存在,他們不屬於哪種語言(中國,日語,韓國,亞美尼亞,林欄,緬甸或NKO)。

也參考

Wikipedia的感嘆號<https://en.wikipedia.org/wiki/exclamation_mark>`_

句號不相符#

摘要:

翻譯沒有和來源一致以句號結尾

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.EndStopCheck

檢查標識符:

end_stop

忽略的標誌:

ignore-end-stop

檢查在源和翻譯之間複製完整停止。檢查全部停止的存在,以便他們不屬於哪種語言(中文,日語,Devanagari或Urdu)。

也參考

wikipedia

問號不相符#

摘要:

翻譯沒有和來源一致以問號結尾

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.EndQuestionCheck

檢查標識符:

end_question

忽略的標誌:

ignore-end-question

檢查源和翻譯之間複製的問號。還檢查了問號的存在,以便他們不屬於哪些語言(亞美尼亞,阿拉伯語,中國,韓國,日語,埃塞俄比亞,vai或coptic)。

分號不相符#

摘要:

翻譯沒有和來源一致以分號結尾

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.EndSemicolonCheck

檢查標識符:

end_semicolon

忽略的標誌:

ignore-end-semicolon

Checks that semicolons at the end of sentences are replicated between both source and translation.

斷列符不相配#

摘要:

譯文中的換行數和源文不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.NewLineCountCheck

檢查標識符:

newline-count

忽略的標誌:

ignore-newline-count

Usually newlines are important for formatting program output. Check fails if the number of new lines in translation does not match the source.

缺少複數形#

摘要:

有些複數形未翻譯

範圍:

已翻譯好的字串

檢查類:

weblate.checks.consistency.PluralsCheck

檢查標識符:

plurals

忽略的標誌:

ignore-plurals

檢查已翻譯所有復數形式的源字串。可以在字串定義中找到每個複數表單的具體細節。

在某些情況下,未能填寫複數表格將導致多種形式使用時顯示任何內容。

佔位符#

摘要:

翻譯缺少一些佔位符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.placeholders.PlaceholderCheck

檢查標識符:

placeholders

Flag to enable:

placeholders

忽略的標誌:

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

標點符號間距#

摘要:

兩個標點符號前沒有不斷行空格

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.PunctuationSpacingCheck

檢查標識符:

punctuation_spacing

忽略的標誌:

ignore-punctuation-spacing

檢查雙標點符號(驚嘆號,問號,分號和冒號)之前存在不可破壞的空間。此規則僅以少數選定的語言使用法語或BRETON,其中PARD標註符號前的空間是印刷規則。

正則表達式#

摘要:

翻譯不符正則表達式

範圍:

已翻譯好的字串

檢查類:

weblate.checks.placeholders.RegexCheck

檢查標識符:

regex

Flag to enable:

regex

忽略的標誌:

ignore-regex

翻譯與正則表達式不匹配。表達式要麼從翻譯文件中提取,也可以使用`````````)來定義:

regex:^foo|bar$

重複使用的翻譯#

在 4.18 版新加入.

摘要:

不同字串的譯文相同。

範圍:

已翻譯好的字串

檢查類:

weblate.checks.consistency.ReusedCheck

檢查標識符:

reused

忽略的標誌:

ignore-reused

Check that fails if the same translation is used on different source strings. Such translations can be intentional, but can also confuse users.

相同複數形#

摘要:

有些複數形沒有以相同方式翻譯

範圍:

已翻譯好的字串

檢查類:

weblate.checks.consistency.SamePluralsCheck

檢查標識符:

same-plurals

忽略的標誌:

ignore-same-plurals

如果在翻譯中復制了一些複數,請檢查失敗。在大多數語言中他們必須不同。

開頭換行#

摘要:

翻譯沒有和來源一致以換列符開頭

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.BeginNewlineCheck

檢查標識符:

begin_newline

忽略的標誌:

ignore-begin-newline

紐丁通常出現在源字串中,有效原因,遺漏或新增可以導致翻譯文本使用時的格式化問題。

也參考

後隨換行

開頭空格#

摘要:

翻譯沒有和來源一致以相同數目的空格開頭

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.BeginSpaceCheck

檢查標識符:

begin_space

忽略的標誌:

ignore-begin-space

字串開頭的空間通常用於界面中的縮進,因此重要地保持。

後隨換行#

摘要:

翻譯沒有和來源一致以換列結尾

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.EndNewlineCheck

檢查標識符:

end_newline

忽略的標誌:

ignore-end-newline

紐丁通常出現在源字串中,有效原因,遺漏或新增可以導致翻譯文本使用時的格式化問題。

也參考

開頭換行

後隨空格#

摘要:

翻譯沒有和來源一致以相同數目的空格結尾

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.EndSpaceCheck

檢查標識符:

end_space

忽略的標誌:

ignore-end-space

檢查後隨空格是否在來源和翻譯之間複製。

尾隨空間通常用於空閒鄰居元素,因此刪除它可能會破壞組態。

未更動的翻譯#

摘要:

翻譯與來源文字相同

範圍:

已翻譯好的字串

檢查類:

weblate.checks.same.SameCheck

檢查標識符:

same

忽略的標誌:

ignore-same

如果源和相應的轉換字串相同,則會發生到至少一個形式中。忽略所有語言中常見的一些字串,並剝離各種標記。這減少了誤報的數量。

此檢查可以幫助查找錯誤誤解的字串。

此檢查的預設行為是從檢查中從內建黑名單中排除單詞。這些是經常未被翻譯的單詞。這對於避免短串上的誤報是有用的,該虛假陽性僅由單個單詞組成,該單詞具有多種語言中的相同。通過新增“嚴格的”“標記至字串或組件,可以禁用此黑名單。

在 4.17 版的變更: With check-glossary flag (see 與詞彙表不同), the untranslatable glossary terms are excluded from the checking.

不安全的 HTML#

摘要:

翻譯使用了不安全的 HTML 標示

範圍:

已翻譯好的字串

檢查類:

weblate.checks.markup.SafeHTMLCheck

檢查標識符:

safe-html

Flag to enable:

safe-html

忽略的標誌:

ignore-safe-html

翻譯使用不安全的HTML標記。必須使用“安全 - HTML”標誌(參見:ref:“客製檢查”)啟用此檢查。還有伴隨的AutoFixer,可以自動消毒標記。

提示

When md-text flag is also used, the Markdown style links are also allowed.

也參考

The HTML check is performed by the Ammonia library.

網址#

摘要:

此譯文未包含網址

範圍:

已翻譯好的字串

檢查類:

weblate.checks.markup.URLCheck

檢查標識符:

url

Flag to enable:

url

忽略的標誌:

ignore-url

翻譯不包含URL。僅在單位標記為包含URL時才會觸發這一點。在這種情況下,翻譯必須是有效的URL。

XML 標記#

摘要:

翻譯中的 XML 標記與來源不符

範圍:

已翻譯好的字串

檢查類:

weblate.checks.markup.XMLTagsCheck

檢查標識符:

xml-tags

忽略的標誌:

ignore-xml-tags

這通常意味著產生的輸出看起來不同。在大多數情況下,這不是改變翻譯的所需結果,但偶爾就是。

檢查源和翻譯之間是否複製XML標記。

The check is automatically enabled for XML like strings. You might need to add xml-text flag in some cases to force turning it on.

備註

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 語法#

摘要:

翻譯標記為無效 XML

範圍:

已翻譯好的字串

檢查類:

weblate.checks.markup.XMLValidityCheck

檢查標識符:

xml-invalid

忽略的標誌:

ignore-xml-invalid

XML標記無效。

The check is automatically enabled for XML like strings. You might need to add xml-text flag in some cases to force turning it on.

備註

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.

零寬度空格#

摘要:

翻譯中包含有額外的零寬度的空白字元

範圍:

已翻譯好的字串

檢查類:

weblate.checks.chars.ZeroWidthSpaceCheck

檢查標識符:

zero-width-space

忽略的標誌:

ignore-zero-width-space

零寬度空間(<u + 200b>)字元用於打破單詞中的消息(Word包裝)。

由於它們通常被錯誤插入,因此在翻譯中存在後觸發此檢查。使用此字元時,某些程序可能會出現問題。

也參考

wikipedia

Source checks#

源檢查可以幫助開發人員提高源字串的品質。

刪節號#

摘要:

該字串使用三個點(…)而非刪節號(…)

範圍:

來源字串

檢查類:

weblate.checks.source.EllipsisCheck

檢查標識符:

ellipsis

忽略的標誌:

ignore-ellipsis

當字串使用三個點時,這會失敗(...)時,它應該使用省略號字元(````)。

在大多數情況下,使用Unicode字元更好的方法,看起來更好,並且文本到語音可能會更好地聽起來更好。

Fluent 來源內部 HTML#

在 5.0 版新加入.

摘要:

Fluent 來源應為有效的內部 HTML

範圍:

來源字串

檢查類:

weblate.checks.fluent.inner_html.FluentSourceInnerHTMLCheck

檢查標識符:

fluent-source-inner-html

Flag to enable:

fluent-source-inner-html

忽略的標誌:

ignore-fluent-source-inner-html

Fluent is often used in contexts where the value for a Message (or Term) is meant to be used directly as .innerHTML (rather than .textContent) for some HTML element. For example, when using the Fluent DOM package.

The aim of this check is to predict how the value will be parsed as inner HTML, assuming a HTML5 conforming parser, to catch cases where there would be some 「unintended」 loss of the string, without being too strict about technical parsing errors that do not lead to a loss of the string.

This check is applied to the value of Fluent Messages or Terms, but not their Attributes. For Messages, the Fluent Attributes are often just HTML attribute values, so can be arbitrary strings. For Terms, the Fluent Attributes are often language properties that can only be referenced in the selectors of Fluent Select Expressions.

Generally, most Fluent values are not expected to contain any HTML markup. Therefore, this check does not expect or want translators and developers to have to care about strictly avoiding any technical HTML5 parsing errors (let alone XHTML parsing errors). Instead, this check will just want to warn them when they may have unintentionally opened a HTML tag or inserted a character reference.

Moreover, for the Fluent values that intentionally contain HTML tags or character references, this check will verify some 「good practices」, such as matching closing and ending tags, valid character references, and quoted attribute values. In addition, whilst the HTML5 specification technically allows for quite arbitrary tag and attribute names, this check will restrain them to some basic ASCII values that should cover the standard HTML5 element tags and attributes, as well as allow some custom element or attribute names. This is partially to ensure that the user is using HTML intentionally.

Examples:

Value

Warns?

Reason

three<four

yes

The <four part would be lost as .innerHTML.

three < four

no

The .innerHTML would match the .textContent.

three <four>

yes

Missing a closing tag.

three <four/>

yes

four is not a HTML void element, so should not self-close.

<a-b>text</a-b>

no

Custom element tag with a matching closing tag.

a <img/> b

no

img is a HTML void element. Self-closing is allowed.

a <br> b

no

br is a HTML void element.

<img class=a/>

yes

The attribute value is not quoted.

<aØ attr=''/>

yes

Non-ASCII tag name.

kind&ethical

yes

The &eth part would be converted to ð.

kind&eth;ical

no

The character reference seems to be intentional.

three&lte;four

yes

The &lte; part would be converted to <e;.

three&lf;four

yes

The character reference is not valid.

three<{ $val }

yes

The Fluent variable may unintentionally become a tag.

&l{ $val }

yes

The Fluent variable may unintentionally become a character reference.

備註

This check will not ensure the inner HTML is safe or sanitized, and is not meant to protect against malicious attempts to alter the inner HTML. Moreover, it should be remembered that Fluent variables and references may expand to arbitrary strings, so could expand to arbitrary HTML unless they are escaped. As an exception, a < or & character before a Fluent reference will trigger this check since even an escaped value could lead to unexpected results.

備註

The Fluent DOM package has further limitations, such as allowed tags and attributes, which this check will not enforce.

Fluent 原文語法#

在 5.0 版新加入.

摘要:

原文中 Fluent 的語法有錯

範圍:

來源字串

檢查類:

weblate.checks.fluent.syntax.FluentSourceSyntaxCheck

檢查標識符:

fluent-source-syntax

Flag to enable:

fluent-source-syntax

忽略的標誌:

ignore-fluent-source-syntax

In Weblate, Fluent strings use Fluent syntax for references and variables, but also for more complex features like defining attributes and selector variants, including plurals. This check ensures that the syntax used in source will be valid for Fluent.

ICU MessageFormat 語法#

在 4.9 版新加入.

摘要:

ICU MessageFormat 字串有語法錯誤。

範圍:

來源字串

檢查類:

weblate.checks.icu.ICUSourceCheck

檢查標識符:

icu_message_format_syntax

Flag to enable:

icu-message-format

忽略的標誌:

ignore-icu-message-format

也參考

ICU MessageFormat

長期未翻譯#

在 4.1 版新加入.

摘要:

字串很久都沒有翻譯

範圍:

來源字串

檢查類:

weblate.checks.source.LongUntranslatedCheck

檢查標識符:

long_untranslated

忽略的標誌:

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.

多項未通過查核#

摘要:

多個語言的翻譯有未通過查核的項目

範圍:

來源字串

檢查類:

weblate.checks.source.MultipleFailingCheck

檢查標識符:

multiple_failures

忽略的標誌:

ignore-multiple-failures

此字串的許多翻譯都沒有品質檢查。這通常是可以進行某些東西來改進源字串的指示。

此檢查失敗通常可以在句子末尾的缺失完整停止遺失或類似的次要問題傾向於在翻譯中解決,而在源字串中將其更好。

多個未命名變數#

在 4.1 版新加入.

摘要:

字串中有多個未命名變數,翻譯者將難以重新排序

範圍:

來源字串

檢查類:

weblate.checks.format.MultipleUnnamedFormatsCheck

檢查標識符:

unnamed_format

忽略的標誌:

ignore-unnamed-format

字串中有多個未命名的變量,使翻譯是不可能重新排序的轉換器。

考慮使用命名變量,而不是允許翻譯器重新排序。

未複數化#

摘要:

該字串為複數,但沒有使用複數形

範圍:

來源字串

檢查類:

weblate.checks.source.OptionalPluralCheck

檢查標識符:

optional_plural

忽略的標誌:

ignore-optional-plural

該字串用作複數,但不使用複數形式。如果您的翻譯系統支援此情況,您應該使用它的複數感知變體。

例如,在Python中用GetText可能是:

from gettext import ngettext

print(ngettext("Selected %d file", "Selected %d files", files) % files)