mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-23 02:53:29 +00:00
Merge branch 'main' into new-search-ui
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"gitbook": patch
|
||||
---
|
||||
|
||||
Fix missing title on button to close the announcement banner.
|
||||
@@ -1,5 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { tString, useLanguage } from '@/intl/client';
|
||||
import * as storage from '@/lib/local-storage';
|
||||
import type { ResolvedContentRef } from '@/lib/references';
|
||||
import { tcls } from '@/lib/tailwind';
|
||||
@@ -18,6 +19,8 @@ export function AnnouncementBanner(props: {
|
||||
}) {
|
||||
const { announcement, contentRef } = props;
|
||||
|
||||
const language = useLanguage();
|
||||
|
||||
const hasLink = announcement.link && contentRef?.href;
|
||||
const closeable = announcement.style !== 'danger';
|
||||
|
||||
@@ -81,6 +84,7 @@ export function AnnouncementBanner(props: {
|
||||
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}`}
|
||||
type="button"
|
||||
onClick={dismissAnnouncement}
|
||||
title={tString(language, 'close')}
|
||||
>
|
||||
<Icon icon="close" className="size-4" />
|
||||
</button>
|
||||
|
||||
@@ -72,7 +72,7 @@ export function CookiesToast(props: { privacyPolicy?: string }) {
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShow(false)}
|
||||
aria-label={tString(language, 'cookies_close')}
|
||||
aria-label={tString(language, 'close')}
|
||||
className={tcls(
|
||||
'absolute',
|
||||
'top-3',
|
||||
@@ -85,7 +85,7 @@ export function CookiesToast(props: { privacyPolicy?: string }) {
|
||||
'rounded-sm',
|
||||
'hover:bg-tint-hover'
|
||||
)}
|
||||
title={tString(language, 'cookies_close')}
|
||||
title={tString(language, 'close')}
|
||||
>
|
||||
<Icon icon="xmark" className={tcls('size-4')} />
|
||||
</button>
|
||||
|
||||
@@ -41,7 +41,7 @@ export const de = {
|
||||
cookies_prompt_privacy: 'Datenschutzrichtlinie',
|
||||
cookies_accept: 'Akzeptieren',
|
||||
cookies_reject: 'Ablehnen',
|
||||
cookies_close: 'Schließen',
|
||||
close: 'Schließen',
|
||||
edit_on_git: 'Bearbeiten auf ${1}',
|
||||
notfound_title: 'Seite nicht gefunden',
|
||||
notfound: 'Die gesuchte Seite existiert nicht.',
|
||||
|
||||
@@ -41,7 +41,7 @@ export const en = {
|
||||
cookies_prompt_privacy: 'privacy policy',
|
||||
cookies_accept: 'Accept',
|
||||
cookies_reject: 'Reject',
|
||||
cookies_close: 'Close',
|
||||
close: 'Close',
|
||||
edit_on_git: 'Edit on ${1}',
|
||||
notfound_title: 'Page not found',
|
||||
notfound: "The page you are looking for doesn't exist.",
|
||||
|
||||
@@ -43,7 +43,7 @@ export const es: TranslationLanguage = {
|
||||
cookies_prompt_privacy: 'política de privacidad',
|
||||
cookies_accept: 'Aceptar',
|
||||
cookies_reject: 'Rechazar',
|
||||
cookies_close: 'Cerrar',
|
||||
close: 'Cerrar',
|
||||
edit_on_git: 'Editar en ${1}',
|
||||
notfound_title: 'Página no encontrada',
|
||||
notfound: 'La página que buscas no existe.',
|
||||
|
||||
@@ -43,7 +43,7 @@ export const fr: TranslationLanguage = {
|
||||
cookies_prompt_privacy: 'politique de confidentialité',
|
||||
cookies_accept: 'Accepter',
|
||||
cookies_reject: 'Rejeter',
|
||||
cookies_close: 'Fermer',
|
||||
close: 'Fermer',
|
||||
edit_on_git: 'Modifier sur ${1}',
|
||||
notfound_title: 'Page non trouvée',
|
||||
notfound: "La page que vous cherchez n'existe pas.",
|
||||
|
||||
@@ -43,7 +43,7 @@ export const ja: TranslationLanguage = {
|
||||
cookies_prompt_privacy: 'プライバシーポリシー',
|
||||
cookies_accept: '同意する',
|
||||
cookies_reject: '拒否する',
|
||||
cookies_close: '閉じる',
|
||||
close: '閉じる',
|
||||
edit_on_git: '${1}で編集',
|
||||
notfound_title: 'ページが見つかりません',
|
||||
notfound: 'お探しのページは存在しません。',
|
||||
|
||||
@@ -43,7 +43,7 @@ export const nl: TranslationLanguage = {
|
||||
cookies_prompt_privacy: 'privacyverklaring',
|
||||
cookies_accept: 'Accepteren',
|
||||
cookies_reject: 'Weigeren',
|
||||
cookies_close: 'Sluiten',
|
||||
close: 'Sluiten',
|
||||
edit_on_git: 'Bewerk op ${1}',
|
||||
notfound_title: 'Pagina niet gevonden',
|
||||
notfound: 'De pagina die je zoekt, bestaat niet.',
|
||||
|
||||
@@ -43,7 +43,7 @@ export const no: TranslationLanguage = {
|
||||
cookies_prompt_privacy: 'personvernerklæringen',
|
||||
cookies_accept: 'Godta',
|
||||
cookies_reject: 'Avslå',
|
||||
cookies_close: 'Lukk',
|
||||
close: 'Lukk',
|
||||
edit_on_git: 'Rediger på ${1}',
|
||||
notfound_title: 'Siden ble ikke funnet',
|
||||
notfound: 'Siden du leter etter eksisterer ikke.',
|
||||
|
||||
@@ -41,7 +41,7 @@ export const pt_br = {
|
||||
cookies_prompt_privacy: 'política de privacidade',
|
||||
cookies_accept: 'Aceitar',
|
||||
cookies_reject: 'Rejeitar',
|
||||
cookies_close: 'Fechar',
|
||||
close: 'Fechar',
|
||||
edit_on_git: 'Editar no ${1}',
|
||||
notfound_title: 'Página não encontrada',
|
||||
notfound: 'A página que você está procurando não existe.',
|
||||
|
||||
@@ -41,7 +41,7 @@ export const zh: TranslationLanguage = {
|
||||
cookies_prompt_privacy: '隐私政策',
|
||||
cookies_accept: '接受',
|
||||
cookies_reject: '拒绝',
|
||||
cookies_close: '关闭',
|
||||
close: '关闭',
|
||||
edit_on_git: '在${1}上编辑',
|
||||
notfound_title: '页面未找到',
|
||||
notfound: '您要找的页面不存在。',
|
||||
|
||||
Reference in New Issue
Block a user