update Spanish content (#2203)

* update spanish content

- closes #2154

* fix download links

- add how to use communites document in Spanish

* add language toggle on mobile

- update snapshots

* add instruction and memo in spanish

* add translations

* update tutorial links

* update links to es

* remove npm audit

* add survey links to "how you can help"

* change case back to lower case
This commit is contained in:
Vim 2023-06-27 09:42:39 -07:00 committed by GitHub
commit 856e5084db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 3915 additions and 434 deletions

View file

@ -872,7 +872,7 @@ const AreaDetail = ({properties}: IAreaDetailProps) => {
{/* Send Feedback button */}
<a
className={styles.sendFeedbackLink}
href={`https://www.surveymonkey.com/r/6GKVCMF?tractid=${blockGroup}`}
href={intl.locale === `es` ? `https://www.surveymonkey.com/r/ZHP6VZZ?tractid=${blockGroup}` : `https://www.surveymonkey.com/r/6GKVCMF?tractid=${blockGroup}`}
target={"_blank"}
rel="noreferrer"
>

View file

@ -35,7 +35,7 @@ const DatasetContainer = () => {
<Grid desktop={{col: 1}}>
</Grid>
<Grid desktop={{col: 4}}>
<DatasetsButton href= {'https://www.surveymonkey.com/r/6G9TQJ8'}/>
<DatasetsButton href= {intl.locale === 'es' ? 'https://www.surveymonkey.com/r/ZPKY8G9' : 'https://www.surveymonkey.com/r/6G9TQJ8'} />
</Grid>
</Grid>

View file

@ -6,7 +6,7 @@
};
@mixin downloadButtonBase {
height: 40px;
height: fit-content;
@include u-margin-top(3);
.buttonContainer {

View file

@ -2,7 +2,7 @@ import React from 'react';
import {GovBanner} from '@trussworks/react-uswds';
import {useIntl} from 'gatsby-plugin-intl';
// import Language from '../Language';
import Language from '../Language';
import * as styles from './GovernmentBanner.module.scss';
@ -14,8 +14,7 @@ const GovernmentBanner = () => {
<div className={styles.bannerContainer}>
<GovBanner language={intl.locale === 'es' ? 'spanish' : 'english'}/>
{/* Temporarily removing while language is translated */}
{/* <Language isDesktop={true}/> */}
<Language isDesktop={true}/>
</div>
</div>

View file

@ -135,6 +135,24 @@ exports[`rendering of the GovernmentBanner checks if component renders 1`] = `
</div>
</div>
</section>
<div>
<img
alt="language icon for selecting language"
src="test-file-stub"
/>
<a
class="usa-link"
href="#"
>
English
</a>
<a
class="usa-link"
href="#"
>
Español
</a>
</div>
</div>
</div>
</DocumentFragment>

View file

@ -14,6 +14,7 @@ import SurveyButton from '../SurveyButton';
// @ts-ignore
import whitehouseIcon from '../../images/eop-seal.svg';
import * as COMMON_COPY from '../../data/copy/common';
import {GITHUB_LINK, GITHUB_LINK_ES} from '../../../src/data/copy/about';
const J40Footer = () => {
const intl = useIntl();
@ -82,7 +83,7 @@ const J40Footer = () => {
<LinkTypeWrapper
linkText={intl.formatMessage(COMMON_COPY.FOOTER.GITHUB_LINK_TEXT)}
internal={false}
url={intl.formatMessage(COMMON_COPY.FOOTER.GITHUB_LINK)}
url={intl.locale === 'es' ? GITHUB_LINK_ES : GITHUB_LINK}
openUrlNewTab={true}
className={'footer-link-first-child'}
key={'contactlink'}

View file

@ -12,7 +12,7 @@ import {
import BetaBanner from '../BetaBanner';
import J40MainGridContainer from '../J40MainGridContainer';
import GovernmentBanner from '../GovernmentBanner';
// import Language from '../Language';
import Language from '../Language';
import {useWindowSize} from 'react-use';
// @ts-ignore
@ -237,10 +237,9 @@ const J40Header = ({location}:IJ40Header) => {
data-cy={'nav-link-contact'}>
{intl.formatMessage(COMMON_COPY.HEADER.CONTACT)}
</Link>,
// Temporarily removing language link until translation is completed
// <div key={'language'}>
// <Language isDesktop={false}/>
// </div>,
<div key={'language'}>
<Language isDesktop={false}/>
</div>,
];
return (

View file

@ -140,6 +140,24 @@ exports[`rendering of the J40Header checks if component renders 1`] = `
</div>
</div>
</section>
<div>
<img
alt="language icon for selecting language"
src="test-file-stub"
/>
<a
class="usa-link"
href="#"
>
English
</a>
<a
class="usa-link"
href="#"
>
Español
</a>
</div>
</div>
</div>
<div>
@ -337,6 +355,30 @@ exports[`rendering of the J40Header checks if component renders 1`] = `
Contact
</a>
</li>
<li
class="usa-nav__primary-item"
>
<div>
<div>
<img
alt="language icon for selecting language"
src="test-file-stub"
/>
<a
class="usa-link"
href="#"
>
English
</a>
<a
class="usa-link"
href="#"
>
Español
</a>
</div>
</div>
</li>
</ul>
</nav>
</div>

View file

@ -11,7 +11,9 @@ import launchIcon from '/node_modules/uswds/dist/img/usa-icons/launch.svg';
const SurveyButton = () => {
const intl = useIntl();
const href = intl.formatMessage(CONTACT_COPY.PAGE_INTRO.SURVEY_URL);
const href = intl.locale === 'es' ?
`https://www.surveymonkey.com/r/ZH36CYV` :
`https://www.surveymonkey.com/r/P3LWTSB`;
return (
<J40MainGridContainer className={styles.surveyButtonContainer}>