Commit 6ee33b19896210d81163a7457eaafeb9216d75be

Authored by Victor Costa
1 parent afb4744a

Do not use navigation language in test mode

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/app/index.config.ts
... ... @@ -26,7 +26,7 @@ export function noosferoModuleConfig($logProvider: ng.ILogProvider,
26 26  
27 27 function configTranslation($translateProvider: angular.translate.ITranslateProvider, tmhDynamicLocaleProvider: any) {
28 28 let defaultLanguage = (<any>navigator)['languages'] ? (<any>navigator)['languages'][0] : (navigator.language || (<any>navigator)['userLanguage']);
29   - defaultLanguage = defaultLanguage ? defaultLanguage.replace(/-br|-us/i, '') : 'en';
  29 + defaultLanguage = defaultLanguage && (<any>navigator)['userAgent'].indexOf('PhantomJS') === -1 ? defaultLanguage.replace(/-br|-us/i, '') : 'en';
30 30  
31 31 $translateProvider.useStaticFilesLoader({
32 32 prefix: '/languages/',
... ...