Replaced old jade with new pug.

Using temporarily npm-shrinkwrap since `template-html-loader` uses an old `consolidate.js` version which doesn't support `pug`.
Follow here: https://github.com/jtangelder/template-html-loader/issues/8
This commit is contained in:
Gunther Brunner
2016-08-05 18:24:30 +09:00
parent 711ab4a8e5
commit 1eb6af0119
164 changed files with 199 additions and 175 deletions

View File

@@ -1,4 +1,5 @@
var supportedLanguages = require('./../../../../common/lang/langs.json')
var _ = require('lodash')
module.exports =
function LanguageServiceFactory(SettingsService, gettextCatalog) {
@@ -7,8 +8,13 @@ module.exports =
var LanguageService = {}
function detectLanguage() {
return (navigator.language || navigator.userLanguage || 'en-US')
.substring(0, 2)
return navigator.language || navigator.userLanguage
}
function browserToSupportedLang(lang) {
//supportedLanguages.
//return lang.replace(/([A-Za-z]{2})(-|_)?([A-Za-z]{0,4})/gm, '$1')
}
function isSupported(lang) {