Closed grahamsutton closed 1 year ago
I've also encountered this issue. It's currently impossible to translate method descriptions.
@grahamsutton Did you ever find a resolution to the problem?
I submitted a PR just now to solve this. The reason is that the translation key is converted to HTML from markdown before the translation so it becomes <p>translation_key</p>
which the I18n engine cannot find of course as it is translation_key
in the language files.
Just by changing this the description is displayed and translated as expected. See PR #808
I am trying to pass in a translation in the
description
option for one of my actions and the translation comes up as just plaintext. I am aware that the documentation states that thedescription
option will be converted to HTML, but is there any support for this feature to allow me to pass translations in action descriptions?Currently, using
I18n.t
method to translate in thedescription
option sort of works. When I haveconfig.languages
set in theconfig/intializers/apipie.rb
file, it places the links for those languages at the top right of the documentation, but when clicking on a different link, it seems to only translate on every other click when switching languages, and they become mismatchedconfig/initializers/apipie.rb
V1::Accounts Controller