Translation namespace
andriiNyzhnik opened this issue · 5 comments
Move translations into some namespace(e.x. apitome), as they are overriden by app where is being used. I can make PR for that.
I'm about to request this too, it makes my docs look like a mess. I have these strings in I18n locale file:
request:
duration:
brief: Brief
intermediate: Intermediate
comprehensive: Comprehensive
up_to: (up to %{minutes} mins)
more_than: (more than %{minutes} mins)
Then every single document request will have this
{:duration=>{:brief=>"Brief", :intermediate=>"Intermediate", :comprehensive=>"Comprehensive", :up_to=>"(up to %{minutes} mins)", :more_than=>"(more than %{minutes} mins)"}}
@andriiNyzhnik Do you still want to work on this?
Thanks @andriiNyzhnik, I didn't see your pull request. I commit one myself for our internal use.
btw, is there any different between <%= t(:body, scope: :apitome) %>
and <%= t('apitome.body') %> which I just replace all, see my commit RingMD@8f7ffa9 ?
IMHO your codes look nicer.
@longkt90 No. There is no difference. Just code style.
OK. Thank you a lot. I thought I missed something.