Page MenuHomePhabricator

Printer friendly version of article must encode URL in unicode.
Closed, ResolvedPublic

Description

While this may or may not be combined with bug 1450, i think this is a seperate issue.

Originally reported on bug 1450

The additional problem appears when you want to make wiki book and opt for
printer friendly version of the article. At the end of the article, a really
long URL in US ASCII appears. I think it need not be in US ASCII, as
international domain names have been approved. Please correct the print
version to a unicode url, so that the page can be accessed easily as well as
understood in the human readable language.

Appreciate higher priority to fix this bug, as we are ready to publish e-books
in Telugu
Example Ubuntu user guide page url as it appears in printer friendly version.
http://te.wikibooks.org/wiki/%E0%B0%89%E0%B0%AC%E0%B1%81%E0%B0%82%E0%B0%9F%E0%B1%81_%E0%B0%B5%E0%B0%BE%E0%B0%A1%E0%B1%81%E0%B0%95%E0%B0%B0%E0%B0%BF_%E0%B0%AE%E0%B0%BE%E0%B0%B0%E0%B1%8D%E0%B0%97%E0%B0%A6%E0%B0%B0%E0%B1%8D%E0%B0%B6%E0%B0%A8%E0%B0%BF
and a shorturl if it were to be used.
http://te.wikibooks.org/wiki/ఉబుంటు వాడుకరి మార్గదర్శని


Version: unspecified
Severity: normal

Details

Reference
bz32748
TitleReferenceAuthorSource BranchDest Branch
build: Move 'publish-dev-image' step to own, un-run stage for nowrepos/abstract-wiki/wikifunctions/function-orchestrator!62jforresterT347487main
Add temporary debug output for T347483repos/phabricator/phabricator!17aklapperT347483debugwmf/stable
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:07 AM
bzimport set Reference to bz32748.
bzimport added a subscriber: Unknown Object (MLST).

Have you tried using the PDF export (click on "PDF క్రింద దిగుమతి చేసుకోండి") instead of the "printer friendly version" or creating a book/collection (click on "ఓ పుస్తకాన్ని సృష్టించండి")? Adding some of the PediaPress devs in case there are some concerns with the Collection extension that they could address.

If there is a compelling reason for not using the above methods, then I'll see if we can't get this fixed sooner.

Indic rendering on PDF is not up to mark yet, So thats a bigger problem than this. I think Santhosh is working on it, but may take time. Fixing this will do good for the time being.

Created attachment 9592
Sample print output from a copy of https://te.wikibooks.org/wiki/%E0%B0%89%E0%B0%AC%E0%B1%81%E0%B0%82%E0%B0%9F%E0%B1%81_%E0%B0%B5%E0%B0%BE%E0%B0%A1%E0%B1%81%E0%B0%95%E0%B0%B0%E0%B0%BF_%E0%B0%AE%E0%B0%

PDF shows the reealllllly long permalink URL broken over 5 lines in the print footer. While possible in principle, it doesn't look very easy to type. :)

Note that the title isn't actually necessary in the permalink, but the 'oldid=1517' at the end is vital to getting that particular version of the page (and would, on its own, be sufficient).

Attached:

Created attachment 9593
Test patch: changes print footer to decode Unicode chars as a pretty IRI

Test patch: changes print footer to decode Unicode chars as a pretty IRI (Internationalized Resource Identifier). Only changes the print footer, but adds a wfExpandIRI() function as a sister of wfExpandUrl().

Attached:

Created attachment 9594
PDF output with the patch

PDF output with the patch. Several things to note:

  • by default, titles will still use underscores instead of spaces here. this may or may not look good with all scripts
  • the URL is still longish due to presence of index.php?title= and the oldid=1517 is bumped to the second line.

I might recommend changing permalinks in general to a more compact format that puts the oldid first.

Attached:

Note the PDF output above is produced by print to file on Firefox 8 on Ubuntu 11.10.

The patch proposed by Brion is submitted here https://gerrit.wikimedia.org/r/3897 - with slight modification.