mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:13:24 +02:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user