Units API.

See the Weblate's Web API documentation for detailed description of the API.

GET /api/units/13189964/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "translation": "https://l10n.opensuse.org/api/translations/packages-i18n/p-master/ja/?format=api",
    "source": [
        "Pmccabe calculates McCabe-style cyclomatic complexity for C and C++ source code.  Per-function complexity may be used for spotting likely trouble spots and for estimating testing effort.\n\nPmccabe also includes a non-commented line counter compatible with anac, 'decomment' which only removes comments from source code; 'codechanges', a program to calculate the amount of change which has occurred between two source trees or files; and 'vifn', to invoke 'vi' given a function name rather than a file name.\n\nPmccabe attempts to calculate the apparent complexity rather than the complexity following the C++ and/or cpp preprocessors. This causes Pmccabe to become confused with cpp constructs which cause unmatched curly braces - most of which can profitably be rewritten so they won't confuse prettyprinters anyway.  Pmccabe prints C-compiler-style error messages when the parser gets confused so they may be browsed with standard tools.\n\nTwo types of cyclomatic complexity are generated - one type counts each switch() statement as regardless of the number of cases included and the other more traditional measure counts each case within the switch(). Pmccabe also calculates the starting line for each function, the number of lines consumed by the function, and the number of C statements within the function."
    ],
    "previous_source": "",
    "target": [
        "Pmccabe は、CとC++のソースコードに対して、McCabeスタイルの循環的複雑度を計算します。ファンクションごとの複雑度は、起こりそうな問題箇所を見つけたり、テスト作業を見積もるために使用されます。\n\nPmccabeには、anacと互換性のあるコメントなしの行カウンタ、ソースコードからコメントだけを削除する「decomment」、2つのソースツリーやファイル間で発生した変更量を計算するプログラム「codechanges」、ファイル名ではなく関数名を指定して「vi」を呼び出す「vifn」も含まれている。\n\nPmccabeは、C++やcppプリプロセッサに続く複雑さではなく、見かけ上の複雑さを計算しようとします。このため、Pmccabeはcpp構造体と混同されることになります。cpp構造体は中括弧の不一致を引き起こします。ほとんどの中括弧は、prettyprintersを混同しないように書き直すことができ、利益があります。Pmccabeは、パーサが混乱したときにCコンパイラスタイルのエラーメッセージを出力するので、標準ツールで参照できます。\n\n2つのタイプの循環的複雑度が生成されます。1つのタイプは含まれるケースの数に関係なく各switch()ステートメントをカウントし、もう1つのより伝統的なメジャーはswitch()内の各ケースをカウントします。Pmccabeは、各関数の開始行、関数によって消費された行数、関数内のCステートメントの数も計算します。"
    ],
    "id_hash": -6375620520312348432,
    "content_hash": -6375620520312348432,
    "location": "",
    "context": "",
    "note": "tumbleweed/pmccabe/description",
    "flags": "",
    "labels": [],
    "state": 20,
    "fuzzy": false,
    "translated": true,
    "approved": false,
    "position": 2692,
    "has_suggestion": false,
    "has_comment": false,
    "has_failing_check": false,
    "num_words": 199,
    "source_unit": "https://l10n.opensuse.org/api/units/13188611/?format=api",
    "priority": 100,
    "id": 13189964,
    "web_url": "https://l10n.opensuse.org/translate/packages-i18n/p-master/ja/?checksum=27853eea901760f0",
    "url": "https://l10n.opensuse.org/api/units/13189964/?format=api",
    "explanation": "",
    "extra_flags": "",
    "pending": false,
    "timestamp": "2022-02-23T17:03:26.601221Z"
}