Skip to content

Commit

Permalink
feat: never show translation banner if selected language is english (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
goslingo authored May 13, 2024
1 parent 8e230a6 commit 8d7e5d9
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/pages/bug-bounties/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const BugBountiesPage = ({ data }) => {
const form = useRef()

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

const checkForm = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/community/contributors.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Contributors = () => {
const [missingTranslations, setMissingTranslations] = useState(false)

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/community/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Events = ({ data }) => {
const [missingTranslations, setMissingTranslations] = useState(false)

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

return (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/community/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const CommunityPage = ({ data }) => {
const [missingTranslations, setMissingTranslations] = useState(false)

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

return (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/community/swag.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Events = ({ data }) => {
const [missingTranslations, setMissingTranslations] = useState(false)

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

return (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/developers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const DevelopPage = ({ data }) => {
const [missingTranslations, setMissingTranslations] = useState(false)

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

return (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ecosystem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const EcosystemPage = ({ data }) => {
}

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/faqs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const FaqsPage = ({ data }) => {
}))

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

return (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/governance/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const GovernancePage = ({ data }) => {
const [missingTranslations, setMissingTranslations] = useState(false)

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

const Phase3Text = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const IndexPage = ({ data }) => {
const { t, i18n } = useTranslation('page.index')
const [missingTranslations, setMissingTranslations] = useState(false)
i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

return (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/key-concepts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const KeyConceptsPage = () => {
const [missingTranslations, setMissingTranslations] = useState(false)

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

const sections = [
Expand Down
2 changes: 1 addition & 1 deletion src/pages/market-creation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const MarketCreationPage = ({ data }) => {
const [missingTranslations, setMissingTranslations] = useState(false)

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

const Phase3Text = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/programmatic-trading/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ProgrammaticTrading = ({ data }) => {
const [missingTranslations, setMissingTranslations] = useState(false)

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

const MarketMakerText = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/validators/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ValidatorsPage = ({ data }) => {
const { params } = useNetworkParams()

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

const Arrow = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/wallet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const WalletPageNew = ({ data }) => {
const [userAgent, setUserAgent] = useState(false)

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

const sections = [
Expand Down
2 changes: 1 addition & 1 deletion src/templates/articles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ArticlesPage = ({ data, pageContext }) => {
const nextPage = `/articles/${currentPage + 1}`

i18n.on('missingKey', (lng) => {
setMissingTranslations(true)
i18n.language !== 'en' && setMissingTranslations(true)
})

const Pagination = () => {
Expand Down

0 comments on commit 8d7e5d9

Please sign in to comment.