You are reading the documentation for an outdated Corteza release. 2023.9 is the latest stable Corteza release.

Importing Resource Translations

After you have imported the translations, you need to restart the server for the changes to take affect. Translations are kept in-memory of the process running the server. We are looking into improving this in the future releases.

Before importing larger datasets (especially to production), it is advised to make a database backup and to test the configuration locally or on a staging server.

To import resource translations you need to:
  1. Prepare the source files,

  2. run the command.

Source Files

Prepare a directory where all of your source files reside in.

/import:
/import
  /corteza::compose:module.yaml
  /corteza::compose:namespace.yaml
  /resource-translation.yaml

The resource-translation.yaml file contains the resource translations you wish to import, and the other two files,(corteza::compose:module.yaml and corteza::compose:namespace.yaml) contain the definitions for the resources we are applying the translations for.

The current resource-translations importer requires you to provide the definitions for the resources you are applying the translations for. We are looking in improving this in the future releases

Running the Import

Use the import CLI command to import your resource-translations.

The argument to the CLI command needs to be the location of the source files, in our above case this is /import.

By default, the import CLI command skips already existing resources.

You can control the behavior using the following flags:
--merge-left-existing             Update any existing values; existing data takes priority. Default skips.
--merge-right-existing            Update any existing values; new data takes priority. Default skips.
--replace-existing                Replace any existing values. Default skips.
An example of running the CLI command for our case:
corteza-server import /import