feat(client): Translatable footer links
Modifies the translation schema to allow the footer links (such as `about`) to be replaced based on the client locale. Updates the snapshot for the `Footer` component to reflect the changes. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
5950a397e6
commit
994b4c27df
@ -2,7 +2,27 @@
|
||||
"meta": {
|
||||
"title": "免费学习编程 – 适合忙碌人士的编程课程",
|
||||
"description": "在家学习编程,构建项目,获得认证。自 2014 年以来,已有超过 40,000 名 freeCodeCamp 学员入职谷歌、苹果、亚马逊、微软等科技公司。",
|
||||
"keywords": ["javascript", "js", "网站", "web", "开发", "free", "code", "camp", "课程", "html", "css", "react", "redux", "api", "前端", "后端", "学习", "教程", "编程"],
|
||||
"keywords": [
|
||||
"javascript",
|
||||
"js",
|
||||
"网站",
|
||||
"web",
|
||||
"开发",
|
||||
"free",
|
||||
"code",
|
||||
"camp",
|
||||
"课程",
|
||||
"html",
|
||||
"css",
|
||||
"react",
|
||||
"redux",
|
||||
"api",
|
||||
"前端",
|
||||
"后端",
|
||||
"学习",
|
||||
"教程",
|
||||
"编程"
|
||||
],
|
||||
"youre-unsubscribed": "你已取消订阅"
|
||||
},
|
||||
"buttons": {
|
||||
@ -72,7 +92,7 @@
|
||||
"big-heading-2": "构建项目",
|
||||
"big-heading-3": "获得认证",
|
||||
"h2-heading": "自 2014 年以来,已有超过 40,000 名 freeCodeCamp.org 学员入职科技公司,例如:",
|
||||
"hero-img-description" : "韩国的 freeCodeCamp 学员在当地一个学习小组的交流活动上",
|
||||
"hero-img-description": "韩国的 freeCodeCamp 学员在当地一个学习小组的交流活动上",
|
||||
"as-seen-in": "这些媒体曾对 freeCodeCamp 进行报道:",
|
||||
"testimonials": {
|
||||
"heading": "freeCodeCamp 校友感言:",
|
||||
@ -220,16 +240,25 @@
|
||||
"our-nonprofit": "关于我们",
|
||||
"links": {
|
||||
"about": "简介",
|
||||
"about-url": "https://www.freecodecamp.org/news/about/",
|
||||
"alumni": "校友网络",
|
||||
"open-source": "开源",
|
||||
"shop-url": "https://www.freecodecamp.org/shop/",
|
||||
"shop": "商店",
|
||||
"support": "支持",
|
||||
"support-url": "https://www.freecodecamp.org/news/support/",
|
||||
"sponsors": "赞助商",
|
||||
"sponsors-url": "https://www.freecodecamp.org/news/sponsors/",
|
||||
"honesty": "学术诚信",
|
||||
"honesty-url": "https://www.freecodecamp.org/news/academic-honesty-policy/",
|
||||
"coc": "行为规范",
|
||||
"coc-url": "https://www.freecodecamp.org/news/code-of-conduct/",
|
||||
"privacy": "隐私条例",
|
||||
"privacy-url": "https://www.freecodecamp.org/news/privacy-policy/",
|
||||
"tos": "服务条款",
|
||||
"copyright": "版权条例"
|
||||
"tos-url": "https://www.freecodecamp.org/news/terms-of-service/",
|
||||
"copyright": "版权条例",
|
||||
"copyright-url": "https://www.freecodecamp.org/news/copyright-policy/"
|
||||
},
|
||||
"language": "语言:"
|
||||
},
|
||||
|
@ -242,16 +242,25 @@
|
||||
"our-nonprofit": "Our Nonprofit",
|
||||
"links": {
|
||||
"about": "About",
|
||||
"about-url": "https://www.freecodecamp.org/news/about/",
|
||||
"alumni": "Alumni Network",
|
||||
"open-source": "Open Source",
|
||||
"shop": "Shop",
|
||||
"shop-url": "https://www.freecodecamp.org/shop/",
|
||||
"support": "Support",
|
||||
"support-url": "https://www.freecodecamp.org/news/support/",
|
||||
"sponsors": "Sponsors",
|
||||
"sponsors-url": "https://www.freecodecamp.org/news/sponsors/",
|
||||
"honesty": "Academic Honesty",
|
||||
"honesty-url": "https://www.freecodecamp.org/news/academic-honesty-policy/",
|
||||
"coc": "Code of Conduct",
|
||||
"coc-url": "https://www.freecodecamp.org/news/code-of-conduct/",
|
||||
"privacy": "Privacy Policy",
|
||||
"privacy-url": "https://www.freecodecamp.org/news/privacy-policy/",
|
||||
"tos": "Terms of Service",
|
||||
"copyright": "Copyright Policy"
|
||||
"tos-url": "https://www.freecodecamp.org/news/terms-of-service/",
|
||||
"copyright": "Copyright Policy",
|
||||
"copyright-url": "https://www.freecodecamp.org/news/copyright-policy/"
|
||||
},
|
||||
"language": "Language:"
|
||||
},
|
||||
|
@ -2,7 +2,29 @@
|
||||
"meta": {
|
||||
"title": "Learn to Code for Free – Coding Courses for Busy People",
|
||||
"description": "Learn to code at home. Build projects. Earn certifications. Since 2014, more than 40,000 freeCodeCamp.org graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.",
|
||||
"keywords": ["javascript", "js", "website", "web", "development", "free", "code", "camp", "course", "courses", "html", "css", "react", "redux", "api", "front", "back", "end", "learn", "tutorial", "programming"],
|
||||
"keywords": [
|
||||
"javascript",
|
||||
"js",
|
||||
"website",
|
||||
"web",
|
||||
"development",
|
||||
"free",
|
||||
"code",
|
||||
"camp",
|
||||
"course",
|
||||
"courses",
|
||||
"html",
|
||||
"css",
|
||||
"react",
|
||||
"redux",
|
||||
"api",
|
||||
"front",
|
||||
"back",
|
||||
"end",
|
||||
"learn",
|
||||
"tutorial",
|
||||
"programming"
|
||||
],
|
||||
"youre-unsubscribed": "You have been unsubscribed"
|
||||
},
|
||||
"buttons": {
|
||||
@ -72,7 +94,7 @@
|
||||
"big-heading-2": "Build projects.",
|
||||
"big-heading-3": "Earn certifications.",
|
||||
"h2-heading": "Since 2014, more than 40,000 freeCodeCamp.org graduates have gotten jobs at tech companies including:",
|
||||
"hero-img-description" : "freeCodeCamp students at a local study group in South Korea.",
|
||||
"hero-img-description": "freeCodeCamp students at a local study group in South Korea.",
|
||||
"as-seen-in": "As seen in:",
|
||||
"testimonials": {
|
||||
"heading": "Here is what our alumni say about freeCodeCamp:",
|
||||
@ -220,16 +242,25 @@
|
||||
"our-nonprofit": "Our Nonprofit",
|
||||
"links": {
|
||||
"about": "About",
|
||||
"about-url": "https://www.freecodecamp.org/news/about/",
|
||||
"alumni": "Alumni Network",
|
||||
"open-source": "Open Source",
|
||||
"shop": "Shop",
|
||||
"shop-url": "https://www.freecodecamp.org/shop/",
|
||||
"support": "Support",
|
||||
"support-url": "https://www.freecodecamp.org/news/support/",
|
||||
"sponsors": "Sponsors",
|
||||
"sponsors-url": "https://www.freecodecamp.org/news/sponsors/",
|
||||
"honesty": "Academic Honesty",
|
||||
"honesty-url": "https://www.freecodecamp.org/news/academic-honesty-policy/",
|
||||
"coc": "Code of Conduct",
|
||||
"coc-url": "https://www.freecodecamp.org/news/code-of-conduct/",
|
||||
"privacy": "Privacy Policy",
|
||||
"privacy-url": "https://www.freecodecamp.org/news/privacy-policy/",
|
||||
"tos": "Terms of Service",
|
||||
"copyright": "Copyright Policy"
|
||||
"tos-url": "https://www.freecodecamp.org/news/terms-of-service/",
|
||||
"copyright": "Copyright Policy",
|
||||
"copyright-url": "https://www.freecodecamp.org/news/copyright-policy/"
|
||||
},
|
||||
"language": "Language:"
|
||||
},
|
||||
|
@ -230,16 +230,25 @@ const translationsSchema = strictObject({
|
||||
'our-nonprofit': stringType,
|
||||
links: strictObject({
|
||||
about: stringType,
|
||||
'about-url': stringType,
|
||||
alumni: stringType,
|
||||
'open-source': stringType,
|
||||
shop: stringType,
|
||||
'shop-url': stringType,
|
||||
support: stringType,
|
||||
'support-url': stringType,
|
||||
sponsors: stringType,
|
||||
'sponsors-url': stringType,
|
||||
honesty: stringType,
|
||||
'honesty-url': stringType,
|
||||
coc: stringType,
|
||||
'coc-url': stringType,
|
||||
privacy: stringType,
|
||||
'privacy-url': stringType,
|
||||
tos: stringType,
|
||||
copyright: stringType
|
||||
'tos-url': stringType,
|
||||
copyright: stringType,
|
||||
'copyright-url': stringType
|
||||
}),
|
||||
language: stringType
|
||||
}),
|
||||
|
@ -321,7 +321,7 @@ exports[`<Footer /> matches snapshot 1`] = `
|
||||
className="our-nonprofit"
|
||||
>
|
||||
<a
|
||||
href="https://www.freecodecamp.org/news/about/"
|
||||
href="footer.links.about-url"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
@ -342,56 +342,56 @@ exports[`<Footer /> matches snapshot 1`] = `
|
||||
footer.links.open-source
|
||||
</a>
|
||||
<a
|
||||
href="https://www.freecodecamp.org/shop/"
|
||||
href="footer.links.shop-url"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
footer.links.shop
|
||||
</a>
|
||||
<a
|
||||
href="https://www.freecodecamp.org/news/support/"
|
||||
href="footer.links.support-url"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
footer.links.support
|
||||
</a>
|
||||
<a
|
||||
href="https://www.freecodecamp.org/news/sponsors/"
|
||||
href="footer.links.sponsors-url"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
footer.links.sponsors
|
||||
</a>
|
||||
<a
|
||||
href="https://www.freecodecamp.org/news/academic-honesty-policy/"
|
||||
href="footer.links.honesty-url"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
footer.links.honesty
|
||||
</a>
|
||||
<a
|
||||
href="https://www.freecodecamp.org/news/code-of-conduct/"
|
||||
href="footer.links.coc-url"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
footer.links.coc
|
||||
</a>
|
||||
<a
|
||||
href="https://www.freecodecamp.org/news/privacy-policy/"
|
||||
href="footer.links.privacy-url"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
footer.links.privacy
|
||||
</a>
|
||||
<a
|
||||
href="https://www.freecodecamp.org/news/terms-of-service/"
|
||||
href="footer.links.tos-url"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
footer.links.tos
|
||||
</a>
|
||||
<a
|
||||
href="https://www.freecodecamp.org/news/copyright-policy/"
|
||||
href="footer.links.copyright-url"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
|
@ -149,10 +149,7 @@ function Footer() {
|
||||
<div className='col-header'>{t('footer.our-nonprofit')}</div>
|
||||
<div className='footer-divder' />
|
||||
<div className='our-nonprofit'>
|
||||
<Link
|
||||
external={false}
|
||||
to={'https://www.freecodecamp.org/news/about/'}
|
||||
>
|
||||
<Link external={false} to={t('footer.links.about-url')}>
|
||||
{t('footer.links.about')}
|
||||
</Link>
|
||||
<Link
|
||||
@ -168,50 +165,29 @@ function Footer() {
|
||||
<Link
|
||||
external={false}
|
||||
sameTab={false}
|
||||
to={'https://www.freecodecamp.org/shop/'}
|
||||
to={t('footer.links.shop-url')}
|
||||
>
|
||||
{t('footer.links.shop')}
|
||||
</Link>
|
||||
<Link
|
||||
external={false}
|
||||
to={'https://www.freecodecamp.org/news/support/'}
|
||||
>
|
||||
<Link external={false} to={t('footer.links.support-url')}>
|
||||
{t('footer.links.support')}
|
||||
</Link>
|
||||
<Link
|
||||
external={false}
|
||||
to={'https://www.freecodecamp.org/news/sponsors/'}
|
||||
>
|
||||
<Link external={false} to={t('footer.links.sponsors-url')}>
|
||||
{t('footer.links.sponsors')}
|
||||
</Link>
|
||||
<Link
|
||||
external={false}
|
||||
to={'https://www.freecodecamp.org/news/academic-honesty-policy/'}
|
||||
>
|
||||
<Link external={false} to={t('footer.links.honesty-url')}>
|
||||
{t('footer.links.honesty')}
|
||||
</Link>
|
||||
<Link
|
||||
external={false}
|
||||
to={'https://www.freecodecamp.org/news/code-of-conduct/'}
|
||||
>
|
||||
<Link external={false} to={t('footer.links.coc-url')}>
|
||||
{t('footer.links.coc')}
|
||||
</Link>
|
||||
<Link
|
||||
external={false}
|
||||
to={'https://www.freecodecamp.org/news/privacy-policy/'}
|
||||
>
|
||||
<Link external={false} to={t('footer.links.privacy-url')}>
|
||||
{t('footer.links.privacy')}
|
||||
</Link>
|
||||
<Link
|
||||
external={false}
|
||||
to={'https://www.freecodecamp.org/news/terms-of-service/'}
|
||||
>
|
||||
<Link external={false} to={t('footer.links.tos-url')}>
|
||||
{t('footer.links.tos')}
|
||||
</Link>
|
||||
<Link
|
||||
external={false}
|
||||
to={'https://www.freecodecamp.org/news/copyright-policy/'}
|
||||
>
|
||||
<Link external={false} to={t('footer.links.copyright-url')}>
|
||||
{t('footer.links.copyright')}
|
||||
</Link>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user