Skip to content

Commit 16f79c1

Browse files
committed
fix(adev): 翻译文档框架
1 parent 5a58337 commit 16f79c1

38 files changed

+775
-878
lines changed

adev/shared-docs/components/cookie-popup/cookie-popup.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
@if (!hasAccepted()) {
22
<div class="docs-cookies-popup docs-invert-mode">
3-
<p>This site uses cookies from Google to deliver its services and to analyze traffic.</p>
3+
<p>本网站使用 Google 的 Cookie 来提供服务并分析流量。</p>
44

55
<div>
66
<a href="https://policies.google.com/technologies/cookies" target="_blank" rel="noopener">
7-
<button class="docs-primary-btn" [attr.text]="'Learn more'" aria-label="Learn More">
8-
Learn more
7+
<button class="docs-primary-btn" [attr.text]="'了解更多'" aria-label="了解更多">
8+
了解更多
99
</button>
1010
</a>
1111
<button
1212
type="button"
1313
(click)="accept()"
1414
class="docs-primary-btn"
15-
[attr.text]="'Ok, Got it'"
16-
aria-label="Ok, Got it"
15+
[attr.text]="'好的,我知道了'"
16+
aria-label="好的,我知道了"
1717
>
18-
Ok, Got it
18+
好的,我知道了
1919
</button>
2020
</div>
2121
</div>

adev/shared-docs/components/navigation-list/navigation-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<button
6666
type="button"
6767
(click)="toggle(item)"
68-
[attr.aria-label]="(item.isExpanded ? 'Collapse' : 'Expand') + ' ' + item.label"
68+
[attr.aria-label]="(item.isExpanded ? '收起' : '展开') + ' ' + item.label"
6969
[attr.aria-expanded]="item.isExpanded"
7070
class="docs-secondary-nav-button"
7171
[class.docs-faceted-list-item-active]="item | isActiveNavigationItem: activeItem()"

adev/shared-docs/components/search-dialog/search-dialog.component.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[ngModel]="searchQuery()"
77
(ngModelChange)="updateSearchQuery($event)"
88
class="docs-search-input"
9-
placeholder="Search docs"
9+
placeholder="搜索文档"
1010
/>
1111

1212
@if (searchResults() && searchResults()!.length > 0) {
@@ -49,7 +49,7 @@
4949
</div>
5050

5151
<!-- Page title -->
52-
<span class="docs-result-page-title">{{ result.hierarchy?.lvl0 }}</span>
52+
<span class="docs-result-page-title">{{ result.hierarchy.lvl0 }}</span>
5353
</a>
5454
</li>
5555
}
@@ -58,22 +58,23 @@
5858
<div class="docs-search-results docs-mini-scroll-track">
5959
@if (searchResults() === undefined) {
6060
<div class="docs-search-results__start-typing">
61-
<span>Start typing to see results</span>
61+
<span>开始输入以查看结果</span>
6262
</div>
6363
} @else if (searchResults()?.length === 0) {
6464
<div class="docs-search-results__no-results">
65-
<span>No results found</span>
65+
<span>未找到结果</span>
6666
</div>
6767
}
6868
</div>
6969
}
7070

7171
<div class="docs-algolia">
72-
<span>Search by</span>
72+
<span></span>
7373
<a target="_blank" rel="noopener"
7474
href="https://www.algolia.com/developers/?utm_source=angular.dev&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch">
7575
<docs-algolia-icon />
7676
</a>
77+
<span>提供搜索支持</span>
7778
</div>
7879
</div>
7980
</dialog>

adev/shared-docs/components/table-of-contents/table-of-contents.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<aside>
22
<nav>
33
<header>
4-
<h2 class="docs-title">On this page</h2>
4+
<h2 class="docs-title">在本页中</h2>
55
</header>
66
<ul class="docs-faceted-list">
77
<!-- TODO: Hide li elements with class docs-toc-item-h3 for laptop, table and phone screen resolutions -->
@@ -18,6 +18,6 @@ <h2 class="docs-title">On this page</h2>
1818
</nav>
1919
<button type="button" (click)="scrollToTop()">
2020
<docs-icon role="presentation">arrow_upward_alt</docs-icon>
21-
Back to the top
21+
返回顶部
2222
</button>
23-
</aside>
23+
</aside>

adev/shared-docs/components/top-level-banner/top-level-banner.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h1 tabindex="0" class="docs-top-level-banner-cta background"><span class="docs-
1313
</div>
1414
}
1515

16-
<button class="docs-top-level-banner-close" type="button" (click)="close()">
16+
<button class="docs-top-level-banner-close" type="button" (click)="close()" aria-label="关闭">
1717
<docs-icon class="docs-icon_high-contrast">close</docs-icon>
1818
</button>
1919
}

adev/src/app/app.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<button (click)="focusFirstHeading()" class="adev-skip">Skip to main content</button>
1+
<button (click)="focusFirstHeading()" class="adev-skip">跳转到主要内容</button>
22

33
@defer (when isBrowser) {
44
<adev-progress-bar />
5-
<docs-top-level-banner expiry="2024-12-10" id="state-of-js-2024" link="https://survey.devographics.com/en-US/survey/state-of-js/2024?source=angular_homepage" text="Share your experience with Angular in The State of JavaScript 2024 survey" />
5+
<docs-top-level-banner expiry="2024-12-10" id="state-of-js-2024" link="https://survey.devographics.com/en-US/survey/state-of-js/2024?source=angular_homepage" text="The State of JavaScript 2024 survey 中分享您的 Angular 体验" />
66
}
77

88
<div class="adev-nav"></div>

adev/src/app/core/constants/versions.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,67 +11,67 @@ export const VERSIONS_CONFIG = {
1111
aioVersions: [
1212
{
1313
version: 'v18',
14-
url: 'https://v18.angular.dev/overview',
14+
url: 'https://v18.angular.cn/overview',
1515
},
1616
{
1717
version: 'v17',
18-
url: 'https://v17.angular.io/docs',
18+
url: 'https://v17.angular.cn/docs',
1919
},
2020
{
2121
version: 'v16',
22-
url: 'https://v16.angular.io/docs',
22+
url: 'https://v16.angular.cn/docs',
2323
},
2424
{
2525
version: 'v15',
26-
url: 'https://v15.angular.io/docs',
26+
url: 'https://v15.angular.cn/docs',
2727
},
2828
{
2929
version: 'v14',
30-
url: 'https://v14.angular.io/docs',
30+
url: 'https://v14.angular.cn/docs',
3131
},
3232
{
3333
version: 'v13',
34-
url: 'https://v13.angular.io/docs',
34+
url: 'https://v13.angular.cn/docs',
3535
},
3636
{
3737
version: 'v12',
38-
url: 'https://v12.angular.io/docs',
38+
url: 'https://v12.angular.cn/docs',
3939
},
4040
{
4141
version: 'v11',
42-
url: 'https://v11.angular.io/docs',
42+
url: 'https://v11.angular.cn/docs',
4343
},
4444
{
4545
version: 'v10',
46-
url: 'https://v10.angular.io/docs',
46+
url: 'https://v10.angular.cn/docs',
4747
},
4848
{
4949
version: 'v9',
50-
url: 'https://v9.angular.io/docs',
50+
url: 'https://v9.angular.cn/docs',
5151
},
5252
{
5353
version: 'v8',
54-
url: 'https://v8.angular.io/docs',
54+
url: 'https://v8.angular.cn/docs',
5555
},
5656
{
5757
version: 'v7',
58-
url: 'https://v7.angular.io/docs',
58+
url: 'https://v7.angular.cn/docs',
5959
},
6060
{
6161
version: 'v6',
62-
url: 'https://v6.angular.io/docs',
62+
url: 'https://v6.angular.cn/docs',
6363
},
6464
{
6565
version: 'v5',
6666
url: 'https://v5.angular.io/docs',
6767
},
6868
{
6969
version: 'v4',
70-
url: 'https://v4.angular.io/docs',
70+
url: 'https://v4.angular.cn/docs',
7171
},
7272
{
7373
version: 'v2',
74-
url: 'https://v2.angular.io/docs',
74+
url: 'https://v2.angular.cn/docs',
7575
},
7676
],
7777
};
Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<div class="adev-footer-container">
22
<div class="adev-footer-columns">
33
<div>
4-
<h2>Social Media</h2>
4+
<h2>社交媒体</h2>
55
<ul>
66
<li>
7-
<a [href]="MEDIUM" title="Angular blog">Blog</a>
7+
<a [href]="MEDIUM" title="Angular 博客">博客</a>
88
</li>
99
<li>
10-
<a [href]="X" title="X (formerly Twitter)">X (formerly Twitter)</a>
10+
<a [href]="X" title="X (formerly Twitter)">X ( Twitter)</a>
1111
</li>
1212
<li>
1313
<a [href]="BLUESKY" title="Bluesky">Bluesky</a>
@@ -18,7 +18,7 @@ <h2>Social Media</h2>
1818
<li>
1919
<a
2020
href="https://discord.gg/angular"
21-
title="Join the discussions at Angular Community Discord server."
21+
title="加入 Angular 社区 Discord 服务器的讨论吧!"
2222
>
2323
Discord
2424
</a>
@@ -29,74 +29,74 @@ <h2>Social Media</h2>
2929
<li>
3030
<a
3131
href="https://stackoverflow.com/questions/tagged/angular"
32-
title="Stack Overflow: where the community answers your technical Angular questions."
32+
title="Stack Overflow:社区为你解答技术上的 Angular 问题。"
3333
>
3434
Stack Overflow
3535
</a>
3636
</li>
3737
</ul>
3838
</div>
3939
<div>
40-
<h2>Community</h2>
40+
<h2>社区</h2>
4141
<ul>
4242
<li>
4343
<a
4444
href="https://github.com/angular/angular/blob/main/CONTRIBUTING.md"
45-
title="Contribute to Angular"
45+
title="Angular 做贡献"
4646
>
47-
Contribute
47+
做贡献
4848
</a>
4949
</li>
5050
<li>
5151
<a
5252
href="https://github.com/angular/code-of-conduct/blob/main/CODE_OF_CONDUCT.md"
53-
title="Treating each other with respect."
53+
title="彼此尊重"
5454
>
55-
Code of Conduct
55+
行为准则
5656
</a>
5757
</li>
5858
<li>
5959
<a
6060
href="https://github.com/angular/angular/issues"
61-
title="Post issues and suggestions on github."
61+
title="在 Github 上报告问题或提建议"
6262
>
63-
Report Issues
63+
报告问题
6464
</a>
6565
</li>
6666
<li>
6767
<a
6868
href="https://devlibrary.withgoogle.com/products/angular?sort=updated"
69-
title="Google's DevLibrary"
69+
title="Google 的开发库"
7070
>
71-
Google's DevLibrary
71+
Google 的 开发库
7272
</a>
7373
</li>
7474
<li>
7575
<a
7676
href="https://developers.google.com/community/experts/directory?specialization=angular"
77-
title="Angular Google Developer Experts"
77+
title="Angular Google 开发技术专家"
7878
>
79-
Angular Google Developer Experts
79+
Angular Google 开发技术专家
8080
</a>
8181
</li>
8282
</ul>
8383
</div>
8484
<div>
85-
<h2>Resources</h2>
85+
<h2>资源</h2>
8686
<ul>
8787
<li>
88-
<a routerLink="/press-kit" title="Press contacts, logos, and branding.">Press Kit</a>
88+
<a routerLink="/press-kit" title="媒体联系、标志和品牌形象。">宣传资料</a>
8989
</li>
9090
<li>
91-
<a routerLink="/roadmap" title="Roadmap">Roadmap</a>
91+
<a routerLink="/roadmap" title="路线图">路线图</a>
9292
</li>
9393
</ul>
9494
</div>
9595
<div>
96-
<h2>Languages</h2>
96+
<h2>多语言</h2>
9797
<ul>
9898
<li>
99-
<a href="https://angular.cn/" title="简体中文版">简体中文版</a>
99+
<a href="https://angular.dev/" title="English Version">English Version</a>
100100
</li>
101101
<li>
102102
<a href="https://angular.tw/" title="正體中文版">正體中文版</a>
@@ -119,10 +119,7 @@ <h2>Languages</h2>
119119
</div>
120120
</div>
121121
<p class="docs-license">
122-
Super-powered by Google ©2010-2025. Code licensed under an
123-
<a routerLink="/license" title="License text">MIT-style License</a>
124-
. Documentation licensed under
125-
<a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>
126-
.
122+
由 Google 强力赋能 ©2010-2025。代码以<a routerLink="/license" title="协议文本">MIT-style 协议</a>授权。文档以
123+
<a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a> 授权。
127124
</p>
128125
</div>

0 commit comments

Comments
 (0)