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

add logs to plugin.import & export #213

Open
samuelstroschein opened this issue Sep 23, 2024 — with Linear · 2 comments
Open

add logs to plugin.import & export #213

samuelstroschein opened this issue Sep 23, 2024 — with Linear · 2 comments

Comments

Copy link
Member

Context

Building plugins incrementally is easier if a plugin can emit warnings. Emitting warnings allows starting with a subset of a format that used by the majority of users before adding every feature of a format.

For example, i18next allows referencing other keys. Cool feature. But not supported in the inlang SDK and likely used by a tiny minority in the i18next community. Ignoring the message and emitting a warning "referencing

  "keyNesting": "reuse $t(keyDeep.inner)",

Proposal

Add an API to emit warnings.

Copy link
Member Author

samuelstroschein commented Sep 25, 2024

After sync call with @niklas.buchfink the api is rly benefitial.



	files[0].logs = [
		level: "warning",
		bundleId: "keyContext"
		message: "This is a warning",
	]

Copy link
Member Author

Agreed with @niklas.buchfink that warnings out of scope.

  • can be added without breaking changes
  • it's a nice to have

@samuelstroschein samuelstroschein changed the title add warnings to plugin.import & export add logs to plugin.import & export Oct 11, 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