Opened 11 years ago
Closed 11 years ago
#3607 closed defect (fixed)
Override file message is not totally translated
Reported by: | humitos | Owned by: | humitos |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | Unspecified |
Component: | InfoSlicer | Version: | Unspecified |
Severity: | Unspecified | Keywords: | |
Cc: | humitos, godiard, cjl | Distribution/OS: | Unspecified |
Bug Status: | Unconfirmed |
Description
Steps to reproduce it:
- Open InfoSlicer
- Edit an article
- Export your work
- Export your work again
Issue:
You will see that the message is partially translated (see screenshot)
Behavior:
Show the message totally translated.
Environment:
- git version of info slicer
Attachments (4)
Change History (13)
Changed 11 years ago by humitos
comment:1 Changed 11 years ago by humitos
comment:2 Changed 11 years ago by walter
I split lines all the time (for help strings in Turtle Art) and have never encountered this bug, but then again, I am using UTF-8. So maybe it is as simple as telling infosclicer about UTF-8?
Changed 11 years ago by humitos
comment:3 Changed 11 years ago by cjl
I believe our L10n infrastructure is dependent on UTF-8 encoding in order to capture the full array of characters we may need to represent in the many languages we work with.
comment:4 Changed 11 years ago by walter
I used a slightly different approach that seems to fix the problem:
See attached patch.
Changed 11 years ago by walter
comment:5 Changed 11 years ago by humitos
Did you test your patch?
When I run "genpot" with your patch applied I get this error:
xol.py:62: warning: internationalized messages should not contain the `\r' escape sequence
I go to the .pot file and effectively I see the same behavior that this ticket mentions.
The solution is re-encode the file as I did. We have to change the end-of-line style:
- This is wrong for us (DOS format)
$ file xol.py xol.py: Python script, ASCII text executable, with CRLF line terminators
- This is right
$ file xol.py xol.py: Python script, ASCII text executable
How to change this:
vim xol.py :set fileformat=unix :wq
That command will modify all the lines of the file to change the end-of-line.
We don't want to deal with DOS end-of-line style, it's from 70's :)
comment:6 Changed 11 years ago by walter
I didn't run genpot, I ran build and got no warnings. And when I ran the activity, I got the proper strings in Spanish.
But I see that the POT file is wrong. I don't understand why I never encounter this problem with TurtleArt.
comment:7 Changed 11 years ago by humitos
TurtleArt has no "CRLF line terminators" in any of its .py files. Take a look at the log attached. That is why you didn't notice this problem.
Changed 11 years ago by humitos
comment:8 Changed 11 years ago by walter
Let's solve the problem by getting side of the CRLFs.
comment:9 Changed 11 years ago by humitos
- Resolution set to fixed
- Status changed from new to closed
Pushed:
This will be available in version 15.
There is a problem with multiple lines strings and gettext: