Skip to content

Strings in the navigation bar cannot be internationalizedΒ #16470

@hwhsu1231

Description

@hwhsu1231

Page

const NAV_LINKS = [
{ name: "Blog", href: BLOG_URL },
{ name: "Documentation", href: DOCS_URL },
{ name: "Use cases", href: USE_CASES_PATH },
{ name: "Contribute", href: CONTRIBUTE_PATH },
{ name: "About", href: ABOUT_PATH },
{ name: "Forum", href: FORUM_URL },
];

Image

Abstract

Currently, the strings in the navigation bar at the top of the 0.8 documentation is written inside the constants.js file. However, those strings cannot be extracted by Sphinx's Internationalization with Gettext feature. Therefore, one of the solutions is to move those strings to the Jinja templates (e.g., layout.html) and wrap them with {{ _('xxx') }} or {% trans %}xxx{% endtrans %}.

Pull request

#16471

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions