Skip to content

Commit 18210e2

Browse files
committed
Merge branch 'develop' of ssh://github.com/shufps/ESP-Miner-NerdQAxe- into develop
2 parents c74480c + 4953483 commit 18210e2

6 files changed

Lines changed: 611 additions & 3 deletions

File tree

main/http_server/axe-os/src/app/@i18n/container/language-selector/language-selector.component.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
<span class="flag-icon flag-icon-pl"></span>
3434
Polski
3535
</nb-option>
36+
<nb-option value="zh-CN">
37+
<span class="flag-icon flag-icon-cn"></span>
38+
简体中文
3639
<nb-option value="da">
3740
<span class="flag-icon flag-icon-dk"></span>
3841
Dansk

main/http_server/axe-os/src/app/@i18n/container/language-selector/language-selector.component.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@
2020
.flag-icon-es, .flag-icon-de, .flag-icon-it, .flag-icon-ro {
2121
background-color: #ccc;
2222
}
23-
}
23+
24+
.flag-icon-cn {
25+
background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAzMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjMwIiBoZWlnaHQ9IjIwIiBmaWxsPSIjREUwMDAwIi8+CjxwYXRoIGQ9Ik04IDRMMTAgOS41SDE0TDEwLjggMTIuOUwxMiAzMEw4IDE1LjNMMTAgOS41SDZMOCA0WiIgZmlsbD0iI0ZGREYwMCIvPgo8L3N2Zz4=');
26+
}
27+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export type Language = 'fr' | 'en' | 'de' | 'es' | 'it' | 'ro' | 'pl' | 'da';
1+
export type Language = 'fr' | 'en' | 'de' | 'es' | 'it' | 'ro' | 'pl' | 'da' | 'zh-CN';

main/http_server/axe-os/src/app/app.component.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ describe('AppComponent', () => {
4444
expect(app.title).toEqual('axe-os');
4545
});
4646

47+
it('should register simplified Chinese as an available language', () => {
48+
TestBed.createComponent(AppComponent);
49+
const translate = TestBed.inject(TranslateService) as unknown as TranslateServiceMock;
50+
expect(translate.addLangs).toHaveBeenCalledWith(['en', 'fr', 'es', 'de', 'it', 'ro', 'pl', 'zh-CN']);
51+
});
52+
4753
it('should render the router outlet', () => {
4854
const fixture = TestBed.createComponent(AppComponent);
4955
fixture.detectChanges();

main/http_server/axe-os/src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class AppComponent {
1616
private store: Store<fromI18n.State>
1717
) {
1818
// Set available languages
19-
translate.addLangs(['en', 'fr', 'es', 'de', 'it', 'ro', 'pl', 'da']);
19+
translate.addLangs(['en', 'fr', 'es', 'de', 'it', 'ro', 'pl', 'da', 'zh-CN']);
2020

2121
translate.setDefaultLang('en');
2222

0 commit comments

Comments
 (0)