Menu

#5839 Fix translation-status.py with Python 3

Fixed
Enhancement
2020-03-10
2020-03-10
No

Fix translation-status.py with Python 3

Individual commits:
1) translations-status: Use str.maketrans()

It's now a static function of the builtin type str, not in the
string module. It wasn't marked as deprecated in Python 2...

2) translations-status: Call locals() outside of list comprehension

Otherwise Python 3 throws KeyErrors because it's not getting the
local variables from the function (in particular p).

3) translations-status: Correctly reference self.filename

http://codereview.appspot.com/581800043

Discussion

  • Anonymous

    Anonymous - 2020-03-10
    • Description has changed:

    Diff:

    
    
    • Needs: -->
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2020-03-10

    Passes make, make check and a full make doc.

     
  • Jonas Hahnfeld

    Jonas Hahnfeld - 2020-03-10

    pushed to staging to unlock translators (again)

    commit d4b0946668624bf4978aff4d58055db84abbcdf7
    Author:     Jonas Hahnfeld <hahnjo@hahnjo.de>
    AuthorDate: Tue Mar 10 09:59:29 2020 +0100
    Commit:     Jonas Hahnfeld <hahnjo@hahnjo.de>
    CommitDate: Tue Mar 10 09:59:29 2020 +0100
    
        translations-status: Correctly reference self.filename
    
    commit aeb59680b1ec58867da4f08ab48ac3207c0dc4b4
    Author:     Jonas Hahnfeld <hahnjo@hahnjo.de>
    AuthorDate: Tue Mar 10 09:58:25 2020 +0100
    Commit:     Jonas Hahnfeld <hahnjo@hahnjo.de>
    CommitDate: Tue Mar 10 09:58:25 2020 +0100
    
        translations-status: Call locals() outside of list comprehension
    
        Otherwise Python 3 throws KeyErrors because it's not getting the
        local variables from the function (in particular p).
    
    commit 12315a152f09bfd09ac4ea56244c3e643f188afb
    Author:     Jonas Hahnfeld <hahnjo@hahnjo.de>
    AuthorDate: Tue Mar 10 09:57:00 2020 +0100
    Commit:     Jonas Hahnfeld <hahnjo@hahnjo.de>
    CommitDate: Tue Mar 10 09:57:00 2020 +0100
    
        translations-status: Use str.maketrans()
    
        It's now a static function of the builtin type str, not in the
        string module. It wasn't marked as deprecated in Python 2...
    
     
  • Jonas Hahnfeld

    Jonas Hahnfeld - 2020-03-10
    • labels: --> Fixed_2_21_0
    • status: Started --> Fixed
    • Patch: review -->
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.