I18n using react-localization (#8)
This commit is contained in:
1 parent
16e439db41
commit
2612d7a3b4
7 files changed
+114
-50
No files matched your search
@@ -1,32 +0,0 @@
|
||||
import LocalizedStrings from 'react-localization';
|
||||
|
||||
const strings = new LocalizedStrings({
|
||||
en: {
|
||||
colonize: (input: string): any => strings.formatString('{0}:', input),
|
||||
|
||||
save: 'Save',
|
||||
cancel: 'Cancel',
|
||||
close: 'Close',
|
||||
settings: 'Settings',
|
||||
user: 'User',
|
||||
pseudo: 'Pseudo',
|
||||
geolocation: 'Geolocation',
|
||||
minTimeInt: 'Minimal time interval (ms)',
|
||||
minDist:'Minimal distance (m)',
|
||||
},
|
||||
fr: {
|
||||
colonize: (input: string): any => strings.formatString('{0} :', input),
|
||||
|
||||
save: 'Sauvegarder',
|
||||
cancel: 'Annuler',
|
||||
close: 'Fermer',
|
||||
settings: 'Paramètres',
|
||||
user: 'Utilisateur',
|
||||
pseudo: 'Pseudo',
|
||||
geolocation: 'Géolocalisation',
|
||||
minTimeInt: 'Interval minimal (ms)',
|
||||
minDist:'Distance minimale (m)',
|
||||
},
|
||||
});
|
||||
|
||||
export default strings;
|
||||
@@ -0,0 +1,81 @@
|
||||
import { Fragment } from 'react';
|
||||
import LocalizedStrings from 'react-localization';
|
||||
|
||||
const strings = new LocalizedStrings({
|
||||
en: {
|
||||
colonize: (input: string): any => strings.formatString('{0}:', input),
|
||||
|
||||
save: 'Save',
|
||||
cancel: 'Cancel',
|
||||
close: 'Close',
|
||||
settings: 'Settings',
|
||||
user: 'User',
|
||||
pseudo: 'Pseudo',
|
||||
geolocation: 'Geolocation',
|
||||
minTimeInt: 'Minimal time interval (ms)',
|
||||
minDist: 'Minimal distance (m)',
|
||||
|
||||
trackRecording: 'Track recording',
|
||||
resumeRecording: 'Resume recording',
|
||||
startRecording: 'Start recording',
|
||||
pauseRecording: 'Pause',
|
||||
// stopRecording: 'stop',
|
||||
// cancelRecording: 'cancel',
|
||||
stopRecording: (
|
||||
<Fragment key='x'>
|
||||
Stop recording
|
||||
<br key='x'/>
|
||||
(and save track)
|
||||
</Fragment>
|
||||
),
|
||||
cancelRecording: (
|
||||
<Fragment key='x'>
|
||||
Cancel recording
|
||||
<br key='x'/>
|
||||
(and clear track)
|
||||
</Fragment>
|
||||
),
|
||||
|
||||
chooseYourMap: 'Choose your map',
|
||||
|
||||
tracks: 'Tracks',
|
||||
},
|
||||
fr: {
|
||||
colonize: (input: string): any => strings.formatString('{0} :', input),
|
||||
|
||||
save: 'Sauvegarder',
|
||||
cancel: 'Annuler',
|
||||
close: 'Fermer',
|
||||
settings: 'Paramètres',
|
||||
user: 'Utilisateur',
|
||||
pseudo: 'Pseudo',
|
||||
geolocation: 'Géolocalisation',
|
||||
minTimeInt: 'Interval minimal (ms)',
|
||||
minDist: 'Distance minimale (m)',
|
||||
|
||||
trackRecording: 'Enregistrement de trace',
|
||||
resumeRecording: "Reprendre l'enregistrement",
|
||||
startRecording: "Démarre l'enregistrement",
|
||||
pauseRecording: 'Pause',
|
||||
stopRecording: (
|
||||
<Fragment key='x'>
|
||||
Arrêter
|
||||
<br key='x'/>
|
||||
(et sauvegarder)
|
||||
</Fragment>
|
||||
),
|
||||
cancelRecording: (
|
||||
<Fragment key='x'>
|
||||
Annuler
|
||||
<br key='x'/>
|
||||
(et effacer)
|
||||
</Fragment>
|
||||
),
|
||||
|
||||
chooseYourMap: 'Choisissez votre carte',
|
||||
|
||||
tracks: 'Traces',
|
||||
},
|
||||
});
|
||||
|
||||
export default strings;
|
||||
Reference in new issue
Block a user