Skip to content

Commit

Permalink
feat: Angular 15 Support (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
cerinoligutom authored Feb 21, 2023
1 parent 5b5c86e commit f4be106
Show file tree
Hide file tree
Showing 13 changed files with 5,485 additions and 5,927 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ An [Angular](https://angular.io/) library for [Fluent](https://projectfluent.org

Latest version available for each version of Angular

| Angular | @zeferinix/ngx-fluent | @fluent/bundle |
|---------|-----------------------|----------------|
| 13.x | >= 1.0 | < 1.x |
| 14.x | >= 1.1 | < 1.x |
| @zeferinix/ngx-fluent | Angular | @fluent/bundle |
| --------------------- | ------- | -------------- |
| >= 1.0 | 13.x | < 1.x |
| >= 1.1 | 14.x | < 1.x |
| >= 1.2 | 15.x | < 1.x |

## Installation

Expand Down Expand Up @@ -38,6 +39,8 @@ import { NgxFluentModule } from '@zeferinix/ngx-fluent';

The library needs to know where to locate the `.ftl` files so you have to provide this first (preferably on the root of your app such as `app.component.ts`) by providing a flat object where the `key` is the `locale` code and the `value` is the `source` then passing this object to the `setTranslationSourceMap()` method of the service.

*Note: Translation sources are lazy loaded then cached in memory. Translation source for the respective locale is only loaded after calling the `setLocale()` method.*

```ts
import { Component, OnInit } from '@angular/core';
import { NgxFluentService } from '@zeferinix/ngx-fluent';
Expand Down
8 changes: 8 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,13 @@
"schematicCollections": [
"@angular-eslint/schematics"
]
},
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
}
}
Loading

0 comments on commit f4be106

Please sign in to comment.