Skip to content

feat/non-ctx-translations #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 72 additions & 3 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,39 @@ export const sidebar: ThemeConfig['sidebar'] = {
}

// Placeholder of the i18n config for @vuejs-translations.
// const i18n: ThemeConfig['i18n'] = {
// }
const i18n: ThemeConfig['i18n'] = {
search: 'Szukaj',
menu: 'menu',
toc: 'Na tej stronie',
returnToTop: 'Powrót do góry',
appearance: 'wygląd',
previous: 'Poprzednia',
next: 'Następna',
pageNotFound: 'Strona nie znaleziona',
deadLink: {
before: 'Znaleziono niedziałający link:',
after: '.'
},
deadLinkReport: {
before: 'Prosimy',
link: 'daj nam znać',
after: ',abyśmy mogli to naprawić.'
},
footerLicense: {
before: 'Wydane na podstawie ',
after: '.'
},
ariaAnnouncer: {
before: '',
after: 'Jest załadowany'
},
ariaDarkMode: 'Przełączanie trybu ciemnego',
ariaSkipToContent: 'Przejdź bezpośrednio do treści',
ariaToC: 'Katalog bieżącej strony',
ariaMainNav: 'główna nawigacja',
ariaMobileNav: 'Nawigacja mobilna',
ariaSidebarNav: 'Nawigacja w pasku bocznym'
}

export default defineConfigWithTheme<ThemeConfig>({
extends: baseConfig,
Expand Down Expand Up @@ -661,7 +692,7 @@ export default defineConfigWithTheme<ThemeConfig>({
nav,
sidebar,
// Placeholder of the i18n config for @vuejs-translations.
// i18n,
i18n,

localeLinks: [
{
Expand Down Expand Up @@ -737,6 +768,44 @@ export default defineConfigWithTheme<ThemeConfig>({
apiKey: '21cf9df0734770a2448a9da64a700c22',
searchParameters: {
facetFilters: ['version:v3']
},
placeholder: 'Wyszukiwanie dokumentów',
translations: {
button: {
buttonText: 'Szukaj'
},
modal: {
searchBox: {
resetButtonTitle: 'Wyczyść kryteria wyszukiwania',
resetButtonAriaLabel: 'Wyczyść kryteria wyszukiwania',
cancelButtonText: 'Anuluj',
cancelButtonAriaLabel: 'Anuluj'
},
startScreen: {
recentSearchesTitle: 'Historia wyszukiwania',
noRecentSearchesText: 'Brak historii wyszukiwania',
saveRecentSearchButtonTitle: 'Zapisz w historii wyszukiwania',
removeRecentSearchButtonTitle: 'Usuń z historii wyszukiwania',
favoriteSearchesTitle: 'Ulubione',
removeFavoriteSearchButtonTitle: 'Usuń z ulubionych'
},
errorScreen: {
titleText: 'Nie można uzyskać wyników',
helpText: 'Konieczne może być sprawdzenie połączenia internetowego'
},
footer: {
selectText: 'wybierz',
navigateText: 'nawigacja',
closeText: 'zamknij',
searchByText: 'Wyszukiwanie według'
},
noResultsScreen: {
noResultsText: 'brak wyników wyszukiwania dla',
suggestedQueryText: 'Spróbuj wyszukać',
reportMissingResultsText: 'Uważasz że brakuje wyników?',
reportMissingResultsLinkText: 'Daj nam znać'
}
}
}
},

Expand Down
10 changes: 5 additions & 5 deletions .vitepress/theme/components/PreferenceSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function useToggleFn(
<div v-if="show" class="preference-switch">
<button
class="toggle"
aria-label="preference switches toggle"
aria-label="przełącznik zmiany preferencji"
aria-controls="preference-switches"
:aria-expanded="isOpen"
@click="toggleOpen"
Expand All @@ -79,7 +79,7 @@ function useToggleFn(
>
<VTSwitch
class="api-switch"
aria-label="prefer composition api"
aria-label="preferuję API kompozycyjne"
:aria-checked="preferComposition"
@click="toggleCompositionAPI()"
/>
Expand All @@ -90,7 +90,7 @@ function useToggleFn(
>
<a
class="switch-link"
title="About API preference"
title="O preferencji API"
href="/guide/introduction.html#api-styles"
@click="closeSideBar"
>?</a
Expand All @@ -101,14 +101,14 @@ function useToggleFn(
<label class="no-sfc-label" @click="toggleSFC(false)">HTML</label>
<VTSwitch
class="sfc-switch"
aria-label="prefer single file component"
aria-label="preferuj komponent jednoplikowy"
:aria-checked="preferSFC"
@click="toggleSFC()"
/>
<label class="sfc-label" @click="toggleSFC(true)">SFC</label>
<a
class="switch-link"
title="About SFC"
title="O SFC"
href="/guide/scaling-up/sfc.html"
@click="closeSideBar"
>?</a
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/TextAd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function track() {

<template>
<div class="text-ad">
<span class="label">Ad</span>
<span class="label">Reklama</span>
<a
href="https://aircode.io"
target="_blank"
Expand Down
2 changes: 1 addition & 1 deletion src/api/ApiIndex.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const filtered = computed(() => {
<input
ref="search"
type="search"
placeholder="Enter keyword"
placeholder="Wpisz słowo kluczowe"
id="api-filter"
v-model="query"
/>
Expand Down