Updates intl file with latest copy (#795)

* Extract 404 page copy to intl

* Move all copy to data copy folder and add tests

- Add test:intl-extraction script
- Fix certain defaultMessages not appearing
- update snapshot
This commit is contained in:
Vim 2021-10-14 13:49:16 -07:00 committed by GitHub
commit d1511287b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 199 additions and 140 deletions

View file

@ -0,0 +1,34 @@
import {defineMessages} from 'react-intl';
export const PAGE = defineMessages({
TITLE: {
id: 'pageNotFound.title.text',
defaultMessage: 'Page not found',
description: 'page not found title text',
},
HEADING: {
id: 'pageNotFound.heading.text',
defaultMessage: 'Page not found',
description: 'page not found heading text',
},
APOLOGY: {
id: 'pageNotFound.apology.text',
defaultMessage: 'Sorry',
description: 'page not found apology text',
},
APOLOGY_INFO: {
id: 'pageNotFound.apology.description.text',
defaultMessage: 'we couldnt find what you were looking for.',
description: 'page not found apology description text',
},
GUIDANCE: {
id: 'pageNotFound.Guidance.text',
defaultMessage: 'Try creating a page in',
description: 'page not found guidance text',
},
LINK_HOME: {
id: 'pageNotFound.link.to.go.home.text',
defaultMessage: 'Go home',
description: 'page not found link to go home text',
},
});

View file

@ -19,6 +19,21 @@ export const PAGE_INTRO = defineMessages({
},
});
export const PAGE_DESCRIPTION = <FormattedMessage
id={'exploreTool.page.description'}
defaultMessage={
`Zoom into the map to see communities of focus that can help Federal agencies
identify disadvantaged communities and to provide socioeconomic,
environmental, and climate information and data. Learn more about the methodology
and datasets that were used to determine these communities of focus on the
{methodologyLink}
page.`}
description={'page description'}
values={{
methodologyLink: <Link to={'/methodology'}>Data & methodology</Link>,
}}
/>;
export const LEGEND = defineMessages({
PRIORITY_LABEL: {
id: 'legend.info.priority.label',
@ -41,6 +56,46 @@ export const MAP = defineMessages({
defaultMessage: 'Zoom in to the state or regional level to see prioritized communities on the map.',
description: 'zoom warning on map',
},
LOWER48_SHORT: {
id: 'map.territoryFocus.lower48.short',
defaultMessage: '48',
description: 'The abbreviated name indicating the bounds of the Lower 48 states',
},
LOWER48_LONG: {
id: 'map.territoryFocus.lower48.long',
defaultMessage: 'Lower 48',
description: 'The longer name indicating the bounds of the Lower 48 states',
},
ALASKA_SHORT: {
id: 'map.territoryFocus.alaska.short',
defaultMessage: 'AK',
description: 'The abbreviated indicating the bounds of Alaska',
},
ALASKA_LONG: {
id: 'map.territoryFocus.alaska.long',
defaultMessage: 'Alaska',
description: 'The full name indicating the bounds of Alaska',
},
HAWAII_SHORT: {
id: 'map.territoryFocus.hawaii.short',
defaultMessage: 'HI',
description: 'The abbreviated name indicating the bounds of Hawaii',
},
HAWAII_LONG: {
id: 'map.territoryFocus.hawaii.long',
defaultMessage: 'Hawaii',
description: 'The longer name indicating the bounds of Hawaii',
},
PR_SHORT: {
id: 'map.territoryFocus.puerto_rico.short',
defaultMessage: 'PR',
description: 'The abbreviated name indicating the bounds of Puerto Rico',
},
PR_LONG: {
id: 'map.territoryFocus.puerto_rico.long',
defaultMessage: 'Puerto Rico',
description: 'The full name indicating the bounds of Puerto Rico',
},
});
// Side Panel copy
@ -310,7 +365,10 @@ export const DOWNLOAD_DRAFT = {
PARAGRAPH_2: <FormattedMessage
id={'download.draft.ptag.2'}
description={'Download the draft list of communities of focus and datasets used.'}
defaultMessage={`ZIP file will contain one .xlsx, one .csv, and one .pdf (${METHODOLOGY_COPY.DOWNLOAD_FILE_SIZE}).`}
defaultMessage={`ZIP file will contain one .xlsx, one .csv, and one .pdf ({downloadFileSize}).`}
values={{
downloadFileSize: METHODOLOGY_COPY.DOWNLOAD_FILE_SIZE,
}}
/>,
};

View file

@ -33,30 +33,39 @@ export const DOWNLOAD_ZIP_URL = [
process.env.GATSBY_SCORE_DOWNLOAD_FILE_PATH,
].join('/');
export const DOWNLOAD_PACKAGE = defineMessages({
TITLE: {
id: 'downloadPacket.header.text',
defaultMessage: `Draft communities list v${VERSION_NUMBER} (${DOWNLOAD_FILE_SIZE})`,
description: 'download packet header text',
},
DESCRIPTION: {
id: 'downloadPacket.info.text',
defaultMessage: `The package includes draft v${VERSION_NUMBER} `+
` of the list of communities of focus (.csv and .xlsx) ` +
` and information about how to use the list (.pdf).`,
description: 'download packet info text',
},
LAST_UPDATED: {
id: 'downloadPacket.info.last.updated',
defaultMessage: `Last updated: ${DOWNLOAD_LAST_UPDATED} `,
description: 'download packet info last updated',
},
BUTTON_TEXT: {
id: 'downloadPacket.button.text',
defaultMessage: 'Download package',
description: 'download packet button text',
},
});
export const DOWNLOAD_PACKAGE = {
TITLE: <FormattedMessage
id={'downloadPacket.header.text'}
defaultMessage={ `Draft communities list v{versionNumber} ({downloadFileSize})`}
description={'download packet header text'}
values= {{
versionNumber: VERSION_NUMBER,
downloadFileSize: DOWNLOAD_FILE_SIZE,
}}
/>,
DESCRIPTION: <FormattedMessage
id={ 'downloadPacket.info.text'}
// eslint-disable-next-line max-len
defaultMessage= {`The package includes draft v{versionNumber} of the list of communities of focus (.csv and .xlsx) and information about how to use the list (.pdf).`}
description= {'download packet info text'}
values= {{
versionNumber: VERSION_NUMBER,
}}
/>,
LAST_UPDATED: <FormattedMessage
id={ 'downloadPacket.info.last.updated'}
defaultMessage= {`Last updated: {downloadLastUpdated} `}
description= {'download packet info last updated'}
values= {{
downloadLastUpdated: DOWNLOAD_LAST_UPDATED,
}}
/>,
BUTTON_TEXT: <FormattedMessage
id={ 'downloadPacket.button.text'}
defaultMessage= {'Download package'}
description= {'download packet button text'}
/>,
};
// Dataset section