How to override some file properties without causing conflict?

Description

Hello,

We are having a minor difficulty with maintaining configuration files between your source code and ours. A couple examples below.
*
server/docker/zanata-config.cli*
Specifies sender address as no-reply@zanata.org. We need to change this something else, however we don't really want to touch the source file for this. How about a convention like zanata-config.sample.cli in the GIT repo, and then we can rename it to zanata-config.cli in our local environments? We would commit only zanata-config.sample.cli and .gitignore zanata-config.cli.

Or is there another way to accomplish this?

server/zanata-war/src/main/resources/messages.properties
This may be because we are not familiar with the localization flow of this application. Is there way to override, for example, `jsf.Zanata` string, without changing this file?

What we are aiming is that we want to keep the changes as away from Zanata's original source code. We would like to keep as much original code as possible, which would make it easier to pull from and push to upstream.

Any ideas?

Thanks,
Haiwei @ MotaWord

Environment

Docker, Java

Activity

Show:

Oytun Tez 30 November 2016 at 18:24

Hi team,

Can we close this one? I don't want to clutter your issue list 🙂

haiwei.su@motaword.com 22 November 2016 at 15:13

Hey guys,

Thank you so much for help. Everything makes sense now.

Thanks,
Haiwei

On Mon, Nov 21, 2016 at 7:20 PM, Sean Flanigan (JIRA) <

Sean Flanigan 22 November 2016 at 00:20

Hi

This really ought to be two issues.

Please note that the docker scripts in the source tree are intended for Zanata development only. We may change them or break them at any time.

We do have images published on Docker Hub - https://hub.docker.com/r/zanata/server/, but Docker is not a tested deployment mode for Zanata yet.

If you want to rebrand Zanata, you might be able to do something with a branch in git, which just holds the branding changes, where you merge in both master and the branding branch when building.

Anything more sophisticated would definitely deserve its own issue. We would be open to merging a pull request with a good approach to solving this problem[1], but I don't think we will have time to develop it ourselves any time soon.

[1] Perhaps splitting out all branding-related strings into separate resource bundles which can be overridden by dropping in a different branding jar?

Former user 21 November 2016 at 23:51

sender email address in the cli file is for the default value. You can override the actual value once you have your instance up and running. Sign in as an admin user. Go to admin -> server configuration -> change the value there and then save.

re: messages.properties
I think the only way will be to change that file. If you use maven (you probably are as Zanata is built by maven), you can use maven-war-plugin with its overlay feature. So you will keep zanata as is, but in your own module (e.g. motaword-module), you depend on zanata-war and then use overlay to override that messages.properties file and replace the jsf.Zanata string to something else. You can keep this module in your private repo only. So no need to change Zanata code at all.

Not a Bug

Details

Assignee

Reporter

Tested Version/s

Affects versions

Priority

More fields

Created 21 November 2016 at 20:42
Updated 1 December 2016 at 00:13
Resolved 1 December 2016 at 00:13

Flag notifications