From 5b612b8ac7bc75e7f539eb4845fa9ec68ecd5a96 Mon Sep 17 00:00:00 2001 From: Dav Date: Tue, 7 Jul 2020 22:53:03 +0000 Subject: [PATCH] [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> --- docs/framework_i18n.rst | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/docs/framework_i18n.rst b/docs/framework_i18n.rst index 86b166d4d..b305a8e12 100644 --- a/docs/framework_i18n.rst +++ b/docs/framework_i18n.rst @@ -33,21 +33,17 @@ Tutorial After making your cog, generate a :code:`messages.pot` file -The process of generating this will depend on the operating system -you are using +We recommend using redgettext - a modified version of pygettext for Red. +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), -create a directory called "locales". -Then do one of the following: - -Windows: :code:`python \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 +To generate the :code:`messages.pot` file, you will now need to run +:code:`python -m redgettext -c [path_to_cog]` +This file will contain all strings to be translated, including docstrings. +(For advanced usage check :code:`python -m redgettext -h`) + +You can now use a tool like `poedit +`_ to translate the strings in your messages.pot file. ------------- API Reference