-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Docs: dynamically generated list of available locales page #2838
base: main
Are you sure you want to change the base?
Conversation
DIscussion: |
@bartduisters Apologies, as mentioned in the other thread I was going off the CLDR for the English name of the locale and found that Flemish was in there. https://unicode-org.github.io/cldr-staging/charts/40/summary/nl.html Just pushed a commit using your recommendations. |
Last commit in this PR fixes dosc ESM usage examples for FP (see #2124). Before notice After It also removes 'umd' usage since that is not supported anymore and not displayed on the docs website. |
bd471dc
to
9e5c925
Compare
9e5c925
to
4af9178
Compare
4af9178
to
d177686
Compare
c243c3d
to
9bb5169
Compare
soft reset to fix all the conflicts. Also removed the TypeScript and broken locale stats from output since these are not relevant anymore. |
This PR seems stale. Is there any plans to merge it anytime soon? |
This PR converts the documentation generation code to TypeScript and adds a new dynamically generated documentation page that lists available locales as a table and as JSON. I think this will be very valuable to the community to have easy access to this information.
You can preview the generated page here: https://github.com/date-fns/date-fns/blob/9bb51691f201c3ec05ab832acbc5d478f2e5c47a/docs/i18nLocales.md
A few things to point out:
jsdoc-to-markdown
cache, as it seems to work well and detects file changes correctly. On my machine, it takes almost 2 minutes on an empty cache to generate the docs, but completes in 420ms with cache and one source file modified.@summary
jsdoc tags of locales are not unique. Hoping this will help people build out locale selectors without duplicate entries. I made some adjustments to a few locale's jsdoc entries to fix typos, uniqueness and precision.package.json
. I kept the changes to a minimum.Hope you like it!
EDIT: also fixes a docs bug for FP ESM usage, see comment below