gen_lang
gen_lang copied to clipboard
Improvement idea: support object grouping
We've been using this package to manage our texts and really love the plural functions. The only problem I see is organizing your text definition. It's not an issue when you have only a few lines in your JSON file but as the projects gets bigger with more areas and topics in the app, it gets harder to stay organized.
As JSON doesn't allow comments, my idea would be to create objects in the definition itself and have texts in it. For instance:
{
"screenSharing": {
"title": "Screen sharing",
"startError": "Another user is already sharing his screen."
}
}
instead of:
{
"screenSharing_title": "Screen sharing",
"screenSharing_startError": "Another user is already sharing his screen."
}
That would make things so much easier to maintain. Hope this idea gets through!
Interesting. Wanna to know your team to manage the text jsons directly?
For my use case, i use Airtable to manage my texts and share this table to translators. That why i write another library - lang_table to generate different json from airtable
Basically, i will not manage the jsons file directly.
I hear you. I've seen Airtable but to use it on a larger project with multiple devs, I don't want to rely on yet another online service for managing this. Any chance of improving this?