Skip to content

[BUG] Strange format of nested keys after saving #192

@qdelcourte

Description

@qdelcourte

Hi, I have problem with Sherlock on nested keys.

On VS Code and settings "Format On Save" disabled.

Here a JSON as example which declare one flat key and two nested keys:

{
	"$schema": "https://inlang.com/schema/inlang-message-format",
	"1_1": "test",
	"1": {"2": "test"},
	"1.3": "test"
}

❌ With Sherlock enabled and after saving, I got this:

{
	"1": [
		null,
		null,
		"test",
		"test"
	],
	"$schema": "https://inlang.com/schema/inlang-message-format",
	"1_1": "test"
}

✔️ With Sherlock disabled and after saving, I got this:

{
	"$schema": "https://inlang.com/schema/inlang-message-format",
	"1_1": "test",
	"1": {"2": "test"},
	"1.3": "test"
}

I expect to have the last one after saving. Did I miss something ?

EDIT:

Same behavior with @inlang/cli when trying to translate. Maybe a thing with an inlang formatter somewhere ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions