Skip to content
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

<?>: split download size in half #1287

Closed
wants to merge 12 commits into from
Closed

<?>: split download size in half #1287

wants to merge 12 commits into from

Conversation

Shinigami92
Copy link
Member

@Shinigami92 Shinigami92 commented Aug 19, 2022

EXPERIMENTAL

What is this?:

  1. All TS files in src/locales were converted into .json files
  2. These are then bundled together as src/locales/<locale>.json file to require/import them (for at-dev time)
  3. They are copied into dist/locales/<locale>.json and are required/imported by cjs and esm from same source (for at-bundled time)

Open TODOs:

  • fix tests
  • manage generated docs
  • fix bugs (specially locale ar and ur)

Later?

  • write a locale validator
  • write a locale analyser to get how many % is missing for a locale

To review this PR, I tried as best as I could to separate all commits

@Shinigami92 Shinigami92 added the do NOT merge yet Do not merge this PR into the target branch yet label Aug 19, 2022
@Shinigami92 Shinigami92 self-assigned this Aug 19, 2022
@pkuczynski
Copy link
Member

Just out of the interest: what's the benefit of having locales as json vs ts?

@Shinigami92
Copy link
Member Author

Just out of the interest: what's the benefit of having locales as json vs ts?

Most important one: splitting the package size into HALF!

Second important one: having simpler files to manage
like reducing all the boiler plate around the real content
and making it somewhat simpler for a contributor to contribute

@import-brain import-brain added the c: locale Permutes locale definitions label Aug 21, 2022
@Shinigami92 Shinigami92 changed the title <?>: convert locales to json <?>: split download size in half Aug 26, 2022
@Shinigami92
Copy link
Member Author

Closing these experiments for now

@ST-DDT
Copy link
Member

ST-DDT commented Jan 30, 2023

@Shinigami92 Do you still need the branch? If not, please delete it.

Commit-ID: 4203c3d

@Shinigami92
Copy link
Member Author

Yes, please do not delete them right now so we have a copy and look into it if needed
I just wanted to clean the PR section as we would need to rewrite them anyway as they got to stale

@ST-DDT ST-DDT deleted the locales-as-json branch October 9, 2023 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: locale Permutes locale definitions do NOT merge yet Do not merge this PR into the target branch yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants