-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add translate="no" tags throughout the project
We skip translation only on names of modules, types, functions, and code snippets. For example, the subsection inside a module page are still translated. The rationale is that terms like "function" and "macro" appear as is in the text, without code tags, therefore they are translated, so they same should apply to subsections headers.
- Loading branch information
Showing
20 changed files
with
110 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lib/ex_doc/formatter/html/templates/api_reference_entry_template.eex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 52 additions & 51 deletions
103
lib/ex_doc/formatter/html/templates/module_template.eex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,57 @@ | ||
<%= head_template(config, %{title: module.title, type: module.type}) %> | ||
<%= sidebar_template(config, nodes_map) %> | ||
<%= head_template(config, %{title: module.title, type: module.type}) %> | ||
<%= sidebar_template(config, nodes_map) %> | ||
|
||
<h1> | ||
<%= module_title(module) %> <small class="app-vsn">(<%= config.project %> v<%= config.version %>)</small> | ||
<%= if module.source_url do %> | ||
<a href="<%= module.source_url %>" title="View Source" class="view-source" rel="help"> | ||
<span class="icon-code" aria-hidden="true"></span> | ||
<span class="sr-only">View Source</span> | ||
</a> | ||
<% end %> | ||
<%= for annotation <- module.annotations do %> | ||
<span class="note">(<%= annotation %>)</span> | ||
<% end %> | ||
</h1> | ||
<h1> | ||
<span translate="no"><%= module.title %></span> <%= module_type(module) %> | ||
<small class="app-vsn" translate="no">(<%= config.project %> v<%= config.version %>)</small> | ||
<%= if module.source_url do %> | ||
<a href="<%= module.source_url %>" title="View Source" class="view-source" rel="help"> | ||
<span class="icon-code" aria-hidden="true"></span> | ||
<span class="sr-only">View Source</span> | ||
</a> | ||
<% end %> | ||
<%= for annotation <- module.annotations do %> | ||
<span class="note">(<%= annotation %>)</span> | ||
<% end %> | ||
</h1> | ||
|
||
<%= if deprecated = module.deprecated do %> | ||
<div class="deprecated"> | ||
This <%= module.type %> is deprecated. <%= h(deprecated) %>. | ||
</div> | ||
<% end %> | ||
<%= if deprecated = module.deprecated do %> | ||
<div class="deprecated"> | ||
This <%= module.type %> is deprecated. <%= h(deprecated) %>. | ||
</div> | ||
<% end %> | ||
|
||
<%= if doc = module.rendered_doc do %> | ||
<section id="moduledoc"> | ||
<%= link_moduledoc_headings(doc) %> | ||
</section> | ||
<% end %> | ||
<%= if doc = module.rendered_doc do %> | ||
<section id="moduledoc"> | ||
<%= link_moduledoc_headings(doc) %> | ||
</section> | ||
<% end %> | ||
|
||
<%= if Enum.any?(summary, fn {_, v} -> v != [] end) do %> | ||
<section id="summary" class="details-list"> | ||
<h1 class="section-heading"> | ||
<a class="hover-link" href="#summary"> | ||
<span class="icon-link" aria-hidden="true"></span> | ||
<span class="sr-only">Link to this section</span> | ||
</a> | ||
Summary | ||
</h1> | ||
<%= for {name, nodes} <- summary, do: summary_template(name, nodes) %> | ||
</section> | ||
<% end %> | ||
<%= if Enum.any?(summary, fn {_, v} -> v != [] end) do %> | ||
<section id="summary" class="details-list"> | ||
<h1 class="section-heading"> | ||
<a class="hover-link" href="#summary"> | ||
<span class="icon-link" aria-hidden="true"></span> | ||
<span class="sr-only">Link to this section</span> | ||
</a> | ||
Summary | ||
</h1> | ||
<%= for {name, nodes} <- summary, do: summary_template(name, nodes) %> | ||
</section> | ||
<% end %> | ||
|
||
<%= for {name, nodes} <- summary, nodes != [], key = HTML.text_to_id(name) do %> | ||
<section id="<%= key %>" class="details-list"> | ||
<h1 class="section-heading"> | ||
<a class="hover-link" href="#<%= key %>"> | ||
<span class="icon-link" aria-hidden="true"></span> | ||
<span class="sr-only">Link to this section</span> | ||
</a> | ||
<%= name %> | ||
</h1> | ||
<div class="<%= key %>-list"> | ||
<%= for node <- nodes, do: detail_template(node, module) %> | ||
</div> | ||
</section> | ||
<% end %> | ||
<%= footer_template(config, module) %> | ||
<%= for {name, nodes} <- summary, nodes != [], key = HTML.text_to_id(name) do %> | ||
<section id="<%= key %>" class="details-list"> | ||
<h1 class="section-heading"> | ||
<a class="hover-link" href="#<%= key %>"> | ||
<span class="icon-link" aria-hidden="true"></span> | ||
<span class="sr-only">Link to this section</span> | ||
</a> | ||
<%= name %> | ||
</h1> | ||
<div class="<%= key %>-list"> | ||
<%= for node <- nodes, do: detail_template(node, module) %> | ||
</div> | ||
</section> | ||
<% end %> | ||
<%= footer_template(config, module) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
lib/ex_doc/formatter/html/templates/summary_entry_template.eex
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.