Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit 79d44cd

Browse files
Adopted SkyLibResourcesProvider (#3)
1 parent 6522f59 commit 79d44cd

File tree

6 files changed

+48
-16
lines changed

6 files changed

+48
-16
lines changed

package.json

+5-6
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@
3030
"@angular/core": "^4.3.6",
3131
"@angular/router": "^4.3.6",
3232
"@skyux/core": "^3.1.0",
33-
"@skyux/i18n": "^3.0.1",
33+
"@skyux/i18n": "^3.2.0",
3434
"@skyux/indicators": "^3.0.0-rc.0",
35-
"@skyux/popovers": "^3.0.0-rc.0",
36-
"rxjs": "^5.4.3"
35+
"@skyux/popovers": "^3.0.0-rc.0"
3736
},
3837
"dependencies": {},
3938
"devDependencies": {
@@ -48,12 +47,12 @@
4847
"@angular/platform-browser-dynamic": "4.3.6",
4948
"@angular/router": "4.3.6",
5049
"@blackbaud/skyux": "2.26.0",
51-
"@blackbaud/skyux-builder": "1.24.0",
50+
"@blackbaud/skyux-builder": "1.25.0",
5251
"@skyux/core": "3.1.0",
53-
"@skyux/i18n": "3.0.1",
52+
"@skyux/i18n": "3.2.0",
5453
"@skyux/indicators": "3.0.0-rc.0",
5554
"@skyux/popovers": "3.0.0-rc.0",
56-
"@skyux-sdk/builder-plugin-skyux": "1.0.0-rc.0",
55+
"@skyux-sdk/builder-plugin-skyux": "1.0.0-rc.3",
5756
"core-js": "2.4.1",
5857
"rxjs": "5.4.3",
5958
"ts-node": "3.0.4",

src/app/public/modules/search/search.component.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<button
44
class="sky-btn sky-btn-default sky-search-btn-open"
55
type="button"
6-
[attr.title]="'skyux_search_open' | skyAppResources"
6+
[attr.title]="'skyux_search_open' | skyLibResources"
77
[hidden]="!searchButtonShown"
88
[ngClass]="{'sky-search-btn-open-applied': clearButtonShown}"
99
(click)="toggleSearchInput(true)"
@@ -33,8 +33,8 @@
3333
<input
3434
class="sky-form-control sky-search-input sky-rounded-corners"
3535
type="text"
36-
[attr.aria-label]="'skyux_search_label' | skyAppResources"
37-
[attr.placeholder]="placeholderText || ('skyux_search_placeholder' | skyAppResources)"
36+
[attr.aria-label]="'skyux_search_label' | skyLibResources"
37+
[attr.placeholder]="placeholderText || ('skyux_search_placeholder' | skyLibResources)"
3838
[disabled]="disabled"
3939
[ngModel]="searchText"
4040
(blur)="inputFocused(false)"
@@ -65,7 +65,7 @@
6565
<button
6666
class="sky-btn sky-btn-default sky-search-btn sky-search-btn-apply"
6767
type="button"
68-
[attr.aria-label]="'skyux_search_label' | skyAppResources"
68+
[attr.aria-label]="'skyux_search_label' | skyLibResources"
6969
[disabled]="disabled"
7070
(click)="applySearchText(searchText)"
7171
>
@@ -85,7 +85,7 @@
8585
*ngIf="mobileSearchShown"
8686
class="sky-btn sky-btn-secondary sky-search-btn-dismiss"
8787
type="button"
88-
[attr.title]="'skyux_search_dismiss' | skyAppResources"
88+
[attr.title]="'skyux_search_dismiss' | skyLibResources"
8989
(click)="toggleSearchInput(false)"
9090
>
9191
<sky-icon

src/app/public/modules/search/search.module.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ import {
1515
SkyMediaQueryModule
1616
} from '@skyux/core';
1717

18-
import {
19-
SkyI18nModule
20-
} from '@skyux/i18n';
21-
2218
import {
2319
SkyIconModule
2420
} from '@skyux/indicators';
2521

22+
import {
23+
SkyLookupResourcesModule
24+
} from '../shared';
25+
2626
import {
2727
SkySearchComponent
2828
} from './search.component';
@@ -34,7 +34,7 @@ import {
3434
imports: [
3535
BrowserAnimationsModule,
3636
CommonModule,
37-
SkyI18nModule,
37+
SkyLookupResourcesModule,
3838
SkyMediaQueryModule,
3939
FormsModule,
4040
SkyIconModule
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './lookup-resources.module';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import {
2+
NgModule
3+
} from '@angular/core';
4+
5+
import {
6+
SKY_LIB_RESOURCES_PROVIDERS,
7+
SkyI18nModule
8+
} from '@skyux/i18n';
9+
10+
import {
11+
SkyLookupResourcesProvider
12+
} from '../../plugin-resources/lookup-resources-provider';
13+
14+
@NgModule({
15+
exports: [
16+
SkyI18nModule
17+
],
18+
providers: [{
19+
provide: SKY_LIB_RESOURCES_PROVIDERS,
20+
useClass: SkyLookupResourcesProvider,
21+
multi: true
22+
}]
23+
})
24+
export class SkyLookupResourcesModule { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import {
2+
SkyAppLocaleInfo,
3+
SkyLibResourcesProvider
4+
} from '@skyux/i18n';
5+
6+
export class SkyLookupResourcesProvider implements SkyLibResourcesProvider {
7+
public getString: (localeInfo: SkyAppLocaleInfo, ...args: any[]) => string;
8+
}

0 commit comments

Comments
 (0)