Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typedoc theme): allow shell localization typedoc theme #2704

Merged
merged 7 commits into from
Oct 12, 2018
2 changes: 1 addition & 1 deletion extras/docs/themes/typedoc/src/partials/breadcrumb.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{else}}
{{#if url}}
<li>
<a href="{{relativeURL url}}">Globals</a>
<a href="{{relativeURL url}}">{{#localize}}Globals{{/localize}}</a>
</li>
{{/if}}
{{/if}}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{{> comment}}

{{#if typeParameters}}
<h4 class="tsd-type-parameters-title">Type parameters</h4>
<h4 class="tsd-type-parameters-title">{{#localize}}Type parameters{{/localize}}</h4>
{{> typeParameters}}
{{/if}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
{{> comment}}

{{#if typeParameters}}
<h4 class="tsd-type-parameters-title">Type parameters</h4>
<h4 class="tsd-type-parameters-title">{{#localize}}Type parameters{{/localize}}</h4>
{{> typeParameters}}
{{/if}}

{{#if parameters}}
<h4 class="tsd-parameters-title">Parameters</h4>
<h4 class="tsd-parameters-title">{{#localize}}Parameters{{/localize}}</h4>
<ul class="tsd-parameters">
{{#each parameters}}
<li>
Expand Down Expand Up @@ -42,7 +42,7 @@
{{/if}}

{{#if type}}
<h4 class="tsd-returns-title">Returns {{#with type}}{{>type}}{{/with}}</h4>
<h4 class="tsd-returns-title"><span>{{#localize}}Returns{{/localize}}</span> {{#with type}}{{>type}}{{/with}}</h4>

{{#if comment.returns}}
{{#markdown}}{{{comment.returns}}}{{/markdown}}
Expand Down
10 changes: 5 additions & 5 deletions extras/docs/themes/typedoc/src/partials/member.sources.hbs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<aside class="tsd-sources">
{{#if implementationOf}}
<p>Implementation of {{#with implementationOf}}{{> typeAndParent}}{{/with}}</p>
<p><span>{{#localize}}Implementation of{{/localize}}</span> {{#with implementationOf}}{{> typeAndParent}}{{/with}}</p>
{{/if}}
{{#if inheritedFrom}}
<p>Inherited from {{#with inheritedFrom}}{{> typeAndParent}}{{/with}}</p>
<p><span>{{#localize}}Inherited from{{/localize}}</span> {{#with inheritedFrom}}{{> typeAndParent}}{{/with}}</p>
{{/if}}
{{#if overwrites}}
<p>Overrides {{#with overwrites}}{{> typeAndParent}}{{/with}}</p>
<p><span>{{#localize}}Overrides{{/localize}}</span> {{#with overwrites}}{{> typeAndParent}}{{/with}}</p>
{{/if}}
{{#if sources}}
<ul>
{{#each sources}}
{{#if url}}
<li>Defined in <a href="{{url}}">{{fileName}}:{{line}}</a></li>
<li><span>{{#localize}}Defined in{{/localize}}</span> <a href="{{url}}">{{fileName}}:{{line}}</a></li>
{{else}}
<li>Defined in {{fileName}}:{{line}}</li>
<li><span>{{#localize}}Defined in{{/localize}}</span> {{fileName}}:{{line}}</li>
{{/if}}
{{/each}}
</ul>
Expand Down
8 changes: 4 additions & 4 deletions extras/docs/themes/typedoc/src/templates/reflection.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@

{{#if model.typeParameters}}
<section class="tsd-panel tsd-type-parameters">
<h3>Type parameters</h3>
<h3>{{#localize}}Type parameters{{/localize}}</h3>
{{#with model}}{{> typeParameters}}{{/with}}
</section>
{{/if}}

{{#if model.typeHierarchy}}
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<h3>{{#localize}}Hierarchy{{/localize}}</h3>
{{#with model.typeHierarchy}}{{> hierarchy}}{{/with}}
</section>
{{/if}}

{{#if model.implementedTypes}}
<section class="tsd-panel">
<h3>Implements</h3>
<h3>{{#localize}}Implements{{/localize}}</h3>
<ul class="tsd-hierarchy">
{{#each model.implementedTypes}}
<li>{{> type}}</li>
Expand All @@ -33,7 +33,7 @@

{{#if model.implementedBy}}
<section class="tsd-panel">
<h3>Implemented by</h3>
<h3>{{#localize}}Implemented by{{/localize}}</h3>
<ul class="tsd-hierarchy">
{{#each model.implementedBy}}
<li>{{> type}}</li>
Expand Down