зеркало из https://github.com/github/docs.git
Make 'Home' translatable (#46054)
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
This commit is contained in:
Родитель
14ce71e813
Коммит
f86ebbca67
|
@ -16,6 +16,7 @@ header:
|
|||
ghes_release_notes_upgrade_patch_and_release: 📣 This is not the <a href="#{{ latestPatch }}">latest patch release</a> of this release series, and this is not the <a href="/enterprise-server@{{ latestRelease }}/admin/release-notes">latest release</a> of Enterprise Server.
|
||||
sign_up_cta: Sign up
|
||||
menu: Menu
|
||||
go_home: Home
|
||||
picker:
|
||||
language_picker_label: Language
|
||||
product_picker_default_text: All products
|
||||
|
|
|
@ -2,10 +2,12 @@ import { useRouter } from 'next/router'
|
|||
import { ArrowLeftIcon } from '@primer/octicons-react'
|
||||
import { DEFAULT_VERSION, useVersion } from 'src/versions/components/useVersion'
|
||||
import { Link } from 'src/frame/components/Link'
|
||||
import { useTranslation } from 'src/languages/components/useTranslation'
|
||||
|
||||
export const AllProductsLink = () => {
|
||||
const router = useRouter()
|
||||
const { currentVersion } = useVersion()
|
||||
const { t } = useTranslation('header')
|
||||
const currentVersionPathSegment = currentVersion === DEFAULT_VERSION ? '' : `/${currentVersion}`
|
||||
|
||||
return (
|
||||
|
@ -15,7 +17,7 @@ export const AllProductsLink = () => {
|
|||
className="f6 pl-2 pr-5 ml-n1 pb-1 Link--primary color-fg-default"
|
||||
>
|
||||
<ArrowLeftIcon size="small" className="mr-1" />
|
||||
Home
|
||||
{t('go_home')}
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -16,6 +16,7 @@ header:
|
|||
ghes_release_notes_upgrade_patch_and_release: 📣 This is not the <a href="#{{ latestPatch }}">latest patch release</a> of this release series, and this is not the <a href="/enterprise-server@{{ latestRelease }}/admin/release-notes">latest release</a> of Enterprise Server.
|
||||
sign_up_cta: Sign up
|
||||
menu: Menu
|
||||
go_home: Home
|
||||
picker:
|
||||
language_picker_label: Language
|
||||
product_picker_default_text: All products
|
||||
|
|
Загрузка…
Ссылка в новой задаче