Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
c5ac6eb9
Commit
c5ac6eb9
authored
Apr 24, 2024
by
Carlos Ramos Carreño
Browse files
Options
Browse Files
Download
Plain Diff
Fix `po_import` behavior in Python 2
See merge request
nexedi/erp5!1929
parents
f9b3c7ae
cb64370a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
product/Localizer/MessageCatalog.py
product/Localizer/MessageCatalog.py
+2
-4
No files found.
product/Localizer/MessageCatalog.py
View file @
c5ac6eb9
...
...
@@ -660,10 +660,8 @@ class MessageCatalog(LanguageManager, ObjectManager, SimpleItem):
messages
=
self
.
_messages
# Load the data
if
isinstance
(
data
,
bytes
):
# six.PY2
pass
elif
isinstance
(
data
,
bytes
):
# six.PY3
data
=
data
.
decode
()
if
isinstance
(
data
,
bytes
):
data
=
data
.
decode
(
"utf-8"
)
po
=
polib
.
pofile
(
data
)
encoding
=
to_str
(
po
.
encoding
)
for
entry
in
po
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment