ever-traduora icon indicating copy to clipboard operation
ever-traduora copied to clipboard

Namespaces

Open tonxxd opened this issue 4 years ago • 1 comments

Hi, and first of all thanks for this awesome project!

Is your feature request related to a problem? Please describe. Many tools for translations handling use words namespaces to organize and improve performances. For instance, I usually use next-translate while creating a multilanguage next.js website and the tool needs the creation of different files for each namespace (eg. about.json, home.json ...) such that only what's needed is actually loaded.

Describe the solution you'd like Would be nice if we can manage in traduora multiple files/namespaces with the ability to import and export them separately.

Describe alternatives you've considered The only alternative that came up to my mind was to merge the files together adding the namespace to the key (eg. "about:hero-h1": "....") but this requires a pre-import and post export processing which I think could be avoided.

Actually traduora could implement this by just adding the prefix namespace to the key during import (as an additional field in the modal "namespace") and then splitting the export into different files during export with the name of the file corresponding to the namespace and removing it from the key again. Also, the namespace could be displayed as a label on the translations cards.

tonxxd avatar Jul 24 '20 08:07 tonxxd

I think you could achieve this by using the tags/labels functionality. Simply add common labels as your namespaces and you can easily filter for them using the search bar. They won't appear in the exported files as they are not supported by most formats.

anthonynsimon avatar Oct 10 '20 08:10 anthonynsimon