Migrate from the Properties Plugin to Resource Bundles
To migrate from the Properties Plugin to Resource Bundles, you can use a Groovy updater script to convert your properties documents to a resource bundle.
-
Create a resource bundle document in a folder of your choice.
-
Add the Groovy script below to the script registry.
-
Set the 'path' parameter to the absolute path of the resource bundle document your created, e.g. /content/documents/myproject/labels/labels.
-
Run the script! You might want to do a dry run first. Make sure you have no conflicting keys.
-
Check your resource bundle document. All properties from all your properties documents should have been added to the resource bundle.
-
You will still need to adapt your code to use the messages from the resource bundle instead of the properties documents.