Modify

Opened 14 years ago

Closed 14 years ago

#4461 closed defect (fixed)

Links in internal Russian Help works very strange

Reported by: calibrator Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

Now first call to Russian Help (in Russian version) JOSM 2916 works correct. But if click on any link, then next page of internal Russian Help looks very strange. See attached PrintScreen file, please.
PS: English Internal Help works correct.

Attachments (1)

RussianStrangeHelp(pressAnyLink).PNG (85.4 KB ) - added by calibrator 14 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by calibrator, 14 years ago

PPS: I can not attach file to ticket. I recieve error message during upload to Track:

Trac detected an internal error:
UnicodeDecodeError: ('ascii', 'C:
Documents and Settings
Parfenov_SN
\xd0\x9c\xd0\xbe\xd0\xb8 \xd0\xb4\xd0\xbe\xd0\xba\xd1\x83\xd0\xbc\xd0\xb5\xd0\xbd\xd1\x82\xd1\x8b
\xd0\x9c\xd0\xbe\xd0\xb8 \xd1\x80\xd0\xb8\xd1\x81\xd1\x83\xd0\xbd\xd0\xba\xd0\xb8
Strange_Russian_Help.PNG', 38, 39, 'ordinal not in range(128)')

comment:2 by stoecker, 14 years ago

Owner: changed from team to calibrator
Status: newneedinfo

Copy file first to C:\ and upload then. Seems this is a Trac bug - Trac should ignore that error as it is anyway in stripped part of the path.

by calibrator, 14 years ago

comment:3 by calibrator, 14 years ago

Done.

comment:4 by calibrator, 14 years ago

Status: needinfoassigned

comment:5 by stoecker, 14 years ago

Same for all languages.

comment:6 by Upliner, 14 years ago

Owner: changed from calibrator to team
Status: assignednew

It seems to be a bug in JEditorPane.setPage() method which is called in HelpBrowser.openUrl() for all pages that doesn't start with "http://josm.openstreetmap.de/wiki/Help".

comment:7 by stoecker, 14 years ago

Probably we need to load the page directly like the JOSM help pages. We should reset the CSS for pages not from http://josm.openstreetmap.de/.

comment:8 by anonymous, 14 years ago

Problem shows in those wiki pages that doesn't start with "Help", for example http://josm.openstreetmap.de/wiki/Introduction

Probem in CSS sheet indeed: http://josm.openstreetmap.de/chrome/common/css/trac.css

body { background: #fff; color: #000; margin: 10px; padding: 0; }

I think #fff is interpreted as #000fff by Java.

Possible solutions:

  • use fetchHelpTopicContent() for all JOSM wiki pages, not only these that starts with "Help"
  • Find a way to make JEditorPane.setPage() ignore CSS stylesteets.
  • Do not use JEditorPane.setPage() at all, use HttpURLConnection + JEditorPane.setText(), but do not prettify contents with prepareHelpContent().

comment:9 by stoecker, 14 years ago

I tested without CSS and I got a page which looked binary (German help, click on link to OSM webpage). Probably setPage() did not undo gzip for the contents.

Best seems to switch to own loader for all pages and handle correctly handle the CSS settings.

comment:10 by stoecker, 14 years ago

Resolution: fixed
Status: newclosed

(In [3043]) fix #4461 - external pages in Help browser wrong

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.