[READ-ONLY] a fast, modern browser for the npm registry
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(i18n): translate callout titles in README (#934)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

authored by

Wojciech Maj
autofix-ci[bot]
and committed by
GitHub
1e175691 7237af93

+60 -16
+12 -5
app/components/Readme.vue
··· 62 62 <article 63 63 class="readme prose prose-invert max-w-[70ch] lg:max-w-none px-1" 64 64 v-html="html" 65 + :style="{ 66 + '--i18n-note': '\'' + $t('package.readme.callout.note') + '\'', 67 + '--i18n-tip': '\'' + $t('package.readme.callout.tip') + '\'', 68 + '--i18n-important': '\'' + $t('package.readme.callout.important') + '\'', 69 + '--i18n-warning': '\'' + $t('package.readme.callout.warning') + '\'', 70 + '--i18n-caution': '\'' + $t('package.readme.callout.caution') + '\'', 71 + }" 65 72 @click="handleClick" 66 73 /> 67 74 </template> ··· 333 340 background: rgba(59, 130, 246, 0.05); 334 341 } 335 342 .readme :deep(blockquote[data-callout='note']::before) { 336 - content: 'Note'; 343 + content: var(--i18n-note, 'Note'); 337 344 color: #3b82f6; 338 345 } 339 346 .readme :deep(blockquote[data-callout='note']::after) { ··· 348 355 background: rgba(34, 197, 94, 0.05); 349 356 } 350 357 .readme :deep(blockquote[data-callout='tip']::before) { 351 - content: 'Tip'; 358 + content: var(--i18n-tip, 'Tip'); 352 359 color: #22c55e; 353 360 } 354 361 .readme :deep(blockquote[data-callout='tip']::after) { ··· 363 370 background: rgba(168, 85, 247, 0.05); 364 371 } 365 372 .readme :deep(blockquote[data-callout='important']::before) { 366 - content: 'Important'; 373 + content: var(--i18n-important, 'Important'); 367 374 color: var(--syntax-fn); 368 375 } 369 376 .readme :deep(blockquote[data-callout='important']::after) { ··· 378 385 background: rgba(234, 179, 8, 0.05); 379 386 } 380 387 .readme :deep(blockquote[data-callout='warning']::before) { 381 - content: 'Warning'; 388 + content: var(--i18n-warning, 'Warning'); 382 389 color: #eab308; 383 390 } 384 391 .readme :deep(blockquote[data-callout='warning']::after) { ··· 393 400 background: rgba(239, 68, 68, 0.05); 394 401 } 395 402 .readme :deep(blockquote[data-callout='caution']::before) { 396 - content: 'Caution'; 403 + content: var(--i18n-caution, 'Caution'); 397 404 color: #ef4444; 398 405 } 399 406 .readme :deep(blockquote[data-callout='caution']::after) {
+8 -1
i18n/locales/en.json
··· 208 208 "title": "Readme", 209 209 "no_readme": "No README available.", 210 210 "view_on_github": "View on GitHub", 211 - "toc_title": "Outline" 211 + "toc_title": "Outline", 212 + "callout": { 213 + "note": "Note", 214 + "tip": "Tip", 215 + "important": "Important", 216 + "warning": "Warning", 217 + "caution": "Caution" 218 + } 212 219 }, 213 220 "provenance_section": { 214 221 "title": "Provenance",
+12 -4
i18n/locales/pl-PL.json
··· 19 19 "chat": "czat" 20 20 }, 21 21 "search": { 22 - "title": "Wyszukiwanie", 23 22 "label": "Szukaj pakietów npm", 24 23 "placeholder": "szukaj pakietów...", 25 24 "button": "szukaj", ··· 28 27 "found_packages": "Nie znaleziono pakietów | Znaleziono 1 pakiet | Znaleziono {count} pakiety | Znaleziono {count} pakietów | Znaleziono {count} pakietów", 29 28 "updating": "(aktualizowanie...)", 30 29 "no_results": "Nie znaleziono pakietów dla \"{query}\"", 30 + "title": "Wyszukiwanie", 31 31 "not_taken": "{name} jest wolne", 32 32 "claim_prompt": "Zajmij tę nazwę pakietu w npm", 33 33 "claim_button": "Zajmij \"{name}\"", ··· 73 73 "theme_light": "Jasny", 74 74 "theme_dark": "Ciemny", 75 75 "theme_system": "Systemowy", 76 - "background_themes": "Odcień tła", 77 76 "language": "Język", 78 77 "help_translate": "Pomóż tłumaczyć npmx", 79 78 "accent_colors": "Kolory akcentu", 80 79 "clear_accent": "Wyczyść kolor akcentu", 81 - "translation_progress": "Postęp tłumaczenia" 80 + "translation_progress": "Postęp tłumaczenia", 81 + "background_themes": "Odcień tła" 82 82 }, 83 83 "i18n": { 84 84 "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ń", ··· 204 204 "title": "README", 205 205 "no_readme": "Brak README.", 206 206 "view_on_github": "Zobacz na GitHub", 207 - "toc_title": "Spis treści" 207 + "toc_title": "Spis treści", 208 + "callout": { 209 + "note": "Notatka", 210 + "tip": "Wskazówka", 211 + "important": "Ważne", 212 + "warning": "Uwaga", 213 + "caution": "Ostrożnie" 214 + } 208 215 }, 216 + "provenance_section": {}, 209 217 "keywords_title": "Słowa kluczowe", 210 218 "compatibility": "Zgodność", 211 219 "card": {
+8 -1
lunaria/files/en-GB.json
··· 208 208 "title": "Readme", 209 209 "no_readme": "No README available.", 210 210 "view_on_github": "View on GitHub", 211 - "toc_title": "Outline" 211 + "toc_title": "Outline", 212 + "callout": { 213 + "note": "Note", 214 + "tip": "Tip", 215 + "important": "Important", 216 + "warning": "Warning", 217 + "caution": "Caution" 218 + } 212 219 }, 213 220 "provenance_section": { 214 221 "title": "Provenance",
+8 -1
lunaria/files/en-US.json
··· 208 208 "title": "Readme", 209 209 "no_readme": "No README available.", 210 210 "view_on_github": "View on GitHub", 211 - "toc_title": "Outline" 211 + "toc_title": "Outline", 212 + "callout": { 213 + "note": "Note", 214 + "tip": "Tip", 215 + "important": "Important", 216 + "warning": "Warning", 217 + "caution": "Caution" 218 + } 212 219 }, 213 220 "provenance_section": { 214 221 "title": "Provenance",
+12 -4
lunaria/files/pl-PL.json
··· 19 19 "chat": "czat" 20 20 }, 21 21 "search": { 22 - "title": "Wyszukiwanie", 23 22 "label": "Szukaj pakietów npm", 24 23 "placeholder": "szukaj pakietów...", 25 24 "button": "szukaj", ··· 28 27 "found_packages": "Nie znaleziono pakietów | Znaleziono 1 pakiet | Znaleziono {count} pakiety | Znaleziono {count} pakietów | Znaleziono {count} pakietów", 29 28 "updating": "(aktualizowanie...)", 30 29 "no_results": "Nie znaleziono pakietów dla \"{query}\"", 30 + "title": "Wyszukiwanie", 31 31 "not_taken": "{name} jest wolne", 32 32 "claim_prompt": "Zajmij tę nazwę pakietu w npm", 33 33 "claim_button": "Zajmij \"{name}\"", ··· 73 73 "theme_light": "Jasny", 74 74 "theme_dark": "Ciemny", 75 75 "theme_system": "Systemowy", 76 - "background_themes": "Odcień tła", 77 76 "language": "Język", 78 77 "help_translate": "Pomóż tłumaczyć npmx", 79 78 "accent_colors": "Kolory akcentu", 80 79 "clear_accent": "Wyczyść kolor akcentu", 81 - "translation_progress": "Postęp tłumaczenia" 80 + "translation_progress": "Postęp tłumaczenia", 81 + "background_themes": "Odcień tła" 82 82 }, 83 83 "i18n": { 84 84 "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ń", ··· 204 204 "title": "README", 205 205 "no_readme": "Brak README.", 206 206 "view_on_github": "Zobacz na GitHub", 207 - "toc_title": "Spis treści" 207 + "toc_title": "Spis treści", 208 + "callout": { 209 + "note": "Notatka", 210 + "tip": "Wskazówka", 211 + "important": "Ważne", 212 + "warning": "Uwaga", 213 + "caution": "Ostrożnie" 214 + } 208 215 }, 216 + "provenance_section": {}, 209 217 "keywords_title": "Słowa kluczowe", 210 218 "compatibility": "Zgodność", 211 219 "card": {