forked from JMPerez/spotify-dedup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
i18n.js
91 lines (88 loc) · 4.1 KB
/
i18n.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
export const AvailableLanguages = ['de', 'en', 'es', 'pt'];
// the translations
// (tip move them in a JSON file and import them)
const resources = {
en: {
translation: {
'menu.link-home': 'Home',
'home.title': 'Spotify Deduplicator',
'home.description':
'Remove duplicate songs from your playlists and saved songs.',
'home.login-button': 'Log in with Spotify',
'meta.title':
'Spotify Dedup - Remove duplicate songs from your Spotify library automatically',
'meta.description':
'Delete repeated songs from your Spotify playlists and saved tracks quickly and easy.',
'features.find-remove.header': 'Find & remove',
'features.find-remove.body':
'Dedup checks your playlists and saved songs in {{- strongOpen}}your Spotify library{{- strongClose}}. Once Dedup finds duplicates you can remove them per-playlist basis.',
'features.safer.header': 'Safer',
'features.safer.body':
'Dedup will only remove {{- strongOpen}}duplicate songs{{- strongClose}}, leaving the rest of the playlist and saved songs untouched.',
'features.open-source.header': 'Open Source',
'features.open-source.body':
"You might want to have a look at the {{- linkGithubOpen}}source code on GitHub{{- linkGithubClose}}. This web app uses the {{- linkWebApiOpen}}Spotify Web API{{- linkWebApiClose}} to manage user's playlists and saved tracks.",
'reviews.title': 'This is what users are saying',
'footer.author': 'Made with ♥ by {{- linkOpen}}JMPerez 👨💻{{- linkClose}}',
'footer.github':
'Check out the {{- linkOpen}}code on GitHub 📃{{- linkClose}}',
'footer.bmc':
'Support the project {{- linkOpen}}buying a coffee ☕{{- linkClose}}',
'bmc.button': 'Would you buy me a coffee?',
'result.duplicate.reason-same-id': 'Duplicate',
'result.duplicate.reason-same-data':
'Duplicate (same name, artist and duration)',
'result.duplicate.track':
'<0>{{trackName}}</0> <2>by</2> <4>{{trackArtistName}}</4>',
'process.status.finding':
'Finding duplicates in your playlists and saved songs…',
'process.status.complete': 'Processing complete!',
'process.status.complete.body':
'Your playlists and saved songs have been processed!',
'process.status.complete.dups.body':
'Click on the {{- strongOpen}}Remove duplicates{{- strongClose}} button to get rid of duplicates in that playlist or saved songs collection.',
'process.status.complete.nodups.body':
"Congrats! You don't have duplicates in your playlists nor saved songs.",
'process.reading-library':
'Going through your library, finding the playlists you own and your saved songs…',
'process.processing':
'Searching for duplicate songs, wait a sec. Still to process {{count}} playlist…',
'process.processing_plural':
'Searching for duplicate songs, wait a sec. Still to process {{count}} playlists…',
'process.saved.title': 'Saved songs in your library',
'process.saved.duplicates':
'This collection has {{count}} duplicate song',
'process.saved.duplicates_plural':
'This collection has {{count}} duplicate songs',
'process.saved.remove-button': 'Remove duplicates from your saved songs',
'process.playlist.duplicates':
'This playlist has {{count}} duplicate song',
'process.playlist.duplicates_plural':
'This playlist has {{count}} duplicate songs',
'process.playlist.remove-button': 'Remove duplicates from this playlist',
'process.items.removed': 'Duplicates removed',
},
},
fallbackLng: 'en',
};
i18n
.use(initReactI18next) // passes i18n down to react-i18next
.init({
resources,
lng: 'en',
keySeparator: false, // we do not use keys in form messages.welcome
debug: false,
missingKeyHandler: (
lng,
ns,
key,
fallbackValue,
updateMissing,
options
) => {
console.log('Missing key', key);
},
});
export default i18n;