snipcart / snipcart-localization-v2

Localization files for Snipcart's shopping cart v2
https://docs.snipcart.com/v2/configuration/localization
MIT License
30 stars 114 forks source link

Warning messages of missing locale in javascript console. #42

Closed Umair-Munir closed 7 years ago

Umair-Munir commented 7 years ago

I have changed language from en to de. I am following each step given here. Every time on loading page I get warning messages in my console.

screen shot 2017-03-19 at 5 39 47 pm

How can I remove these warnings/errors?

couellet commented 7 years ago

Actually it looks like some strings haven't been translated. We plan on adding a "debug" mode to Snipcart to disable/enable logs. However, in the meantime the missing strings have to be added to de.js file.

I'll flag it as a bug on our side and we'll try to add the missing keys with the help of Google Translate but a PR would be awesome :)

Umair-Munir commented 7 years ago

It would be great if you would add this feature. For now I am adding missing strings and would like to create PR.

couellet commented 7 years ago

We just added a way to do it ;)

document.addEventListener('snipcart.ready', function() {
  Snipcart.DEBUG = false;
});

It will be documented soon, it's being deployed at the moment.

Umair-Munir commented 7 years ago

Great Work 👍 . Thanks :)