GithubHelp home page GithubHelp logo

i18n strategies about symbol-docs HOT 10 CLOSED

symbol avatar symbol commented on June 3, 2024 2
i18n strategies

from symbol-docs.

Comments (10)

dgarcia360 avatar dgarcia360 commented on June 3, 2024 1

Instead of using .rst files for generating landings, Sphinx accepts as well jinja html pages. Will migrate home and references pages to enable translation 👍

https://ofosos.org/2018/12/28/landing-page-template/

from symbol-docs.

dgarcia360 avatar dgarcia360 commented on June 3, 2024 1

Just applied the change proposed to the cow branch. index and reference pages should be translatable after the next release.

from symbol-docs.

dgarcia360 avatar dgarcia360 commented on June 3, 2024

Relevant conversation: sphinx-doc/sphinx#1235

from symbol-docs.

kaiyzen avatar kaiyzen commented on June 3, 2024

not super experienced with translation templating and handling on sphinx so will read up more, but maybe an approach where make/build of the docs can be enhanced or extended so for html type pages we can maintain en, ja, etc versions of each to be included based on language target

from symbol-docs.

dgarcia360 avatar dgarcia360 commented on June 3, 2024

@kaiyzen translation is already enabled taking English as the base language.

The problem right now is that some UI elements are not automatically recognized by the Sphinx translation system.

from symbol-docs.

44uk avatar 44uk commented on June 3, 2024

By adding gettext_additional_targets = ['raw'] option to source/conf.py, it creates PO file including raw directive.
It can be translatable, but little hard to edit because they are containing html tags.

issue38

from symbol-docs.

kaiyzen avatar kaiyzen commented on June 3, 2024

@dgarcia360 my point was more about duping those assets that sphinx doesn't support native string translation, so instead of saying "build jp version of the docs" and relying on its native string i18n sub functionality, would be more "build the jp version of the jp docs", where repo would have jp, en, etc versions of the pieces that cant be natively translated/substituted by sphinx

not sure how possible or hacky it would be or if simple tweak/hack of an existing extension

from symbol-docs.

dgarcia360 avatar dgarcia360 commented on June 3, 2024

Added gettext tags to the footer, so now it should be translatable:

e5023b5#diff-67dcea514bdf82dd986b048ef2e4f679

@44uk Seems the best solution right now, altough is not convenient. Will investigate a little bit further before enabling gettext_additional_targets = ['raw'].

from symbol-docs.

dgarcia360 avatar dgarcia360 commented on June 3, 2024

Interesting article by @44uk to integrate transifex with Sphinx to reduce the difficulty of translating .po files directly:

https://blog.44uk.net/2018/11/03/how-to-use-transifex/

from symbol-docs.

dgarcia360 avatar dgarcia360 commented on June 3, 2024

@44uk Started integrating transifex with sphinx. The command make gettext seems not to work due to an issue with ablog.

Pushed as well a PR fixing the bug, let's wait until sunpy launches the release to continue with transifex integration.

from symbol-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.