Encoding problem in exported HTML

Information about GMAO - the application I (write and) use to translate manga.

Moderator: FuguTabetai

Post Reply
Onkr
Yuurei
Yuurei
Posts: 15
Joined: Fri Oct 08, 2004 3:03 pm

Encoding problem in exported HTML

Post by Onkr »

First of all, GMAO is great ! I downloaded it today, and I kept playing with it in the last few hours. Greatly impressed ! :shock:

In use this program to translate from japanese to french, without displaying the original japanese text into the translation: I have thus set my XML encoding to "iso-8859-1". The text stored into the XML file is just fine, but the "export to HTML" keeps writing HTML pages with an "euc-jp" encoding. With this, the french accented letters are badly displayed. And I have no workaround since I am not using XP, and cannot switch my locale to japanese. I just feel that the HTML conversion uses a hard-coded "euc-jp", instead of taking into account the XML encoding configuration field.

Thanks for making this application public ! :D
User avatar
FuguTabetai
Shifu
Shifu
Posts: 2589
Joined: Mon Feb 10, 2003 5:45 pm
Location: Tokyo, Japan
Contact:

Post by FuguTabetai »

Hi Onkr,

I'll check into it - I've actually never used an encoding other than euc-jp, so I might have missed one of the hardcoded strings when I put the preference in. Regardless, should be a short fix (I'll have it done by Saturday evening maybe.)

Glad you found a use for GMAO.
User avatar
FuguTabetai
Shifu
Shifu
Posts: 2589
Joined: Mon Feb 10, 2003 5:45 pm
Location: Tokyo, Japan
Contact:

Post by FuguTabetai »

I have fixed this bug. More details in the GMAO 1.4.0 thread. Thanks!
Onkr
Yuurei
Yuurei
Posts: 15
Joined: Fri Oct 08, 2004 3:03 pm

Post by Onkr »

Whoa, that was fast ! And it works, thanks !

While I am at it, here are some problems and quircks I stumbled over while playing with the program:
- when the opacity of a region is lowered to 0%, its blue outline is made transparent too, making it difficult to know if the bubble is selected or not: the transparency attribute should not be applied to the blue outline.
- the in-line editing does not seem to work in some cases: I added a letter in the middle of a text, then removed it using 'backspace', and the program stopped responding, seemingly stucked in some infinite loop.
- when exporting a page to an image, if a bubble is currently selected, the blue outline will appear on the generated image.
- the 'erase' button could be made 'non-sticky': more than one time, I selected it to erase a bubble, then clicked on another bubble to edit it, erasing it too to my dismay. It could be nice that the 'erase' button inactivates itself as soon as a bubble has been erased.
- the completion of a character name can be somewhat surprising: at the letter 'K', my list of characters contained 'Kaorin' and 'Kagura' (just guess what I was translating ). When hitting the 'K' key, the 'a' letter was automatically added, but I dit not noticed it immediatly, thus resulting in things like 'Kaaorin' or 'Kaagura' because I added the 'a' letter just after 'K'.
- It could be nice to put the focus of the new page immediately after it being added.
- I have been able to mistakenly create a two-point polygon, i.e. a line segment, that the erase button can not delete. I had to erase it from the
XML file.
- a bubble is outlined in blue when the curser is over it: when leaving this bubble then reentering it immediately, the blue outline is not redrawn.

Nothing critical as you can see.

I love this program :D
User avatar
FuguTabetai
Shifu
Shifu
Posts: 2589
Joined: Mon Feb 10, 2003 5:45 pm
Location: Tokyo, Japan
Contact:

Post by FuguTabetai »

Onkr wrote: - when the opacity of a region is lowered to 0%, its blue outline is made transparent too, making it difficult to know if the bubble is selected or not: the transparency attribute should not be applied to the blue outline.
That should be easy enough to fix. I'll look into it when I have some time.
Onkr wrote: - the in-line editing does not seem to work in some cases: I added a letter in the middle of a text, then removed it using 'backspace', and the program stopped responding, seemingly stucked in some infinite loop.
That shouldn't happen; I've debugged that code pretty well. It could spike CPU and take a while to be responsive since GMAO does full text flowing and font resizing on each character input. But, I could be wrong.
Onkr wrote: - when exporting a page to an image, if a bubble is currently selected, the blue outline will appear on the generated image.
Ah, yes, that is a problem. It would be annoying to fix though, compared with how easy it is to not highlight a bubble. :)
Onkr wrote: - the 'erase' button could be made 'non-sticky': more than one time, I selected it to erase a bubble, then clicked on another bubble to edit it, erasing it too to my dismay. It could be nice that the 'erase' button inactivates itself as soon as a bubble has been erased.
Hm, I haven't had that problem since I'm very careful with the delete button... It does change the cursor. Anyway, it wouldn't be too tough to snap the tool back to the polygon tool or something. I don't really like that behavior though, so I wouldn't hold my breath...
Onkr wrote: - the completion of a character name can be somewhat surprising: at the letter 'K', my list of characters contained 'Kaorin' and 'Kagura' (just guess what I was translating ). When hitting the 'K' key, the 'a' letter was automatically added, but I dit not noticed it immediatly, thus resulting in things like 'Kaaorin' or 'Kaagura' because I added the 'a' letter just after 'K'.
Well, that won't change for sure - that is proper completion behavior. GMAO will automatically add letters until the name is ambiguous. Since you only had "Kaorin" and "Kagura", when you enter K, also adds "a" since all choices require it. The user only has to press the minimum number of characters to specify any string in this case.

There are other ways to do completion, but they are far inferior. Blame my Unix bias for this. :)
Onkr wrote: - It could be nice to put the focus of the new page immediately after it being added.
I can't do this - I've tried, and the code that I have that does this crashed GMAO hard. I haven't been able to solve that problem. Bummer.
Onkr wrote: - I have been able to mistakenly create a two-point polygon, i.e. a line segment, that the erase button can not delete. I had to erase it from the XML file.
Yes, I've had that problem also. I guess I could force the polygon tool to have at least 3 points before closing, but it is a bit of work for another problem I haven't run into too often. If I have time, I'll fix that.
Onkr wrote: - a bubble is outlined in blue when the curser is over it: when leaving this bubble then reentering it immediately, the blue outline is not redrawn.
If you move around too quickly you can get the bubbles stuck on as well. That's a problem with how I've currently implemented the bubble class. I have been playing on and off with moving a Bubble to a subclass of Component, but it's too big of a change to make easily.

Thanks for all the bugs. I'll try to fix them.
User avatar
FuguTabetai
Shifu
Shifu
Posts: 2589
Joined: Mon Feb 10, 2003 5:45 pm
Location: Tokyo, Japan
Contact:

Post by FuguTabetai »

Onkr wrote: - when the opacity of a region is lowered to 0%, its blue outline is made transparent too, making it difficult to know if the bubble is selected or not: the transparency attribute should not be applied to the blue outline.
This has been fixed.

The other points you bring up I can't really address easily. One thing I will try to do is add a "Delete Bubble" command that you can apply by right-clicking on the Bubble node in the tree display of the left pane. Otherwise, that is the only thing I've got a clear idea of what I should do to fix.

thanks for the comments/bug reports. Hope GMAO is still working out for you.
Onkr_

Post by Onkr_ »

Thanks for the correction, it works nicely.

After using the program for a while, here are additional comments and/or requests:

- when opening the "edit translation" box, it would be nice that the keyboard focus be on 'Character' rather than 'Language', because I never change the latter.

- the 'character' field could be case-insensitive: il would hit 'k' + 'a' for Kagura, rather than 'K' + 'a'

- it would be useful to have a 'black and white' mode in the color chooser.

- also, I would like to have a color picker tool: this would help to create a colored bubble without text, whose sole purpose is to erase a sound effect (then I create at the same place a rectangular bubble with transparent background).

- it would be nice that, when drawing a polygon, Backspace removes the last point.

- in the content of a translation, the <BR> pseudo character does not always work, and may be ignored in occasions. Also, is <br> identical to <BR> ?

- finally, the bubble focus keeps following the cursor, even when a dialog box has been invoked through a context menu: sometimes, I end up changing a bubble that was not the one that had the focus when I opened the context menu. It would be nice that the bubble focus keeps 'locked' while a context menu menu operation is active.

I am still loving GMAO, and would not do any translation if I were to edit each image by hand 8) .

By the way, I like Vulgar Ghost Daydream too :P

Keep on the good work
Onkr_

Post by Onkr_ »

Ahh, stupid me... The backspace key for erasing the last point in polygon is already working. I should have tried it :oops:
User avatar
FuguTabetai
Shifu
Shifu
Posts: 2589
Joined: Mon Feb 10, 2003 5:45 pm
Location: Tokyo, Japan
Contact:

Post by FuguTabetai »

Onkr_ wrote: - when opening the "edit translation" box, it would be nice that the keyboard focus be on 'Character' rather than 'Language', because I never change the latter.
I've tried changing the focus before, and have had problems with it. In general, I always change the language (first is English usually, then I enter the Japanese) so this wouldn't be a useful change for me. I will think about making a generalize preference for setting up focus traversal though.
Onkr_ wrote: - the 'character' field could be case-insensitive: il would hit 'k' + 'a' for Kagura, rather than 'K' + 'a'
This would be pretty easy to do. I'll probably program that in later today, as an option. In general, the computer scientist and computational linguist in me views upper-case and lower-case letters as separate entities.
Onkr_ wrote: - it would be useful to have a 'black and white' mode in the color chooser.
The default Java color chooser should always have a black and white swatch displayed for you. Mine does. Unless you are talking about a button "black and white" that you can click.
Onkr_ wrote: - also, I would like to have a color picker tool: this would help to create a colored bubble without text, whose sole purpose is to erase a sound effect (then I create at the same place a rectangular bubble with transparent background).
Yes, I've wanted to make one of these for a while. It would be useful for me as well.
Onkr_ wrote: - it would be nice that, when drawing a polygon, Backspace removes the last point.

As you noticed, this does work. I think it is "delete" though, and not "backspace". Maybe I made both work. I forget.
Onkr_ wrote: - in the content of a translation, the <BR> pseudo character does not always work, and may be ignored in occasions. Also, is <br> identical to <BR> ?
This is a pretty buggy feature - you are right, it might be ignored sometimes. I don't really know why. In general, I try to avoid doing presentational layout in GMAO. I just want to do semantic markup. But I put <BR> in there because people have asked for something like that. Looking at the code, either <br> or <BR> will work - I force the token to lower case when checking for the <br>, so that shouldn't matter.
Also, I don't know if two <br>'s in a row will do anything. This is not something that I really spent lots of time on, but I did try to make it work for the most part...
Onkr_ wrote: - finally, the bubble focus keeps following the cursor, even when a dialog box has been invoked through a context menu: sometimes, I end up changing a bubble that was not the one that had the focus when I opened the context menu. It would be nice that the bubble focus keeps 'locked' while a context menu menu operation is active.
Hm, I thought that I fixed that problem. The highlighting and stuff will still change, but when you select an item from the menu, it will apply it to the bubble that was under the mouse when you popped-up the menu. So what you describe shouldn't happen - it is "locked on" once the menu is popped up. Highlighting isn't though. I'll try to test things out to see if that really is the case (just by looking at the code, it should be, but...)
Onkr_ wrote:
I am still loving GMAO, and would not do any translation if I were to edit each image by hand 8) .
Oh, that's great. I'm glad it can help. What are you translating, if you don't mind my asking?
User avatar
FuguTabetai
Shifu
Shifu
Posts: 2589
Joined: Mon Feb 10, 2003 5:45 pm
Location: Tokyo, Japan
Contact:

Post by FuguTabetai »

I've pushed out version 1.4.4 of GMAO where the text completion is now not case sensitive.
Onkr_

Post by Onkr_ »

The default Java color chooser should always have a black and white swatch displayed for you. Mine does. Unless you are talking about a button "black and white" that you can click
I should have talked about a 'grey scale' color chooser: I see a color palette, a HSV and a RVB color chooser, but nothing like 'grey scale'. Hey, wait... I just have to set 'S' to 0 in the HSV color chooser. Once again, I should have tried before asking. :oops:
Hm, I thought that I fixed that problem. The highlighting and stuff will still change, but when you select an item from the menu, it will apply it to the bubble that was under the mouse when you popped-up the menu. So what you describe shouldn't happen - it is "locked on" once the menu is popped up. Highlighting isn't though. I'll try to test things out to see if that really is the case (just by looking at the code, it should be, but...)
You are right: the focus follows the cursor, but the menu acts on the proper bubble. I did not notice it working OK since the time I had this
problem.
What are you translating, if you don't mind my asking?
I am currently translating Azumanga Daioh vol 3 & 4 from japanese to french, as only vol 1 & 2 have an english scanlation. And it seems that this title will not be published in french in the near future. I also translated Appare Jipangu from english to french (and it took me faaaaaar less time than translating from japanese), but it has been licenced here.
Onkr
Yuurei
Yuurei
Posts: 15
Joined: Fri Oct 08, 2004 3:03 pm

and some more...

Post by Onkr »

While I am at it, two more little problems, this time in the HTML rendering of the translations :

- when a translation spans more than one line in its edit box, the popup in the HTML rendering of the page 'sticks' the two lines together, without a separating white space between the last word of the first line and the first word of the second line.

- I use bubbles without translations to erase sound effects, then I add over a bubble with transparent background, containing the translated sound effect. In the HTML rendering of the page, the bubbles without translation appear with a 'no character' empty popup -> instead, they should simply not create popups.

Cheers !
User avatar
FuguTabetai
Shifu
Shifu
Posts: 2589
Joined: Mon Feb 10, 2003 5:45 pm
Location: Tokyo, Japan
Contact:

Re: and some more...

Post by FuguTabetai »

Onkr wrote: - also, I would like to have a color picker tool: this would help to create a colored bubble without text, whose sole purpose is to erase a sound effect (then I create at the same place a rectangular bubble with transparent background).
I have added a color picker. See the other comment on the GMAO 1.4.0 (now 1.5.0!) thread, or the "What's New" info...
Onkr wrote:While I am at it, two more little problems, this time in the HTML rendering of the translations :

- when a translation spans more than one line in its edit box, the popup in the HTML rendering of the page 'sticks' the two lines together, without a separating white space between the last word of the first line and the first word of the second line.
I don't really understand. GMAO just spits out the text that it has as the translation on the HTML page. So all spaces and returns are collapsed as per normal HTML processing. In the edit box, returns really don't mean anything (although they are preserved in the XML file) but I thought they would still render to space in HTML. Can you give me an example of concretely what happens (some text, how it ends up looking, how you want it to look?) This should be really easy to fix, once I understand what is wrong.
Onkr wrote: - I use bubbles without translations to erase sound effects, then I add over a bubble with transparent background, containing the translated sound effect. In the HTML rendering of the page, the bubbles without translation appear with a 'no character' empty popup -> instead, they should simply not create popups.
Ok, I'll look into this. I haven't really done anything like that because generally, if you need to erase part of the background, it usually isn't just one color like GMAO can handle. This should be easy enough to fix, and I will fix it when I fix the problem above.

Thanks for all the great feedback - it has been nice to do some GMAO programming instead of translation lately (of course, mostly that is because I don't have much to translate right now.)
Onkr
Yuurei
Yuurei
Posts: 15
Joined: Fri Oct 08, 2004 3:03 pm

Post by Onkr »

- when a translation spans more than one line in its edit box, the popup in the HTML rendering of the page 'sticks' the two lines together, without a separating white space between the last word of the first line and the first word of the second line.


I don't really understand. GMAO just spits out the text that it has as the translation on the HTML page. So all spaces and returns are collapsed as per normal HTML processing. In the edit box, returns really don't mean anything (although they are preserved in the XML file) but I thought they would still render to space in HTML. Can you give me an example of concretely what happens (some text, how it ends up looking, how you want it to look?) This should be really easy to fix, once I understand what is wrong.
OK: here is the XML of an "offending" bubble:

Code: Select all

<Bubble Number="6" Type="Polygon" Character="Osaka">
<Point X="700" Y="913"/>
<Point X="756" Y="913"/>
<Point X="755" Y="1094"/>
<Point X="731" Y="1102"/>
<Point X="700" Y="1075"/>
<Point X="684" Y="1032"/>
<Point X="691" Y="942"/>
<Translation Author="bb" Language="French" Created="2004/10/29 20:57:45">Il y a dedans l'adresse et
le num
User avatar
FuguTabetai
Shifu
Shifu
Posts: 2589
Joined: Mon Feb 10, 2003 5:45 pm
Location: Tokyo, Japan
Contact:

Post by FuguTabetai »

[quote="Onkr"]
In XML, the "et" and "le" words are separated by a carriage return. It displays in a popup as:

"Il y a dedans l'adresse etle num
Post Reply