From 0830d227a5d6fe5ce67e39f01d856d80c54ee4e6 Mon Sep 17 00:00:00 2001 From: Curtis ROck Date: Wed, 5 Aug 2020 21:12:15 -0500 Subject: [PATCH] Added translations for public_header text elements --- .../public_layout/components/header.js | 23 +- app/soapbox/locales/ar.json | 43 +++ app/soapbox/locales/ast.json | 43 +++ app/soapbox/locales/bg.json | 43 +++ app/soapbox/locales/bn.json | 43 +++ app/soapbox/locales/br.json | 43 +++ app/soapbox/locales/ca.json | 43 +++ app/soapbox/locales/co.json | 43 +++ app/soapbox/locales/cs.json | 43 +++ app/soapbox/locales/cy.json | 43 +++ app/soapbox/locales/da.json | 43 +++ app/soapbox/locales/de.json | 43 +++ app/soapbox/locales/defaultMessages.json | 253 ++++++++++++++++-- app/soapbox/locales/el.json | 43 +++ app/soapbox/locales/en.json | 43 +++ app/soapbox/locales/eo.json | 43 +++ app/soapbox/locales/es-AR.json | 43 +++ app/soapbox/locales/es.json | 43 +++ app/soapbox/locales/et.json | 43 +++ app/soapbox/locales/eu.json | 43 +++ app/soapbox/locales/fa.json | 43 +++ app/soapbox/locales/fi.json | 43 +++ app/soapbox/locales/fr.json | 43 +++ app/soapbox/locales/ga.json | 43 +++ app/soapbox/locales/gl.json | 43 +++ app/soapbox/locales/he.json | 43 +++ app/soapbox/locales/hi.json | 43 +++ app/soapbox/locales/hr.json | 43 +++ app/soapbox/locales/hu.json | 43 +++ app/soapbox/locales/hy.json | 43 +++ app/soapbox/locales/id.json | 43 +++ app/soapbox/locales/io.json | 43 +++ app/soapbox/locales/it.json | 43 +++ app/soapbox/locales/ja.json | 43 +++ app/soapbox/locales/ka.json | 43 +++ app/soapbox/locales/kk.json | 43 +++ app/soapbox/locales/ko.json | 43 +++ app/soapbox/locales/lt.json | 43 +++ app/soapbox/locales/lv.json | 43 +++ app/soapbox/locales/mk.json | 43 +++ app/soapbox/locales/ms.json | 43 +++ app/soapbox/locales/nl.json | 43 +++ app/soapbox/locales/nn.json | 43 +++ app/soapbox/locales/no.json | 43 +++ app/soapbox/locales/oc.json | 43 +++ app/soapbox/locales/pl.json | 43 +++ app/soapbox/locales/pt-BR.json | 43 +++ app/soapbox/locales/pt.json | 43 +++ app/soapbox/locales/ro.json | 43 +++ app/soapbox/locales/ru.json | 43 +++ app/soapbox/locales/sk.json | 43 +++ app/soapbox/locales/sl.json | 43 +++ app/soapbox/locales/sq.json | 43 +++ app/soapbox/locales/sr-Latn.json | 43 +++ app/soapbox/locales/sr.json | 43 +++ app/soapbox/locales/sv.json | 43 +++ app/soapbox/locales/ta.json | 43 +++ app/soapbox/locales/te.json | 43 +++ app/soapbox/locales/th.json | 43 +++ app/soapbox/locales/tr.json | 43 +++ app/soapbox/locales/uk.json | 43 +++ app/soapbox/locales/zh-CN.json | 43 +++ app/soapbox/locales/zh-HK.json | 43 +++ app/soapbox/locales/zh-TW.json | 43 +++ 64 files changed, 2919 insertions(+), 23 deletions(-) diff --git a/app/soapbox/features/public_layout/components/header.js b/app/soapbox/features/public_layout/components/header.js index 9f018cc3c..016d6dc47 100644 --- a/app/soapbox/features/public_layout/components/header.js +++ b/app/soapbox/features/public_layout/components/header.js @@ -6,6 +6,15 @@ import { Link } from 'react-router-dom'; import LoginForm from 'soapbox/features/auth_login/components/login_form'; import SiteLogo from './site_logo'; import SoapboxPropTypes from 'soapbox/utils/soapbox_prop_types'; +import { defineMessages, injectIntl } from 'react-intl'; +import PropTypes from 'prop-types'; + +const messages = defineMessages({ + home: { id: 'header.home.label', defaultMessage: 'Home' }, + about: { id: 'header.about.label', defaultMessage: 'About' }, + backTo: { id: 'header.back_to.label', defaultMessage: 'Back to' }, + login: { id: 'header.login.label', defaultMessage: 'Log in' }, +}); const mapStateToProps = state => ({ me: state.get('me'), @@ -13,15 +22,17 @@ const mapStateToProps = state => ({ }); export default @connect(mapStateToProps) +@injectIntl class Header extends ImmutablePureComponent { static propTypes = { me: SoapboxPropTypes.me, instance: ImmutablePropTypes.map, + intl: PropTypes.object.isRequired, } render() { - const { me, instance } = this.props; + const { me, instance, intl } = this.props; return (