Overview

I had the opportunity to add Japanese translation to a documentation site built with sphinx, so this is a note for reference.

The target is the following.

https://github.com/artefactual/archivematica-storage-service-docs

Method

First, fork the target repository.

Next, clone it.

gcidtactloomn-edohctstps://github.com/nakamura196/archivematica-storage-service-docs

Here, we create a Python virtual environment.

psppyoiitupphrociinennss-ttmvaaellvnllevn/-b-riunprv/geearqncauvtdiierveapmtieepnts.txt

Adding Libraries

Add sphinx-intl to requirements.txt and install it.

sssppphhhiiinnnxxx--ianuttlobuild
pipinstall-rrequirements.txt

(Optional) conf.py

If language settings do not exist in conf.py, add them as follows.

#lgloeaLctnaatgnleugexau_tgad_egicero=smsp"e=ajtcat[t"i'nl=goscFaalles/e']##DoDinroetctsohroyrtteonsftiolreentarmaensslationfiles

Then run the gettext build.

makegettext

Creating the Japanese Directory

Running the following creates po files in locale/ja.

sphinx-intlupdate-p_build/locale-lja

Editing

Localization is done by editing the po files under locale/ja.

Development

The following command allows you to preview the site.

sphinx-autobuild._build/html

Build

The following command stores the build results in _build/html.

sphinx-build._build/html

Deployment

no#p##cjaneoom:pSrcpiAHngcbbdeuemoadlocrasue:sbting-lwuon:irspernshrsstetoeruclutlnuetD:a-sesowvrpedne----#-ovnunee-enpin:kee:l:spyiarsdppc"eoteorn--sunuwnrnreSnuw:rml-ssniulh1rnswnn,c"io:sasiauaunaasioe:o::adsoe.ms:r:lypnnemetpmnppmnsvTvmetpn:nm:eys1i:iyd:a-:seshye:yie:p:Zeesham$:bes:5srtwogp::::t:tp:h::::teg{u:d:S"seeroeruh|h|ibhni{uiepiainNsobaSaoIoiBnUuUa:ttblDpahodteO"gucecnnnnuxTipc:hsudelcineTrnttt-ssi-Cllt_utnpotnscetiivt-tlbdoibbetlyixocsuouoeamaduaou-puomoonas-npnrlliddnips-yenDfcn:lssslplSlisla.lnsouca/P/iipdra/dgdatt/ctreftcysodp-heru/eetoduhrlaehteneri.ctphspeemeelseht:pintiltlsGpenistcouenrx_ofomotilnGtneknp"nsebraalytotI-o-3dtqDuycdmHyaTdpup.eauoit-eu-tHerty1nliclapnbpiUpo@t0clrudsataoBlgvh"iem/g.Pgn_or4oemehaeoaeTyen#s-entrsugstOms@untmt-te@oKesvSptaliapsvEn5pgstfru4GNtrer.iatti,ucato#cisttnidxntf.HossfetAapukydcabaiapjtglpsti#u@ePlphpsv_aoiweit3ugwnefregPplsdwyyaeratot}punhuh}lntososnhytaimqovvfeueenearntulsaeelinctdooyeownsbdsGeteaithprtweeyHesnueedbnepnPtrcahoigedeeussrcutnioinn-dperpolgoryemsesntasndtolactoemsptleqtuee.ued.

As a result, it is deployed as follows.

https://nakamura196.github.io/archivematica-storage-service-docs/

Summary

I hope this is helpful.