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

How to mark strings within JavaScript code as translatable #1587

Closed
gabalafou opened this issue Dec 8, 2023 · 1 comment
Closed

How to mark strings within JavaScript code as translatable #1587

gabalafou opened this issue Dec 8, 2023 · 1 comment

Comments

@gabalafou
Copy link
Collaborator

gabalafou commented Dec 8, 2023

Can you open a new issue to remind us to come back to this (question about marking strings as translatable if they're generated within JavaScript) please?

Originally posted by @drammock in #1454 (comment)

Summary

In 1454, I added a banner type landmark to the pink version warning banner and labeled it with the string "Version warning" (in pydata-sphinx-theme.js line 473).

When it is shown, the version warning banner displays: "This is documentation for an unstable development version," followed by a red button that reads "Switch to stable version"

The landmark label is not visible; it's only exposed by assistive technology, such as screen readers. But like all user-facing strings, the "Version warning" label needs to be added to the set of translatable strings, but I don't know how to do that in JavaScript.

@trallard
Copy link
Collaborator

trallard commented Feb 6, 2024

@gabalafou IIRC you figured out how this works? I am going to close this issue but if not feel free to re-open it

@trallard trallard closed this as completed Feb 6, 2024
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

No branches or pull requests

2 participants