ever-co / ever-traduora

Ever® Traduora™ - Open Translation Management Platform - https://traduora.co
https://traduora.co
GNU Affero General Public License v3.0
1.99k stars 201 forks source link

[Feature] Namespace support #172

Open felixmosh opened 4 years ago

felixmosh commented 4 years ago

Is your feature request related to a problem? Please describe. In i18next lib there is a concept of namespaces, this is kind a "group" of translations by domain for the same language.

This means that each language divided into namespaces (which each namespace is a json file).

Describe the solution you'd like Add a new concept of "namespaces" which will allow to upload a file into a specific namespace. It can be a new flag in a project which defines if the project is uses namespaces or not.

Additional context https://www.i18next.com/principles/namespaces

Clearmist commented 9 months ago

Namespaces are basically separate files per language instead of a single file per language.

Traduora will export en_US as en_US.json, but when writing a i18next project we may have main.json, headers.json, and many other files representing different namespaces.

Right now, trying to import more than one file per language overwrites the previously imported language's terms.

Adding support for multiple files is pretty important for those of us using i18next and not wanting to use single huge files per language.

Here's an example of how an i18next project may be laid out. image