Closed stollr closed 8 years ago
I found one last usage of the legacy translation service and replaced it.
As far as i know we don't need to check if the translation is there, i think you can remove it totally. The mozget function does the check everytime it is called. If there is no translation it will show the default language (en-US)
I am not a coder so i can be wrong.....
I will do a local build with your changes this weekend en test it, thanks for your work!
Hi @naitsirch thanks for contributing to OpenWapp! I will review this :)
+1 from my side
thanks
As @Timmaks has suggested in #175 I have done some refactoring and removed the legacy translation service and all its usages.
Maybe you will wonder why I did this ugly thing in
app/scripts/utils/language.js
:Well, as far as I understand this function should test if a translation is available for a given locale and return it. If there is no translation, the default locale 'en-US' is returned. But the
global.localisation
object did only have the key 'en-US', so my change is equivalent to the origin with the advantage that there is no dependency to the old service anymore.I hope this explanation was clear :-)