Page MenuHomePhabricator

Category links seem to be always localized on roundtripping
Open, MediumPublic

Description

% echo "[[Category:Quercus|glauca]]" | node parse --prefix eswiki --wt2wt
[[Categoría:Quercus|glauca]]

This is not an issue for selser-based roundtripping, but worth checking if something is broken here.


Version: unspecified
Severity: normal

Details

Reference
bz70096

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:31 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz70096.
ssastry created this task.Aug 27 2014, 3:56 PM
marcoil claimed this task.Jan 21 2015, 1:24 AM
marcoil added a subscriber: marcoil.

It looks like the serializer takes the namespace from the href, which is stored localized. Investigating…

After further investigation: The serializer thinks all category links with a sortkey have changed, because they are stored without that sortkey in data-parsoid. This makes the serializer recreate the link from href (which should always be localized to behave like the PHP parser) instead of the stored original text, making them appear localized.

Not sure about how to fix it, though. There's a comment by @ssastry in the code that states

// Change the href to include the sort key, if any (but don't update the rt info)

so I'll discuss it further to see what can be done about it.

Not sure about how to fix it, though. There's a comment by @ssastry in the code that states

// Change the href to include the sort key, if any (but don't update the rt info)

so I'll discuss it further to see what can be done about it.

I dug in to see if there is more info, but looks like @GWicke added it in beb2a438f42d3d70becc3dd03ca66f0bab9bc880 .. but, offhand don't know the reason why the RT info for this is not being recorded. Will have to stare at the code for a bit.

This comment was removed by ssastry.
marcoil removed marcoil as the assignee of this task.Jun 9 2015, 2:06 PM
Aklapper edited projects, added Parsoid; removed Parsoid-Edit-Support.Feb 29 2020, 5:15 PM