Skip to content
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
17 changes: 12 additions & 5 deletions app/components/Readme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ function handleClick(event: MouseEvent) {
<article
class="readme prose prose-invert max-w-[70ch] lg:max-w-none px-1"
v-html="html"
:style="{
'--i18n-note': '\'' + $t('package.readme.callout.note') + '\'',
'--i18n-tip': '\'' + $t('package.readme.callout.tip') + '\'',
'--i18n-important': '\'' + $t('package.readme.callout.important') + '\'',
'--i18n-warning': '\'' + $t('package.readme.callout.warning') + '\'',
'--i18n-caution': '\'' + $t('package.readme.callout.caution') + '\'',
}"
@click="handleClick"
/>
</template>
Expand Down Expand Up @@ -333,7 +340,7 @@ function handleClick(event: MouseEvent) {
background: rgba(59, 130, 246, 0.05);
}
.readme :deep(blockquote[data-callout='note']::before) {
content: 'Note';
content: var(--i18n-note, 'Note');
color: #3b82f6;
}
.readme :deep(blockquote[data-callout='note']::after) {
Expand All @@ -348,7 +355,7 @@ function handleClick(event: MouseEvent) {
background: rgba(34, 197, 94, 0.05);
}
.readme :deep(blockquote[data-callout='tip']::before) {
content: 'Tip';
content: var(--i18n-tip, 'Tip');
color: #22c55e;
}
.readme :deep(blockquote[data-callout='tip']::after) {
Expand All @@ -363,7 +370,7 @@ function handleClick(event: MouseEvent) {
background: rgba(168, 85, 247, 0.05);
}
.readme :deep(blockquote[data-callout='important']::before) {
content: 'Important';
content: var(--i18n-important, 'Important');
color: var(--syntax-fn);
}
.readme :deep(blockquote[data-callout='important']::after) {
Expand All @@ -378,7 +385,7 @@ function handleClick(event: MouseEvent) {
background: rgba(234, 179, 8, 0.05);
}
.readme :deep(blockquote[data-callout='warning']::before) {
content: 'Warning';
content: var(--i18n-warning, 'Warning');
color: #eab308;
}
.readme :deep(blockquote[data-callout='warning']::after) {
Expand All @@ -393,7 +400,7 @@ function handleClick(event: MouseEvent) {
background: rgba(239, 68, 68, 0.05);
}
.readme :deep(blockquote[data-callout='caution']::before) {
content: 'Caution';
content: var(--i18n-caution, 'Caution');
color: #ef4444;
}
.readme :deep(blockquote[data-callout='caution']::after) {
Expand Down
9 changes: 8 additions & 1 deletion i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,14 @@
"title": "Readme",
"no_readme": "No README available.",
"view_on_github": "View on GitHub",
"toc_title": "Outline"
"toc_title": "Outline",
"callout": {
"note": "Note",
"tip": "Tip",
"important": "Important",
"warning": "Warning",
"caution": "Caution"
}
},
"keywords_title": "Keywords",
"compatibility": "Compatibility",
Expand Down
16 changes: 12 additions & 4 deletions i18n/locales/pl-PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"chat": "czat"
},
"search": {
"title": "Wyszukiwanie",
"label": "Szukaj pakietów npm",
"placeholder": "szukaj pakietów...",
"button": "szukaj",
Expand All @@ -28,6 +27,7 @@
"found_packages": "Nie znaleziono pakietów | Znaleziono 1 pakiet | Znaleziono {count} pakiety | Znaleziono {count} pakietów | Znaleziono {count} pakietów",
"updating": "(aktualizowanie...)",
"no_results": "Nie znaleziono pakietów dla \"{query}\"",
"title": "Wyszukiwanie",
"not_taken": "{name} jest wolne",
"claim_prompt": "Zajmij tę nazwę pakietu w npm",
"claim_button": "Zajmij \"{name}\"",
Expand Down Expand Up @@ -73,12 +73,12 @@
"theme_light": "Jasny",
"theme_dark": "Ciemny",
"theme_system": "Systemowy",
"background_themes": "Odcień tła",
"language": "Język",
"help_translate": "Pomóż tłumaczyć npmx",
"accent_colors": "Kolory akcentu",
"clear_accent": "Wyczyść kolor akcentu",
"translation_progress": "Postęp tłumaczenia"
"translation_progress": "Postęp tłumaczenia",
"background_themes": "Odcień tła"
},
"i18n": {
"missing_keys": "{count} brakujących tłumaczeń | {count} brakujące tłumaczenie | {count} brakujące tłumaczenia | {count} brakujących tłumaczeń | {count} brakujących tłumaczeń",
Expand Down Expand Up @@ -204,8 +204,16 @@
"title": "README",
"no_readme": "Brak README.",
"view_on_github": "Zobacz na GitHub",
"toc_title": "Spis treści"
"toc_title": "Spis treści",
"callout": {
"note": "Notatka",
"tip": "Wskazówka",
"important": "Ważne",
"warning": "Uwaga",
"caution": "Ostrożnie"
}
},
"provenance_section": {},
"keywords_title": "Słowa kluczowe",
"compatibility": "Zgodność",
"card": {
Expand Down
9 changes: 8 additions & 1 deletion lunaria/files/en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,14 @@
"title": "Readme",
"no_readme": "No README available.",
"view_on_github": "View on GitHub",
"toc_title": "Outline"
"toc_title": "Outline",
"callout": {
"note": "Note",
"tip": "Tip",
"important": "Important",
"warning": "Warning",
"caution": "Caution"
}
},
"keywords_title": "Keywords",
"compatibility": "Compatibility",
Expand Down
9 changes: 8 additions & 1 deletion lunaria/files/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,14 @@
"title": "Readme",
"no_readme": "No README available.",
"view_on_github": "View on GitHub",
"toc_title": "Outline"
"toc_title": "Outline",
"callout": {
"note": "Note",
"tip": "Tip",
"important": "Important",
"warning": "Warning",
"caution": "Caution"
}
},
"keywords_title": "Keywords",
"compatibility": "Compatibility",
Expand Down
16 changes: 12 additions & 4 deletions lunaria/files/pl-PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"chat": "czat"
},
"search": {
"title": "Wyszukiwanie",
"label": "Szukaj pakietów npm",
"placeholder": "szukaj pakietów...",
"button": "szukaj",
Expand All @@ -28,6 +27,7 @@
"found_packages": "Nie znaleziono pakietów | Znaleziono 1 pakiet | Znaleziono {count} pakiety | Znaleziono {count} pakietów | Znaleziono {count} pakietów",
"updating": "(aktualizowanie...)",
"no_results": "Nie znaleziono pakietów dla \"{query}\"",
"title": "Wyszukiwanie",
"not_taken": "{name} jest wolne",
"claim_prompt": "Zajmij tę nazwę pakietu w npm",
"claim_button": "Zajmij \"{name}\"",
Expand Down Expand Up @@ -73,12 +73,12 @@
"theme_light": "Jasny",
"theme_dark": "Ciemny",
"theme_system": "Systemowy",
"background_themes": "Odcień tła",
"language": "Język",
"help_translate": "Pomóż tłumaczyć npmx",
"accent_colors": "Kolory akcentu",
"clear_accent": "Wyczyść kolor akcentu",
"translation_progress": "Postęp tłumaczenia"
"translation_progress": "Postęp tłumaczenia",
"background_themes": "Odcień tła"
},
"i18n": {
"missing_keys": "{count} brakujących tłumaczeń | {count} brakujące tłumaczenie | {count} brakujące tłumaczenia | {count} brakujących tłumaczeń | {count} brakujących tłumaczeń",
Expand Down Expand Up @@ -204,8 +204,16 @@
"title": "README",
"no_readme": "Brak README.",
"view_on_github": "Zobacz na GitHub",
"toc_title": "Spis treści"
"toc_title": "Spis treści",
"callout": {
"note": "Notatka",
"tip": "Wskazówka",
"important": "Ważne",
"warning": "Uwaga",
"caution": "Ostrożnie"
}
},
"provenance_section": {},
"keywords_title": "Słowa kluczowe",
"compatibility": "Zgodność",
"card": {
Expand Down
Loading