Skip to content

Commit

Permalink
Add translation fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
ZaneH committed Jul 24, 2022
1 parent 4e75f28 commit 12b6a33
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Learn to play the piano at your own pace through various modes of practice. [Watch the video](https://vimeo.com/730642802)

<p align="center">
<img alt="Piano Trainer screenshot" src="https://i.imgur.com/k2y1Gr5.png" height="250px" />
<img alt="Piano Trainer screenshot" src="https://i.imgur.com/Nxg1706.png" height="250px" />
<img alt="Piano Trainer screenshot #2" src="https://i.imgur.com/mBg1fjH.png" height="250px" />
</p>

Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "Piano Trainer",
"version": "1.0.9"
"version": "1.0.10"
},
"tauri": {
"allowlist": {
Expand Down
3 changes: 2 additions & 1 deletion src/components/Quiz/Quiz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,15 @@ const Quiz = () => {
answerChoices,
currentQuestion.majMin,
currentQuestionKey,
t,
])

return (
<QuizPage>
<QuizHeader />
<QuizQuestion>
{formatQuestion(t(`pages.quiz.questions.${currentQuestion.type}`), {
key: currentQuestionKey,
key: t(`piano.note.${currentQuestionKey}`),
majMin: currentQuestion.majMin,
})}
</QuizQuestion>
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import i18n from 'i18next'
import enTranslation from './en/translation'
import frTranslation from './fr/translation'
import { initReactI18next } from 'react-i18next'
import { AVAILABLE_LANGUAGES } from '../utils/languages'

export const resources = {
en: {
Expand All @@ -13,6 +14,7 @@ export const resources = {
} as const

i18n.use(initReactI18next).init({
lng: 'en',
lng: AVAILABLE_LANGUAGES.en.code,
fallbackLng: AVAILABLE_LANGUAGES.en.code,
resources,
})

0 comments on commit 12b6a33

Please sign in to comment.