Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -9663,7 +9663,7 @@
}
},
{
"description": "Only download translation keys containing the specified prefix, and remove the prefix from the generated file.",
"description": "Only download translation keys containing the prefix specified by `translation_key_prefix`, and remove that prefix from the generated file. Requires `translation_key_prefix` to be set.",
"example": null,
"name": "filter_by_prefix",
"in": "query",
Expand Down Expand Up @@ -9885,6 +9885,15 @@
"type": "object",
"properties": {}
},
"translation_key_prefix": {
"description": "Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.",
"example": "prefix_",
"type": "string"
},
"filter_by_prefix": {
"description": "Only download translation keys containing the prefix specified by `translation_key_prefix`, and remove that prefix from the generated file. Requires `translation_key_prefix` to be set.",
"type": "boolean"
},
"updated_since": {
"description": "Only include translations and keys that have been updated since the given date. The date must be in ISO 8601 format (e.g., `2023-01-01T00:00:00Z`).\n",
"type": "string",
Expand Down
7 changes: 7 additions & 0 deletions paths/locale_downloads/create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ requestBody:
Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
type: object
properties: {}
translation_key_prefix:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably extract these to a reference as they are repeated in multiple endpoints. I'll probably try to do it in a separate PR

description: 'Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.'
example: "prefix_"
type: string
filter_by_prefix:
description: Only download translation keys containing the prefix specified by `translation_key_prefix`, and remove that prefix from the generated file. Requires `translation_key_prefix` to be set.
type: boolean
updated_since:
description: |
Only include translations and keys that have been updated since the given date. The date must be in ISO 8601 format (e.g., `2023-01-01T00:00:00Z`).
Expand Down
2 changes: 1 addition & 1 deletion paths/locales/download.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ parameters:
in: query
schema:
type: string
- description: Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
- description: Only download translation keys containing the prefix specified by `translation_key_prefix`, and remove that prefix from the generated file. Requires `translation_key_prefix` to be set.
example:
name: filter_by_prefix
in: query
Expand Down
Loading