Translations

Translations

N2ACD-FE supports translating terms and phrases within the user interface of the application. Default translations are provided as part of the application however these can be overridden by creating unique branding configuration for a N2ACD FE deployment, and then providing translation files for this branding.

To deploy a custom translation for N2ACD-FE, the following steps must be taken:

  1. Create one or more translation JSON files.
  2. Configure the application to utilize the custom translation files.

Custom Translation

N2ACD-FE is a web application, built on standard web technologies including CSS, HTML and JavaScript. Translation in N2ACD FE primarily relies on applying a translation mapping file to the user interface, overriding the defaults.

A custom translation template can be found on the server hosting the FE interface at:

/usr/share/n2acd/floweditor-gui/gui/htdocs/i18n/en-gb.json

This may be used a starting point to adjust the user interface style. The left side of each key value pair represents the text or default value that is being replaced. The right side of the pair represents the value that is replacing the default value.

Web Server Configuration

Apache is configured on installation to serve all default translation files from http://host/n2acd-fe/i18n/, and this maps to the /usr/share/n2acd-fe/htdocs/i18n directory. Only an English translation file (en-gb.json) is currently used.

Each host’s branding configuration may contain its own translation file so they may be edited independently of one another.

N2ACD FE Service Configuration

Currently N2ACD FE only supports a single localisation file per configured host branding. Any changes that need to be made should be made to the en-gb.json file located in the relevant branding sub directory.

Translation variables

For various translation keys, variables are available for better context based text. Here is a list of all keys that have variables available:

Key Available Variables
views.customer_details.sections.alternative_termination_matches matchedAlternativeTerminationNumbers - The number of alternative termination numbers matching the current filter.
totalAlternativeTerminationNumbers - The total number of all alternative termination numbers assigned to a customer.
views customer_details.sections.all_alternative_termination_numbers totalAlternativeTerminationNumbers - The total number of all alternative termination numbers assigned to a customer.
views.customer_details.sections.service_numbers.results_table.flow_column flow_name - The name of the flow scheduled against the current service number.
flow_version - The version of the flow scheduled against the current service number.
views.customer_details.sections.service_numbers.results_table.flow_override_active flow_name - The name of the flow that is currently overriding a service number schedule.
views.customer_details.sections.service_numbers.profile_title serviceNumber - The current service number.
views.customer_details.sections.flows.no_matching_flows searchTerm - The current search term used to filter flows.
views.customer_details.common.search_matches totalMatched - The total number of entries that match the current filter.
views.customer_details.common.showing_all totalResults - The total number of entries.
views.flow_editor.save_errors.duplicate_name flowName - The name of the flow that already exists.
views.reports.generate_report_title reportName - The name of the current report.
modals.flow_schedule.schedule_flow flowName - The name of the flow being scheduled
modals.flow_schedule.reschedule_flow flowName - The name of the flow being rescheduled.
flowVersion - The version of the flow being rescheduled.
modals.flow_schedule.scheduled_flow_for_service_number serviceNumber - The service number to schedule a flow against.
modals.flow_schedule.flow_version_option flowVersionNumber - The current version of the flow.
latestVersion - A boolean value indicating whether the current flow version is the latest flow version.
modals.flow_deletion.delete_flow flowName - The name of the flow being deleted.
modals.flow_deletion.all_flow_versions_scheduled flowName - The name of the flow attempting to be deleted.
modals.flow_deletion.deletion_result_flow_version flowVersion - The version of the flow that has been deleted.
modals.flow_external_id.update_external_id flowName - The name of the flow that is having it’s external ID updated.
modals.flow_error_loading.message flowName - The name of the flow that failed to load.
flowVersion - The version of the flow that failed to load.
modals.load_flow_version.no_versions flowName - The name of the flow that has no versions.
modals.service_number_deletion.delete_service_number serviceNumber - The service number being deleted.
modals.service_number_deletion.deletion_confirmation serviceNumber - The service number being deleted.
modals.add_alternative_termination_number.update_title source - The source value for the alternative termination number being updated
modals.add_alternative_termination_number.delete_title source - The source value for the alternative termination number being deleted
modals.add_alternative_termination_number.are_you_sure destination - The destination value for the alternative termination number being deleted.
source - The source value for the alternative termination number being deleted.

Interpolation

To add available variables to the translation, surround the variable with curly brackets. {{ example_variable }}.