Plugin UI settings is a part of the plugin (configuration) which controls how the plugin works, including the function names, naming structure, where source/sink files will be detected/scanned, etc.
All the profile settings are saved to and read from the project root in i18nally.json
file, which can be re-used
across projects (if necessary) and manually edited.
The plugin UI settings can be accessed by first opening the settings window via Ctrl + Alt + s
(Cmd + Option + s
in MacOS) or opening the menu File | "Settings..."
and navigating to
i18n Ally | Project settings
.
Next step is to click the +
icon to create a profile, choose either "Configure manually"
or
"Configure from composer"
.
For manual configuration you will need to manually configure the sink and source settings, but using the composer option (limited to Symfony), a profile is generated automatically created along with a scope.
Profiles can be created and modified in 2 ways:
i18nally.json
fileProfiles can be created either manually or choosing the autoconfiguration via composed option.
If the “Plug and play configuration” feature has not already created profiles automatically, there should not be any profiles and the settings will look like this
Manual configuration
Add a new entry manually and configure the sink
The last step is to configure the source, choose the appropriate source
It is now possible to save and create the configuration file
To ensure that there are minimal false positives and negatives, it is recommended to perform further configuration.
For example:
Configuration via composer
Note: Only Symfony framework v2.x-5.x projects amd bundles can be autoconfigured at the moment.
Choose “Configure from composer”, the plugin will automatically look for a compose.lock
file in the project folder and
prefill the input field
compose.json
or compose.lock
.By clicking "OK"
a new profile and/or scope will be created based on the compose
file.
The settings for sink are explained in this page.
For now there are 4 supported sources (Vue/JS coming soon)
Add another source either by clicking the Cog icon | "Duplicate"
or by clicking "Add new source"
.
For such profile, only one sink file will be used for multiple sources.
By clicking the "Reset"
text on the top right (which shows up after making changes), the profile settings will, be
reset to the state before pressing "Apply"
.
Under "Sources"
section, far right of the source name, click the cog icon to either "Duplicate"
or "Remove"
the source.
i18nally.json
After creating profile, to edit an existing profile or add new profiles:
Now you can edit its values, but to create a new profile
By visiting the plugin UI settings, there should be a new entry if done correctly.