File tree Expand file tree Collapse file tree 12 files changed +20
-11
lines changed Expand file tree Collapse file tree 12 files changed +20
-11
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " gitbook " : patch
3
+ ---
4
+
5
+ Fix missing title on button to close the announcement banner.
Original file line number Diff line number Diff line change 1
1
'use client' ;
2
2
3
+ import { tString , useLanguage } from '@/intl/client' ;
3
4
import * as storage from '@/lib/local-storage' ;
4
5
import type { ResolvedContentRef } from '@/lib/references' ;
5
6
import { tcls } from '@/lib/tailwind' ;
@@ -18,6 +19,8 @@ export function AnnouncementBanner(props: {
18
19
} ) {
19
20
const { announcement, contentRef } = props ;
20
21
22
+ const language = useLanguage ( ) ;
23
+
21
24
const hasLink = announcement . link && contentRef ?. href ;
22
25
const closeable = announcement . style !== 'danger' ;
23
26
@@ -81,6 +84,7 @@ export function AnnouncementBanner(props: {
81
84
className = { `absolute top-0 right-4 mt-2 mr-2 rounded straight-corners:rounded-none p-1.5 transition-all hover:ring-1 sm:right-6 md:right-8 ${ style . close } ` }
82
85
type = "button"
83
86
onClick = { dismissAnnouncement }
87
+ title = { tString ( language , 'close' ) }
84
88
>
85
89
< Icon icon = "close" className = "size-4" />
86
90
</ button >
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ export function CookiesToast(props: { privacyPolicy?: string }) {
72
72
< button
73
73
type = "button"
74
74
onClick = { ( ) => setShow ( false ) }
75
- aria-label = { tString ( language , 'cookies_close ' ) }
75
+ aria-label = { tString ( language , 'close ' ) }
76
76
className = { tcls (
77
77
'absolute' ,
78
78
'top-3' ,
@@ -85,7 +85,7 @@ export function CookiesToast(props: { privacyPolicy?: string }) {
85
85
'rounded-sm' ,
86
86
'hover:bg-tint-hover'
87
87
) }
88
- title = { tString ( language , 'cookies_close ' ) }
88
+ title = { tString ( language , 'close ' ) }
89
89
>
90
90
< Icon icon = "xmark" className = { tcls ( 'size-4' ) } />
91
91
</ button >
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export const de = {
40
40
cookies_prompt_privacy : 'Datenschutzrichtlinie' ,
41
41
cookies_accept : 'Akzeptieren' ,
42
42
cookies_reject : 'Ablehnen' ,
43
- cookies_close : 'Schließen' ,
43
+ close : 'Schließen' ,
44
44
edit_on_git : 'Bearbeiten auf ${1}' ,
45
45
notfound_title : 'Seite nicht gefunden' ,
46
46
notfound : 'Die gesuchte Seite existiert nicht.' ,
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export const en = {
40
40
cookies_prompt_privacy : 'privacy policy' ,
41
41
cookies_accept : 'Accept' ,
42
42
cookies_reject : 'Reject' ,
43
- cookies_close : 'Close' ,
43
+ close : 'Close' ,
44
44
edit_on_git : 'Edit on ${1}' ,
45
45
notfound_title : 'Page not found' ,
46
46
notfound : "The page you are looking for doesn't exist." ,
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export const es: TranslationLanguage = {
42
42
cookies_prompt_privacy : 'política de privacidad' ,
43
43
cookies_accept : 'Aceptar' ,
44
44
cookies_reject : 'Rechazar' ,
45
- cookies_close : 'Cerrar' ,
45
+ close : 'Cerrar' ,
46
46
edit_on_git : 'Editar en ${1}' ,
47
47
notfound_title : 'Página no encontrada' ,
48
48
notfound : 'La página que buscas no existe.' ,
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export const fr: TranslationLanguage = {
42
42
cookies_prompt_privacy : 'politique de confidentialité' ,
43
43
cookies_accept : 'Accepter' ,
44
44
cookies_reject : 'Rejeter' ,
45
- cookies_close : 'Fermer' ,
45
+ close : 'Fermer' ,
46
46
edit_on_git : 'Modifier sur ${1}' ,
47
47
notfound_title : 'Page non trouvée' ,
48
48
notfound : "La page que vous cherchez n'existe pas." ,
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export const ja: TranslationLanguage = {
42
42
cookies_prompt_privacy : 'プライバシーポリシー' ,
43
43
cookies_accept : '同意する' ,
44
44
cookies_reject : '拒否する' ,
45
- cookies_close : '閉じる' ,
45
+ close : '閉じる' ,
46
46
edit_on_git : '${1}で編集' ,
47
47
notfound_title : 'ページが見つかりません' ,
48
48
notfound : 'お探しのページは存在しません。' ,
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export const nl: TranslationLanguage = {
42
42
cookies_prompt_privacy : 'privacyverklaring' ,
43
43
cookies_accept : 'Accepteren' ,
44
44
cookies_reject : 'Weigeren' ,
45
- cookies_close : 'Sluiten' ,
45
+ close : 'Sluiten' ,
46
46
edit_on_git : 'Bewerk op ${1}' ,
47
47
notfound_title : 'Pagina niet gevonden' ,
48
48
notfound : 'De pagina die je zoekt, bestaat niet.' ,
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export const no: TranslationLanguage = {
42
42
cookies_prompt_privacy : 'personvernerklæringen' ,
43
43
cookies_accept : 'Godta' ,
44
44
cookies_reject : 'Avslå' ,
45
- cookies_close : 'Lukk' ,
45
+ close : 'Lukk' ,
46
46
edit_on_git : 'Rediger på ${1}' ,
47
47
notfound_title : 'Siden ble ikke funnet' ,
48
48
notfound : 'Siden du leter etter eksisterer ikke.' ,
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export const pt_br = {
40
40
cookies_prompt_privacy : 'política de privacidade' ,
41
41
cookies_accept : 'Aceitar' ,
42
42
cookies_reject : 'Rejeitar' ,
43
- cookies_close : 'Fechar' ,
43
+ close : 'Fechar' ,
44
44
edit_on_git : 'Editar no ${1}' ,
45
45
notfound_title : 'Página não encontrada' ,
46
46
notfound : 'A página que você está procurando não existe.' ,
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export const zh: TranslationLanguage = {
40
40
cookies_prompt_privacy : '隐私政策' ,
41
41
cookies_accept : '接受' ,
42
42
cookies_reject : '拒绝' ,
43
- cookies_close : '关闭' ,
43
+ close : '关闭' ,
44
44
edit_on_git : '在${1}上编辑' ,
45
45
notfound_title : '页面未找到' ,
46
46
notfound : '您要找的页面不存在。' ,
You can’t perform that action at this time.
0 commit comments