How to make Crowdin put the right name for Enum Class

Hello ! So My languages files are in this structure:

enum English {
	NOT_FOUND = "Not Found",
}
export default English;

I would like translations to french be like this:

enum French {
	NOT_FOUND = "Aucun message trouvé pour la clé: {0}",,
}
export default French;

But what I get is this:

enum English {
	NOT_FOUND = "Aucun message trouvé pour la clé: {0}",,
}
export default English;

The problem is when translating, instead of having the correct enum name, they are all called “English”. Is there any way to tell crowdin to put the name of the language there? Or atleast be able to translate that aswell? Thanks!

Specific files. What’s the type? Did you use some segmenation? Like Srx rules?

It is Typescript files (so I assume I dont have segmentation)

Hello @JustSxm

Crowdin is going to release a post-export processor module for our apps, it should be possible to do the replacement in your code directly in Crowdin soon. The feature I’ve mentioned is currently being tested and the ETA is about a month.

The only thing I can think of is to use sed to replace “English” with the language name of the locale for each resource. You should do this after downloading files from Crowdin.

If you are using Github integration or a Github action, you can also do the replacement during build time.

1 Like