mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Docs] Update framework_i18n.rst (#4018)
* Update framework_i18n.rst * Update framework_i18n.rst * -h flag note * Add hyphen Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
parent
e0b922c949
commit
5b612b8ac7
@ -33,21 +33,17 @@ Tutorial
|
|||||||
|
|
||||||
After making your cog, generate a :code:`messages.pot` file
|
After making your cog, generate a :code:`messages.pot` file
|
||||||
|
|
||||||
The process of generating this will depend on the operating system
|
We recommend using redgettext - a modified version of pygettext for Red.
|
||||||
you are using
|
You can install redgettext by running :code:`pip install redgettext` in a command prompt.
|
||||||
|
|
||||||
In a command prompt in your cog's package (where yourcog.py is),
|
To generate the :code:`messages.pot` file, you will now need to run
|
||||||
create a directory called "locales".
|
:code:`python -m redgettext -c [path_to_cog]`
|
||||||
Then do one of the following:
|
This file will contain all strings to be translated, including
|
||||||
|
|
||||||
Windows: :code:`python <your python install path>\Tools\i18n\pygettext.py -D -n -p locales`
|
|
||||||
|
|
||||||
Mac: ?
|
|
||||||
|
|
||||||
Linux: :code:`pygettext3 -D -n -p locales`
|
|
||||||
|
|
||||||
This will generate a messages.pot file with strings to be translated, including
|
|
||||||
docstrings.
|
docstrings.
|
||||||
|
(For advanced usage check :code:`python -m redgettext -h`)
|
||||||
|
|
||||||
|
You can now use a tool like `poedit
|
||||||
|
<https://poedit.net/>`_ to translate the strings in your messages.pot file.
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
API Reference
|
API Reference
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user