Page MenuHomePhabricator

Add support to display translated and untranslated messages
Closed, ResolvedPublic

Description

Add support for translated and untranslated messages.

Event Timeline

Phoenix303 claimed this task.
Phoenix303 raised the priority of this task from to Medium.
Phoenix303 updated the task description. (Show Details)
Phoenix303 added a project: Translation-search.

http://translation-search.wmflabs.org/w/index.php?title=Special:SearchTranslations&query=edit&language=it&filter=untranslated looks good (though I haven't verified), but http://translation-search.wmflabs.org/w/index.php?title=Special:SearchTranslations&filter=translated&language=it&query=edit seems to be searching "edit" in the Italian documents, finding only Italian translations of messages which contain "edit" in the message key.

@Nemo_bis: http://translation-search.wmflabs.org/w/index.php?title=Special:SearchTranslations&filter=translated&language=it&query=edit currently displays text only in the source language. I will make a change to support this feature too.

Thanks! Can't currently test due to Argument 1 passed to SpecialSearchTranslations::getLanguages() must be an instance of array, null given, will check again later.

Change 218588 had a related patch set uploaded (by Phoenix303):
Added support for translated, untranslated and outdated messages in Special:SearchTranslations.

https://gerrit.wikimedia.org/r/218588

Change 218859 had a related patch set uploaded (by Phoenix303):
Allow cross language search for a string in other languages

https://gerrit.wikimedia.org/r/218859

Change 218588 abandoned by Phoenix303:
Added support for translated, untranslated and outdated messages in Special:SearchTranslations.

https://gerrit.wikimedia.org/r/218588

http://translation-search.wmflabs.org/w/index.php?title=Special:SearchTranslations&filter=untranslated&language=it&query=wiki&uselang=it seems to behave correctly as regards the ability to list untranslated messages.

There are several smaller bugs with things like editability, default language selection, facets and counts, which may be caused by different patches. I'm not able to set up a testing environment on my systems at this time to verify, but phoenix said she'll check the oddities I found.

@Nemo_bis: Thank you. Will recheck all the smaller bugs found.

Nemo_bis added a comment.EditedJul 7 2015, 8:32 AM

http://translation-search.wmflabs.org/w/index.php?title=Special:SearchTranslations&filter=translated&language=ksh&query=edit&string=edit&uselang=en is behaving well, but the interface is confusing, because

  • "All" is not a superset of the following tab(s),
  • it's not clear in what language "edit" is being searched.

As we have to select a default language, better force it to the source language (English in this case) for now.

The tabs I'd make verbose for now, "Messages containing [the query]" and "Translations from English of [the query]", ideally above the search bar.

I would also add an URL operator without interface to force a different source language. I like that the target language is (still) automatically selected by interface language by default, e.g. it vs. http://translation-search.wmflabs.org/w/index.php?title=Special:SearchTranslations&filter=translated&query=edit&string=edit&uselang=ksh.

@Nemo_bis: Source language is English for http://translation-search.wmflabs.org/w/index.php?title=Special:SearchTranslations&filter=translated&language=ksh&query=edit&string=edit&uselang=en

and Finnish for http://translation-search.wmflabs.org/w/index.php?title=Special:SearchTranslations&filter=translated&language=ksh&query=edit&string=edit&uselang=fi right?

I don't know how to check, given Finnish messages are not shown in any way in the second URL. Sounds unlikely though, because I get the same number of results.

Would you explain why do we require to add an URL operator without interface to force a different language?

Because we did not come up yet with a meaningful interface to tell what "source" language is being searched for the string nor how to change it. If you have ideas, let's use them :); otherwise, let's go for the viable thing.

However I don't think it's reasonable that user of language A would search for strings used in language B for messages in language C which are translated in language A. Usually the user is interested in the source language and their language.

Thanks @Nemo_bis
We have been able to provide a user to search in the source language which defaults to the wiki's content language and get translations in their language. We have not come up yet with any interface to let users select a source language or tell user what source language is searched in, however, a user can force the search in any source language with URL parameter 'sourcelanguage'.
One solution to find the source language is to detect the language of the search string using a language detection plugin, if one already exists? The another solution can be to let a user select it while typing a search string, see the attached mockup.

@Nemo_bis @Nikerabbit Please provide feedback or let us schedule a meeting?

Hm, popup or similar (e.g. a panel expanding below the search bar) can be an option, but I'd defer that to a later point when we have many operators and options. For now I'd just use a sensible default.

Change 222074 had a related patch set uploaded (by Nemo bis):
Cross language search using MessageCollection

https://gerrit.wikimedia.org/r/222074

Change 220447 had a related patch set uploaded (by Phoenix303):
Show untranslated messages in the target language.

https://gerrit.wikimedia.org/r/220447

Change 225277 had a related patch set uploaded (by Phoenix303):
Customize facets for translated and untranslated filters.

https://gerrit.wikimedia.org/r/225277

Change 220447 merged by jenkins-bot:
Get untranslated messages in the target language, using MessageCollection

https://gerrit.wikimedia.org/r/220447

Change 222074 merged by jenkins-bot:
Get translated messages in the target language, using MessageCollection.

https://gerrit.wikimedia.org/r/222074

Phoenix303 closed this task as Resolved.Aug 17 2015, 6:52 AM

Change 225277 abandoned by Phoenix303:
Customize facets for translated and untranslated filters.

Reason:
We do not require this patch.

https://gerrit.wikimedia.org/r/225277