檢查和修復

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

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

../_images/checks.webp

自動修正

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

也參考

AUTOFIX_LIST

Trailing ellipsis replacer

類別名稱:

weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis

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

零寬度空格移除

類別名稱:

weblate.trans.autofixes.chars.RemoveZeroSpace

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.

控制字元移除

類別名稱:

weblate.trans.autofixes.chars.RemoveControlChars

去掉控制字元,如果來源字串不包含的話。

天城文短豎線

類別名稱:

weblate.trans.autofixes.chars.DevanagariDanda

Replaces sentence full stop in Bangla by the Devanagari danda character ().

標點符號間距

類別名稱:

weblate.trans.autofixes.chars.PunctuationSpacing

在 5.3 版被加入.

Ensures French uses correct punctuation spacing.

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

不安全 HTML 清理

類別名稱:

weblate.trans.autofixes.html.BleachHTML

Removes unsafe HTML markup from strings flagged as safe-html.

也參考

不安全的 HTML

Trailing and leading whitespace fixer

類別名稱:

weblate.trans.autofixes.whitespace.SameBookendingWhitespace

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 標記

在 5.10 版的變更: This checks no longer relies on unreliable automatic detection, it now needs to be turned on using the bbcode-text flag.

摘要:

翻譯中的 BBCode 與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.markup.BBCodeCheck

檢查識別碼:

bbcode

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

bbcode-text

要忽略的旗標:

ignore-bbcode

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

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

備註

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

XML 標籤周圍的字元

摘要:

翻譯中 XML 標籤周圍的字元與來源不一致。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.markup.XMLCharsAroundTagsCheck

檢查識別碼:

xml-chars-around-tags

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-xml-chars-around-tags

Checks that the characters surrounding an XML tag are consistent between both source and translation. Ensures letters are not replaced with non-letters, and vice versa.

備註

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.

連續重複單字

在 4.1 版被加入.

摘要:

文字在同一列中有兩個相同的單字。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.duplicate.DuplicateCheck

檢查識別碼:

duplicate

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-duplicate

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

提示

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

與詞彙表不同

在 4.5 版被加入.

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.glossary.GlossaryCheck

檢查識別碼:

check_glossary

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

check-glossary

要忽略的旗標:

ignore-check-glossary

This check has to be turned on using check-glossary flag (see 使用標誌自訂行為). Please consider following prior to enabling it:

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

  • Checking each string against glossary is expensive, it will slow down any operation in Weblate which involves running checks like importing strings or translating.

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

兩個空白

摘要:

翻譯含有兩個空格。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.DoubleSpaceCheck

檢查識別碼:

double_space

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-double-space

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

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

Fluent 部分

在 5.0 版被加入.

摘要:

Fluent 部分應當配對。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.fluent.parts.FluentPartsCheck

檢查識別碼:

fluent-parts

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

流暢的格式

要啟用的旗標:

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

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

流暢的格式

要啟用的旗標:

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

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

流暢的格式

要啟用的旗標:

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

但不是:

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

也非

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

Fluent 翻譯語法

在 5.0 版被加入.

摘要:

翻譯中 Fluent 的語法有錯。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.fluent.syntax.FluentTargetSyntaxCheck

檢查識別碼:

fluent-target-syntax

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

流暢的格式

要啟用的旗標:

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

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

angularjs-format

要忽略的旗標:

ignore-angularjs-format

Named format string example:

Your balance is {{amount}} {{ currency }}

Automattic 組件格式設定

摘要:

Automattic 組件的預留位置與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.AutomatticComponentsCheck

檢查識別碼:

automattic_components_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

automattic-components-format

要忽略的旗標:

ignore-automattic-components-format

簡易格式字串範例:

They bought {{strong}}apples{{/strong}}.

C 格式

摘要:

C 格式字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.CFormatCheck

檢查識別碼:

c_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

c-format

要忽略的旗標:

ignore-c-format

簡易格式字串範例:

There are %d apples

位置格式字串範例:

Your balance is %1$d %2$s

C# 格式

摘要:

C# 格式字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.CSharpFormatCheck

檢查識別碼:

c_sharp_format

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

ResourceDictionary 檔案

要啟用的旗標:

c-sharp-format, csharp-format

要忽略的旗標:

ignore-c-sharp-format

位置格式字串範例:

There are {0} apples

ECMAScript 範本字面值

摘要:

ECMAScript 範本字面值與來源不相符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.ESTemplateLiteralsCheck

檢查識別碼:

es_format

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

draggable/i18n lang files

要啟用的旗標:

es-format

要忽略的旗標:

ignore-es-format

插值範例:

There are ${number} apples

i18next 插值

在 4.0 版被加入.

摘要:

i18next 插值與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.I18NextInterpolationCheck

檢查識別碼:

i18next_interpolation

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

i18next JSON 檔案, i18next JSON 檔案

要啟用的旗標:

i18next-interpolation

要忽略的旗標:

ignore-i18next-interpolation

插值範例:

There are {{number}} apples

巢狀範例:

There are $t(number) apples

ICU MessageFormat

在 4.9 版被加入.

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.icu.ICUMessageFormatCheck

檢查識別碼:

icu_message_format

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

ARB 檔案, Format.JS JSON 檔案

要啟用的旗標:

icu-message-format

要忽略的旗標:

ignore-icu-message-format

插值範例:

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:

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

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

Android 字串資源, Mobile Kotlin 資源, Compose Multiplatform 資源

要啟用的旗標:

java-printf-format

要忽略的旗標:

ignore-java-printf-format

簡易格式字串範例:

There are %d apples

位置格式字串範例:

Your balance is %1$d %2$s

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

Java MessageFormat

摘要:

Java MessageFormat 字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.JavaMessageFormatCheck

檢查識別碼:

java_format

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

Java 屬性, GWT 屬性

要啟用的旗標:

auto-java-messageformat, java-format

自動旗標行為:

auto-java-messageformat: Treat a text as conditional Java MessageFormat, enabling Java MessageFormat only when the source contains Java MessageFormat placeholders.

要忽略的旗標:

ignore-java-format

位置格式字串範例:

There are {0} apples

在 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

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

javascript-format

要忽略的旗標:

ignore-javascript-format

簡易格式字串範例:

There are %d apples

Laravel 格式

摘要:

Laravel 格式字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.LaravelFormatCheck

檢查識別碼:

laravel_format

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

Laravel PHP 字串

要啟用的旗標:

laravel-format

要忽略的旗標:

ignore-laravel-format

Named format string example:

The :attribute must be :value

Lua 格式

摘要:

Lua 格式字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.LuaFormatCheck

檢查識別碼:

lua_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

lua-format

要忽略的旗標:

ignore-lua-format

簡易格式字串範例:

There are %d apples

Object Pascal 格式

摘要:

Object Pascal 格式字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.ObjectPascalFormatCheck

檢查識別碼:

object_pascal_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

object-pascal-format

要忽略的旗標:

ignore-object-pascal-format

簡易格式字串範例:

There are %d apples

Objective-C 格式

在 5.17 版被加入.

摘要:

Objective-C 格式字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.ObjCFormatCheck

檢查識別碼:

objc_format

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

蘋果 iOS 字串, Stringsdict 格式

要啟用的旗標:

objc-format

要忽略的旗標:

ignore-objc-format

百分比佔位符號

在 4.0 版被加入.

摘要:

百分比佔位符號與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.PercentPlaceholdersCheck

檢查識別碼:

percent_placeholders

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

percent-placeholders

要忽略的旗標:

ignore-percent-placeholders

簡易格式字串範例:

There are %number% apples

也參考

格式化字串

Perl 大括號格式

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.PerlBraceFormatCheck

檢查識別碼:

perl_brace_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

perl-brace-format

要忽略的旗標:

ignore-perl-brace-format

Named format string example:

There are {number} apples

Perl 格式

摘要:

Perl 格式字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.PerlFormatCheck

檢查識別碼:

perl_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

perl-format

要忽略的旗標:

ignore-perl-format

簡易格式字串範例:

There are %d apples

位置格式字串範例:

Your balance is %1$d %2$s

PHP 格式

摘要:

PHP 格式字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.PHPFormatCheck

檢查識別碼:

php_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

php-format

要忽略的旗標:

ignore-php-format

簡易格式字串範例:

There are %d apples

位置格式字串範例:

Your balance is %1$d %2$s

Python 大括號格式

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.PythonBraceFormatCheck

檢查識別碼:

python_brace_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

python-brace-format

要忽略的旗標:

ignore-python-brace-format

Simple format string:

There are {} apples

Named format string example:

Your balance is {amount} {currency}

Python 格式

摘要:

Python 格式字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.PythonFormatCheck

檢查識別碼:

python_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

python-format

要忽略的旗標:

ignore-python-format

Simple format string:

There are %d apples

Named format string example:

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

Qt 格式

摘要:

Qt 格式字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.qt.QtFormatCheck

檢查識別碼:

qt_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

qt-format

要忽略的旗標:

ignore-qt-format

位置格式字串範例:

There are %1 apples

Qt 複數格式

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.qt.QtPluralCheck

檢查識別碼:

qt_plural_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

qt-plural-format

要忽略的旗標:

ignore-qt-plural-format

Plural format string example:

There are %Ln apple(s)

Ruby 格式

摘要:

Ruby 格式字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.ruby.RubyFormatCheck

檢查識別碼:

ruby_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

ruby-format

要忽略的旗標:

ignore-ruby-format

簡易格式字串範例:

There are %d apples

位置格式字串範例:

Your balance is %1$f %2$s

Named format string example:

Your balance is %+.2<amount>f %<currency>s

Named template string:

Your balance is %{amount} %{currency}

Scheme 格式

摘要:

Scheme 格式字串與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.SchemeFormatCheck

檢查識別碼:

scheme_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

scheme-format

要忽略的旗標:

ignore-scheme-format

簡易格式字串範例:

There are ~d apples

Vue I18n 格式

摘要:

Vue I18n 格式與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.format.VueFormattingCheck

檢查識別碼:

vue_format

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

vue-format

要忽略的旗標:

ignore-vue-format

已命名格式:

There are {count} apples

Rails i18n 格式化:

There are %{count} apples

Linked locale messages:

@:message.dio @:message.the_world!

已經翻譯過

摘要:

字串之前已經有翻譯過。

範圍:

所有字串

檢查類別:

weblate.checks.consistency.TranslatedCheck

檢查識別碼:

translated

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-translated

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

不一致

摘要:

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

範圍:

所有字串

檢查類別:

weblate.checks.consistency.ConsistencyCheck

檢查識別碼:

inconsistent

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-inconsistent

Weblate檢查專案中所有翻譯中相同字串的翻譯,以幫助您保持一致的翻譯。

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

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.

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

reStructuredText 不一致

在 5.10 版被加入.

摘要:

訊息翻譯的 reStructuredText 標記不一致。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.markup.RSTReferencesCheck

檢查識別碼:

rst-references

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

rst-text

要忽略的旗標:

ignore-rst-references

reStructuredText term references or other markup do not match source, the typical causes for these errors are:

  • Mismatched or missing backticks.

  • Missing spaces or interpunction around the reference. The reStructuredText inline blocks need to be separated by non-word characters.

  • Space between inline tag and backticks.

  • The reference name is not being translated.

  • Using quotes instead of backticks.

  • Mismatched substitutions or footnote references.

使用 Kashida letter

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.KashidaCheck

檢查識別碼:

kashida

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-kashida

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

Markdown 參照

摘要:

Markdown 連結引用和來源不一致。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.markup.MarkdownRefLinkCheck

檢查識別碼:

md-reflink

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

Markdown 檔案, MDX files

要啟用的旗標:

md-text

要忽略的旗標:

ignore-md-reflink

Markdown 連結引用和來源不一致。

也參考

Markdown links

Markdown 語法

摘要:

Markdown 語法與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.markup.MarkdownSyntaxCheck

檢查識別碼:

md-syntax

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

Markdown 檔案, MDX files

要啟用的旗標:

md-text

要忽略的旗標:

ignore-md-syntax

Markdown 語法與來源不符

也參考

Markdown inlines

翻譯最大長度

摘要:

翻譯不該超過指定長度。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.MaxLengthCheck

檢查識別碼:

max-length

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

max-length

要忽略的旗標:

ignore-max-length

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

Unlike the other checks, the flag should be set as a key:value pair like max-length:100.

提示

此檢查查看字元數,使用比例字型呈現文本時可能不是最佳度量。翻譯的最大長度 檢查確實檢查了文本的實際渲染。

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

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

翻譯的最大長度

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.render.MaxSizeCheck

檢查識別碼:

max-size

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

max-size

要忽略的旗標:

ignore-max-size

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

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

You can also configure used font by font-* directives (see 使用標誌自訂行為), for example following translation flags say that the text rendered with ubuntu font size 22 should fit into two lines and 500 pixels:

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

提示

You might want to set font-* directives in 組件配置 to have the same font configured for all strings within a component. You can override those values per string in case you need to customize it per string.

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

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

不相配的 \n

摘要:

翻譯中的 \n 字面值與來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.EscapedNewlineCountingCheck

檢查識別碼:

escaped_newline

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

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

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-end-colon

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

也參考

Colon on Wikipedia

刪節號不相符

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.EndEllipsisCheck

檢查識別碼:

end_ellipsis

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-end-ellipsis

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

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

驚嘆號不相符

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.EndExclamationCheck

檢查識別碼:

end_exclamation

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-end-exclamation

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

句號不相符

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.EndStopCheck

檢查識別碼:

end_stop

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-end-stop

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

也參考

wikipedia

不相配的驚歎問號

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.EndInterrobangCheck

檢查識別碼:

end_interrobang

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-end-interrobang

Checks that interrobang marks are replicated between both source and translation. It allows the swap between "!?" and "?!".

問號不相符

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.EndQuestionCheck

檢查識別碼:

end_question

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-end-question

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

分號不相符

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.EndSemicolonCheck

檢查識別碼:

end_semicolon

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-end-semicolon

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

斷列符不相配

摘要:

翻譯中的換行數和來源不符。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.NewLineCountCheck

檢查識別碼:

newline-count

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-newline-count

通常換行符號對於格式化程式輸出很重要。如果在翻譯中的新行數與來源不相配,則檢查失敗。

缺少複數

摘要:

有些複數未翻譯。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.consistency.PluralsCheck

檢查識別碼:

plurals

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-plurals

Checks that all plural forms of a source string have been translated. Specifics on how each plural form is used can be found in the string definition.

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

多個大寫字母

在 5.16 版被加入.

摘要:

翻譯有多個大寫字母錯位的單字。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.MultipleCapitalCheck

檢查識別碼:

multiple_capital

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-multiple-capital

Checks for misplaced capitalization by detecting words that contain consecutive uppercase letters in otherwise lowercase or normally capitalized text (for example, HEllo or CAmelCase). Strings that contain capitalization in the source string are allowed to contain capitalization in the translation.

非標準的柏柏爾語字元

在 5.12 版被加入.

摘要:

使用標準化的拉丁柏柏爾語字元(例如:使用 ɣ 而非希臘字母 γ;使用 ɛ 而非 ε)。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.KabyleCharactersCheck

檢查識別碼:

kabyle-characters

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-kabyle-characters

Checks that Kabyle translations use correct Kabyle letters and not similar Greek ones, which were often used before Kabyle characters were standardized in Unicode.

佔位符號

在 4.3 版的變更: You can use regular expression as placeholder.

在 4.13 版的變更: With the case-insensitive flag, the placeholders are not case-sensitive.

摘要:

翻譯缺少一些佔位符號。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.placeholders.PlaceholderCheck

檢查識別碼:

placeholders

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

placeholders

要忽略的旗標:

ignore-placeholders

Translation is missing some placeholders. These are either extracted from the translation file or defined manually using placeholders flag, more can be separated with colon, strings with space can be quoted:

placeholders:$URL$:$TARGET$:"some long text"

如果您對佔位符號有一些語法,則可以使用正規表達式:

placeholders:r"%[^% ]%"

You can also have case insensitive placeholders:

placeholders:$URL$:$TARGET$,case-insensitive

禁止的初始字元

在 5.9 版被加入.

摘要:

CSV 中字串以禁止的字元開頭。

範圍:

詞彙表字串

檢查類別:

weblate.checks.glossary.ProhibitedInitialCharacterCheck

檢查識別碼:

prohibited_initial_character

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-prohibited-initial-character

The glossary is often shared as CSV and using some characters at the beginning is restricted by many applications as these can cause the text being evaluated as an expression. This also affects Glossaries in automatic suggestion where many services use CSV for synchronizing glossaries and reject such strings.

標點符號間距

在 5.10 版的變更: This check used to apply to Breton language as well, but it was limited to French only.

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.PunctuationSpacingCheck

檢查識別碼:

punctuation_spacing

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-punctuation-spacing

Checks that there is non breakable space before double punctuation sign (exclamation mark, question mark, semicolon and colon). This rule is used only in a few selected languages like French, where space before double punctuation sign is a typographic rule.

正規表達式

在 5.10 版的變更: Extended support for advanced regular expressions including Unicode codepoint properties.

摘要:

翻譯不符合正規表達式。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.placeholders.RegexCheck

檢查識別碼:

regex

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

regex

要忽略的旗標:

ignore-regex

Translation does not match regular expression. The expression is either extracted from the translation file or defined manually using regex flag:

regex:^foo|bar$

The matching also supports Unicode codepoint properties, including scripts and blocks:

regex:^[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$

提示

Use 佔位符號 for detecting missing placeholders in the string.

reStructuredText 語法錯誤

在 5.10 版被加入.

摘要:

翻譯中 reStructuredText 的語法有錯。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.markup.RSTSyntaxCheck

檢查識別碼:

rst-syntax

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

rst-text

要忽略的旗標:

ignore-rst-syntax

reStructuredText syntax error in the translation. Issues to look for:

  • Mismatched closing/opening tags.

  • Missing spaces or interpunction around the reference. The reStructuredText inline blocks need to be separated by non-word characters.

  • Using quotes instead of backticks.

重複使用的翻譯

在 4.18 版被加入.

摘要:

不同字串的翻譯相同。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.consistency.ReusedCheck

檢查識別碼:

reused

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

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

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-same-plurals

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

開頭換行

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.BeginNewlineCheck

檢查識別碼:

begin_newline

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-begin-newline

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

也參考

後隨換行

開頭空格

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.BeginSpaceCheck

檢查識別碼:

begin_space

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-begin-space

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

後隨換行

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.EndNewlineCheck

檢查識別碼:

end_newline

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-end-newline

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

也參考

開頭換行

後隨空格

摘要:

翻譯沒有和來源一致以空格結尾。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.chars.EndSpaceCheck

檢查識別碼:

end_space

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-end-space

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

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

未變更的翻譯

摘要:

翻譯與來源文字相同。

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.same.SameCheck

檢查識別碼:

same

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-same

Happens if the source and corresponding translation strings are identical, down to at least one of the plural forms. Some strings commonly found across all languages are ignored, and various markups are stripped. This reduces the number of false positives.

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

The default behavior of this check is to exclude words from the built-in terms list from the checking. These are words which are frequently not being translated. This is useful to avoid false positives on short strings, which consist only of a single word which is the same in several languages. This list can be disabled by adding strict-same flag to a string or component.

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

不安全的 HTML

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.markup.SafeHTMLCheck

檢查識別碼:

safe-html

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

HTML 檔案, Markdown 檔案, MDX files, AsciiDoc 檔案

要啟用的旗標:

auto-safe-html, safe-html

自動旗標行為:

auto-safe-html: Treat a text as conditional HTML, enabling 不安全的 HTML only for plain text or source strings that contain standard HTML markup or valid custom elements. This is useful for extended Markdown variants such as MDX, where angle-bracket syntax may not be HTML.

要忽略的旗標:

ignore-safe-html

翻譯使用不安全的HTML標記。必須使用 safe-html 標誌(參閱 使用標誌自訂行為)啟用此檢查。還有伴隨的AutoFixer,可以自動消毒標記。

提示

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

也參考

The HTML check is performed by the Ammonia library.

URL

摘要:

The translation does not contain a URL.

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.markup.URLCheck

檢查識別碼:

url

觸發:

This check needs to be enabled using a flag.

要啟用的旗標:

url

要忽略的旗標:

ignore-url

The translation does not contain a URL. This is triggered only in case the unit is marked as containing URL. In that case the translation has to be a valid URL.

XML 標記

摘要:

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

範圍:

已翻譯好的字串

檢查類別:

weblate.checks.markup.XMLTagsCheck

檢查識別碼:

xml-tags

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

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

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

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

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-zero-width-space

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

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

也參考

wikipedia

Source checks

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

刪節號

摘要:

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

範圍:

來源字串

檢查類別:

weblate.checks.source.EllipsisCheck

檢查識別碼:

ellipsis

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-ellipsis

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

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

Fluent 來源內部 HTML

在 5.0 版被加入.

摘要:

Fluent 來源應為有效的內部 HTML。

範圍:

來源字串

檢查類別:

weblate.checks.fluent.inner_html.FluentSourceInnerHTMLCheck

檢查識別碼:

fluent-source-inner-html

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

流暢的格式

要啟用的旗標:

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 an 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 an 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.

範例:

Fluent 內部 HTML 範例

警告?

原因

three<four

The <four part would be lost as .innerHTML.

three < four

The .innerHTML would match the .textContent.

three <four>

Missing a closing tag.

three <four/>

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

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

Custom element tag with a matching closing tag.

a <img/> b

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

a <br> b

br is an HTML void element.

<img class=a/>

The attribute value is not quoted.

<aØ attr=''/>

Non-ASCII tag name.

kind&ethical

The &eth part would be converted to ð.

kind&eth;ical

The character reference seems to be intentional.

three&lte;four

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

three&lf;four

The character reference is not valid.

three<{ $val }

The Fluent variable may unintentionally become a tag.

&l{ $val }

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

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

流暢的格式

要啟用的旗標:

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

觸發:

This check needs to be enabled using a flag.

File formats automatically enabling this check:

ARB 檔案, Format.JS JSON 檔案

要啟用的旗標:

icu-message-format

要忽略的旗標:

ignore-icu-message-format

也參考

ICU MessageFormat

長期未翻譯

在 4.1 版被加入.

摘要:

字串很久都沒有翻譯。

範圍:

來源字串

檢查類別:

weblate.checks.source.LongUntranslatedCheck

檢查識別碼:

long_untranslated

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

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

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-multiple-failures

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

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

多個未命名變數

在 4.1 版被加入.

摘要:

此字串內含多個未命名的變數,致使翻譯者無法調整其順序。

範圍:

來源字串

檢查類別:

weblate.checks.format.MultipleUnnamedFormatsCheck

檢查識別碼:

unnamed_format

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-unnamed-format

此字串內含多個未命名的變數,致使翻譯者無法調整其順序。

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

未複數化

摘要:

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

範圍:

來源字串

檢查類別:

weblate.checks.source.OptionalPluralCheck

檢查識別碼:

optional_plural

觸發:

This check is always enabled but can be ignored using a flag.

要忽略的旗標:

ignore-optional-plural

The string is used as a plural, but does not use plural forms. In case your translation system supports this, you should use the plural aware variant of it.

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

from gettext import ngettext

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

Placeables in automatic suggestion

Checks for placeables expose information on current placeables and this can be used to instruct automatic suggestion engines to keep them. The support for this varies in different services and in many cases there is no way to enforce keeping placeables intact.

也參考

自動建議