/contact -> /community
This commit is contained in:
Родитель
69f81c11f0
Коммит
b530928644
|
@ -33,10 +33,46 @@ languages:
|
|||
community:
|
||||
title: Electron Community
|
||||
description:
|
||||
Tools, boilerplates, videos, and more from Electron's
|
||||
<a href="https://github.com/sindresorhus/awesome-electron">awesome</a>
|
||||
open-source contributors. Find or add
|
||||
<a href="/community#meetups">meetups</a> near you.
|
||||
Resources for connecting with people working on Electron.
|
||||
channels:
|
||||
help:
|
||||
"For help or feedback on Electron app development, join the
|
||||
<a href='http://atom-slack.herokuapp.com'>atomio Slack</a>,
|
||||
post questions on
|
||||
<a href='https://discuss.atom.io/c/electron'>Discuss</a>,
|
||||
or see existing Electron-related questions on
|
||||
<a href='https://stackoverflow.com/questions/tagged/electron'>Stack Overflow</a>."
|
||||
bugs:
|
||||
"To report a bug in Electron, open an issue on the
|
||||
<a href='https://github.com/electron/electron/issues'>electron/electron</a>
|
||||
repository."
|
||||
feature_requests:
|
||||
"To make a feature request, open an issue on the
|
||||
<a href='https://github.com/electron/electron/issues'>electron/electron</a>
|
||||
repository."
|
||||
code_of_conduct:
|
||||
"To report violations of our
|
||||
<a href='https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md'>Code of Conduct</a>,
|
||||
email
|
||||
<a href='mailto:coc@electronjs.org'>coc@electronjs.org</a>."
|
||||
security:
|
||||
"To report a security vulnerability in Electron, email
|
||||
<a href='mailto:security@electronjs.org'>security@electronjs.org</a>."
|
||||
updates:
|
||||
"To stay up to date on Electron developments, follow
|
||||
<a href='https://twitter.com/electronjs'>@electronjs</a> on Twitter,
|
||||
and subscribe to the
|
||||
<a href='/blog'>Blog RSS feed</a>."
|
||||
other:
|
||||
"For all other inquiries, email <a href='mailto:info@electronjs.org'>info@electronjs.org</a>."
|
||||
language_communities:
|
||||
title: Language Communities
|
||||
description:
|
||||
"The Electron community spans the globe, and English is not everyone's first language.
|
||||
Find
|
||||
<a href='/languages'>documentation in your language</a>,
|
||||
or join one of the language communities below:"
|
||||
|
||||
tools: Tools
|
||||
boilerplates: Boilerplates
|
||||
components: Components
|
||||
|
|
|
@ -12,7 +12,9 @@ const websiteKeys = Object.keys(flat(websiteStrings))
|
|||
locales.forEach(locale => {
|
||||
websiteKeys.forEach(key => {
|
||||
const deepKey = `website.${locale}.${key}`
|
||||
if (!get(i18n, deepKey)) {
|
||||
// Always use local locale.yml data for English,
|
||||
// and backfill to English for missing entries in other languages.
|
||||
if (locale === 'en-US' || !get(i18n, deepKey)) {
|
||||
set(i18n, deepKey, get(websiteStrings, key))
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
module.exports = (req, res) => {
|
||||
res.render('contact', Object.assign(req.context, {}))
|
||||
}
|
|
@ -69,7 +69,7 @@ app.get('/awesome', (req, res) => res.redirect('/community'))
|
|||
app.get('/blog.json', routes.feed.blog)
|
||||
app.get('/blog.xml', routes.feed.blog)
|
||||
app.get('/community', routes.community)
|
||||
app.get('/contact', routes.contact)
|
||||
app.get('/contact', (req, res) => res.redirect(301, '/community'))
|
||||
app.get('/devtron', routes.devtron)
|
||||
app.get('/docs', routes.docs.index)
|
||||
app.get('/docs/versions', (req, res) => res.redirect(301, '/releases'))
|
||||
|
|
|
@ -324,6 +324,12 @@ describe('electronjs.org', () => {
|
|||
const $ = cheerio.load(res.text)
|
||||
$('.subtron .container-narrow h1').text().should.eq(i18n.website['vi-VN'].community.title)
|
||||
})
|
||||
|
||||
test('/contact redirects to /community', async () => {
|
||||
const res = await supertest(app).get('/contact')
|
||||
res.statusCode.should.be.equal(301)
|
||||
res.headers.location.should.equal('/community')
|
||||
})
|
||||
})
|
||||
|
||||
describe('localized strings for client-side code', () => {
|
||||
|
|
|
@ -7,8 +7,33 @@
|
|||
|
||||
<section class='page-section'>
|
||||
|
||||
<div class="container-narrow text-center">
|
||||
<div class="container-narrow">
|
||||
<p class="lead mb-4">📣 {{{localized.community.channels.updates}}}</p>
|
||||
<p class="lead mb-4">🙋 {{{localized.community.channels.help}}}</p>
|
||||
<p class="lead mb-4">🐞 {{{localized.community.channels.bugs}}}</p>
|
||||
<p class="lead mb-4">💡 {{{localized.community.channels.feature_requests}}}</p>
|
||||
<p class="lead mb-4">👎 {{{localized.community.channels.code_of_conduct}}}</p>
|
||||
<p class="lead mb-4">🙊 {{{localized.community.channels.security}}}</p>
|
||||
<p class="lead mb-4">❓ {{{localized.community.channels.other}}}</p>
|
||||
</div>
|
||||
|
||||
<div class="container-narrow my-5">
|
||||
<h2 id="language-communities">{{localized.community.language_communities.title}}</h2>
|
||||
|
||||
<p>{{{localized.community.language_communities.description}}}</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://telegram.me/electron_ru" rel="nofollow">electron-ru</a> <em>(Russian)</em></li>
|
||||
<li><a href="https://electron-br.slack.com" rel="nofollow">electron-br</a> <em>(Brazilian Portuguese)</em></li>
|
||||
<li><a href="https://electron-kr.github.io/electron-kr" rel="nofollow">electron-kr</a> <em>(Korean)</em></li>
|
||||
<li><a href="https://electron-jp.slack.com" rel="nofollow">electron-jp</a> <em>(Japanese)</em></li>
|
||||
<li><a href="https://electron-tr.herokuapp.com" rel="nofollow">electron-tr</a> <em>(Turkish)</em></li>
|
||||
<li><a href="https://electron-id.slack.com" rel="nofollow">electron-id</a> <em>(Indonesia)</em></li>
|
||||
<li><a href="https://electronpl.github.io" rel="nofollow">electron-pl</a> <em>(Poland)</em></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="container-narrow">
|
||||
<h2 id="tools">{{localized.community.tools}}</h2>
|
||||
<table class="table table-ruled table-full-width table-with-spacious-first-column mb-7">
|
||||
{{#each items}}
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
<div class='subtron'>
|
||||
<div class='container-narrow'>
|
||||
<h1>Get in touch</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class='page-section'>
|
||||
<div class='container-narrow'>
|
||||
|
||||
<div class='row my-4'>
|
||||
<h2 class="col-xs-12 col-md-3"><span class="octicon mega-octicon octicon-mark-github pr-3"></span>GitHub</h2>
|
||||
<h2 class="col-xs-12 col-md-9"><a href="https://github.com/electron">@electron</a></h2>
|
||||
</div>
|
||||
|
||||
<div class='row my-4'>
|
||||
<h2 class="col-xs-12 col-md-3"><span class="octicon mega-octicon octicon-mention pr-3"></span>Twitter</h2>
|
||||
<h2 class="col-xs-12 col-md-9"><a href="https://twitter.com/electronjs">@electronjs</a></h2>
|
||||
</div>
|
||||
|
||||
<div class='row my-4'>
|
||||
<h2 class="col-xs-12 col-md-3"><span class="octicon mega-octicon octicon-comment-discussion pr-3"></span>Slack</h2>
|
||||
<h2 class="col-xs-12 col-md-9"><a href="http://atom-slack.herokuapp.com">atomio.slack.com</a></h2>
|
||||
</div>
|
||||
|
||||
<div class='row my-4'>
|
||||
<h2 class="col-xs-12 col-md-3"><span class="octicon mega-octicon octicon-pin pr-3"></span>Discuss</h2>
|
||||
<h2 class="col-xs-12 col-md-9"><a href="https://discuss.atom.io/c/electron">discuss.atom.io/c/electron</a></h2>
|
||||
</div>
|
||||
|
||||
<div class='row my-4'>
|
||||
<h2 class="col-xs-12 col-md-3"><span class="octicon mega-octicon octicon-mail pr-3"></span>Email</h2>
|
||||
<h2 class="col-xs-12 col-md-9"><a href="mailto:info@electronjs.org">info@electronjs.org</a></h2>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
Загрузка…
Ссылка в новой задаче