Re: [xwiki-users] Translation problems

2016-03-09 Thread vinc...@massol.net

On 9 Mar 2016 at 12:12:57, Mark Sack 
(mark.s...@secti.al.gov.br(mailto:mark.s...@secti.al.gov.br)) wrote:

> I've started doing that. But I could not figure out how to set multi-line
> values in the translation wiki page - for example, the Sandbox test pages.
> For those ones, I exported the Sandbox page in a xar file, added in the new
> translation xml file, and then imported the new xar file.
>  
> Thank you for your patience in explaining all of this.

The syntax is “\”

For example:

keyname=line 1\
\
\line3


Thanks
-Vincent

> Mark Sack

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


Re: [xwiki-users] Translation problems

2016-03-09 Thread Mark Sack
I've started doing that. But I could not figure out how to set multi-line
values in the translation wiki page - for example, the Sandbox test pages.
For those ones, I exported the Sandbox page in a xar file, added in the new
translation xml file, and then imported the new xar file.

Thank you for your patience in explaining all of this.

Mark Sack



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7598387.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] Translation problems

2016-03-09 Thread vinc...@massol.net
Hi Mark,

On 8 Mar 2016 at 13:35:16, Mark Sack 
(mark.s...@secti.al.gov.br(mailto:mark.s...@secti.al.gov.br)) wrote:

> I have been updating the translations on the l10n site and then downloading
> the resource files. My challenge is that, sometimes, I don't want to wait
> for the next release. My perception is that, for extensions, the wait until
> the next release can be quite long (not a surprise). Speaking in complete
> ignorance of the implementation challenges, I think it would be ideal if the
> translations could be updated separately from the releases.

You don’t need to wait; you could put the translations in a wiki page with a 
TranslationDocumentClass xobject, see
http://platform.xwiki.org/xwiki/bin/view/DevGuide/InternationalizingApplications#HUsingpropertieslocatedinXWikipages

Thanks
-Vincent

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


Re: [xwiki-users] Translation problems

2016-03-08 Thread Mark Sack
I have been updating the translations on the l10n site and then downloading
the resource files. My challenge is that, sometimes, I don't want to wait
for the next release. My perception is that, for extensions, the wait until
the next release can be quite long (not a surprise). Speaking in complete
ignorance of the implementation challenges, I think it would be ideal if the
translations could be updated separately from the releases.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7598380.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] Translation problems

2016-03-07 Thread vinc...@massol.net



On 5 Feb 2016 at 18:33:15, Mark Sack (mark.s...@secti.al.gov.br) wrote:

What is the easiest/standar process for incorporating new translation 
resource files from the translation site before the next release of the core 
or an extension? So far I've been downloading the source for the extension, 
adding in or replacing the translation resource file downloaded from the 
translation site, rebuilding the extension and importing the xar file. For 
the core resources, I replaced the resources file in the jar. 
All translations should be done on http://l10n.xwiki.org

The release manager incorporates them during the release.

For core, check the steps from any release plan: 
http://dev.xwiki.org/xwiki/bin/view/ReleasePlans/

For extensions, it’s done manually, see for example 
https://github.com/xwiki-contrib/application-filemanager/blob/master/README.md



Thanks

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


Re: [xwiki-users] Translation problems

2016-02-05 Thread Mark Sack
What is the easiest/standar process for incorporating new translation
resource files from the translation site before the next release of the core
or an extension? So far I've been downloading the source for the extension,
adding in or replacing the translation resource file downloaded from the
translation site, rebuilding the extension and importing the xar file. For
the core resources, I replaced the resources file in the jar.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7597804.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] Translation problems

2016-02-05 Thread Mark Sack
The workaround you suggested didn't have any effect. To analyse the problem a
bit further (and verify that I was creating the translation page correctly),
I inserted a spelling error in the Translations page. The spelling error was
displayed as expected if I deployed the app to a path other than ROOT. But
in ROOT that translation page is still not used. Maybe this one is a
candidate for Ripley's Believe It or Not.

I did all of the new translations via the 
http://l10n.xwiki.org/xwiki/bin/view/L10N/
   site (logging in there and
making the edits on the forms). Then I downloaded the Application Resource
file. Do I still need to do a github pull request or send you the files?

I corrected one spelling error in the core resources before the 7.4 release
and noticed that the correction was automatically included in 7.4. I guess
the core is built using a different process than the extensions.

Regards
Mark



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7597793.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] Translation problems

2016-02-05 Thread Clemens Klein-Robbenhaar

> The workaround you suggested didn't have any effect. To analyse the problem a
> bit further (and verify that I was creating the translation page correctly),
> I inserted a spelling error in the Translations page. The spelling error was
> displayed as expected if I deployed the app to a path other than ROOT. But
> in ROOT that translation page is still not used. Maybe this one is a
> candidate for Ripley's Believe It or Not.
> 

This is really odd. Next time I need to exercise my admin skills I hope I am 
able to reproduce it with exactly your setup.
Just deploying as root-webapp is not enough (at least for me).

A tentative explanation is that the translated part (the "por página de") is 
directly rendered in the HTML of the wiki page,
while the untranslated parts ("Results ... out of ..." ) are inserted via 
JavaScript.

This means that:
  a) either the javascript code was not fetched with the right language (it 
should have a "?language=pt_BR" appended to it)
  b) it has been fetched, but as an old version, maybe before the server has 
been configured to use pt_BR; i.e. it is a caching issue


> I did all of the new translations via the 
> http://l10n.xwiki.org/xwiki/bin/view/L10N/
>    site (logging in there and
> making the edits on the forms). Then I downloaded the Application Resource
> file. Do I still need to do a github pull request or send you the files?
> 

No, that is the right place to add the translations, actually. I forgot to 
check they are already there,
and would have to upload them manually if you'd send a pull request. So you 
manage to do it the right way despite of my misleading advice ;)

The new translations should be updated with the next release of these 
extensions.
Thanks a lot for the contribution!

> I corrected one spelling error in the core resources before the 7.4 release
> and noticed that the correction was automatically included in 7.4. I guess
> the core is built using a different process than the extensions.

Yes, for the XWiki platform core syncing the translations from l10n into the 
code base on github
is part of the release process. (As via 
http://dev.xwiki.org/xwiki/bin/view/ReleasePlans/ReleasePlanHelp#HUpdateTranslations)
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translation problems

2016-02-04 Thread Clemens Klein-Robbenhaar


On 02/03/2016 06:21 PM, Mark Sack wrote:
> For the second problem, I discovered something that I can't quite understand
> (perhaps because I am relatively new to this kind of development).
> My setup is debian 8, openjdk 7, tomcat8, postgresql 9.4 (all installed from
> the debian repositories).
> 

No, it is not just you, I do not understand it either.
I cannot reproduce it the jetty/hsql distro; it seems the problem is more 
specific to the setup.

Anyway here is a workaround:

- create a new (empty) page somewhere (for example direct in the document 
index, create new page "Translations", so it ends up as 
Main/AllDocs/Translations)
- in the wiki editor, add these lines to the page:

platform.livetable.paginationResults=Resultados
platform.livetable.paginationResultsOf=de
platform.livetable.pagesizeLabel=por página de

 - save the page and then edit it in the "Objects" editor
 - in that editor, add a new object by choosing "TranslationDocumentClass" (in 
he "XWiki" section in the dropdown)
   This will add a marker that the contents on that page are translations.

This should work around the problem. (Translations in wiki pages override 
translations in property files.)

It would be interesting to figure out why this happens in the first place, of 
course.


Oh, and btw:
[...]
>
> All of the other ones listed were installed as dependencies. There are a
> couple of extensions that don't have pt_BR localization (such as Meeting and
> Full Calendar). For those cases, I downloaded the source files, added in the
> pt_BR resources file, rebuilt the extension and imported the resulting xar
> file.
>

Hey, did I hear new translations? Could you please send a pull request on 
github, or maybe attach
the new translations to a new issue at 
http://jira.xwiki.org/secure/BrowseProjects.jspa#10070
or if that is too much fuzz for you, just send them to me (I am not sure how 
the mailinglist handles mails with attachments, I guess they get scrubbed?)

(Oh, and I see there are a few translations in e.g.
  
http://l10n.xwiki.org/xwiki/bin/view/L10N/Search?application=Contrib=Contrib.CalendarTranslations===pt_BR==notdead
seems fetching these translations needs to be integrated into the build of e.g. 
the calendar macro)



Clemens
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translation problems

2016-02-03 Thread Mark Sack
For the first problem, I tried setting the locale to pt and found that the
month does get translated to Portuguese. So it may be that this is a
consequence of  http://jira.xwiki.org/browse/XWIKI-10083
  . But if I append
?language=pt_BR to the URL, the month still shows up in English.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7597767.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] Translation problems

2016-02-03 Thread Mark Sack
I tried the search on "platform.livetable.paginationResults*" with xwiki
installed both in tomcat8/webapps/xwiki and in tomcat8/xwiki/ROOT. In both
cases, there was no result (or Nenhum resultado in Portuguese).

On the installed extensions page, it shows the following that I've installed
explicitly:
Mocca Calendar Application
Meeting Application
Admin Tools Application
XWiki Enterprise Flavor - Main Wiki

All of the other ones listed were installed as dependencies. There are a
couple of extensions that don't have pt_BR localization (such as Meeting and
Full Calendar). For those cases, I downloaded the source files, added in the
pt_BR resources file, rebuilt the extension and imported the resulting xar
file. 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7597772.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] Translation problems

2016-02-03 Thread Clemens Klein-Robbenhaar
Hi Mark,

> I'm setting up a XWiki 7.4 site with a pt_BR localization and am updating
> empty translations as I go along according to our use cases. In the process
> I've run into a couple of problems.
> 
> Firstly, on the Blog Archive panel, the months are being displayed in
> English. If I log into l10.xwiki.org and do a search for existing
> translation keys like the following:
> Original text: January
> Language: pt_BR
> Status: Not dead
> Other fields all blank
> the result returned has two keys, both of which are translated.
> How can I do the translation for the months in the blog panel? Note that if
> I switch the localization to another language such as fr, I see that the
> months are translated properly.

I can reproduce this. The month printed in the Blog.Archive page seems not to 
take the current locale into account.

If one creates a test page with only the content:

{{velocity}}
#set($monthFormatter = $xwiki.jodatime.getDateTimeFormatterForPattern(''))
#set($tempDate = $xwiki.jodatime.mutableDateTime)
$monthFormatter.print($tempDate)
{{/velocity}}

and then viewing this page and appending "language=pt_BR" to the URL shows the 
month in English;
however appending "language=pt" shows it in Portuguese.

Extend the check:
{{velocity}}
#set($monthFormatter = $xwiki.jodatime.getDateTimeFormatterForPattern(''))
#set($tempDate = $xwiki.jodatime.mutableDateTime)
$monthFormatter.print($tempDate)

Language: $xcontext.getContext().get('locale').getLanguage() / 
$xcontext.getContext().get('locale').getDisplayLanguage()
Country: $xcontext.getContext().get('locale').getCountry()
{{/velocity}}

and one can see that for "language=pt" it correctly reports language as "pt / 
Portuguese" (and Country as empty)
but for language=pt_BR
one wrongly gets a language as "pt_br"  (and no country). That is not looking 
good :(

I can reproduce the issue with 6.4.7, so it is not a very recent thing.

Interestingly only the "locale" object in the "context as map" is wrong, with 
the "$xcontext.getContext().getLocale()" everything works fine.

So either the jodatime plugin uses a deprecated API with the 
context.get('locale')  or the calculation in that context.get('locale')  should 
be fixed.

I guess I should know what is the case, but I have to admit I dont :(


> 
> Secondly, on the live tables on my soon to be production instance, the range
> phrase at the top of the live tables (such as the User Index) is showing up
> half English/half Portuguese as 'Results 1-10 out of 40 por página de 10'.
> If I switch the language to fr, the problem remains with the phrase showing
> up as 'Results 1-10 out of 40 par page de 10'. But if I set up a clean
> instance of XWiki, I see that the phrases are translated properly for both
> pt_BR and fr. Clearly, I've been futzing with something(s) that I should not
> have touched. Can anyone give me some pointers on how to diagnose the
> problem and restore the system to its proper behaviour? 
> 

That is a tough one; the actual translations are in the 
ApplicationResources_pt_BR.properties
which is a file packages in one of the *.jar- files in the WEB-INF/lib 
directory (I think it is xwiki-platform-legacy-oldcore-7.4.jar)

The translation keys are either

platform.livetable.paginationResults=Resultados

or:

platform.livetable.paginationResultsMany=Resultados {0} - {1} de {2}

it is possible that you have installed any extension that overwrites these keys?
(You can try to search for "platform.livetable.paginationResults*" in the 
normal wiki search; do not forget to set "Display hidden documents" to try in 
you user preferences page)

hope this helps a little
Clemens
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translation problems

2016-02-03 Thread Mark Sack
For the second problem, I discovered something that I can't quite understand
(perhaps because I am relatively new to this kind of development).
My setup is debian 8, openjdk 7, tomcat8, postgresql 9.4 (all installed from
the debian repositories).

The problem occurs when I have the xwiki application installed in
tomcat8/webapps/ROOT. I did this by first installing it in
tomcat8/webapps/xwiki, deleting the existing ROOT directory and then moving
the xwiki directory to ROOT. If I move the ROOT directory back to xwiki, the
problem goes away.

Note other phrases (including ones in the core resources translation file)
are being localized correctly.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7597771.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


[xwiki-users] Translation problems

2016-02-02 Thread Mark Sack
I'm setting up a XWiki 7.4 site with a pt_BR localization and am updating
empty translations as I go along according to our use cases. In the process
I've run into a couple of problems.

Firstly, on the Blog Archive panel, the months are being displayed in
English. If I log into l10.xwiki.org and do a search for existing
translation keys like the following:
Original text: January
Language: pt_BR
Status: Not dead
Other fields all blank
the result returned has two keys, both of which are translated.
How can I do the translation for the months in the blog panel? Note that if
I switch the localization to another language such as fr, I see that the
months are translated properly.

Secondly, on the live tables on my soon to be production instance, the range
phrase at the top of the live tables (such as the User Index) is showing up
half English/half Portuguese as 'Results 1-10 out of 40 por página de 10'.
If I switch the language to fr, the problem remains with the phrase showing
up as 'Results 1-10 out of 40 par page de 10'. But if I set up a clean
instance of XWiki, I see that the phrases are translated properly for both
pt_BR and fr. Clearly, I've been futzing with something(s) that I should not
have touched. Can anyone give me some pointers on how to diagnose the
problem and restore the system to its proper behaviour? 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763.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