solidjs-community / solidjs-community/solid-primitives

Behind the scenes key generation for `@solid-primitives/i18n`

Open
#493 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
1.6k
Forks
162
Avg merge
19h 40m
Merged PRs (30d)
8

Description

Describe The Problem To Be Solved

As a developer I don't want to have to come up with an project-wide unique key for each piece of text that needs to be internationalized. The given defaultValue with parameters should be enough and the rest should be handled in the background.

Suggest A Solution

A CLI Tool as this Feature requests (https://github.com/solidjs-community/solid-primitives/issues/492) could output a hash-map like .json output. And a vite plugin generates theses hashes in advance so that we have identical lookup times, less work and smaller bundles on the client side.

A killer feature would be to automatically determine the hash length so that for small projects only two to three letters do the trick which would also significantly reduce bundle size of these translation json's

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the @solid-primitives/i18n implementation and the linked feature request in issue #492, then investigate how a CLI and Vite plugin would fit the repository. The scope needs agreement on generated hashes, collision handling, and automatic hash length before completion can be evaluated.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vite
Domain
build-system, cli, localization, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.