read_po_context
Retrieve a translation entry and its surrounding context from a PO file to see how it fits within the message catalog.
Instructions
Return the target entry plus its surrounding context window.
Responses:
200 (Success): Successful Response
Content-Type:
application/jsonResponse Properties:
target_entry: The requested entry.
context_before: Entries preceding the target.
context_after: Entries succeeding the target.
Example:
{
"target_entry": "unknown_type",
"context_before": [
"unknown_type"
],
"context_after": [
"unknown_type"
]
}422: Validation Error
Content-Type:
application/jsonResponse Properties:
Example:
{
"detail": [
"unknown_type"
]
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| msgid | Yes | The msgid of the entry to find. | |
| msgctxt | No | Optional message context to disambiguate entries with the same msgid. | |
| file_path | Yes | Absolute path to the .po file to read. | |
| context_size | No | Number of entries before and after to include. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_entry | No | The requested entry. | |
| context_after | Yes | Entries succeeding the target. | |
| context_before | Yes | Entries preceding the target. |