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 Html from "react-pdf-html";
|
||||||
|
|
||||||
import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
|
import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
|
||||||
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
|
|
||||||
export const AppealRow_pdf = (props) => {
|
export const AppealRow_pdf = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -324,7 +325,9 @@ export const AppealRow_pdf = (props) => {
|
|||||||
: fieldCopy;
|
: fieldCopy;
|
||||||
|
|
||||||
const transData = require(
|
const transData = require(
|
||||||
"../../locales/en/" +
|
"../../locales/" +
|
||||||
|
locale +
|
||||||
|
"/" +
|
||||||
(typeof fieldCopy != "undefined"
|
(typeof fieldCopy != "undefined"
|
||||||
? fieldCopy.split(":")[0]
|
? fieldCopy.split(":")[0]
|
||||||
: "common") +
|
: "common") +
|
||||||
@@ -432,13 +435,32 @@ export const AppealRow_pdf = (props) => {
|
|||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.questionAnswer}>
|
<Text style={styles.questionAnswer}>
|
||||||
{getPickListLabel(
|
{locale == "cy"
|
||||||
props.pickListData,
|
? jsonpath({
|
||||||
datafieldname[0].value,
|
path:
|
||||||
props.props[
|
'$..[?(@ && @.value=="' +
|
||||||
datafieldname[0].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>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
@@ -687,8 +709,12 @@ export const AppealRow_pdf = (props) => {
|
|||||||
{props.props[
|
{props.props[
|
||||||
datafieldname[0].value
|
datafieldname[0].value
|
||||||
] == "true"
|
] == "true"
|
||||||
? "Yes"
|
? locale == "cy"
|
||||||
: "No"}
|
? "Ydw"
|
||||||
|
: "Yes"
|
||||||
|
: locale == "cy"
|
||||||
|
? "Na"
|
||||||
|
: "No"}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import { AppealRow_pdf } from "./appealRow_pdf";
|
|||||||
|
|
||||||
import transLookupCY from "../../locales/cy/newappeal.json";
|
import transLookupCY from "../../locales/cy/newappeal.json";
|
||||||
import transLookupEN from "../../locales/en/newappeal.json";
|
import transLookupEN from "../../locales/en/newappeal.json";
|
||||||
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
||||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
|
|
||||||
@@ -365,8 +366,12 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
|||||||
{values.caseObj
|
{values.caseObj
|
||||||
.pinswg_appellantagent ==
|
.pinswg_appellantagent ==
|
||||||
"846040000"
|
"846040000"
|
||||||
? "Appellant"
|
? locale == "cy"
|
||||||
: "Agent"}
|
? "Apelydd"
|
||||||
|
: "Appellant"
|
||||||
|
: locale == "cy"
|
||||||
|
? "Asiant"
|
||||||
|
: "Agent"}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View
|
<View
|
||||||
@@ -469,8 +474,12 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
|||||||
{values.caseObj
|
{values.caseObj
|
||||||
.pinswg_languagepreference ==
|
.pinswg_languagepreference ==
|
||||||
"846040000"
|
"846040000"
|
||||||
? "English"
|
? locale == "cy"
|
||||||
: "Welsh"}
|
? "Saesneg"
|
||||||
|
: "English"
|
||||||
|
: locale == "cy"
|
||||||
|
? "Cymraeg"
|
||||||
|
: "Welsh"}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
{values.caseObj.pinswg_appellantagent !=
|
{values.caseObj.pinswg_appellantagent !=
|
||||||
@@ -633,8 +642,12 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
|||||||
{values.caseObj
|
{values.caseObj
|
||||||
.pinswg_agentlanguagepreference ==
|
.pinswg_agentlanguagepreference ==
|
||||||
"846040000"
|
"846040000"
|
||||||
? "English"
|
? locale == "cy"
|
||||||
: "Welsh"}
|
? "Saesneg"
|
||||||
|
: "English"
|
||||||
|
: locale == "cy"
|
||||||
|
? "Cymraeg"
|
||||||
|
: "Welsh"}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</>
|
</>
|
||||||
@@ -653,10 +666,22 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
|||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.questionAnswer}>
|
<Text style={styles.questionAnswer}>
|
||||||
{values.caseObj.pinswg_lpaname ||
|
{/* {values.caseObj.pinswg_lpaname ||
|
||||||
values.caseObj[
|
values.caseObj[
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
"_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>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
{/* <View
|
{/* <View
|
||||||
|
|||||||
@@ -909,5 +909,15 @@
|
|||||||
"value": "Final comments",
|
"value": "Final comments",
|
||||||
"value_cy": "Sylwadau terfynol"
|
"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