Merged PR 2387: update welsh translations for new appeal pdf
update welsh translations for new appeal pdf Related work items: #23562
This commit is contained in:
@@ -13,6 +13,7 @@ import { StyleSheet, Text, View, Font } from "@react-pdf/renderer";
|
||||
import Html from "react-pdf-html";
|
||||
|
||||
import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
|
||||
export const AppealRow_pdf = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -324,7 +325,9 @@ export const AppealRow_pdf = (props) => {
|
||||
: fieldCopy;
|
||||
|
||||
const transData = require(
|
||||
"../../locales/en/" +
|
||||
"../../locales/" +
|
||||
locale +
|
||||
"/" +
|
||||
(typeof fieldCopy != "undefined"
|
||||
? fieldCopy.split(":")[0]
|
||||
: "common") +
|
||||
@@ -432,13 +435,32 @@ export const AppealRow_pdf = (props) => {
|
||||
)}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{getPickListLabel(
|
||||
props.pickListData,
|
||||
datafieldname[0].value,
|
||||
props.props[
|
||||
datafieldname[0].value
|
||||
]
|
||||
)}
|
||||
{locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
getPickListLabel(
|
||||
props.pickListData,
|
||||
datafieldname[0]
|
||||
.value,
|
||||
props.props[
|
||||
datafieldname[0]
|
||||
.value
|
||||
]
|
||||
) +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: getPickListLabel(
|
||||
props.pickListData,
|
||||
datafieldname[0]
|
||||
.value,
|
||||
props.props[
|
||||
datafieldname[0]
|
||||
.value
|
||||
]
|
||||
)}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
@@ -687,8 +709,12 @@ export const AppealRow_pdf = (props) => {
|
||||
{props.props[
|
||||
datafieldname[0].value
|
||||
] == "true"
|
||||
? "Yes"
|
||||
: "No"}
|
||||
? locale == "cy"
|
||||
? "Ydw"
|
||||
: "Yes"
|
||||
: locale == "cy"
|
||||
? "Na"
|
||||
: "No"}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -19,6 +19,7 @@ import { AppealRow_pdf } from "./appealRow_pdf";
|
||||
|
||||
import transLookupCY from "../../locales/cy/newappeal.json";
|
||||
import transLookupEN from "../../locales/en/newappeal.json";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
|
||||
@@ -365,8 +366,12 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
||||
{values.caseObj
|
||||
.pinswg_appellantagent ==
|
||||
"846040000"
|
||||
? "Appellant"
|
||||
: "Agent"}
|
||||
? locale == "cy"
|
||||
? "Apelydd"
|
||||
: "Appellant"
|
||||
: locale == "cy"
|
||||
? "Asiant"
|
||||
: "Agent"}
|
||||
</Text>
|
||||
</View>
|
||||
<View
|
||||
@@ -469,8 +474,12 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
||||
{values.caseObj
|
||||
.pinswg_languagepreference ==
|
||||
"846040000"
|
||||
? "English"
|
||||
: "Welsh"}
|
||||
? locale == "cy"
|
||||
? "Saesneg"
|
||||
: "English"
|
||||
: locale == "cy"
|
||||
? "Cymraeg"
|
||||
: "Welsh"}
|
||||
</Text>
|
||||
</View>
|
||||
{values.caseObj.pinswg_appellantagent !=
|
||||
@@ -633,8 +642,12 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
||||
{values.caseObj
|
||||
.pinswg_agentlanguagepreference ==
|
||||
"846040000"
|
||||
? "English"
|
||||
: "Welsh"}
|
||||
? locale == "cy"
|
||||
? "Saesneg"
|
||||
: "English"
|
||||
: locale == "cy"
|
||||
? "Cymraeg"
|
||||
: "Welsh"}
|
||||
</Text>
|
||||
</View>
|
||||
</>
|
||||
@@ -653,10 +666,22 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
||||
)}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{values.caseObj.pinswg_lpaname ||
|
||||
{/* {values.caseObj.pinswg_lpaname ||
|
||||
values.caseObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
]}
|
||||
]} */}
|
||||
|
||||
{locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
values.caseObj
|
||||
.pinswg_lpaname +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: values.caseObj.pinswg_lpaname}
|
||||
</Text>
|
||||
</View>
|
||||
{/* <View
|
||||
|
||||
@@ -909,5 +909,15 @@
|
||||
"value": "Final comments",
|
||||
"value_cy": "Sylwadau terfynol"
|
||||
}
|
||||
],
|
||||
"pinswg_caseworkreason": [
|
||||
{
|
||||
"value": "Failed to give notice of its decision within the appropriate period (Usually 8 weeks) on an application for permission or approval",
|
||||
"value_cy": "Wedi methu â rhoi hysbysiad o’i benderfyniad o fewn y cyfnod priodol (8 wythnos fel arfer) ar gais am ganiatâd neu gymeradwyaeth"
|
||||
},
|
||||
{
|
||||
"value": "Refused planning permission for the development",
|
||||
"value_cy": "Wedi gwrthod caniatâd cynllunio ar gyfer y datblygiad"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user