Skip to content

Commit f2487fe

Browse files
committed
Add singular translation for one-day update age
- '1 days old' should be '1 day old' ├── apps │ └── editor │ └── src │ └── views │ └── prompt │ └── frontend │ ├── Home │ │ ├── Home.tsx │ │ └── hooks │ │ └── use-update-check.ts │ └── i18n │ └── translations │ └── home.ts └── packages └── ui └── src └── components └── editor └── prompt-view └── UpdateAvailable └── UpdateAvailable.tsx
1 parent 9ef5eab commit f2487fe

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@ export const Home: React.FC<Props> = (props) => {
173173
button: t('home.update.button'),
174174
age: update_info.current_version_age_days ? (
175175
<Translation
176-
id="home.update.age"
176+
id={
177+
update_info.current_version_age_days === 1
178+
? 'home.update.age.singular'
179+
: 'home.update.age'
180+
}
177181
components={{
178182
days: update_info.current_version_age_days.toString()
179183
}}

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,24 @@ export const home = {
233233
hu: '{days} napos',
234234
bg: '{days} дни'
235235
},
236+
'home.update.age.singular': {
237+
en: '{days} day old',
238+
pl: '{days} dzień',
239+
'zh-cn': '{days} 天',
240+
ja: '{days} 日前',
241+
'zh-tw': '{days} 天',
242+
de: '{days} Tag alt',
243+
es: '{days} día',
244+
fr: '{days} jour',
245+
'pt-br': '{days} dia',
246+
ru: '{days} день',
247+
ko: '{days}일',
248+
it: '{days} giorno',
249+
tr: '{days} günlük',
250+
cs: '{days} den',
251+
hu: '{days} napos',
252+
bg: '{days} ден'
253+
},
236254
'home.update.open-changelog': {
237255
en: 'Open changelog',
238256
pl: 'Otwórz dziennik zmian',

0 commit comments

Comments
 (0)