gilmarsquinelato/i18n-manager

sort the result in json like babeledit

tlightsky opened this issue · 9 comments

sort the result in json like babeledit instead of add to end of file

https://www.codeandweb.com/babeledit

what version are you using of the app?

it's 1.0.0 i think,
i use released exe version on windows

try to update to the latest version please

ok, just tried development branch,
still add new item to the end of the json file,
it won't sort the json file keys

i changed it locally and it works fine,
made a pr for it

Merged!

@tlightsky one thing that I thought here, your PR won't do the same for nested keys only for flat objects.
This is a problem because we'll have different behaviour depending on the nesting level of the object.
Another thing is that there was an issue in the past asking for respecting the object order because is not everyone that wants the keys alphabetically sorted, some of them have grouped sorting.

The old issue is #211.
So I don't think that this improvement would result in a thing that everyone likes.

it won't sort nested keys,
if we want to support that,
need to find another way,
i only have flat keys though.

yeah, that's a point,
so we should put it into some config file?

Personally I don't know if sorting the keys should be the responsibility of the app.
Because this is a personal thing for each project and developer.
As far as I understood, we have 2 sorting ways, alphabetically sorted and grouped sorted, that they group in chunks and in that chunks they sort for proximity or something else.