Merge branch 'more-localization' into 'master'

More localization

See merge request phyks/Flatisfy!36
This commit is contained in:
Phyks 2018-12-26 10:43:14 +01:00
commit a21b0ef7bd
4 changed files with 13 additions and 3 deletions

View File

@ -41,12 +41,15 @@ export default {
'utilities_included': '(utilities included)', 'utilities_included': '(utilities included)',
'utilities_excluded': '(utilities excluded)', 'utilities_excluded': '(utilities excluded)',
'Description': 'Description', 'Description': 'Description',
'First_posted' : 'First posted',
'Details': 'Details', 'Details': 'Details',
'Metadata': 'Metadata', 'Metadata': 'Metadata',
'postal_code': 'Postal code', 'postal_code': 'Postal code',
'nearby_stations': 'Nearby stations', 'nearby_stations': 'Nearby stations',
'Times_to': 'Times to', 'Times_to': 'Times to',
'Location': 'Location', 'Location': 'Location',
'Notes': 'Notes',
'Save': 'Save',
'Contact': 'Contact', 'Contact': 'Contact',
'Visit': 'Visit', 'Visit': 'Visit',
'setDateOfVisit': 'Set date of visit', 'setDateOfVisit': 'Set date of visit',

View File

@ -41,12 +41,15 @@ export default {
'utilities_included': '(charges comprises)', 'utilities_included': '(charges comprises)',
'utilities_excluded': '(charges non comprises)', 'utilities_excluded': '(charges non comprises)',
'Description': 'Description', 'Description': 'Description',
'First_posted': 'Posté pour la première fois',
'Details': 'Détails', 'Details': 'Détails',
'Metadata': 'Metadonnées', 'Metadata': 'Metadonnées',
'postal_code': 'Code postal', 'postal_code': 'Code postal',
'nearby_stations': 'Stations proches', 'nearby_stations': 'Stations proches',
'Times_to': 'Temps jusqu\'à', 'Times_to': 'Temps jusqu\'à',
'Location': 'Localisation', 'Location': 'Localisation',
'Notes': 'Notes',
'Save': 'Sauvegarder',
'Contact': 'Contact', 'Contact': 'Contact',
'Visit': 'Visite', 'Visit': 'Visite',
'setDateOfVisit': 'Entrer une date de visite', 'setDateOfVisit': 'Entrer une date de visite',

View File

@ -1,5 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import VueI18n from 'vue-i18n' import VueI18n from 'vue-i18n'
import moment from 'moment'
// Import translations // Import translations
import en from './en' import en from './en'
@ -48,6 +49,9 @@ for (var i = 0; i < locales.length; ++i) {
} }
} }
// Set the locale for Moment.js
moment.locale(locale)
export default new VueI18n({ export default new VueI18n({
locale: locale, locale: locale,
messages messages

View File

@ -40,7 +40,7 @@
<h3>{{ $t("flatsDetails.Description") }}</h3> <h3>{{ $t("flatsDetails.Description") }}</h3>
<p>{{ flat.text }}</p> <p>{{ flat.text }}</p>
<p class="right">{{ flat.location }}</p> <p class="right">{{ flat.location }}</p>
<p>First posted {{ flat.date ? flat.date.fromNow() : '?' }}.</p> <p>{{ $t("flatsDetails.First_posted") }} {{ flat.date ? flat.date.fromNow() : '?' }}.</p>
</div> </div>
<div> <div>
<h3>{{ $t("flatsDetails.Details") }}</h3> <h3>{{ $t("flatsDetails.Details") }}</h3>
@ -114,11 +114,11 @@
<FlatsMap :flats="flatMarkers" :places="timeToPlaces" :journeys="journeys"></FlatsMap> <FlatsMap :flats="flatMarkers" :places="timeToPlaces" :journeys="journeys"></FlatsMap>
</div> </div>
<div> <div>
<h3>Notes</h3> <h3>{{ $t("flatsDetails.Notes") }}</h3>
<form v-on:submit="updateFlatNotes"> <form v-on:submit="updateFlatNotes">
<textarea ref="notesTextarea" rows="10">{{ flat.notes }}</textarea> <textarea ref="notesTextarea" rows="10">{{ flat.notes }}</textarea>
<p class="right"><input type="submit" value="Save"/></p> <p class="right"><input type="submit" :value="$t('flatsDetails.Save')"/></p>
</form> </form>
</div> </div>
</div> </div>