Modify

Opened 3 years ago

Closed 3 years ago

#4461 closed defect (fixed)

Links in internal Russian Help works very strange

Reported by: calibrator Owned by: team
Priority: normal 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 3 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 3 years ago by calibrator

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 Changed 3 years ago by stoecker

  • Owner changed from team to calibrator
  • Status changed from new to needinfo

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.

Changed 3 years ago by calibrator

comment:3 Changed 3 years ago by calibrator

Done.

comment:4 Changed 3 years ago by calibrator

  • Status changed from needinfo to assigned

comment:5 Changed 3 years ago by stoecker

Same for all languages.

comment:6 Changed 3 years ago by Upliner

  • Owner changed from calibrator to team
  • Status changed from assigned to new

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 Changed 3 years ago by stoecker

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 Changed 3 years ago by anonymous

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 Changed 3 years ago by stoecker

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 Changed 3 years ago by stoecker

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.