Commit graph

16 commits

Author SHA1 Message Date
Alexey Pyltsyn
63bd6b9025
refactor: define own translations in other themes (#5849)
Co-authored-by: Armano <armano2@users.noreply.github.com>
2021-11-20 16:35:27 +01:00
Paden Clayton
fa6d15b35f
feat(core): Add React ErrorBoundary component + theme default boundaries (#3104)
Co-authored-by: Paden Clayton <paden.clayton@monkedia.com>
Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2021-11-04 16:07:32 +01:00
philipp985
3db4fcaec7
refactor: Polish de translation (#5717) 2021-10-20 15:40:59 +02:00
Don
b6d0378704
refactor: adjust styling of back top top button (#5469)
* refactor: css variables for back to top button

* refactor: adjust back to top button styling

* Update from PR feedback

* err... darker.

* swap secondary color for emphasis scale

* reduce contrast further

* Add new translations

* Cleanup CSS

* Remove active state

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2021-09-11 16:09:58 +03:00
Gabriel Csapo
cb8718a1e3
feat: adds blog archive route (#5428)
* [feature] adds blog archive route

* Update plugin-content-blog.md

* fix TS issues + minor refactors

* remove useless css

* add translation apis

* add missing translations

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-09-02 17:35:13 +02:00
Joshua Chen
8e1cde135c
feat: make blog config options and navbar versions dropdown label translatable (#5371)
* Translate versions dropdown label

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Make blog options tranlatable

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Fix names

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Rename functions

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Rename translations path

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Update docs

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Update Chinese translations

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Remove space

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Update docs

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Add jest test

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Fix copyright typing

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Update test

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Update options

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Fix test

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-20 17:11:59 +02:00
Isaac Philip
f9c79cbd58
feat: doc tags (same as blog tags) (#3646)
* [v2] tags to doc, same as tags to blog - [IN PROGRESS]

- Addition of plugin-content-docs

- Addition of DocTagsListPage in `docusaurus-theme-classic`

! Error exists for this commit towards the theme aspect and help required.

Commit towards #3434

* docs: make tags list page work

* temp: disable onBrokenLinks

* theme bootstrap: create DocTagsListPage

* DocTagsPage added and functionality too

- individual doc tag page added to show docs for that specific tag

* Added all Docs Tags Link

* add some shared tag utils

* move tag tests to _dogfooding

* fix type

* fix some tests

* fix blog test

* refactor blog post tags handling

* better yaml tag examples

* better dogfood md files

* refactor and factorize theme tag components

* finish DocTagDocListPage

* Extract DocItemFooter + add inline tag list

* minor fix

* better typings

* fix versions.test.ts tests

* add tests for doc tags

* fix tests

* test toTagDocListProp

* move shared theme code to tagUtils

* Add new theme translation keys

* move common theme code to tagUtils + add tests

* update-code-translations should handle theme-common

* update french translation

* revert add translation

* fix pluralization problem in theme.docs.tagDocListPageTitle

* add theme component configuration options

* add more tags tests

* add documentation for docs tagging

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-08-19 10:31:15 +02:00
Alexey Pyltsyn
9536ef900d
feat(v2): redesign mobile UX: inline TOC + doc sidebar in main menu (#4273)
* feat(v2): mobile TOC

* Bug fixes and various improvements

* Redesign

* extract TOCCollapsible component

* TS improvements

* Assign sidebar name directly to the doc route => no need for either permalinkToSidebar or GlobalData

* revert changes to useWindowSize, fix FOUC issues

* extract DocSidebarDesktop component

* remove now useless menu infima classes

* TOCHeadings => rename + remove unused onClick prop

* Extract DocSidebarItem

* minor renaming

* replace GlobalData usage by a React teleport system to render in the navbar mobile sidebar menu directly from the DocPage component

* useWindowSize => simulate SSR size in dev to make FOUC issues more obvious

* fix remaining sidebar layout shift

* update docs snapshots

* remove unused code translations

* remove unused code translations

* fix minor update-code-translations bug

* Add more build-size paths to watch

* Restyle back button

* Add  missing`menu` class

* extract useShallowMemoizedObject

* fix routes tests + better routes formatting

* use Translate api for labels

* use Translate api for labels

* Update translations

* Improve dark mode support for back button

* Merge branch 'master' into lex111/inline-color-code

# Conflicts:
#	packages/core/dist/css/default-dark/default-dark-rtl.min.css
#	packages/core/dist/css/default-dark/default-dark.min.css
#	packages/core/dist/css/default/default-rtl.min.css
#	packages/core/dist/css/default/default.min.css

* replace useCollapse by new useCollapsible

* Cleanup and use clean-btn for TOCCollapsible button

* Make TOC links clickable over full width

* Cleanup

* fix uncollapsible sidebar that can be collapsed + create <Collapsible> component

* dependency array typo

* rollback sidebars community commit typo

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-07-09 16:50:38 +02:00
Alexey Pyltsyn
c8b9061f6c
refactor(v2): improve semantic doc sidebar markup (#4940)
* refactor(v2): improve semantic doc sidebar markup

* Fixes
2021-06-15 12:45:29 +02:00
Alexey Pyltsyn
8629fbdc77
refactor(v2): improve semantic blog sidebar markup (#4961) 2021-06-14 19:04:58 +02:00
miku86
93dab24bec
polish(v2): Add german translations (#4448)
* Add german translations

Hey folks,

I updated some missing translations.

Greetings
Michael

* Update packages/docusaurus-theme-classic/codeTranslations/de.json

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-03-18 11:46:23 +01:00
Alexey Pyltsyn
1dd400db7e
refactor(v2): format post date using Intl (#4344)
* refactor(v2): format post date using Intl

* Fix test

* Blog: add localized blog post date test

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-03-04 19:11:31 +01:00
Sébastien Lorber
364d4dbf01
fix(v2): fix bad theme pluralization rules for some labels (#4304)
* Pluralization test!

* Simplify usePluralForm usage with | plural message separator

* fix interpolate bug with falsy values like 0

* fix interpolate bug with falsy values like 0

* Order plural forms + allow to not provide the last plural forms if they are not used

* fix typo

* revert test!

* plurals and typo of the SearchPage

* update some labels

* improve the update-code-translations cli + update translations

* pluralize blog reading time label

* ensure base.json contains message descriptions: helps the user to provide the translations

* remove russian production locale
2021-03-03 17:05:21 +01:00
Yamagishi Kazutoshi
99d83995a5
feat(v2): add japanese translations (#4303) 2021-03-01 18:35:07 +01:00
Sébastien Lorber
1734975f2f
feat(v2): Add Interpolate / interpolate APIs + complete theme translations (#4295)
* WIP: refactor team profile cards

* Add Interpolate / interpolate APIs

* Add interpolate snapshot test

* comments

* fix Interpolate TS types

* Interpolate should handle numbers and other JS types

* translate BlogPostItem

* interpolate translate() fn + add translations for blog post tag header

* localize the LastUpdated component

* translate DocVersionSuggestions

* fix test

* add some new translations

* Add node script to easily update the theme default translations

* fix translation extractor bug due to translate() dynamic values

* use ICU placeholder syntax

* refactor month key

* order

* team  page translation improvements

* Add interpolation doc + improve i18n doc
2021-02-26 13:19:51 +01:00
philipp985
9e758308bb
polish(v2): theme default translations for language de / german (#4279) 2021-02-24 10:33:15 +01:00