1

I'm trying to internazionalize the documents of a python library using sphinx and crowdin.

Through sphinx i firstly generate the .pot files but there's a problem with these files. As mentioned in the sphinx docs

It is the maintainer’s task to split up paragraphs which are too large as there is no sane automated way to do that.

that's an example of what i have

...

#: ../../../disnake/client.py:docstring of disnake.client.Client:4
msgid "A number of options can be passed to the :class:`Client`."
msgstr ""

#: ../../../disnake/abc.py:docstring of disnake.abc.GuildChannel.clone:0
#: ../../../disnake/abc.py:docstring of disnake.abc.GuildChannel.create_invite:0
#: ../../../disnake/abc.py:docstring of disnake.abc.GuildChannel.delete:0

...

where i need all the docstrings of the methods with a msgid and the empty msgstr for translators. Now, am i supposed to create a script to do this? If so, that script should extract paragraphs to use as msgid but i don't know where to start. I've also searched on internet but there isn't any example.

Thanks in advance.

snipy7374
  • 26
  • 4
  • Crowdin will be releasing a new feature soon that will allow string segmentation for key-value file formats like `.pot` and others. This will address this case. I will give an answer about how it works as soon as it is released :) It will also be announced in the release notes - https://crowdin.com/release-notes – Andrii Bodnar Feb 06 '23 at 10:12
  • Hi @AndriiBodnar thanks for the answer, besides the new feature that will be soon released, can you tell me or share links towards the creation of this script? What should I use? gettext and crowdin's python client? – snipy7374 Feb 06 '23 at 12:25
  • You should use your file as usual. After this new feature release, Crowdin will segment all the long paragraphs so translators will translate these segments as separate strings. Then, Crowdin will put all the segments together during the file export. – Andrii Bodnar Feb 06 '23 at 12:59

0 Answers0