Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add German translation #13

Merged
merged 2 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add translation
  • Loading branch information
jsteinhuelb committed Aug 25, 2022
commit 18e12b7874372308aff6ca1adb8b08e01fcb9257
4 changes: 4 additions & 0 deletions src/i18n/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import enTranslation from './en/translation'
import frTranslation from './fr/translation'
import brTranslation from './br/translation'
import jaTranslation from './ja/translation'
import deTranslation from './de/translation'
import { initReactI18next } from 'react-i18next'
import { AVAILABLE_LANGUAGES } from '../utils/languages'

Expand All @@ -19,6 +20,9 @@ export const resources = {
ja: {
translation: jaTranslation,
},
de: {
translation: deTranslation,
},
} as const

i18n.use(initReactI18next).init({
Expand Down
149 changes: 149 additions & 0 deletions src/i18n/de/translation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
const de = {
piano: {
note: {
Cb: 'Cb',
C: 'C',
'C#': 'C#',
Db: 'Db',
D: 'D',
'D#': 'D#',
Eb: 'Eb',
E: 'E',
'E#': 'E#',
Fb: 'Fb',
F: 'F',
'F#': 'F#',
Gb: 'Gb',
G: 'G',
'G#': 'G#',
Ab: 'Ab',
A: 'A',
'A#': 'A#',
Bb: 'Bb',
B: 'B',
'B#': 'B#',
},
numeral: {
i: 'i',
I: 'I',
ii: 'ii',
iiº: 'iiº',
II: 'II',
iii: 'iii',
III: 'III',
'III+': 'III+',
iv: 'iv',
IV: 'IV',
v: 'v',
V: 'V',
vi: 'vi',
viº: 'viº',
VI: 'VI',
viiº: 'viiº',
VII: 'VII',
},
},
scales: {
// Major
'c-flat-major': 'Cb-Dur',
'c-major': 'C-Dur',
'c-sharp-major': 'C#-Dur',
'd-flat-major': 'Db-Dur',
'd-major': 'D-Dur',
'd-sharp-major': 'D#-Dur',
'e-flat-major': 'Eb-Dur',
'e-major': 'E-Dur',
'e-sharp-major': 'E#-Dur',
'f-flat-major': 'Fb-Dur',
'f-major': 'F-Dur',
'f-sharp-major': 'F#-Dur',
'g-flat-major': 'Gb-Dur',
'g-major': 'G-Dur',
'g-sharp-major': 'G#-Dur',
'a-flat-major': 'Ab-Dur',
'a-major': 'A-Dur',
'a-sharp-major': 'A#-Dur',
'b-flat-major': 'Bb-Dur',
'b-major': 'B-Dur',
'b-sharp-major': 'B#-Dur',
// Minor (Natural)
'c-minor-natural': 'C Natürliches Moll',
'c-sharp-minor-natural': 'C# Natürliches Moll',
'd-flat-minor-natural': 'Db Natürliches Moll',
'd-minor-natural': 'D Natürliches Moll',
'd-sharp-minor-natural': 'D# Natürliches Moll',
'e-flat-minor-natural': 'Eb Natürliches Moll',
'e-minor-natural': 'E Natürliches Moll',
'e-sharp-minor-natural': 'E# Natürliches Moll',
'f-minor-natural': 'F Natürliches Moll',
'f-sharp-minor-natural': 'F# Natürliches Moll',
'g-flat-minor-natural': 'Gb Natürliches Moll',
'g-minor-natural': 'G Natürliches Moll',
'g-sharp-minor-natural': 'G# Natürliches Moll',
'a-flat-minor-natural': 'Ab Natürliches Moll',
'a-minor-natural': 'A Natürliches Moll',
'a-sharp-minor-natural': 'A# Natürliches Moll',
'b-flat-minor-natural': 'Bb Natürliches Moll',
'b-minor-natural': 'B Natürliches Moll',
'b-sharp-minor-natural': 'B# Natürliches Moll',
// Minor (Melodic)
'c-minor-melodic': 'C Melodisches Moll',
'c-sharp-minor-melodic': 'C# Melodisches Moll',
'd-flat-minor-melodic': 'Db Melodisches Moll',
'd-minor-melodic': 'D Melodisches Moll',
'd-sharp-minor-melodic': 'D# Melodisches Moll',
'e-flat-minor-melodic': 'Eb Melodisches Moll',
'e-minor-melodic': 'E Melodisches Moll',
'e-sharp-minor-melodic': 'E# Melodisches Moll',
'f-minor-melodic': 'F Melodisches Moll',
'f-sharp-minor-melodic': 'F# Melodisches Moll',
'g-flat-minor-melodic': 'Gb Melodisches Moll',
'g-minor-melodic': 'G Melodisches Moll',
'g-sharp-minor-melodic': 'G# Melodisches Moll',
'a-flat-minor-melodic': 'Ab Melodisches Moll',
'a-minor-melodic': 'A Melodisches Moll',
'a-sharp-minor-melodic': 'A# Melodisches Moll',
'b-flat-minor-melodic': 'Bb Melodisches Moll',
'b-minor-melodic': 'B Melodisches Moll',
'b-sharp-minor-melodic': 'B# Melodisches Moll',
},
practiceModes: {
scales: 'Tonleitern',
chords: 'Akkorde',
seventhChords: 'Septakkorde',
fifths: 'Quinten',
},
pages: {
practice: {
scale: {
title: 'Tonleiter',
pingPongHint: 'Ping-Pong Tonleiter Übung umschalten',
hardModeHint: 'Schweren Modus umschalten',
},
mode: {
title: 'Modus',
quizModeHint: 'In den Quizmodus wechseln',
settingsHint: 'Einstellungen öffnen',
},
},
quiz: {
title: 'Quiz',
questions: {
key: 'Drücken Sie {{key}} auf Ihrer Tastatur',
fifth: 'Was ist die perfekte Quinte von {{key}}',
},
},
},
settings: {
title: 'Einstellungen',
options: {
'show-keyboard': 'Tastatur anzeigen',
'mute-sound': 'Ton stummschalten',
'midi-input-id': 'MIDI Eingang',
language: 'Sprache',
'is-sentry-on': 'Absturzberichte senden',
},
},
}

export default de
6 changes: 5 additions & 1 deletion src/utils/languages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type SupportedLanguagesType = 'en' | 'fr' | 'br' | 'ja'
export type SupportedLanguagesType = 'en' | 'fr' | 'br' | 'ja' | 'de'

export type LanguageOptionType = {
name: string
Expand All @@ -24,4 +24,8 @@ export const AVAILABLE_LANGUAGES: {
name: '日本語',
code: 'ja',
},
de: {
name: 'German',
code: 'de',
},
} as const