Skip to content

Commit 685f9c9

Browse files
authored
Merge pull request #13763 from github/repo-sync
repo sync
2 parents a361306 + 91548b0 commit 685f9c9

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

components/page-header/LanguagePicker.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ export const LanguagePicker = ({ variant }: Props) => {
2828
<Link href={router.asPath} locale={lang.code}>
2929
{lang.nativeName ? (
3030
<>
31-
{lang.nativeName} ({lang.name})
31+
<span lang={lang.code}>{lang.nativeName}</span> (
32+
<span lang="en">{lang.name}</span>)
3233
</>
3334
) : (
34-
lang.name
35+
<span lang={lang.code}>{lang.name}</span>
3536
)}
3637
</Link>
3738
),

components/ui/Picker/Picker.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ReactNode } from 'react'
22
import cx from 'classnames'
3+
import { useTranslation } from 'components/hooks/useTranslation'
34

45
import { Details, useDetails, Text, Dropdown, Box } from '@primer/components'
56
import { ChevronDownIcon } from '@primer/octicons-react'
@@ -52,6 +53,7 @@ function PickerOptionsWrapper({ variant, children }: PickerWrapperPropsT) {
5253
export function Picker({ variant, defaultText, options, ...restProps }: PickerPropsT) {
5354
const { getDetailsProps, setOpen } = useDetails({ closeOnOutsideClick: true })
5455
const selectedOption = options.find((option) => option.selected)
56+
const { t } = useTranslation(['picker', 'toggle_picker_list'])
5557

5658
return (
5759
<Details
@@ -65,7 +67,7 @@ export function Picker({ variant, defaultText, options, ...restProps }: PickerPr
6567
<summary
6668
className="d-block btn btn-invisible color-fg-default"
6769
aria-haspopup="true"
68-
aria-label="Toggle picker list"
70+
aria-label={t('toggle_picker_list')}
6971
>
7072
<PickerSummaryWrapper variant={variant}>
7173
<Text>{selectedOption?.text || defaultText}</Text>

data/ui.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ header:
2323
ghes_release_notes_upgrade_patch_only: 📣 This is not the <a href="#{{ latestPatch }}">latest patch release</a> of Enterprise Server.
2424
ghes_release_notes_upgrade_release_only: 📣 This is not the <a href="/enterprise-server@{{ latestRelease }}/admin/release-notes">latest release</a> of Enterprise Server.
2525
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.
26+
picker:
27+
toggle_picker_list: Toggle picker list
2628
release_notes:
2729
banner_text: GitHub began rolling these changes out to enterprises on
2830
search:

0 commit comments

Comments
 (0)