Skip to content

Commit

Permalink
Merge pull request #20 from bigBear713/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
bigBear713 committed Mar 11, 2023
2 parents daecc5d + 601f182 commit 6c47f14
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- feat: [`<nb-trans></nb-trans>`](https://github.com/bigBear713/nb-trans/blob/master/projects/nb-trans/README.md#nb-transnb-trans) - Support to be imported as a `standalone component`
- feat: [`[nb-trans-subcontent]`](https://github.com/bigBear713/nb-trans/blob/master/projects/nb-trans/README.md#nb-trans-subcontent) - Support to be imported as a `standalone component`

## [Pipes](https://github.com/bigBear713/nb-common/blob/master/projects/nb-common/README.md#Pipes "Pipes")
## [Pipes](https://github.com/bigBear713/nb-trans/blob/master/projects/nb-trans/README.md#Pipes "Pipes")
- feat: [nbTrans](https://github.com/bigBear713/nb-trans/blob/master/projects/nb-trans/README.md#nbtrans-transformkey-string-options-inbtransoptions-string) - Support to be imported as a `standalone component`

<br/>
Expand Down
4 changes: 4 additions & 0 deletions README.CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Angular translation lib by bigBear713.
- [中文](https://github.com/bigBear713/nb-trans/blob/master/CHANGELOG.CN.md "更新日志 - 中文")
- [English](https://github.com/bigBear713/nb-trans/blob/master/CHANGELOG.md "Changelog - English")

## Readme
- [中文](https://github.com/bigBear713/nb-trans/blob/master/README.CN.md "文档 - 中文")
- [English](https://github.com/bigBear713/nb-trans/blob/master/README.md "Document - English")

## Feature
- 支持翻译文本懒加载,或者急性加载;
- 支持切换语言时,不刷新页面自动更新翻译文本;
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Angular translation lib by bigBear713.
- [中文](https://github.com/bigBear713/nb-trans/blob/master/CHANGELOG.CN.md "更新日志 - 中文")
- [English](https://github.com/bigBear713/nb-trans/blob/master/CHANGELOG.md "Changelog - English")

## Readme
- [中文](https://github.com/bigBear713/nb-trans/blob/master/README.CN.md "文档 - 中文")
- [English](https://github.com/bigBear713/nb-trans/blob/master/README.md "Document - English")

## Feature
- Support to direct/lazing loading translation file;
- Support to update translation content in page directly and no need to reload page;
Expand Down
51 changes: 51 additions & 0 deletions projects/nb-trans/README.CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,23 @@ this.transService.subscribeLoadDefaultOver().subscribe(over=>{
<ng-container *ngTemplateOutlet="compContent,context:{list}"></ng-container>
</ng-template>
```
```ts
// v15.1.0新增
// 在NgModule中引入
@NgModule({
imports:[NbTransComponent],
// ...
})
export class XXXModule{}

// 在standalone component中引入
@Component({
standalone:true,
imports:[NbTransComponent],
// ...
})
export class XXXComponent{}
```

<br>

Expand Down Expand Up @@ -194,6 +211,23 @@ this.transService.subscribeLoadDefaultOver().subscribe(over=>{
<b>{{comContent}}</b>
</ng-template>
```
```ts
// v15.1.0新增
// 在NgModule中引入
@NgModule({
imports:[NbTransSubcontentComponent],
// ...
})
export class XXXModule{}

// 在standalone component中引入
@Component({
standalone:true,
imports:[NbTransSubcontentComponent],
// ...
})
export class XXXComponent{}
```

<br>

Expand Down Expand Up @@ -224,6 +258,23 @@ this.transService.subscribeLoadDefaultOver().subscribe(over=>{
<div>{{'title'|nbTrans:options}}</div>
<div>{{'helloWorld'|nbTrans:({prefix:'content'})}}</div>
```
```ts
// v15.1.0新增
// 在NgModule中引入
@NgModule({
imports:[NbTransPipe],
// ...
})
export class XXXModule{}

// 在standalone component中引入
@Component({
standalone:true,
imports:[NbTransPipe],
// ...
})
export class XXXComponent{}
```

<br>

Expand Down
51 changes: 51 additions & 0 deletions projects/nb-trans/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,23 @@ this.transService.subscribeLoadDefaultOver().subscribe(over=>{
<ng-container *ngTemplateOutlet="compContent,context:{list}"></ng-container>
</ng-template>
```
```ts
// New in the v15.1.0
// imported in NgModule
@NgModule({
imports:[NbTransComponent],
// ...
})
export class XXXModule{}

// imported in standalone component
@Component({
standalone:true,
imports:[NbTransComponent],
// ...
})
export class XXXComponent{}
```

<br>

Expand Down Expand Up @@ -193,6 +210,23 @@ this.transService.subscribeLoadDefaultOver().subscribe(over=>{
<b>{{comContent}}</b>
</ng-template>
```
```ts
// New in the v15.1.0
// imported in NgModule
@NgModule({
imports:[NbTransSubcontentComponent],
// ...
})
export class XXXModule{}

// imported in standalone component
@Component({
standalone:true,
imports:[NbTransSubcontentComponent],
// ...
})
export class XXXComponent{}
```

<br>

Expand Down Expand Up @@ -222,6 +256,23 @@ this.transService.subscribeLoadDefaultOver().subscribe(over=>{
<div>{{'title'|nbTrans:options}}</div>
<div>{{'helloWorld'|nbTrans:({prefix:'content'})}}</div>
```
```ts
// New in the v15.1.0
// imported in NgModule
@NgModule({
imports:[NbTransPipe],
// ...
})
export class XXXModule{}

// imported in standalone component
@Component({
standalone:true,
imports:[NbTransPipe],
// ...
})
export class XXXComponent{}
```

<br>

Expand Down

0 comments on commit 6c47f14

Please sign in to comment.