Re: [xwiki-users] Problems setting up multilingual site

2016-01-25 Thread Thomas Mortagne
On Mon, Jan 25, 2016 at 6:04 PM, Mark Sack  wrote:
> Yes, I can switch back and forth between the different languages using the
> URL method.
>
> However, this functionality seems to be exhibiting some strange and
> inconsistent behaviour. This time I created a new instance in a VM and
> observed the following:
>
> 1. Logged in as Admin and set the Multilingual - Yes, Supported languages -
> pt_BR,en and Default language - pt_BR
> 2. Saved the configuration with the result that the page was displayed in
> French (I did not list fr as a supported language).
> 3. Tried switching between different languages (pt_BR, en and fr) and they
> all were displayed as expected.

In xwiki.cfg file you have a fiew properties to control this behaviour
i the section "Internationalization":

#-# By default, XWiki chooses the language specified by the client
(browser) in the Accept-Language HTTP header. This
#-# allows to use the default language of the wiki when the user
didn't manually choose a language.
# xwiki.language.preferDefault=0

#-# Force only one of the supported languages to be accepted.
# xwiki.language.forceSupported=0


>
> The languages shown on the side are English and French as in the attached
> image. 
>
> Another thing I noted is it appears that the list of supported languages
> cannot contain spaces. If I put a space after the comma, there is an error
> in catalina.out.
>
> Also I don't quite understand is how to edit a page for a specific language
> only. If I go to the first blog post page with language pt_BR and make some
> edits, those same edits show up if I display the page with language en. I
> read the Internationalization page
> http://http://platform.xwiki.org/xwiki/bin/view/Features/I18N
>    But I
> can't see a "Document Information" panel as it describes. The last item on
> the ... drop down menu gives some information about the page but does not
> say anything about the language.

That's because you did not choose the right example. Blog post is not
a simple wiki page and when you edit it you get a custom edit view.
You should try with a new page for example.

>
>
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/Problems-setting-up-multilingual-site-tp7597630p7597692.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users



-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Problems setting up multilingual site

2016-01-25 Thread Mark Sack
Yes, I can switch back and forth between the different languages using the
URL method. 

However, this functionality seems to be exhibiting some strange and
inconsistent behaviour. This time I created a new instance in a VM and
observed the following:

1. Logged in as Admin and set the Multilingual - Yes, Supported languages -
pt_BR,en and Default language - pt_BR
2. Saved the configuration with the result that the page was displayed in
French (I did not list fr as a supported language).
3. Tried switching between different languages (pt_BR, en and fr) and they
all were displayed as expected.

The languages shown on the side are English and French as in the attached
image.  

Another thing I noted is it appears that the list of supported languages
cannot contain spaces. If I put a space after the comma, there is an error
in catalina.out.

Also I don't quite understand is how to edit a page for a specific language
only. If I go to the first blog post page with language pt_BR and make some
edits, those same edits show up if I display the page with language en. I
read the Internationalization page 
http://http://platform.xwiki.org/xwiki/bin/view/Features/I18N
   But I
can't see a "Document Information" panel as it describes. The last item on
the ... drop down menu gives some information about the page but does not
say anything about the language.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Problems-setting-up-multilingual-site-tp7597630p7597692.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Problems setting up multilingual site

2016-01-25 Thread Thomas Mortagne
Is it ok when you put ?language=pt_BR in the URL (this explicitly set
and remember the locale to use for you) ? Seems to work well for me.

Looks like there is an issue when automatically choosing the locale
based on the browser configuration according to
http://jira.xwiki.org/browse/XWIKI-10083.

On Wed, Jan 20, 2016 at 4:27 PM, Mark Sack  wrote:
> With XWiki 7.4 I have a site setup in Brazilian Portuguese (pt_BR). I edited
> the localization settings as follows:
> Multilingual - Yes
> Supported languages - pt_BR, en
> Default language - pt_BR
>
> After saving the settings, the site looks like it switches to the pt local
> (European Portuguese?). I can tell this because the pt local is much more
> sparsely translated. On the drop down menu on the right, I now see a
> Languages item with Portuguese and English options and selecting English
> switches the site to English.
>
> I go back to the drop down menu and select languages. But now I only see
> English - Portuguese is not listed as an available language.
>
> I tried to repeat the above with a fresh install. This time I first set the
> local to pt (no multilingual support) and verified that the site is switch
> to pt. Then I set the multilingual support to yes and added the en local (pt
> still the default). Now the site switches immediately to English and the
> only language available on the drop down menu on the right is English.
>
> I'd appreciate some help in setting up my site for multilingual support with
> both English and Brazilian Portuguese. Is there something I'm doing wrong?
>
>
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/Problems-setting-up-multilingual-site-tp7597630.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users



-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] XWikiRights for groups on page and children

2016-01-25 Thread Marius Dumitru Florea
See http://extensions.xwiki.org/xwiki/bin/view/Extension/Setting+Rights "if
you want to change global (wiki or space) rights, use
XWiki.XWikiGlobalRights". See the last comment on the page for an example.

Hope this helps,
Marius

On Mon, Jan 25, 2016 at 10:41 AM, gervwyk  wrote:

> Good day.
>
> I'm trying to write a java component to set rights to a space and the space
> children. Normally, the user would set this on the space when clicking on
> administer page>users and groups>Rights: page and children, where the user
> can set access rights for a group to effect the space and its children.
>
> I'm trying to achieve this with a java component and currently I'm
> attaching
> an XWikiRights object with the specified group and rights to the
> .WebHome page. However, this only effects the one page and not the
> children, also view rights only leaves comment and page creating rights
> which is not desired. Am I understanding the rights objects wrong? How do I
> achieve this in Java, currently I have:
>
> XWikiDocument doc = xwiki.getDocument(docref, xcontext); //
> referance to the .WebHome
> DocumentReference classdoc =
> createDocumentReference(xwikiName,"XWiki","XWikiRights",false);
> BaseObject DSErightsobj = doc.newXObject(classdoc, xcontext);
> DSErightsobj.set("groups", DSEname, xcontext);
> DSErightsobj.set("users", "", xcontext);
> DSErightsobj.set("levels", "view", xcontext); // space right
> DSErightsobj.set("allow", 1, xcontext);
> xwiki.saveDocument(doc, xcontext);
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/XWikiRights-for-groups-on-page-and-children-tp7597689.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] XWikiRights for groups on page and children

2016-01-25 Thread gervwyk
Good day.

I'm trying to write a java component to set rights to a space and the space
children. Normally, the user would set this on the space when clicking on
administer page>users and groups>Rights: page and children, where the user
can set access rights for a group to effect the space and its children. 

I'm trying to achieve this with a java component and currently I'm attaching
an XWikiRights object with the specified group and rights to the
.WebHome page. However, this only effects the one page and not the
children, also view rights only leaves comment and page creating rights
which is not desired. Am I understanding the rights objects wrong? How do I
achieve this in Java, currently I have:

XWikiDocument doc = xwiki.getDocument(docref, xcontext); //
referance to the .WebHome
DocumentReference classdoc =
createDocumentReference(xwikiName,"XWiki","XWikiRights",false);
BaseObject DSErightsobj = doc.newXObject(classdoc, xcontext);
DSErightsobj.set("groups", DSEname, xcontext);
DSErightsobj.set("users", "", xcontext);
DSErightsobj.set("levels", "view", xcontext); // space right
DSErightsobj.set("allow", 1, xcontext);
xwiki.saveDocument(doc, xcontext); 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/XWikiRights-for-groups-on-page-and-children-tp7597689.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users