tolgee-platform icon indicating copy to clipboard operation
tolgee-platform copied to clipboard

Add configuration for import/export file naming

Open AAS97 opened this issue 1 year ago • 4 comments

Coming from i18next, I'm missing the option to configure the path schema to load/export files. As a default, the path structure is currently {{namespace}}/{{locale}} which does not match my current config (and next-i18next default) {{locale}}/{{namespace}}.

Am I missing a configuration option or is it currently not an option in Tolgee (either platform or CLI)?

AAS97 avatar May 05 '23 09:05 AAS97

Hmm, I guess we should add this to the CLI. What do you think @cyyynthia ?

stepan662 avatar May 05 '23 09:05 stepan662

Right now the CLI purely dumps the zip file it gets from Tolgee and expects the file to already be correctly formatted. That being said, I've seen in many places float the suggestion to let people write transformers to convert the file received from Tolgee to an arbitrary format (e.g. .properties, .toml, ...)

Since this will add a processing step on the files anyway, I think a flag could be added to the CLI to "invert" the way files are named (--use-namespace-as-filename? seems a bit long but I don't have any better yet 😅).

One note though, this means manual exports from the project's dashboard could not be formatted this way. As the backend still supports things like xliff, I do wonder if it wouldn't be a good idea to make the backend do this job, and have the CLI help when it comes to arbitrary formats not supported by Tolgee itself 🤔

Or, we could consider the CLI now responsible of the files presentation (and maybe also move xliff support to the CLI, simplifying the backend logic?)

cyyynthia avatar May 08 '23 13:05 cyyynthia

I guess you are right @cyyynthia it will be better to do this on the BE.

stepan662 avatar May 25 '23 14:05 stepan662

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jun 25 '23 02:06 github-actions[bot]