dhoko / angular-ngBabelfish

Internationalization module for angular.js, it's magic !
MIT License
11 stars 3 forks source link

Bug [hashkey] directive #7

Closed dhoko closed 10 years ago

dhoko commented 10 years ago

Patch :

BabelfishProvider

get: function get(lang) {
  var currentLang = i18n.data[lang || i18n.current];

  if(!currentLang[i18n.currentState]) {
    console.warn('[serval-i18n-babelfish@get] No translation available for the page %s for the lang %s',i18n.currentState, (lang || i18n.current));
    currentLang[i18n.currentState] = {};
  }

  return angular.extend(currentLang[i18n.currentState] , currentLang['_common']);
},