Skip to content
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

Updated setting default locale for api documentation #543

Merged
merged 1 commit into from
May 10, 2017

Conversation

DmitryKK
Copy link
Contributor

@DmitryKK DmitryKK commented May 5, 2017

No description provided.

@iNecas
Copy link
Member

iNecas commented May 5, 2017

What is the issue this PR fixes? Just to understand better the reasoning behind the change?

@DmitryKK
Copy link
Contributor Author

DmitryKK commented May 6, 2017

@iNecas, the fact is that configuration Apipie.configuration.default_locale is not working. Api documentation shows default language by I18n.default_locale. You may check

@iNecas
Copy link
Member

iNecas commented May 10, 2017

Oh, I see. Makes sense then :) Merging

@iNecas iNecas merged commit 3112358 into Apipie:master May 10, 2017
@iNecas
Copy link
Member

iNecas commented Aug 21, 2017

apipie-0.5.2 released, including this change.

Marri added a commit to glowfic-constellation/glowfic that referenced this pull request Sep 1, 2017
…with no locale and the latest version has the fix Apipie/apipie-rails#543 merged in, which now correctly defaults locale from the previous 'no idea use nil' to 'use the default_locale of the app', so it would try to find .en files and they did not exist. This will set our language to nil, so it looks for files without the .en, which do exist. Long term fix is to properly generate localized files, but it's not immediately clear to me how to do that.
@Haniyya
Copy link
Contributor

Haniyya commented Jan 18, 2018

This seems to result in a breaking change:
If you set your default_locale to something other than 'en' and defined your api, this change will alter all the links in the documentation to use a locale (like users/1.de.html) which leads to non-existant documentation errors for everything.
Workaround is to manually remove the locale from the urls, which leads you back to a working state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants