[英]How can I limit a Weblate check/autofix on the file format (i.a. Android, iOS)
我們在移動應用 CI 環境中使用 Weblate。 到目前為止,一切都很棒。 Weblate 在 docker 環境 (v4.1) 中運行
現在我想改進工作流程。
我設法創建了自定義檢查,這些檢查驗證了 Android/iOS 占位符的使用(參見下面的示例)。 現在翻譯人員需要知道他正在使用哪個平台來使用正確的占位符並取消誤報檢查。
目前使用的占位符是%1$@
用於 iOS 和%1$s
用於 Android
我的問題:
%1$s
而不是%1$@
樣品檢查
class iOSPlaceholderCheck(TargetCheck):
# Used as identifier for check, should be unique
# Has to be shorter than 50 characters
check_id = "iOSPlaceholder"
# Short name used to display failing check
name = _("iOS placeholder")
# Description for failing check
description = _("Your translation contains an iOS placeholder")
# Real check code
def check_single(self, source, target, unit):
if "%1$@" in target:
return True
...
提前致謝
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.