Closed scorixear closed 4 years ago
yeah no, I give up, the added google translate function destroys pretty much the point of this and myself
I added the fallback here: https://github.com/CodingGarden/is-it-new-years-day/blob/master/client/src/translations/index.js#L416
I'm still open to using some sort of replacer variable though. The time functions could be updated to just return the formatted time, and the translations.json file could be updated to have the text with the $time$ value.
Also, the translations.json file could include something like commonPluralization: true or allPlural: true to simplify the number of translation override functions.
I might explore this tonight on stream.
@w3cj my intention was to have more usability for other developers when creating other languages (since writing into a json is easier than writing into the js).
I might have a look into it later, but now its 0am in germany ;)
Wait no more,
I sat down and changed the client site as I would imagine it and rewrote the
CountDown.vue
and thetranslations/index.js
.The standard
$time$
argument will be automatically replaced if present and if there is no special translation function in theìndex.js
. Now the translation for Russian still uses the special time translation, turkish or german for example are using the $time$ argument (which is quite shorter).Will update the pulll request on recent changes if wanted