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

rename bundle to key? #224

Open
samuelstroschein opened this issue Oct 4, 2024 — with Linear · 0 comments
Open

rename bundle to key? #224

samuelstroschein opened this issue Oct 4, 2024 — with Linear · 0 comments
Assignees

Comments

Copy link
Member

samuelstroschein commented Oct 4, 2024

Proposal

Rename bundle to key to align with user expectations and reduce communication effort.

  • (+) aligns with user expectations. users are referring to "bundles" as keys.
  • (+) eases communication. we won't need to explain that bundles are "like keys"
  • (+) aligns with the industry. other localization tooling refers to bundles as keys.
  • (-) breaking change 💀

Context

Bundles are "breaking" the communication model of "messages" and will lead to confusion and higher effort of releasing the inlang sdk v2.

Example: Paraglide JS

  1. Paraglide JS users import messages from paraglide-js/messages.

With the introduction of bundles, they import a bundle now though which is still a message. If that sentence confused you, that's the problem.

import * as m from "paraglide-j/messages/index.js" 

// this is referencing a bundle
const output = m.happy_elephant()

// but the output is a message
console.log(output) -> "You need to login!"
  1. The term bundle clashes with compiling.

The output of compiling an app is a bundle. We will have to have warnings in the documentation to not confuse a message bundle and app bundle.

CleanShot 2024-10-04 at 14.51.51@2x.png

Example: Sherlock

Sherlock used to extract messages but now it's a bundle.

CleanShot 2024-10-04 at 14.39.27@2x.png

Example Fink

Fink allows adding a bundle. Every other CAT editor refers to this as adding a new key.

CleanShot 2024-10-04 at 14.44.24@2x.png

Screenshot from Lokalise

CleanShot 2024-10-04 at 14.45.08@2x.png

Screenshot from Tolgee

CleanShot 2024-10-04 at 14.45.49@2x.png

@samuelstroschein samuelstroschein self-assigned this Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant