New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@larscom/ngx-translate-module-loader

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@larscom/ngx-translate-module-loader - npm Package Compare versions

Comparing version 3.1.2 to 3.1.3

4

package.json
{
"name": "@larscom/ngx-translate-module-loader",
"version": "3.1.2",
"version": "v3.1.3",
"description": "Highly configurable and flexible translations loader for ngx-translate. Fetch multiple translations, each translation file gets it's own namespace by default",

@@ -31,3 +31,3 @@ "repository": {

"dependencies": {
"ramda": "^0.29.0",
"ramda": "^0.29.1",
"tslib": "^2.6.0"

@@ -34,0 +34,0 @@ },

@@ -8,5 +8,2 @@ # @larscom/ngx-translate-module-loader

[![master](https://github.com/larscom/ngx-translate-module-loader/actions/workflows/master-build.yml/badge.svg?branch=master)](https://github.com/larscom/ngx-translate-module-loader/actions/workflows/master-build.yml)
[![CodeQL](https://github.com/larscom/ngx-translate-module-loader/actions/workflows/codeql-analysis.yml/badge.svg?branch=master)](https://github.com/larscom/ngx-translate-module-loader/actions/workflows/codeql-analysis.yml)
> Highly configurable and flexible translations loader for [@ngx-translate/core](https://github.com/ngx-translate/core). Fetch multiple translations (http only) and configure them to your needs. Each translation file has it's own **namespace** out of the box so the key/value pairs do not conflict with each other.

@@ -23,3 +20,3 @@

```bash
npm i --save @larscom/ngx-translate-module-loader
npm install @larscom/ngx-translate-module-loader
```

@@ -39,11 +36,11 @@

```ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpClientModule, HttpClient } from '@angular/common/http';
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import { ModuleTranslateLoader, IModuleTranslationOptions } from '@larscom/ngx-translate-module-loader';
import { AppComponent } from './app';
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { HttpClientModule, HttpClient } from '@angular/common/http'
import { TranslateModule, TranslateLoader } from '@ngx-translate/core'
import { ModuleTranslateLoader, IModuleTranslationOptions } from '@larscom/ngx-translate-module-loader'
import { AppComponent } from './app'
export function moduleHttpLoaderFactory(http: HttpClient) {
const baseTranslateUrl = './assets/i18n';
const baseTranslateUrl = './assets/i18n'

@@ -59,5 +56,5 @@ const options: IModuleTranslationOptions = {

]
};
}
return new ModuleTranslateLoader(http, options);
return new ModuleTranslateLoader(http, options)
}

@@ -81,3 +78,3 @@

constructor(readonly translate: TranslateService) {
translate.setDefaultLang('en');
translate.setDefaultLang('en')
}

@@ -95,3 +92,3 @@ }

export function moduleHttpLoaderFactory(http: HttpClient) {
const baseTranslateUrl = './assets/i18n';
const baseTranslateUrl = './assets/i18n'

@@ -107,4 +104,4 @@ const options: IModuleTranslationOptions = {

]
};
return new ModuleTranslateLoader(http, options);
}
return new ModuleTranslateLoader(http, options)
}

@@ -146,15 +143,15 @@ ```

*/
modules: IModuleTranslation[];
modules: IModuleTranslation[]
/**
* By default, each module gets its own namespace so it doesn't conflict with other modules
*/
disableNamespace?: boolean;
disableNamespace?: boolean
/**
* By default, namespaces are uppercase
*/
lowercaseNamespace?: boolean;
lowercaseNamespace?: boolean
/**
* By default, it'll perform a deepmerge when merging translation files
*/
deepMerge?: boolean;
deepMerge?: boolean
/**

@@ -165,3 +162,3 @@ * Set a version to prevent the browser from caching the translation files.

*/
version?: string | number;
version?: string | number
/**

@@ -172,3 +169,3 @@ * Function that gets executed if an error occurred while retrieving a translation file

*/
translateError?: (error: any, path: string) => void;
translateError?: (error: any, path: string) => void
/**

@@ -178,3 +175,3 @@ * Custom translate merge function after retrieving all translation files

*/
translateMerger?: (translations: Translation[]) => Translation;
translateMerger?: (translations: Translation[]) => Translation
/**

@@ -185,3 +182,3 @@ * Provide custom headers at 'root' level, which means this headers gets added to every request

*/
headers?: HttpHeaders;
headers?: HttpHeaders
}

@@ -199,3 +196,3 @@ ```

*/
moduleName?: string;
moduleName?: string
/**

@@ -208,3 +205,3 @@ * The base translate URL

*/
baseTranslateUrl: string;
baseTranslateUrl: string
/**

@@ -216,3 +213,3 @@ * By default, it uses the moduleName as namespace

*/
namespace?: string;
namespace?: string
/**

@@ -222,3 +219,3 @@ * Custom translation map function after retrieving a translation file

*/
translateMap?: (translation: Translation) => Translation;
translateMap?: (translation: Translation) => Translation
/**

@@ -235,7 +232,7 @@ * Custom path template for fetching translations

*/
pathTemplate?: string;
pathTemplate?: string
/**
* Provide custom headers at 'module' level. These headers only apply to this module.
*/
headers?: HttpHeaders;
headers?: HttpHeaders
}

@@ -262,3 +259,3 @@ ```

]
};
}
```

@@ -265,0 +262,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc