Skip to content

Latest commit

 

History

History
42 lines (23 loc) · 1.46 KB

File metadata and controls

42 lines (23 loc) · 1.46 KB
orphan:

How to update to a new Python version

We are currently in branch 3.7, and we want to update the strings from 3.8.

  1. Fetch the lastet commit of 3.8 branch:

    cd cpython/
    git fetch --depth 1 origin 70fe95cdc9ac1b00d4f86b7525dca80caf7003e1
    
  2. Checkout that commit locally:

    git checkout 70fe95cdc9ac1b00d4f86b7525dca80caf7003e1
    
  3. Clean possible garbage (form previous builds):

    rm -rf _build ../python-docs-es-pot cpython/Doc/CONTRIBUTING.rst cpython/Doc/upgrade-python-version.rst
    
  4. Create the .po files from the new source code. This will generate all the .po files for version 3.8:

    SPHINX_GETTEXT=True sphinx-build -j auto -b gettext -d _build/doctrees . ../python-docs-es-pot
    

    Note

    In ../python-docs-es-pot directory, we will have the new .pot files with new strings from 3.8 branch. All these strings will be unstranslated at this point.

  5. Now, we update our translated files form the source language (English) with new strings:

    sphinx-intl update --language es --pot-dir ../python-docs-es-pot --locale-dir cpython/locales/
    
  6. Remove python-docs-cpython/ prefix added by sphinx-build to avoid clazy diffs:

    sed -i **/*.po -e "s|python-docs-es/cpython/||g"
    
  7. Pass powrap to make the column widths consistent:

    powrap --modified