On Tue, Mar 22, 2016 at 6:43 PM, Vincent Massol <[email protected]> wrote:
> Hi,
>
> This is a brainstorming aimed at fixing:
> * http://jira.xwiki.org/browse/XWIKI-10384
> * http://jira.xwiki.org/browse/XWIKI-12033
>
> In addition I believe we need to support the following use cases:
>
> * UC1: (Simple) users should be able to see documents in the currently 
> selected UI language and documents with no translations
> * UC2: (Advanced) users should be able to see all documents in the wiki (i.e. 
> all translations + all docs with no translations)
> * UC3: It could be interesting to have an option to limit the translations to 
> the list of configured languages of the wiki
>
> ATM the issues is that:
> * the “currentlanguage” query filter is not implemented properly and returns 
> duplicates (the default language + the translation)
> * sorting can fail
> * there’s no way for an advanced users to see all translations in the AllDocs 
> LT
>
> Also note that Marius (who’s discovered the problem) as commented at 
> http://jira.xwiki.org/browse/XWIKI-9229
>
> There are several solutions I can imagine
>
> Solution 1
> ========
>
> The idea is to implement a query filter that  returns “a given language + the 
> default language if there’s no translation”. It can be done, see 
> http://jira.xwiki.org/browse/XWIKI-9229?focusedCommentId=90654&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-90654
>
> Pros:
> - Generic solution that would work wherever we use the query manager in the 
> wiki
> Cons:
> - it’s “slow”.
> - It’s also not solving UC2 and UC3.

"a given language + the default language if there’s no translation" is
not enough if we go this way, it should be a given language, then its
parents until you hit default language (for example "fr_FR", "fr",
"").


>
> Solution 2
> ========
>
> When the wiki is in multilingual mode, add a “Language” column in the LT and 
> display all docs having translations in one of the configured languages of 
> the wiki + all docs with no translations.
>
> The user will see duplicates but the “Language” column will indicate clearly 
> that they are different translations.
>
> Pros:
> - This would fix UC3, partially UC2 and partially UC1.
> Cons:
> - Not a generic solution; only solves the issue for the AllDocs LT (and the 
> other places where we want to do the same).
>
> Solution 3
> ========
>
> (initially proposed by Marius)
>
> Have a toggle with several states somewhere in the AllDocs UI (could be 
> outside of the LT) to be able to choose different results:
> * Only docs in the current UI language
> * Only docs that don’t have translations
> * All docs
> * All docs in one of the configured languages of the wiki
>
> Note that from a wiki syntax POV, this could be a parameter in the 
> {{document/}} live table.
>
> Pros:
> - This would fix UC2, UC3 and partially UC1.
> Cons:
> - Not a generic solution; only solves the issue for the AllDocs LT (and the 
> other places where we want to do the same).
>
> Solution 4
> =========
>
> Modify the DB schema and add a column in the xwikidocs table to indicate if a 
> doc has translations. This would mean updating it when a new translation is 
> created and when a translation is removed.

Note: we have a "locales" field in Solr for each document indicating
for which of the supported languages it should be matched (for
example. a document in default language and no translation will have
all the supported locales listed in this field so that if you filter
on any of those in the request you will find this document).

>
> Pros:
> - Fast query
> - Generic solution that will work with any query using the query manager
> Cons:
> - Requires a DB update
>
> Conclusion
> =========
>
> Solution 4 seems to be the only real generic solution.
>
> WDYT? Any other idea?
>
> Thanks
> -Vincent
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to