vordgi / kvco

Edit JSONs faster than ever. Just Run and Edit!
https://k-v.co
Other
4 stars 0 forks source link

feature request: highlight repetitive keys and prevent adding them #57

Closed zakidze closed 3 months ago

zakidze commented 4 months ago

i want a warning or smth on repetitive keys repetitive keys shold be in one place witch is global transation or common file or its one file

eg there is common json and home json and about json

if a key is used in about json and same key is used in home json the app sujjest to move the key to global

sujjest not move on it self only if user wanted to move

zakidze commented 4 months ago

call it a global filter for repitive keys across all project

vordgi commented 4 months ago

The problem is to detect files where inio should check for.

f.e., if Inio runs in the root dir, how can it ensure that it should checks for repetition only in the 'translates' dir, and not in 'node_modules'?

zakidze commented 4 months ago

a user can drag and drop the locales folder i personly runs inio inside the root of locales folder

i sujjest to make a seprate page for the repetitive keys ,

it would be like this

key1 //marketpalce ................................... values in en , values in de ..... ................................... button: transfer to common folder //aboutpage ................................... values in en , values in de ..... ................................... button: transfer to common folder

key2 //homepage ................................... values in en , values in de ..... ................................... button: transfer to common folder //contact page ................................... values in en , values in de ..... ................................... button: transfer to common folder

zakidze commented 4 months ago

also i want if a user wants to add new key , using the dashbaord inio warns him that there alredy a keys same inside and it shows where it located ,

so this check would be for every adding new key

zakidze commented 4 months ago

why not a user points into a DIR inio scans jsons , and highlight for repititieve keys amonge the dir

vordgi commented 4 months ago

Because for example between some/en/header.json and some/de/header.json - repeating keys - that's all. Also with some/else/en/home/meta.json and some/else/de/home/meta.json. And how to understand which of them are planned, and which are not.

I understand that you have a clear and understandable structure, but I am thinking about a universal solution.

zakidze commented 4 months ago

a universal souloution is to label the jsons so inio know what to do with them, why know start with the structured jsons for now , later switch to unstructured

vordgi commented 4 months ago

This isnt universal, companies may have their own rules and reasons for specific naming and structure

zakidze commented 4 months ago

i know its a manuel work to label the jsons but its get the job done+ inio saves this configuration so its once for all

a person will specify the name of jsons in diffrent locales
for example

de/home.json en/about.json

in file structre they are not same name but i can overwrite in inio make a configuration and make them that they have the same keys so inio scans and know what to do

ps : it dosent change the file name in hardrive just we guide inio into the jsons

by label i mean only in inio

a json dictionry only for naming the jsons and their DIR

zakidze commented 4 months ago

i name a namespace named : contact

in en version i specify en/home.json in de versioon i speify de/qsdfmkljsqdf/qsdfsdqf.json

in file system they are just some paths but a manuel work is required so inio knows that the namespace have 2 files in thoes dir ( a GUI is required to help with this) and thats it inio saves it configuration inside the project loccaly and we are done

vordgi commented 4 months ago

Got it, thanks! I will think about this solution

zakidze commented 4 months ago

hope to see it come to life

vordgi commented 3 months ago

Shipped repetitive keys and repetitive values filters 🚀