Skip to content

Translation language codes not showing in flyout #9406

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

Closed
azvoleff opened this issue Jul 6, 2022 · 10 comments
Closed

Translation language codes not showing in flyout #9406

azvoleff opened this issue Jul 6, 2022 · 10 comments
Labels
Support Support question

Comments

@azvoleff
Copy link

azvoleff commented Jul 6, 2022

Details

Expected Result

The trendsearth project is meant to be generated both in English and in a number of translations. When the translations are generated, the appropriate language codes should show up in the flyout menu so a user can link to those pages.

Actual Result

When I build the docs for the trendsearth project the two letter language code links to the translated versions of the documentation do not show in the flyout menu (for example see the flyout menu here). The translated versions of the project ARE generated and the pages do show up correctly when I link to them directly (for example ES and PT). However the flyout menu doesn't seem to generate properly as it doesn't list any language codes.

I'm not sure if this is related or a different issue, but the "Downloads" links also do not appear in the flyout even though I have chosen for them to be generated on the project's settings page.

For some reason the flyout does show correctly on pull request builds, for example this one, which makes me wonder if it is an issue with the docs being served from a custom domain (since the pull request build in the above link is being served from a readthedocs.build subdomain)?

@azvoleff azvoleff changed the title Translation language codes and generated not showing in flyout Translation language codes not showing in flyout Jul 6, 2022
@stsewd
Copy link
Member

stsewd commented Jul 6, 2022

Hi, looks like the API is returning 404 from your domain

https://trends.earth/_/api/v2/footer_html/?project=trendsearth&version=latest

but it works from outside your domain

https://docs.readthedocs.io/_/api/v2/footer_html/?project=trendsearth&version=latest

In fact, looks like all proxied APIs don't work on your domain.

Did you follow the steps from https://docs.readthedocs.io/en/stable/custom-domains.html#adding-a-custom-domain? especially the part about using an ANAME or ALIAS record

@stsewd stsewd added the Support Support question label Jul 6, 2022
@azvoleff
Copy link
Author

azvoleff commented Jul 6, 2022

Thanks @stsewd. We use AWS Route53 and it wouldn't let us add an ANAME or ALIAS record on that domain to trendsearth.readthedocs.io. Therefore I setup an A record to AWS cloudfront with trendsearth.readthedocs.io as the origin server for trends.earth. I have cloudfront setup to add an X-RTD-SLUG header with value trendsearth based I think on this comment. But possible I missed something - is there another header I need to add to make this work?

@humitos
Copy link
Member

humitos commented Jul 6, 2022

@azvoleff I'd recommend you to disable "canonical domain" on your project and take a look if everything works fine in trendsearth.readthedocs.io domain. That check will tell you if the problem is on your AWS setup.

@azvoleff
Copy link
Author

azvoleff commented Jul 6, 2022

I assume disabling canonical domain from within readthedocs would take the site down (at least from the trends.earth domain)? If so I'd rather not take that step unless I have to given we have a number of high-profile events (for us at least...) upcoming we'll need the site up for. I'm fairly sure this is an AWS setup issue as you suggest as I believe things were working before we switched the domain over. Do you know offhand if there are further headers that I might need to add to cloudfront for the API to work correctly?

@ericholscher
Copy link
Member

@azvoleff I'd recommend using a non-root domain for this, which is a supported use case. It's likely your proxy will break if you try to do something custom, and we aren't able to support it.

@azvoleff
Copy link
Author

azvoleff commented Jul 7, 2022

Thanks, I confirmed a subdomain (https://docs.trends.earth) works fine. The downloads still aren't showing, but I assume that is a separate issue - so I'll look into it further and post a separate issue if need be.

@humitos
Copy link
Member

humitos commented Jul 7, 2022

@azvoleff downloads are not showing because there is no artifacts built yet. See https://readthedocs.org/projects/trendsearth/downloads/

@azvoleff
Copy link
Author

azvoleff commented Jul 7, 2022

Thanks @humitos. I've had both PDF and EPUB builds enabled for several weeks but the builds don't seem to trigger. Is there something else I need to do? The build logs always end in the HTML build and I don't see anything triggering for PDF/EPUBs.

@stsewd
Copy link
Member

stsewd commented Jul 7, 2022

@azvoleff you need to enable the formats in your configuration file, see https://docs.readthedocs.io/en/stable/config-file/v2.html#formats.

@ericholscher
Copy link
Member

Looks like this is fixed 👍

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

No branches or pull requests

4 participants