Closed fx2000 closed 4 years ago
Can you make those radio buttons Bootstrap's custom radio buttons? You can read about it here
Can you make those radio buttons Bootstrap's custom radio buttons? You can read about it here
Done
Nice feature.. Really good job! Let me do review on code over weekend..
Quick review looks like you have removed default skills..
and where source is generated looks like you have added if's that check language.. maybe that can be done smarter?
not:
if (data.title && data.language === "en") { source += "### Hi there 👋, "+data.title+""; source += "\n"; }
but something like:
if (data.title) { source += "### "+translations.source.hiThere+" 👋, "+data.title+""; source += "\n"; }
???
This way code would be lot cleaner lot less if's..
Could you fix that if's issue until weekend.. i could merge in then over weekend and check everything.. @fx2000
Could you fix that if's issue until weekend.. i could merge in then over weekend and check everything.. @fx2000
Check out the latest commit, it looks better now.
Yes, good job.. looks lot better.. just still..
To make it even better and even cleaner all translations should come from your i18n plugin..
Maybe you can somehow that translations come from i18n/en.json ?
It only make sense to have all translations in one file.. :)
I moved all strings into the json files and added a fetch function to get the data.
This PR includes a rough but functional translation engine based on @andreasremdt's simple-translator library. It lets you switch between English and Spanish right now with the possibility of adding extra languages later on.
The language selector needs work and the default values that come with Vue's data object are hard-coded in English so it looks a bit odd when you first switch languages, it would be great if you could have initial values that change according to the language but my Vue skills are fairly rudimentary.