Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for localized API documentation
- Loading branch information
Showing
24 changed files
with
233 additions
and
113 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,6 @@ | |||
<% if @languages && @languages.size > 1 %> | |||
<li class='pull-right'> | |||
[ <%= @languages.collect { |lang| link = link_to(lang, "#{doc_url}.#{lang}.html"); | |||
lang==@language ? content_tag(:b, link) : link }.join(' | ').html_safe %> ] | |||
</li> | |||
<% end %> |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,14 +1,17 @@ | |||
<h1 class='page-header'> | <h1 class='page-header'> | ||
Oops! | <%= t('apipie.oops') %> | ||
<small> | <small> | ||
<% if @resource == 'null' %> | <% if @resource == 'null' %> | ||
Resource <code><%= params[:resource] %></code> not found. | <%= t('apipie.resource_not_found_html', :resource => "<code>#{params[:resource]}</code>") %> | ||
<% else %> | <% else %> | ||
Method <code><%= params[:method] %></code> not found for resource <code><%= params[:resource] %></code>. | <%= t('apipie.method_not_found_html', :resource => "<code>#{params[:resource]}</code>", | ||
:method => "<code>#{params[:resource]}</code>" %> | |||
<% end %> | <% end %> | ||
</small> | </small> | ||
</h1> | </h1> | ||
|
|
||
<% if @doc %> | <% if @doc %> | ||
Try going to <a href='<%= @doc[:doc_url] %><%= @doc[:link_extension] %>'><%= @doc[:name] %> API documentation homepage</a> | <%= t('apipie.goto_homepage_html', :href = link_to( | ||
t('apipie.goto_homepage_href', :app_name => @doc[:name]), | |||
File.join(@doc[:doc_url], @doc[:link_extension]))) %> | |||
<% end %> | <% end %> |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,4 +1,6 @@ | |||
<h1 class='page-header'>No documentation found</h1> | <h1 class='page-header'><%= t('apipie.no_doc_found') %></h1> | ||
<p>We have not found any documentation for your API.</p> | <p><%= t('apipie.no_docs_found_descr') %></p> | ||
<p>Follow <a href="https://github.com/Pajk/apipie-rails#getting-started" target="_blank">further instructions</a> on how to describe your controllers.</p> | <p><%= t('apipie.follow_instructions_html', | ||
:href => link_to(t('apipie.follow_instructions_href'), | |||
"https://github.com/Pajk/apipie-rails#getting-started", :target => "_blank")) %></p> | |||
|
|
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
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
en: | |||
apipie: | |||
resources: Resources | |||
resource: Resource | |||
description: Description | |||
no_docs_found: No documentation found | |||
no_docs_found_descr: We have not found any documentation for your API. | |||
follow_instructions_html: Follow %{href} on how to describe your controllers. | |||
follow_instructions_href: further instructions | |||
oops: Oops!! | |||
resource_not_found_html: Resource %{res} not found. | |||
method_not_found_html: Method %{method} not found for resource %{resource}. | |||
goto_homepage_html: Try going to %{href} | |||
goto_homepage_href: "%{app_name} API documentation homepage" | |||
required: required | |||
optional: optional | |||
nil_allowed: nil allowed | |||
param_name: Param name | |||
params: Params | |||
examples: Examples | |||
metadata: Metadata | |||
errors: Errors | |||
supported_formats: Supported Formats | |||
enable_javascript_html: Please enable JavaScript to view the %{comments_href}. | |||
comments_powered_by_disqus: comments powered by %{disqus} | |||
api_documentation: API documentation | |||
|
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.