Page MenuHomePhabricator

Drilldown result query is ignoring current language
Open, Needs TriagePublic

Description

Hello Yaron,

I'm not quite sure about this, but it appears to me that the Semantic Drilldown ASK Query result is not properly translated into the currently used language.

The other parts of the BrowseData Special page are properly translated, just the result itself is not.

I've taken a look into the code, but couldn't find a solution or point to a specific problem, sorry.

I'm using {{int: strings to translate some property names, like this:

<!-- DRILLDOWNINFO --><div class="hidden" style="display: none;">{{#drilldowninfo:filters=
  Tag (property=Tag,int=SA Tag Tags),
  First Letter (property=First Letter,int=SA Foundation First Letter),
  |display parameters=?Short Description={{int:SA Foundation Short Description}};?Tag={{int:SA Tag Tags}};format=broadtable;mainlabel={{int:SA Tag Tag}};
  |header=Template:S Tag Drilldown Header
}}__SHOWINDRILLDOWN__</div><!-- /DRILLDOWNINFO -->

Event Timeline

Fannon created this task.Jun 13 2016, 2:07 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 13 2016, 2:07 PM

Semantic Drilldown doesn't do an Ask/SMW query, it does a direct SQL query, as strange as that sounds.

What is not being translated?

Fannon added a comment.EditedJun 13 2016, 2:15 PM

The labels of the result are not translated.

I thought it does an SMW query at the bottom? This is also where some parameters like "display parameters" are implemented. You can actually choose wich Semantic Result Format you want to use.

See this screenshot -> Short Description should be translated.

Thanks for the fast reply!

This comment was removed by Fannon.

No, it doesn't do an SMW query, it packages its own results as SMW query results and sends them to one of the formatters.

Ah, now I get it - I missed all the "int"s in the original wikitext you sent.

On that note - I understand the purpose of the #int calls, but what is this about?

(property=Tag,int=SA Tag Tags)

Did "int=" in there ever do anything? Is that some patch you added to SD?

Yes, "int=" is part of a patch that I've uploaded in a task here.

This int is for translating the filters, which works.

Maybe I have to follow some similar route/logic...

Thanks!

Aklapper removed Yaron_Koren as the assignee of this task.Jun 19 2020, 4:15 PM
Aklapper added a subscriber: Yaron_Koren.

This task has been assigned to the same task owner for more than two years. Resetting task assignee due to inactivity, to decrease task cookie-licking and to get a slightly more realistic overview of plans. Please feel free to assign this task to yourself again if you still realistically work or plan to work on this task - it would be welcome!

For tips how to manage individual work in Phabricator (noisy notifications, lists of task, etc.), see https://phabricator.wikimedia.org/T228575#6237124 for available options.
(For the records, two emails were sent to assignee addresses before resetting assignees. See T228575 for more info and for potential feedback. Thanks!)

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptJun 19 2020, 4:15 PM