coralproject / talk

A better commenting experience from Vox Media
https://coralproject.net
Other
1.88k stars 355 forks source link

[QUESTION] Template modifications in production systems #4617

Closed czepan closed 3 months ago

czepan commented 3 months ago

Hello Coral Talk Team and Community,

For our project, it is necessary to customize certain templates, including email and others, and we also need to adjust some incomplete German localizations. I am currently exploring how to effectively use Coral Talk with these modifications, especially when deploying with Docker in a production environment.

Could you provide some guidance or examples on:

How to manage and apply template and localization changes within the Docker environment? Are there any recommended approaches for ensuring that these modifications are maintained across updates or redeployments?

Thank you in advance for your help and advice!

Best regards

EnCz

tessalt commented 3 months ago

If you're maintaining a fork of the project, you can modify the .ftl files to change translations. If you do a search of the codebase for the string you're looking to change, you should be able to find the appropriate file. If the string only exists in english, you'll have to copy that key into the german file. For example, if you wanted to change the text that says "Paste image URL" you would copy the line

comments-postComment-pasteImage = Paste image URL

into the de/stream.ftl file and add the german translation. As for maintaining these across updates, you'll just have to compare your fork to the original and not bring in changes that overwrite your changes, you can use interactive rebase or other git tools to manage more fine-grained updates.