சோதனைகள் மற்றும் சரிசெய்தல்

தனிப்பயன் தானியங்கி சரிசெய்தல்

You can also implement your own automatic fixup in addition to the standard ones and include them in AUTOFIX_LIST.

தானியங்கி திருத்தங்கள் சக்திவாய்ந்தவை, ஆனால் சேதத்தையும் ஏற்படுத்தும்; ஒன்றை எழுதும்போது கவனமாக இருங்கள்.

எடுத்துக்காட்டாக, பின்வரும் தானியங்கி சரிசெய்தல் `` பார்`` உடன் மொழிபெயர்ப்பில் `` ஃபூ`` சரத்தின் ஒவ்வொரு நிகழ்வையும் மாற்றும்:

# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later

from django.utils.translation import gettext_lazy

from weblate.trans.autofixes.base import AutoFix


class ReplaceFooWithBar(AutoFix):
    """Replace foo with bar."""

    name = gettext_lazy("Foobar")

    def fix_single_target(self, target, source, unit):
        if "foo" in target:
            return target.replace("foo", "bar"), True
        return target, False

To install custom checks, provide a fully-qualified path to the Python class in the AUTOFIX_LIST, see தனிப்பயன் தர சோதனைகள், துணை நிரல்கள் மற்றும் தானி சரிசெய்தல்.

கொடிகளைப் பயன்படுத்தி நடத்தை தனிப்பயனாக்குதல்

கொடிகளைப் பயன்படுத்துவதன் மூலம் வலைபெயர்ப்புடின் நடத்தையை நீங்கள் நன்றாகக் கட்டுப்படுத்தலாம். கொடிகள் மொழிபெயர்ப்பாளர்களுக்கு காட்சி கருத்துக்களை வழங்குகின்றன மற்றும் அவற்றின் மொழிபெயர்ப்பை மேம்படுத்த உதவுகின்றன. கொடிகள் பின்வரும் ஆதாரங்களிலிருந்து இணைக்கப்படுகின்றன:

கொடிகள் கமாவால் பிரிக்கப்பட்டவை; அவற்றில் அளவுருக்கள் இருந்தால், அவை பெருங்குடலுடன் பிரிக்கப்படுகின்றன. சரத்தில் ஒயிட்ச்பேச்கள் அல்லது சிறப்பு எழுத்துக்களைச் சேர்க்க மேற்கோள்களைப் பயன்படுத்தலாம். உதாரணத்திற்கு:

placeholders:"special:value":"other value", regex:.*

ஒற்றை மற்றும் இரட்டை மேற்கோள்கள் இரண்டும் ஏற்றுக்கொள்ளப்படுகின்றன, பின்சாய்வுக்குறிப்பைப் பயன்படுத்தி சிறப்பு எழுத்துக்கள் தப்பிக்கப்படுகின்றன:

placeholders:"quoted \"string\"":'single \'quoted\''
placeholders:r"^#*"

To verify that translators do not change the heading of a Markdown document. A failing check will be triggered if the string ### Index is translated as # Indice.

placeholders:r"\]\([^h].*?\)"

உள் இணைப்புகள் மொழிபெயர்க்கப்படவில்லை என்பதை உறுதிப்படுத்த (அதாவது [சோதனை] (../ சோதனைகள்) [சோதனை] (../ செக்கியோச்) ஆக மாறாது.

தற்போது ஏற்றுக்கொள்ளப்பட்ட கொடிகளின் பட்டியல் இங்கே:

rst-text

Treat a text as an reStructuredText document, affects மாறாத மொழிபெயர்ப்பு. Turns on reStructuredText syntax error and Inconsistent reStructuredText references.

bbcode-text

Treat a text as an Bulletin Board Code (BBCode) document, affects மாறாத மொழிபெயர்ப்பு.

dos-eol

யுனிக்ச் ஒன்றுக்கு பதிலாக டோச் எண்ட்-ஆஃப்-லைன் குறிப்பான்களைப் பயன்படுத்துகிறது (`` n`` க்கு பதிலாக `` r n``).

read-only

The string is read-only and should not be edited in Weblate, see படிக்க-மட்டுமே சரங்கள்.

terminology

Used in சொற்களஞ்சியம். Copies the string into all glossary languages so it can be used consistently in all translations. Also useful in combination with read-only, for example in product names.

priority:N

சரத்தின் முன்னுரிமை. மொழிபெயர்ப்புக்கு முதலில் அதிக முன்னுரிமை சரங்கள் வழங்கப்படுகின்றன. இயல்புநிலை முன்னுரிமை 100, ஒரு சரம் அதிக முன்னுரிமை, முந்தையது மொழிபெயர்ப்புக்கு வழங்கப்படுகிறது.

max-length:N

Limit the maximal length for a string to N characters, see மொழிபெயர்ப்பின் அதிகபட்ச நீளம்.

xml-text

Treat text as XML document, affects எக்ச்எம்எல் தொடரியல் and எக்ச்எம்எல் மார்க்அப்.

font-family:NAME

Define font-family for rendering checks, see எழுத்துருக்களை நிர்வகித்தல்.

font-weight:WEIGHT

Define font-weight for rendering checks, see எழுத்துருக்களை நிர்வகித்தல்.

font-size:SIZE

Define font-size for rendering checks, see எழுத்துருக்களை நிர்வகித்தல்.

font-spacing:SPACING

Define letter spacing for rendering checks, see எழுத்துருக்களை நிர்வகித்தல்.

icu-flags:FLAGS

Define flags for customizing the behavior of the icu messageformat quality check.

icu-tag-prefix:PREFIX

Set a required prefix for XML tags for the icu messageformat quality check.

placeholders:NAME:NAME2:...

Placeholder strings expected in translation, see இடம் வைத்திருப்பவர்கள்.

replacements:FROM:TO:FROM2:TO2...

Replacements to perform when checking resulting text parameters (for example in மொழிபெயர்ப்பின் அதிகபட்ச அளவு or மொழிபெயர்ப்பின் அதிகபட்ச நீளம்). The typical use case for this is to expand placeables to ensure that the text fits even with long values, for example: replacements:%s:"John Doe".

variants:SOURCE

Mark this string as a variant of string with matching source. See சர வகைகள்.

regex:REGEX

Regular expression to match translation, see வழக்கமான வெளிப்பாடு.

forbidden

Indicates forbidden translation in a glossary, see தடைசெய்யப்பட்ட மொழிபெயர்ப்புகள்.

strict-same

Make the மாறாத மொழிபெயர்ப்பு avoid using the built-in words exceptions.

strict-format

Make format checks enforce using format even for plural forms with a single value, see வடிவமைக்கப்பட்ட சரங்கள்.

check-glossary

Enable the சொற்களஞ்சியத்தைப் பின்பற்றாது quality check.

angularjs-format

Enable the angularjs இடைக்கணிப்பு சரம் quality check.

c-format

Enable the சி வடிவம் quality check.

c-sharp-format

Enable the சி# வடிவம் quality check.

es-format

Enable the ecmascript வார்ப்புரு எழுத்துக்கள் quality check.

i18next-interpolation

Enable the i18next இடைக்கணிப்பு quality check.

icu-message-format

Enable the icu messageformat quality check.

java-printf-format

Enable the சாவா வடிவம் quality check.

java-format

Enable the சாவா செய்தி quality check.

javascript-format

Enable the சாவாச்கிரிப்ட் வடிவம் quality check.

lua-format

Enable the லுவா வடிவம் quality check.

object-pascal-format

Enable the பொருள் பாச்கல் வடிவம் quality check.

percent-placeholders

Enable the விழுக்காடு ஒதுக்கிடங்கள் quality check.

perl-brace-format

Enable the பெர்ல் அடைப்புக்குறி வடிவம் quality check.

perl-format

Enable the பெர்ல் வடிவம் quality check.

php-format

Enable the php வடிவம் quality check.

python-brace-format

Enable the பைதான் அடைப்புக்குறி வடிவம் quality check.

python-format

Enable the பைதான் வடிவம் quality check.

qt-format

Enable the கியுடி வடிவம் quality check.

qt-plural-format

Enable the கியுடி பன்மை வடிவம் quality check.

ruby-format

Enable the ரூபி வடிவம் quality check.

scheme-format

Enable the திட்ட வடிவம் quality check.

vue-format

Enable the vue ப18ல் வடிவமைப்பு quality check.

md-text

Treat text as a Markdown document, and provide Markdown syntax highlighting on the translation text area. Enables மார்க் பேரூர் இணைப்புகள், மார்க் பேரூர் குறிப்புகள், and மார்க் பேரூர் தொடரியல் quality checks.

case-insensitive

Adjust checks behavior to be case-insensitive. Currently affects only இடம் வைத்திருப்பவர்கள் quality check.

safe-html

Enable the பாதுகாப்பற்ற html quality check.

url

The string should consist of only a URL. Enable the முகவரி quality check.

ignore-all-checks

அனைத்து தர சோதனைகளையும் புறக்கணிக்கவும்.

ignore-bbcode

Skip the பிபிகோட் மார்க்அப் quality check.

ignore-duplicate

Skip the தொடர்ச்சியான நகல் சொற்கள் quality check.

ignore-check-glossary

Skip the சொற்களஞ்சியத்தைப் பின்பற்றாது quality check.

ignore-double-space

Skip the இரட்டை இடம் quality check.

ignore-angularjs-format

Skip the angularjs இடைக்கணிப்பு சரம் quality check.

ignore-c-format

Skip the சி வடிவம் quality check.

ignore-c-sharp-format

Skip the சி# வடிவம் quality check.

ignore-es-format

Skip the ecmascript வார்ப்புரு எழுத்துக்கள் quality check.

ignore-i18next-interpolation

Skip the i18next இடைக்கணிப்பு quality check.

ignore-icu-message-format

Skip the icu messageformat quality check.

ignore-java-printf-format

Skip the சாவா வடிவம் quality check.

ignore-java-format

Skip the சாவா செய்தி quality check.

ignore-javascript-format

Skip the சாவாச்கிரிப்ட் வடிவம் quality check.

ignore-lua-format

Skip the லுவா வடிவம் quality check.

ignore-object-pascal-format

Skip the பொருள் பாச்கல் வடிவம் quality check.

ignore-percent-placeholders

Skip the விழுக்காடு ஒதுக்கிடங்கள் quality check.

ignore-perl-brace-format

Skip the பெர்ல் அடைப்புக்குறி வடிவம் quality check.

ignore-perl-format

Skip the பெர்ல் வடிவம் quality check.

ignore-php-format

Skip the php வடிவம் quality check.

ignore-python-brace-format

Skip the பைதான் அடைப்புக்குறி வடிவம் quality check.

ignore-python-format

Skip the பைதான் வடிவம் quality check.

ignore-qt-format

Skip the கியுடி வடிவம் quality check.

ignore-qt-plural-format

Skip the கியுடி பன்மை வடிவம் quality check.

ignore-ruby-format

Skip the ரூபி வடிவம் quality check.

ignore-scheme-format

Skip the திட்ட வடிவம் quality check.

ignore-vue-format

Skip the vue ப18ல் வடிவமைப்பு quality check.

ignore-translated

Skip the மொழிபெயர்க்கப்பட்டுள்ளது quality check.

ignore-inconsistent

Skip the சீரற்ற quality check.

ignore-kashida

Skip the காசிடா கடிதம் பயன்படுத்தப்பட்டது quality check.

ignore-md-link

Skip the மார்க் பேரூர் இணைப்புகள் quality check.

ignore-md-reflink

Skip the மார்க் பேரூர் குறிப்புகள் quality check.

ignore-md-syntax

Skip the மார்க் பேரூர் தொடரியல் quality check.

ignore-max-length

Skip the மொழிபெயர்ப்பின் அதிகபட்ச நீளம் quality check.

ignore-max-size

Skip the மொழிபெயர்ப்பின் அதிகபட்ச அளவு quality check.

ignore-escaped-newline

Skip the பொருந்தாத \n quality check.

ignore-end-colon

Skip the பொருந்தாத பெருங்குடல் quality check.

ignore-end-ellipsis

Skip the பொருந்தாத நீள்வட்டங்கள் quality check.

ignore-end-exclamation

Skip the பொருந்தாத ஆச்சரியக் குறி quality check.

ignore-end-stop

Skip the பொருந்தாத முழு நிறுத்தம் quality check.

ignore-end-question

Skip the பொருந்தாத கேள்விக்குறி quality check.

ignore-end-semicolon

Skip the பொருந்தாத அரைக்காற்புள்ளி quality check.

ignore-newline-count

Skip the பொருந்தாத வரி முறிவுகள் quality check.

ignore-plurals

Skip the பன்மைகளைக் காணவில்லை quality check.

ignore-placeholders

Skip the இடம் வைத்திருப்பவர்கள் quality check.

ignore-punctuation-spacing

Skip the நிறுத்தற்குறி இடைவெளி quality check.

ignore-regex

Skip the வழக்கமான வெளிப்பாடு quality check.

ignore-reused

Skip the மீண்டும் பயன்படுத்தப்பட்ட மொழிபெயர்ப்பு quality check.

ignore-same-plurals

Skip the அதே பன்மை quality check.

ignore-begin-newline

Skip the நியூலைன் தொடங்குகிறது quality check.

ignore-begin-space

Skip the தொடக்க இடங்கள் quality check.

ignore-end-newline

Skip the புதிய லைன் பின்னால் quality check.

ignore-end-space

Skip the பின்தங்கிய இடம் quality check.

ignore-same

Skip the மாறாத மொழிபெயர்ப்பு quality check.

ignore-safe-html

Skip the பாதுகாப்பற்ற html quality check.

ignore-url

Skip the முகவரி quality check.

ignore-xml-tags

Skip the எக்ச்எம்எல் மார்க்அப் quality check.

ignore-xml-invalid

Skip the எக்ச்எம்எல் தொடரியல் quality check.

ignore-zero-width-space

Skip the சுழிய அகல இடம் quality check.

ignore-ellipsis

Skip the நீள்வட்டங்கள் quality check.

ignore-icu-message-format-syntax

Skip the icu messageformat தொடரியல் quality check.

ignore-long-untranslated

Skip the நீண்ட மொழிபெயர்க்கப்படாதது quality check.

ignore-multiple-failures

Skip the பல தோல்வியுற்ற சோதனைகள் quality check.

ignore-unnamed-format

Skip the பெயரிடப்படாத பல மாறிகள் quality check.

ignore-prohibited-initial-character

Skip the ஆரம்ப தன்மை தடைசெய்யப்பட்டது quality check.

ignore-optional-plural

Skip the பயப்படாதது quality check.

Note

பொதுவாக விதி புறக்கணிக்கவும்-* என்ற பெயரிடப்பட்டது, எந்தவொரு சோதனைக்கும், அதன் அடையாளங்காட்டியைப் பயன்படுத்தி, எனவே உங்கள் தனிப்பயன் சோதனைகளுக்கு கூட இதைப் பயன்படுத்தலாம்.

These flags are understood both in கூறு உள்ளமைவு settings, per source string settings and in the translation file itself (for example in GNU gettext).

சோதனைகளை செயல்படுத்துதல்

You can configure a list of checks which can not be ignored by setting செயல்படுத்தப்பட்ட சோதனைகள் in கூறு உள்ளமைவு. Each listed check can not be dismissed in the user interface and any string failing this check is marked as Needs editing (see மொழிபெயர்ப்பு நிலைகள்).

Note

சோதனை செயல்படுத்துவதை இயக்குவது தானாகவே செயல்படுத்தாது. தொடர்புடைய கொடியை சரம் அல்லது கூறு கொடிகளில் சேர்ப்பதன் மூலம் சோதனையை இயக்கலாம்.

எழுத்துருக்களை நிர்வகித்தல்

Hint

Fonts uploaded into Weblate are used purely for purposes of the மொழிபெயர்ப்பின் அதிகபட்ச அளவு check, they do not have an effect in Weblate user interface.

The மொழிபெயர்ப்பின் அதிகபட்ச அளவு check used to calculate dimensions of the rendered text needs font to be loaded into Weblate and selected using a translation flag (see கொடிகளைப் பயன்படுத்தி நடத்தை தனிப்பயனாக்குதல்).

Weblate font management tool in Fonts under the Manage menu of your translation project provides interface to upload and manage fonts. TrueType or OpenType fonts can be uploaded, set up font-groups and use those in the check.

எழுத்துரு-குழுக்கள் வெவ்வேறு மொழிகளுக்கான வெவ்வேறு எழுத்துருக்களை வரையறுக்க உங்களை அனுமதிக்கின்றன, இது பொதுவாக லத்தீன் அல்லாத மொழிகளுக்கு தேவைப்படுகிறது:

../_images/font-group-edit.webp

எழுத்துரு-குழுக்கள் பெயரால் அடையாளம் காணப்படுகின்றன, அவை இடைவெளி அல்லது சிறப்பு எழுத்துக்களைக் கொண்டிருக்க முடியாது, இதனால் அதை சோதனை வரையறையில் எளிதாகப் பயன்படுத்த முடியும்:

../_images/font-group-list.webp

அவற்றை பதிவேற்றிய பின் எழுத்துரு-குடும்பம் மற்றும் பாணி தானாக அங்கீகரிக்கப்படும்:

../_images/font-edit.webp

நீங்கள் பல எழுத்துருக்களை வலைபெயர்ப்பில் ஏற்றலாம்:

../_images/font-list.webp

To use the fonts for checking the string length, pass it the appropriate flags (see கொடிகளைப் பயன்படுத்தி நடத்தை தனிப்பயனாக்குதல்). You will probably need the following ones:

`` அதிகபட்ச அளவு: 500`` / `` அதிகபட்ச அளவு: 300: 5``

பிக்சல்களில் அதிகபட்ச அகலத்தை வரையறுக்கிறது மற்றும், விருப்பமாக, அதிகபட்ச வரிகள் (சொல் மடக்குதல் பயன்படுத்தப்படுகிறது).

font-family:ubuntu

எழுத்துரு குழுவை அதன் அடையாளங்காட்டியைக் குறிப்பிடுவதன் மூலம் பயன்படுத்த வரையறுக்கிறது.

font-size:22

எழுத்துரு அளவை படப்புள்ளிகளில் வரையறுக்கிறது.

சொந்த சோதனைகளை எழுதுதல்

A wide range of quality checks are built-in, (see தர சோதனைகள்), though they might not cover everything you want to check. The list of performed checks can be adjusted using CHECK_LIST, and you can also add custom checks.

  1. துணைப்பிரிவு weblate.checks.check

  2. சில பண்புகளை அமைக்கவும்.

  3. `` செக்`` (உங்கள் குறியீட்டில் உள்ள பன்மைகளை நீங்கள் சமாளிக்க விரும்பினால்) அல்லது `` check_single`` முறையை செயல்படுத்தவும் (இது உங்களுக்காகச் செய்கிறது).

சில எடுத்துக்காட்டுகள்:

To install custom checks, provide a fully-qualified path to the Python class in the CHECK_LIST, see தனிப்பயன் தர சோதனைகள், துணை நிரல்கள் மற்றும் தானி சரிசெய்தல்.

மொழிபெயர்ப்பு உரையைச் சரிபார்ப்பது "ஃபூ" ஐக் கொண்டிருக்கவில்லை

இது மிகவும் எளிமையான சோதனை, இது மொழிபெயர்ப்பு "ஃபூ" என்ற சரத்தை காணவில்லையா என்பதை சரிபார்க்கிறது.

# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later

"""Simple quality check example."""

from django.utils.translation import gettext_lazy

from weblate.checks.base import TargetCheck


class FooCheck(TargetCheck):
    # Used as identifier for check, should be unique
    # Has to be shorter than 50 characters
    check_id = "foo"

    # Short name used to display failing check
    name = gettext_lazy("Foo check")

    # Description for failing check
    description = gettext_lazy("Your translation is foo")

    # Real check code
    def check_single(self, source, target, unit):
        return "foo" in target

செக் மொழிபெயர்ப்பு உரை பன்மை வேறுபடுகிறதா என்பதைச் சரிபார்க்கிறது

செக் மொழியில் உள்ள இரண்டு பன்மை வடிவங்களை சரிபார்க்க மொழி தகவலைப் பயன்படுத்தி சரிபார்க்கவும்.

# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later

"""Quality check example for Czech plurals."""

from django.utils.translation import gettext_lazy

from weblate.checks.base import TargetCheck


class PluralCzechCheck(TargetCheck):
    # Used as identifier for check, should be unique
    # Has to be shorter than 50 characters
    check_id = "foo"

    # Short name used to display failing check
    name = gettext_lazy("Foo check")

    # Description for failing check
    description = gettext_lazy("Your translation is foo")

    # Real check code
    def check_target_unit(self, sources, targets, unit):
        if unit.translation.language.is_base({"cs"}):
            return targets[1] == targets[2]
        return False

    def check_single(self, source, target, unit) -> bool:
        """We don't check target strings here."""
        return False