-
Notifications
You must be signed in to change notification settings - Fork 463
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
Support for localized API documentation #232
Conversation
<% if @languages && @languages.size > 1 %> | ||
<li class='pull-right'> | ||
<% if @versions %> | ||
[ <%= @languages.collect { |l| link = link_to(l, "#{@doc[:resources].values.first[:version]}.#{l}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a candidate for extracting to a helper method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, I would go with 'lang' instead of 'l' to be a bit more descriptive
Looks good, waiting for some documentation |
Let me know if you need help. I'm going to use APIpie for documenting a new API at work, in Russian. Willing to invest time into making APIpie output localizable. |
@vassilevsky, It would be really great if you could test this PR and check if the docs are explaining things sufficiently to get going. It would be also helpful to know what setup do you use for your project. I'd appreciate any coments. |
I will do this during this week and will let you know if I run into problems. As regards project setup, which details do you need? |
@vassilevsky, thanks for the details. This patch shouldn't tighten dependeces of apipie in any way so it should just work. I'm more interested in what tools you use in your translations toolchain (I18n, Gettext, etc.). Sorry, I should have been more speciffic. |
Nicely done! merging now |
Support for localized API documentation
0.2.0 released |
Congratulations to @mbacovsky ! We only use I18n and only when we have long strings we would like to substitute with shorter ones in code. We write shorter Russian phrases and words right in the code :) We use Ruby 2 so we don't even need to add the magic comments with encoding at the top of the files anymore :) We also use the gem called russian. Looks like I will start documenting the API tomorrow. |
@vassilevsky, we use FastGettext for our project, but I'll gladly help to tune it for I18n if neccessary. Let me know if you meet any obstacles in localizing API in you environment. |
I have to let you know that I haven't yet documented the API with Apipie. The show stopper is our internal company requirement for all documentation to be in Confluence. Because of that, I need to be able to export documentation to Confluence Wiki Markup. Now, that is quite a rare feature. Fortunately, there exists a gem called |
@vassilevsky, thanks for letting me know. I'm not sure if the extra features apipie offers (ruby API bindings for free, easy to get CLI,..) are worth it for you, but it may be interesting to try to add export to markdown to apipie. It shouldn't be that difficult. |
Yeah, unfortunately we don't support that by now, but you're not the one to ask #63. There are two approaches that could handle that:
The 2. seems to be like long-term better solution, as there are other folks using the same API for other purposes, that could be shared |
@vassilevsky @iNecas we're also interested to be able to export Apipie documentation to others common formats used by lot's of services. So happy to help if someone begin to work on this feature. |
All rake tasks and apipie controller should support multiple languages