Skip to content

Commit 7f80557

Browse files
docs: custom instructions support the same languages as style rules
- Remove the 8-language restriction from custom_instructions in the OpenAPI spec - Rename the language table badge to "Style Rules & Custom Instructions" - Replace the stale 8-language limit on the style rules guide with a link to the supported languages page - Remove the style rules language info box from the supported languages page (the table already shows this) and its generator script 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7ca7852 commit 7f80557

7 files changed

Lines changed: 3 additions & 43 deletions

File tree

‎api-reference/openapi.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@
831831
"$ref": "#/components/schemas/TranslationMemoryThreshold"
832832
},
833833
"custom_instructions": {
834-
"description": "Specify a list of instructions to customize the translation behavior. Up to 10 custom instructions can be specified, each with a maximum of 300 characters.\n\n**Important:** The target language must be `de`, `en`, `es`, `fr`, `it`, `ja`, `ko`, `zh` or any variants of these languages.",
834+
"description": "Specify a list of instructions to customize the translation behavior. Up to 10 custom instructions can be specified, each with a maximum of 300 characters.",
835835
"type": "array",
836836
"items": {
837837
"type": "string",

‎api-reference/openapi.yaml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,6 @@ paths:
672672
custom_instructions:
673673
description: |-
674674
Specify a list of instructions to customize the translation behavior. Up to 10 custom instructions can be specified, each with a maximum of 300 characters.
675-
676-
**Important:** The target language must be `de`, `en`, `es`, `fr`, `it`, `ja`, `ko`, `zh` or any variants of these languages.
677675
type: array
678676
items:
679677
type: string

‎docs/customize/using-style-rules.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ To list or inspect rule lists, use [`GET /v3/style_rules`](/api-reference/style-
109109

110110
## Limits
111111

112-
- Style rule lists support target languages `de`, `en`, `es`, `fr`, `it`, `ja`, `ko`, and `zh`
112+
- Style rule lists support the target languages listed in [Languages supported](/docs/getting-started/supported-languages)
113113
- There is no limit on the number of configured rules per list
114114
- A list can hold up to 200 custom instructions (this cap may be adjusted per plan tier in the future); each instruction prompt is limited to 300 characters
115115
- If you need more than 200 custom instructions, split your rules across multiple style rule lists for different content types

‎docs/getting-started/supported-languages.mdx‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,3 @@ import { LanguageTable } from "/snippets/language-table.jsx"
1919
Currently, characters translated into beta languages are not billed. See [Alpha and beta features](/docs/resources/alpha-and-beta-features) for more information.
2020
</Info>
2121
*/}
22-
23-
<Info>
24-
{/* BEGIN GENERATED style-rules-languages (run: node scripts/update-language-docs.mjs) */}
25-
Style rules are supported for the following target languages: `ar`, `bg`, `cs`, `da`, `de`, `de-CH`, `de-DE`, `el`, `en`, `en-GB`, `en-US`, `es`, `es-419`, `es-ES`, `et`, `fi`, `fr`, `fr-CA`, `fr-FR`, `he`, `hu`, `id`, `it`, `ja`, `ko`, `lt`, `lv`, `nb`, `nl`, `pl`, `pt`, `pt-BR`, `pt-PT`, `ro`, `ru`, `sk`, `sl`, `sv`, `th`, `tr`, `uk`, `vi`, `zh`, `zh-Hans`, and `zh-Hant`.
26-
{/* END GENERATED style-rules-languages */}
27-
28-
For more details, see the [Style Rules API documentation](/docs/customize/using-style-rules). Writing style and tone availability for `/write/rephrase` can also be retrieved via [`GET /v3/languages?resource=write`](/docs/languages/using-the-languages-api).
29-
</Info>

‎scripts/generate-style-rules-lists.mjs‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎scripts/update-language-docs.mjs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@
33
// Each target also has its own script for running individually:
44
// generate-language-table.mjs the table on docs/getting-started/supported-languages
55
// generate-voice-languages.mjs Voice API matrix and input/target lists
6-
// generate-style-rules-lists.mjs style-rules language mentions
76
//
87
// Usage: node scripts/update-language-docs.mjs <api-key> [--dry-run]
98

109
import { parseArgs } from './lib.mjs';
1110
import { update as languageTable } from './generate-language-table.mjs';
1211
import { update as voiceLanguages } from './generate-voice-languages.mjs';
13-
import { update as styleRulesLists } from './generate-style-rules-lists.mjs';
1412

1513
const args = parseArgs();
1614
try {
1715
await languageTable(args);
1816
await voiceLanguages(args);
19-
await styleRulesLists(args);
2017
} catch (err) {
2118
console.error(err.message);
2219
console.error('Aborted mid-run: earlier targets may already be rewritten. Revert with `git checkout -- .` and retry.');

‎snippets/language-table.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export const LanguageTable = () => {
225225
{ key: 'tagHandling', label: 'Tag Handling' },
226226
{ key: 'textImprovement', label: 'Text Improvement' },
227227
{ key: 'translationMemory', label: 'Translation Memory' },
228-
{ key: 'styleRules', label: 'Style Rules' },
228+
{ key: 'styleRules', label: 'Style Rules & Custom Instructions' },
229229
]
230230
return (
231231
<div className="flex flex-wrap gap-1.5">

0 commit comments

Comments
 (0)