Semanticmediawiki: Duplicate Entity lookup has plural problem

Created on 23 Feb 2019  路  9Comments  路  Source: SemanticMediaWiki/SemanticMediaWiki

Setup and configuration

  • SMW version: 3.0.1
  • MW version: 1.32.0
  • PHP version: 7.1.22
  • DB system (MySQL, Blazegraph, etc.) and version: MySQL | 5.6.34-log

Issue

Page Special:SemanticMediaWiki&action=duplookup contains a line
:

The list contains 3 {{PLURAL:3|entry|entries}} and was retrieved from cache (UTC: Sat, 23 Feb 2019 19:35:54 GMT). 

That {{PLURAL should probably resolve to something, but it just shows up as I posted it here.

Steps to reproduce

I have no idea how to make the sandbox throw an error so that this page will be displayed... sorry...

i18n

Most helpful comment

JS component cannot resolve messages with {{PLURAL...

It can if mediawiki.jqueryMsg is loaded.

All 9 comments

The list contains 3 {{PLURAL:3|entry|entries}} a

I have seen this before and the reason is that JS mw.msg cannot parse those template replacement messages. I changed the approach (#3718) and display in SMW 3.1 to avoid the issue in the Duplicate Entity lookup.

Example output

image

@kghbln Simplest fix would be to nuke the {{PLURAL:3|entry|entries}} from the message and use something like entire(s) in case you wanted to make a 3.0.2 release.

I guess we talk about "smw-list-count" and "smw-list-count-from-cache" here. These two still appear to be in the code for 3.1.0 and active

"smw-list-count"

In JS I changed it to:

https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/c71278767d7294ac82fc7da7818cfef5de9c5aa3/res/smw/special/ext.smw.special.admin.js#L75

"smw-list-count-from-cache"

In PHP the only reference is in [0] (which can be nuked as well), JS no longer uses it.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/search?l=PHP&q=smw-list-count-from-cache

Ah, ok, thanks for the info.

In PHP the only reference is in [0] (which can be nuked as well), JS no longer uses it.

This however should not be back-ported since we would be missing it in 3.0.x, so two pulls needed here.

smw-list-count-plural

I guess this one is missing from master?

JS component cannot resolve messages with {{PLURAL...

It can if mediawiki.jqueryMsg is loaded.

It can if mediawiki.jqueryMsg is loaded.

Thanks for the info. Worth considering in the future!

It can if mediawiki.jqueryMsg is loaded.

I didn't know that, wasn't even aware that there is special package for it. Thanks

Was this page helpful?
0 / 5 - 0 ratings