Skip to content

Commit

Permalink
feat: support singular and plural form for maintainers
Browse files Browse the repository at this point in the history
  • Loading branch information
teleginzhenya committed Jun 20, 2024
1 parent dae9e87 commit d7ea6a5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion public/locales/en/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"title": "Components",
"searchPlaceholder": "Search by component name",
"color-input_validation-format-error": "Incorrect format",
"maintainers": "Maintainers:",
"maintainers": {
"key_one": "Maintainer:",
"key_other": "Maintainers:"
},
"theme": "Switch theme",
"rtlOn": "Switch RTL on",
"rtlOff": "Switch RTL off",
Expand Down
5 changes: 4 additions & 1 deletion public/locales/ru/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"title": "Компоненты",
"searchPlaceholder": "Поиск по названию",
"color-input_validation-format-error": "Неверный формат",
"maintainers": "Maintainers:",
"maintainers": {
"key_one": "Maintainer:",
"key_other": "Maintainers:"
},
"theme": "Переключить тему",
"rtlOn": "Включить RTL",
"rtlOff": "Выключить RTL",
Expand Down
4 changes: 3 additions & 1 deletion src/components/HeaderMaintainerList/HeaderMaintainerList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export const HeaderMaintainerList: React.FC<HeaderMaintainerListProps> = ({maint

return (
<div className={b()}>
<span className={b('title')}>{t('component:maintainers')}</span>
<span className={b('title')}>
{t('component:maintainers', {count: limitedMaintainers.length})}
</span>
{limitedMaintainers.map(({login, avatarUrl, url}) => (
<Link
className={b('maintainer')}
Expand Down

0 comments on commit d7ea6a5

Please sign in to comment.