Skip to content
This repository was archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
Update NL, fix various i18n issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SachaG committed Oct 8, 2020
1 parent 1b6da44 commit afafd23
Show file tree
Hide file tree
Showing 29 changed files with 50 additions and 1,095 deletions.
2 changes: 1 addition & 1 deletion config/locales.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@
label: Nederlands
translators:
- name: casvaniersel
github: https://github.com/casvaniersel
github: https://github.com/casvaniersel
11 changes: 3 additions & 8 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ const cleanIdString = id => id.replace(new RegExp('-', 'g'), '_')
*/
const getPageQuery = page => {
const { id, blocks } = page
console.log('// getPageQuery')
console.log(id)
console.log(blocks)
if (!blocks) {
return
}
Expand All @@ -78,11 +75,9 @@ const getPageQuery = page => {
return
}
const variables = _.compact(blocks.map(b => b.queryVariables))
console.log(variables)
const pageQuery = `query page${_.upperFirst(cleanIdString(id))}Query${variables.length > 0 ? `(${variables.join(', ')})` : ''} {
${indentString(queries.join('\n'), 4)}
}`
console.log(pageQuery)
return pageQuery
}

Expand All @@ -96,14 +91,14 @@ exports.createPages = async ({ graphql, actions: { createPage } }) => {
for (let index = 0; index < locales.length; index++) {
const locale = locales[index]

console.log('// pageQuery')
// console.log('// pageQuery')
const pageQuery = getPageQuery(page)

try {
if (pageQuery) {
const queryResults = await graphql(`${pageQuery}`, { id: page.id, locale: locale.locale })
console.log('// queryResults')
console.log(JSON.stringify(queryResults.data, '', 2))
// console.log('// queryResults')
// console.log(JSON.stringify(queryResults.data, '', 2))
pageData = queryResults.data
}
} catch (error) {
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@
"dotenv": "^8.2.0",
"gatsby": "^2.24.65",
"gatsby-cli": "^2.12.100",
"gatsby-plugin-eslint": "^2.0.8",
"gatsby-plugin-google-analytics": "^2.3.14",
"gatsby-plugin-netlify": "^2.3.15",
"gatsby-plugin-react-helmet": "^3.3.11",
"gatsby-plugin-sass": "^2.3.13",
"gatsby-plugin-netlify": "^2.3.17",
"gatsby-plugin-react-helmet": "^3.3.13",
"gatsby-plugin-sass": "^2.3.16",
"gatsby-plugin-styled-components": "^3.3.11",
"gatsby-plugin-webpack-bundle-analyzer": "^1.0.5",
"gatsby-source-filesystem": "^2.3.30",
Expand Down
2 changes: 1 addition & 1 deletion src/core/blocks/other/BioBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const BioContent = styled.div`

const BioBio = styled.div`
padding: ${({ theme }) => theme.spacing}px;
font-size: $medium-font;
font-size: ${({ theme }) => theme.typography.sizes.smallish};
`

const BioPhoto = styled.div`
Expand Down
4 changes: 2 additions & 2 deletions src/translations/hi-IN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1038,9 +1038,9 @@ translations:
# other
- key: bio.guest_visualizer
t: अतिथि विशेषज्ञ
- key: footer.state_of_js_link
- key: footer.state_of_js_link
t: © 2019 <a href="${link}">State of JavaScript</a>.
- key: footer.leave_an_issue
t: प्रश्न? कोई बग मिला? <a href="${link}">एक इशू दर्ज करें</a>.
t: प्रश्न? कोई बग मिला? <a href="${link}">एक इशू दर्ज करें</a>.
- key: footer.netlify
t: यह साइट <a href="${link}">Netlify</a> द्वारा संचालित है।
Loading

0 comments on commit afafd23

Please sign in to comment.