Localizer: support python3 and polib 1.2.0

Fix po_import behavior in Python 2.

Newer versions of polib accept only unicode strings in the
`pofile` function (because they check if they start by the decoded
version of the BOM).
I changed the `data` that is passed to `pofile` to be a unicode
string in Python 2 too. This seems to work locally in my old
version of polib, so that at least the old behavior should be
kept the same.

Co-authored-by: Carlos Ramos Carreño <carlos.ramos@nexedi.com>
Co-authored-by: Jérome Perrin <jerome@nexedi.com>
63 jobs for fix/Localizer-polib-1.2.0 in 0 seconds
Status Job ID Name Coverage
  External
passed ERP5.CodingStyleTest-Master

02:01:15

passed ERP5.CodingStyleTest-TestRunner1

00:58:10

failed ERP5.PerformanceTest-Master

00:45:52

failed ERP5.PerformanceTest-TestRunner1

00:40:40

failed ERP5.UnitTest-Master

03:51:45

passed ERP5.UnitTest-TestRunner1

02:43:02

passed SlapOS.Eggs.UnitTest-Master.Python2

00:43:14

passed SlapOS.Eggs.UnitTest-Master.Python3

00:17:24

failed Wendelin.UnitTest-Master

02:03:05

passed ERP5.CodingStyleTest-Master

01:20:28

passed ERP5.CodingStyleTest-Master

01:03:50

passed ERP5.CodingStyleTest-Master

11:43:41

passed ERP5.CodingStyleTest-Master

01:16:14

failed ERP5.PerformanceTest-Master

04:05:09

failed ERP5.PerformanceTest-Master

00:40:37

failed ERP5.PerformanceTest-Master

00:40:35

failed ERP5.PerformanceTest-Master

00:40:09

failed ERP5.UnitTest-Master

02:14:00

failed ERP5.UnitTest-Master

11:54:07

failed ERP5.UnitTest-Master

02:20:30

failed ERP5.UnitTest-Master

02:42:56

passed ERP5.UnitTest-TestRunner1

02:06:45

passed ERP5.UnitTest-TestRunner1

01:40:35

passed SlapOS.Eggs.UnitTest-Master.Python2

00:15:57

passed SlapOS.Eggs.UnitTest-Master.Python2

00:19:55

passed SlapOS.Eggs.UnitTest-Master.Python2

00:16:37

passed SlapOS.Eggs.UnitTest-Master.Python2

03:19:29

passed SlapOS.Eggs.UnitTest-Master.Python2

00:24:49

passed SlapOS.Eggs.UnitTest-Master.Python2

00:15:37

passed SlapOS.Eggs.UnitTest-Master.Python2

00:21:52

passed SlapOS.Eggs.UnitTest-Master.Python2

00:17:24

passed SlapOS.Eggs.UnitTest-Master.Python2

00:17:32

passed SlapOS.Eggs.UnitTest-Master.Python2

00:15:13

passed SlapOS.Eggs.UnitTest-Master.Python2

00:15:00

passed SlapOS.Eggs.UnitTest-Master.Python2

00:38:49

passed SlapOS.Eggs.UnitTest-Master.Python2

00:17:02

passed SlapOS.Eggs.UnitTest-Master.Python2

00:15:10

passed SlapOS.Eggs.UnitTest-Master.Python2

02:49:56

passed SlapOS.Eggs.UnitTest-Master.Python2

00:18:58

passed SlapOS.Eggs.UnitTest-Master.Python3

00:22:14

passed SlapOS.Eggs.UnitTest-Master.Python3

00:14:43

passed SlapOS.Eggs.UnitTest-Master.Python3

00:15:24

passed SlapOS.Eggs.UnitTest-Master.Python3

00:15:59

passed SlapOS.Eggs.UnitTest-Master.Python3

00:16:17

passed SlapOS.Eggs.UnitTest-Master.Python3

00:46:43

passed SlapOS.Eggs.UnitTest-Master.Python3

00:29:22

passed SlapOS.Eggs.UnitTest-Master.Python3

00:27:08

passed SlapOS.Eggs.UnitTest-Master.Python3

05:42:01

passed SlapOS.Eggs.UnitTest-Master.Python3

00:43:53

passed SlapOS.Eggs.UnitTest-Master.Python3

00:28:55

passed SlapOS.Eggs.UnitTest-Master.Python3

00:16:39

passed SlapOS.Eggs.UnitTest-Master.Python3

00:21:46

passed SlapOS.Eggs.UnitTest-Master.Python3

00:17:15

passed SlapOS.Eggs.UnitTest-Master.Python3

00:28:10

passed SlapOS.Eggs.UnitTest-Master.Python3

00:32:06

passed SlapOS.Eggs.UnitTest-Master.Python3

02:09:16

passed SlapOS.Eggs.UnitTest-Master.Python3

00:17:08

passed SlapOS.Eggs.UnitTest-Master.Python3

00:24:14

passed SlapOS.Eggs.UnitTest-Master.Python3

00:19:19

passed Wendelin.UnitTest-Master

00:51:07

passed Wendelin.UnitTest-Master

00:50:58

passed Wendelin.UnitTest-Master

00:49:41

passed Wendelin.UnitTest-Master

08:34:41