3.0 KiB
Customization
You can modify your own CONSUL to have your custom visual style, but first you'll have to create your own fork from.
We've created an specific structure where you can overwrite and customize the application in a way that will let you keep updating it from CONSUL's main repository, without having conflicts on code merging or risking loosing your customization changes. We try to make CONSUL as vanilla as possible to help other developers onboard the codebase.
Special Folders and Files
In order to customize your CONSUL fork, you'll make use of some custom folders on the following paths:
config/locales/custom/app/assets/images/custom/app/views/custom/app/controllers/custom/app/models/custom/
Also these are the files where you can apply some customization:
app/assets/stylesheets/custom.cssapp/assets/stylesheets/_custom_settings.cssapp/assets/javascripts/custom.jsGemfile_customconfig/application.custom.rb
Translation interface
The aim of this feature is to allow users the introduction of dynamic contents in many languages at the same time. From the administration panel you can activate or deactivate it. If you deactivate this feature (default configuration) users will be able to enter one single translation.
Enable module
To activate this feature you must follow 2 steps:
- Execute the following command
bin/rake settings:create_translation_interface_setting RAILS_ENV=production(This is only required for already existing intallations, for new consul installations this step is not needed). - Accessing as administrator user to the administration panel of your Consul application to the section Configuration > Features and activating the feature called Translation Interface as you can see next:

Use Cases
-
When the translation interface is active: As you can see in the image below translation interface has two selectors, the firt one "Select language" is to switch between enabled languages and the second one "Add language" is to add new languages to the form. Translatable fields appears with a blue background to facilitate users to distinguish between translatable and not translatable fields. Additionally interface provides a link
Remove languageto delete the current language shown at "Select language". If a user accidentally removes a translation he can recover it re-adding it to the form. This feature is visible during creation and edition of translatable resources.
-
When the translation interface is disabled: When this feature is deactivated users will see standard forms without translation interface and without translation highlight.
