[py-dev] pytest documents with Japanese translation

Tetsuya Morimoto tetsuya.morimoto at gmail.com
Sun Apr 22 20:43:17 CEST 2012


Hi Holger,

Thanks for thinking about Japanese translation.

> * how do the eventual URLs look like? Maybe pytest.org/latest-jp/...?
>  instead of pytest.org/latest/ ?
>  I'd definitely like to keep existing URLs working.
It's good idea and I suggest "latest-ja" is proper than "latest-jp"
since "jp" is the country code.

> * how to organise the repository so that both EN and JP are included
>  (without the need to have a branch)
I forked original branch for Japanese translation and made named
branch to represent the version, but do you want to manage the
translation in original repository? If so, I know Sphinx has i18n
feature using gettext since 1.1. Is this useful for your purpose?
http://sphinx.pocoo.org/latest/intl.html

> * do we need to do anything special wrt to the examples and their
>  generation? (we use a tool called 'regendoc' written by ronny which
>  regenerates the example outputs)
I used original example code with document, so the example's version
are "pytest-2.2.2"? And then, I tried to run regen (make regen), but I
got an error. It seems regenerating has an encoding issue.

(sphinx)$ make regen
PYTHONDONTWRITEBYTECODE=1 COLUMNS=76 regendoc --update *.txt */*.txt
===== checking apiref.txt =====
Traceback (most recent call last):
  File "/Users/t2y/.virtualenvs/sphinx/bin/regendoc", line 9, in <module>
    load_entry_point('RegenDoc==0.2.dev1', 'console_scripts', 'regendoc')()
  File "/Users/t2y/work/python/regendoc/regendoc.py", line 201, in main
    return _main(options.files, should_update=options.update)
  File "/Users/t2y/work/python/regendoc/regendoc.py", line 196, in _main
    path.write(corrected)
  File "/Users/t2y/.virtualenvs/sphinx/lib/python2.7/site-packages/py/_path/local.py",
line 385, in write
    data = py.builtin._totext(data, sys.getdefaultencoding())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position
22: ordinal not in range(128)
make: *** [regen] Error 1

thanks,
Tetsuya

On Fri, Apr 20, 2012 at 12:45 PM, holger krekel <holger at merlinux.eu> wrote:
> Hi Tetsuya,
>
> thanks for your work already!
>
> i guess we need to work a bit to have both language versions
> generated.  I haven't looked at your branch yet but i guess
> we need to solve a few issues:
>
> * how do the eventual URLs look like? Maybe pytest.org/latest-jp/...?
>  instead of pytest.org/latest/ ?
>  I'd definitely like to keep existing URLs working.
>
> * how to organise the repository so that both EN and JP are included
>  (without the need to have a branch)
>
> * do we need to do anything special wrt to the examples and their
>  generation? (we use a tool called 'regendoc' written by ronny which
>  regenerates the example outputs)
>
> best,
> holger
>
>
> On Mon, Apr 16, 2012 at 16:24 +0900, Tetsuya Morimoto wrote:
>> Hi,
>>
>> I finished translating pytest documents English to Japanese. My
>> repository is below and I made the named branch "2.2.3-ja" for
>> translating docs.
>>
>> https://bitbucket.org/t2y/pytest-ja
>>
>> I would like to publish this Japanese translation on pytest.org with
>> some ways. But, I don't know it's possible or not, and how to deploy
>> the current docs. I think putting original and translated docs
>> separately is easy deployment to avoid some conflicts. Of course,
>> other suggestions are welcome.
>>
>> Additionally, I can maintain Japanese docs in the future. So, I can
>> work by myself if you give me needed permission.
>>
>> thanks,
>> Tetsuya
>> _______________________________________________
>> py-dev mailing list
>> py-dev at codespeak.net
>> http://codespeak.net/mailman/listinfo/py-dev
>>



More information about the Pytest-dev mailing list