Skip to content

Commit

Permalink
fix: moved localize to data file
Browse files Browse the repository at this point in the history
  • Loading branch information
meenakshi-deriv committed Jun 25, 2024
1 parent 3aece32 commit ee8945b
Show file tree
Hide file tree
Showing 16 changed files with 229 additions and 227 deletions.
106 changes: 50 additions & 56 deletions scripts/js_texts/extracted_strings_app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/ach.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/de.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/fr.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/id.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/it.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/pl.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/pt.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/ru.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/th.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/vi.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/zh_cn.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/javascript/_autogenerated/zh_tw.js

Large diffs are not rendered by default.

274 changes: 138 additions & 136 deletions src/javascript/app/pages/bottom/explanation_data.js

Large diffs are not rendered by default.

50 changes: 28 additions & 22 deletions src/javascript/app/pages/bottom/tabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,14 @@ const Explanation = () => {
<div className='tab-explanation'>
{/* ========== Winning ========== */}
<div id='explanation_winning'>

<h3>{parse(localize('Winning the contract'))}</h3>
{contractExplanationData.winning[form_name] &&
contractExplanationData.winning[form_name].content?.map((data, idx) => (
<p key={idx}>{parse(localize(data))}</p>
<div id={`winning_${form_name}`}>
<h3>{localize('Winning the contract')}</h3>
{contractExplanationData.winning[form_name].content.map((data, idx) => (
<p key={idx}>{parse(data)}</p>
))}


</div>

</div>

{/* ========== Image ========== */}
Expand All @@ -108,27 +109,32 @@ const Explanation = () => {

{/* ========== Explain ========== */}
<div id='explanation_explain' className='gr-child'>

<h3>{localize(contractExplanationData.explain[form_name].title)}</h3>
{contractExplanationData.explain[form_name].content.map((data, idx) => (
<p key={idx}>{parse(localize(data))}</p>
))}
{contractExplanationData.explain[form_name].title_secondary &&
<h3 className='secondary-title'>{localize(contractExplanationData.explain[form_name].title_secondary)}</h3>}
{contractExplanationData.explain[form_name].content_secondary &&

<div id={`explain_${form_name}`}>
<h3>{(contractExplanationData.explain[form_name].title)}</h3>
{contractExplanationData.explain[form_name].content.map((data, idx) => (
<p key={idx}>{parse(data)}</p>
))}
{contractExplanationData.explain[form_name].title_secondary &&
<h3 className='secondary-title'>{(contractExplanationData.explain[form_name].title_secondary)}</h3>}
{contractExplanationData.explain[form_name].content_secondary &&
contractExplanationData.explain[form_name].content_secondary.map((data, idx) => (
<p key={idx}>{parse(localize(data))}</p>
<p key={idx}>{parse(data)}</p>
))}


</div>

</div>

{/* ========== Note ========== */}

<p className='hint'><strong>{localize('Note')}: </strong>{contractExplanationData.note[form_name].content.map((data, idx) => (
<span key={idx}>{parse(localize(data))}</span>
))}

</p>
{contractExplanationData.note[form_name] && (
<p className='hint'><strong>{localize('Note')}: </strong>{contractExplanationData.note[form_name].content.map((data, idx) => (
<span key={idx}>{parse((data))}</span>
))}

</p>
)}

</div>

);
Expand Down

0 comments on commit ee8945b

Please sign in to comment.