The file textAssets.js
contains all the text assets for each language of the chosen model (Including but not limited to - the text inside buttons, titles, etc).
Each model has its own languages. To add or remove a language, to change the text of a button or title - you must modify this file - textAssets.js
.
Pay Attention!
Modifying this file is mandatory. This file being fully updated is a must for the web component to run at all.
How to find the languages available for a model?
Go to any browser of your choice (can also use the commandline with the command ‘curl’) and type - [serverDomain]/apiInterviewCtrl/${modelId}/start/
. Replace the ${modelId} with the Model Id you found before. This shall give you a list of all the possible languages for this specific model. [serverDomain]
is https://policymodelsserver.azurewebsites.net/
.
After finding the languages of the model …
In order to add a Language you must write the following -
TextAssets.set(${languageName}, ${languageObject});
A language object looks like this (this is an example for English)-
{
welcome: "Welcome",
start_interview: "Start Interview",
start: "Start",
show_transcript: "Show Transcript",
hide_transcript: "Hide Transcript",
question: "Question",
your_answer: "Your answer",
revisit: "Revisit this question",
show_conclusion: "Show Conclusion",
home: "Home",
welcome: "Welcome to the PolicyModels test site!",
result: "Your results",
conclusion_page: "Conclusion Page",
press_conclusions: "Press the \"show conclusion\" button to see the conclusion of your interview",
download_transcript: "Download Transcript",
write_feedback: "Write feedback",
submit_feedback: "submit feedback",
show_tags: "Show Current Tags (intermediate result)",
hide_tags: "Hide Current Tags (intermediate result)",
my_feedback_is: "My Feedback is:",
my_name_is: "My name is:",
download_conclusions: "Download Conclusions",
enter_answer: "Enter your answer here",
write_comment: "Add personal comment",
hide_comment: "Hide comment",
my_comment_is: "my comment is:"
}
You can find a more in-depth explanation of what each attribute is down below.
Note - every attribute is important and mandatory. Skipping an attribute will result in the WC crashing.
Pay Attention, the first language that is added to the map TextAssets is the default language. That means it’s the language of the interview when it starts. In addition, the conclusions at the end of the interview will be downloaded in this language.
The attributes are:
-
1 - languages - describes the content of the options in the languages menu.
-
2 - welcome^^ - describes the content of the title on the welcome page
-
3 - start_interview - describes the content of the button
-
4 - start - describes the content of the button
-
5 - enter_answer^^ - describes the content of the placeholder of the input
-
6 - show_transcript - describes the content of the button
-
7 - hide_transcript - describes the content of the button
-
8 - question - describes the content in the transcript
-
9 - your_answer - describes the content in the transcript
-
10 - revisit - describes the content of the button
-
11 - show_conclusion - describes the content of the button
-
12 - home - describes the content of the button
-
13 - welcome_PM^ - describes the content of the title
-
14 - results - describes the content on the conclusion page
-
15 - conclusion_page - describes the content of the title on the conclusion page
-
16 - press_conclusions - describes the content that appears after the last question
-
17 - download_transcript - describes the content of the button
-
18 - download_conclusions - describes the content of the button
-
19 - write_feedback - describes the content of the button
-
20 - submit_feedback - describes the content of the button
-
21 - show_tags - describes the content of the button
-
22 - hide_tags - describes the content of the button
-
23 - my_feedback_is - describes the content of the placeholder of the input
-
24 - my_name_is - describes the content of the placeholder of the input
-
25 - write_comment - describes the content of the button
-
26 - submit_comment - describes the content of the button
-
27 - my_comment_is - describes the content of the placeholder of the input
-
28 - rejection - describes the content of the title on the rejection page
-
29 - rejection_advice - describes the content on the rejection page
Attached below are photos of the course of the interview. In each image, the attribute is surrounded by its number.
Note - Some attributes appear in only one web component.
^only relevant for default WC
^^only relevant for Chat WC