Skip to content

Commit ffd038d

Browse files
committed
Add a learn more link to the Anthropic extended cache setting description
- texts for [Fragment] should be shorter - add "Learn more" link to description of 'model-providers.extended-cache.anthropic.description' https://platform.claude.com/docs/en/build-with-claude/prompt-caching
1 parent c91df31 commit ffd038d

2 files changed

Lines changed: 56 additions & 19 deletions

File tree

‎apps/editor/src/views/settings/frontend/Home/Home.tsx‎

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,28 @@ export const Home: React.FC<Props> = (props) => {
424424
/>
425425
<UiItem
426426
title={t('model-providers.extended-cache.anthropic.title')}
427-
description={t(
428-
'model-providers.extended-cache.anthropic.description'
429-
)}
427+
description={
428+
<Translation
429+
id="model-providers.extended-cache.anthropic.description"
430+
components={{
431+
link: (
432+
<a
433+
href="#"
434+
onClick={(e) => {
435+
e.preventDefault()
436+
props.on_open_external_url(
437+
'https://platform.claude.com/docs/en/build-with-claude/prompt-caching'
438+
)
439+
}}
440+
>
441+
{t(
442+
'model-providers.extended-cache.anthropic.learn-more'
443+
)}
444+
</a>
445+
)
446+
}}
447+
/>
448+
}
430449
slot_right={
431450
<UiToggler
432451
is_on={props.extended_cache_duration_for_anthropic}

‎apps/editor/src/views/settings/frontend/i18n/translations/model-providers.ts‎

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,39 @@ export const model_providers = {
7373
bg: 'Разширен кеш за Anthropic'
7474
},
7575
'model-providers.extended-cache.anthropic.description': {
76-
en: 'Enable 1-hour prompt caching.',
77-
pl: 'Włącz 1-godzinne przechowywanie prompta w cache.',
78-
'zh-cn': '启用 1 小时提示词缓存。',
79-
ja: '1時間のプロンプトキャッシュを有効にします。',
80-
'zh-tw': '啟用 1 小時提示詞快取。',
81-
de: '1-stündigen Prompt-Cache aktivieren.',
82-
es: 'Habilitar caché de prompts de 1 hora.',
83-
fr: 'Activer le cache de prompts de 1 heure.',
84-
'pt-br': 'Ativar cache de prompts de 1 hora.',
85-
ru: 'Включить 1-часовое кэширование промптов.',
86-
ko: '1시간 프롬프트 캐싱을 활성화합니다.',
87-
it: 'Abilita la cache dei prompt di 1 ora.',
88-
tr: '1 saatlik istem önbelleğini etkinleştirin.',
89-
cs: 'Povolit 1hodinovou mezipaměť promptů.',
90-
hu: '1 órás prompt gyorsítótár engedélyezése.',
91-
bg: 'Активирайте 1-часовия кеш на prompt.'
76+
en: 'Enable 1-hour prompt caching. {link}',
77+
pl: 'Włącz 1-godzinne cache-owanie prompta. {link}',
78+
'zh-cn': '启用 1 小时提示词缓存。{link}',
79+
ja: '1時間のプロンプトキャッシュを有効にします。{link}',
80+
'zh-tw': '啟用 1 小時提示詞快取。{link}',
81+
de: '1-stündigen Prompt-Cache aktivieren. {link}',
82+
es: 'Habilitar caché de prompts de 1 hora. {link}',
83+
fr: 'Activer le cache de prompts de 1 heure. {link}',
84+
'pt-br': 'Ativar cache de prompts de 1 hora. {link}',
85+
ru: 'Включить 1-часовое кэширование промптов. {link}',
86+
ko: '1시간 프롬프트 캐싱을 활성화합니다. {link}',
87+
it: 'Abilita la cache dei prompt di 1 ora. {link}',
88+
tr: '1 saatlik istem önbelleğini etkinleştirin. {link}',
89+
cs: 'Povolit 1hodinovou mezipaměť promptů. {link}',
90+
hu: '1 órás prompt gyorsítótár engedélyezése. {link}',
91+
bg: 'Активирайте 1-часовия кеш на prompt. {link}'
92+
},
93+
'model-providers.extended-cache.anthropic.learn-more': {
94+
en: 'Learn more',
95+
pl: 'Dowiedz się więcej',
96+
'zh-cn': '了解更多',
97+
ja: '詳細はこちら',
98+
'zh-tw': '了解更多',
99+
de: 'Mehr erfahren',
100+
es: 'Más información',
101+
fr: 'En savoir plus',
102+
'pt-br': 'Saiba mais',
103+
ru: 'Узнать больше',
104+
ko: '자세히 알아보기',
105+
it: 'Scopri di più',
106+
tr: 'Daha fazla bilgi edin',
107+
cs: 'Dozvědět se více',
108+
hu: 'Tudjon meg többet',
109+
bg: 'Научете повече'
92110
}
93111
} as const

0 commit comments

Comments
 (0)