Create and install locale files with Python 3

Bug #1922975 reported by Jeff Davis
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Won't Fix
Fix Released

Bug Description

The Python scripts in build/i18n/scripts don't quite work with Python 3, which is an obstacle to generating and installing translations on Ubuntu 20.04.

I was able to get the scripts working with some minor changes, which I will share in a moment.

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Working branch user/jeffdavis/lp1922975-build-i18n-scripts-python3 should make build/i18n/scripts Python3-compatible:;a=shortlog;h=refs/heads/user/jeffdavis/lp1922975-build-i18n-scripts-python3

To test, do `cd build/i18n && make LOCALE=fr-CA install` (you may need to do configure && make first). In my Ubuntu 20.04 environment, this fails with current master, but succeeds if I apply the changes from my working branch. The issue does not arise on Ubuntu 18.04, which will use Python 2 by default.

I'm not sure how to make the changes available, since different environments need different versions of these scripts.

Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbej)
tags: added: i18n
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thank you so much, Jeff! Works well for me on python 3, so I've signed off on it.

It looks like the recommendation is to specify the major python version in the shebang line if it only works on one python3 (

It seemed simplest to just provide your python3 version of the scripts, and have packagers and translators use python3 for their work, regardless of which OS they use. So I've added another commit that installs python3 versions of all those dependencies, and specifies python3 in the shebang lines.

The signoff and follow-up commit are available at user/sandbergja/lp1922975_python3

Changed in evergreen:
assignee: Jane Sandberg (sandbej) → nobody
tags: added: pullrequest signedoff
Changed in evergreen:
milestone: none → 3.8.1
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Bill Erickson (berick) wrote :

Merged to master in prep for 3.9.

I skipped earlier versions since this is kind of a new big change.

Includes a small 3rd commit to address a few trailing python-3 tweaks.


no longer affects: evergreen/3.7
Bill Erickson (berick)
Changed in evergreen:
status: Confirmed → Won't Fix
Changed in evergreen:
milestone: 3.8.1 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.