Hi, we want to change two messages in creating account in indico 2.0.
- In Indigo 2.0 at login page, when someone click the “create one here”, following message will appear.
To create a new Indico profile you first need to verify your email address.
Is it possible to add a following sentence just after this?
(or where is the source code containing these message ?)
Free email address is not acceptable.
- When filled up the URL of the application page, following messages will appear (LOCAL_MODERATION = True)
Each account needs to be approved by an administrator.
We will send you an email as soon as your request is approved.
Is it possible to add one statement after this ?
(or Where is the source code containing these message ?)
It may take a business day or two.
Of course it is possible as long as you are working on your instance of Indico The Indico Project is open source thus making changes to the source code are allowed.
You can easily modify the
indico/modules/auth/templates/register.html file if you want to include your custom messages.
While @kolodzie’s advice is correct, I would strongly recommend you to avoid modifying templates unless you absolutely have to make these changes:
- if you edit the installed template inside
/opt/indico/.venv/..., any changese will be lost when you upgrade Indico at some time (and upgrading as soon as possible after a release is important, since it may include security and other bug fixes!)
- if you clone the git repo and maintain your own modified version, you need to take care of building new wheels whenever you want to upgrade. With a
git merge (you should absolutely maintain a git repo if you go for this route, a GitHub fork is probably the best option) getting the latest codebase without losing your changes is rather easy, but it still adds the extra maintenance work of building new wheels and copying them to your server.
- you could use the template customization/override system, but in this particular case there are no blocks you can easily use to replace just these messages. So you would have to copy the whole template and edit it. Changes won’t be lost during an upgrade, but if we change something in this template you would still be using your old version - so you’d actually have to check the git log of the file to see whether there are changes. Not very pleasant either.
So if you really need to do these changes, go for the customization option (#3). Like this you at least won’t need to maintain your own build or risk losing changes during an upgrade.
Just a thought: Maybe we should consider adding an i18n override to the customization system. That way you would just provide a small i18n file mapping the original message to a new one, and avoid having to tamper with templates altogether.
Thank you for your information
Both help us!
Using i18n to replace strings doesn’t seem like a great idea to me