Text overrides are added to the texts directory within the Git Repository. All resources related to texts will be located under this repository.
While you can override any component's title and description via the Page Builder UI in Aurora Designer, you also have the option to override them by either committing and pushing them directly to the Git Repository from a developer’s side or by using a GraphQL mutation to create or update the text override.
This document outlines the process for creating a text override.
Throughout this documentation, we will use an example to illustrate how to override the text for components added to the Community page (i.e., the community's home page).
Two ways to create or update your Texts
This document outlines two methods for creating or updating text resources: the GraphQL method and the manual method.
When using the GraphQL mutation, the texts will be automatically checked into the default branch of the Git repository designated by the community (for staging sites, this will be the stage-main
branch).
If opting to create text resources manually, you must clone the Git repository and take responsibility for committing and pushing the text files to the appropriate branch of the Git repository in which you are working.
Creating or Updating a Text override via GraphQL
To create or update text overrides via GraphQL, you'll need to make a GraphQL call to execute the createOrUpdateTextOverride mutation. This mutation will create text overrides and check them into the Git repository for you.
Query: mutation createOrUpdateTextOverride
mutation createOrUpdateTextOverride($componentId: String!, $locale: Locale!, $values: JSON!) {
createOrUpdateTextOverride(componentId: $componentId, locale: $locale, values: $values) {
result {
locale
texts
lastUpdatedTime
} errors {
... on CreateOrUpdateTextFailedError {
message
fields
name
}
}
}
}
Variables
{
"componentId": "communityPage",
"locale": "en",
"values": {
"community.pages.communityPage": {
"NodeHeader.title": "Search test five",
"NodeHeader.description": "Description test five",
"NodePageHeaderWidget-title.title": "Header widget"
}
}
}
Creating or Updating Text Override Manually
To create a text override manually, go to the text.en.json file for all texts in English that need overriding.
Note: The text override JSON file is a complete override of the default Quilt and not a partial override. This means that the entire file is overridden and inherits nothing from the default Quilt.
Sample file: text.en.json
{
"community.pages.communityPage": {
"NodeHeader.title": "Search test five",
"NodeHeader.description": "Description test five",
"NodePageHeaderWidget-title.title": "Header widget",
"NodePageHeaderWidget-title.description": "Description header widget"
},
"blogs.pages.blogMessagePage": {
"section.section-1679557004413.description": "Test description",
"section.section-1679557004413.title": "Test title"
},
"community.pages.categoryPage": {
"section.section-1679560625019.title": "test category section",
"section.section-1679560625019.description": "test category description"
},
"forums.pages.forumBoardPage": {
"section.forum-widgets.description": ""
},
"forums.pages.forumMessagePage": {
"section.message-list.description": ""
},
"users.pages.userPage": {
"section.user-message-lists.description": "User Widgets"
},
"components/search/SearchWidget": {
"title.search": "Search test five",
"description.search": "Description test five"
},
"nodes.widget.nodePageHeaderWidget": {
"title.home@instance:nodes.widget.nodePageHeaderWidget-1681836939421": "Welcome to the Community Edited (1)",
"description.home@instance:nodes.widget.nodePageHeaderWidget-1681836939421": "Our community is a collaborative place to learn about our products and ask questions! Check out our most popular conversations!\nVOYAGER",
"title.home@instance:nodes.widget.nodePageHeaderWidget-1682110996364": "Welcome to the Community ... HELLO!",
"description.home@instance:nodes.widget.nodePageHeaderWidget-1682110996364": "Our community is a collaborative place to learn about our products and ask questions! Check out our most popular conversations!"
}
}
Creating/updating/Deleting Text override via Quilt Override
Quilt override supports creating/updating or deleting existing text overrides as well if you provide an optional field. There are addTextOverrides and removeTextOverrides as optional parameters to add, update, and delete texts along with the Quilt overrides.
How to update text keys for different languages
There is a separate text.{locale}.json file for each language (which will be created automatically and pushed to the Git repository if using GraphQL mutation). You need to create these manually when making changes directly in the repository.
Language | Locale |
---|---|
English | text.en.json |
French | text.fr.json |
German | text.de.json |
US | text.en-us.json |
UK | text.en-uk.json |
ATLAS
Comments