Skip to content

Commit 48c00a6

Browse files
committed
Add updating state translation to UpdateAvailable component
- once 'update' button in panel is disabled, should turn into 'updating...' ├── apps │ └── editor │ └── src │ ├── commands │ │ └── check-for-updates-command.ts │ └── views │ └── prompt │ ├── backend │ │ ├── message-handlers │ │ │ └── handle-update-extension.ts │ │ ├── prompt-view-provider.ts │ │ └── utils │ │ └── check-for-updates.ts │ ├── frontend │ │ ├── Home │ │ │ └── Home.tsx │ │ ├── hooks │ │ │ └── use-prompt │ │ │ └── use-prompt.ts │ │ └── i18n │ │ └── translations │ │ └── home.ts │ └── types │ └── messages.ts └── packages └── ui └── src └── components └── editor └── prompt-view └── UpdateAvailable └── UpdateAvailable.tsx
1 parent ed94021 commit 48c00a6

3 files changed

Lines changed: 23 additions & 1 deletion

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ export const Home: React.FC<Props> = (props) => {
171171
translations={{
172172
title: t('home.update.title'),
173173
button: t('home.update.button'),
174+
updating: t('home.update.updating'),
174175
age: props.update_info.current_version_age_days ? (
175176
<Translation
176177
id={

‎apps/editor/src/views/prompt/frontend/i18n/translations/home.ts‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,24 @@ export const home = {
215215
hu: 'Frissítés',
216216
bg: 'Актуализиране'
217217
},
218+
'home.update.updating': {
219+
en: 'Updating...',
220+
pl: 'Aktualizowanie...',
221+
'zh-cn': '更新中...',
222+
ja: '更新中...',
223+
'zh-tw': '更新中...',
224+
de: 'Aktualisieren...',
225+
es: 'Actualizando...',
226+
fr: 'Mise à jour...',
227+
'pt-br': 'Atualizando...',
228+
ru: 'Обновление...',
229+
ko: '업데이트 중...',
230+
it: 'Aggiornamento...',
231+
tr: 'Güncelleniyor...',
232+
cs: 'Aktualizace...',
233+
hu: 'Frissítés...',
234+
bg: 'Актуализиране...'
235+
},
218236
'home.update.age': {
219237
en: '{days} days old',
220238
pl: '{days} dni',

‎packages/ui/src/components/editor/prompt-view/UpdateAvailable/UpdateAvailable.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ type Props = {
1111
translations: {
1212
title: string
1313
button: string
14+
updating?: string
1415
age?: React.ReactNode
1516
changelog?: React.ReactNode
1617
}
@@ -48,7 +49,9 @@ export const UpdateAvailable: React.FC<Props> = (props) => {
4849
is_small
4950
disabled={is_updating}
5051
>
51-
{props.translations.button}
52+
{is_updating && props.translations.updating
53+
? props.translations.updating
54+
: props.translations.button}
5255
</Button>
5356
</div>
5457
{is_expanded && (

0 commit comments

Comments
 (0)