The Portuguese language pack does not work for the date field

85 views
Skip to first unread message

Rondineli Gama Saad

unread,
Jun 12, 2024, 1:09:15 PMJun 12
to Dataverse Users Community
Hello,
Since we updated Dataverse to version 5.14 (https://data.scielo.org), the Portuguese language in the field where the dataset was created was disconfigured (the image is attached). I've already tried reinstalling the language and the same problem happens. You can see in the image bellow the month abreviation to February (Fevereiro). The correct abreviation is Fev.
The english idiom package is working perfectly.
language-package-error.png
To update the language I did the following:
git clone https://github.com/GlobalDataverseCommunityConsortium/dataverse-language-packs.git
cd dataverse-language-packs
git checkout dataverse-v5.14
rm -Rf /tmp/languages
mkdir /tmp/languages
cp -R en_US/*.properties /tmp/languages
cp -R pt_BR/*.properties /tmp/languages
cd /tmp/languages
zip languages.zip *.properties
curl http://localhost:8080/api/admin/datasetfield/loadpropertyfiles -X POST --upload-file /tmp/languages/languages.zip -H "Content-Type: application/zip"
/usr/local/payara5/bin/asadmin stop-domain && /usr/local/payara5/bin/asadmin start-domain
Can anyone help me with this?
Best Regards,

James Myers

unread,
Jun 12, 2024, 1:50:12 PMJun 12
to dataverse...@googlegroups.com

I believe the month abbreviations come directly from Java based on the locale – they aren’t in Dataverse’s language files. The locale used is either from your machine or Java, or from the list you add when using https://guides.dataverse.org/en/latest/installation/config.html#adding-multiple-languages-to-the-dropdown-in-the-header. You should be able to find info on how to see/change your locale on the Internet – I saw https://jarirajari.wordpress.com/2020/11/23/how-to-set-locale-in-linux-for-jvm/ for example. (FWIW: The only language I see Ebr as a month abbreviation in is Welsh – from https://web.library.yale.edu/cataloging/months).

 

Hope that helps,

 

-- Jim

 

 

 

From: 'Rondineli Gama Saad' via Dataverse Users Community <dataverse...@googlegroups.com>
Sent: Wednesday, June 12, 2024 1:09 PM
To: Dataverse Users Community <dataverse...@googlegroups.com>
Subject: [Dataverse-Users] The Portuguese language pack does not work for the date field

 

Hello,

Since we updated Dataverse to version 5.14 (https://data.scielo.org), the Portuguese language in the field where the dataset was created was disconfigured (the image is attached). I've already tried reinstalling the language and the same problem happens. You can see in the image bellow the month abreviation to February (Fevereiro). The correct abreviation is Fev.
The english idiom package is working perfectly.

To update the language I did the following:
git clone https://github.com/GlobalDataverseCommunityConsortium/dataverse-language-packs.git
cd dataverse-language-packs
git checkout dataverse-v5.14
rm -Rf /tmp/languages
mkdir /tmp/languages
cp -R en_US/*.properties /tmp/languages
cp -R pt_BR/*.properties /tmp/languages
cd /tmp/languages
zip languages.zip *.properties
curl http://localhost:8080/api/admin/datasetfield/loadpropertyfiles -X POST --upload-file /tmp/languages/languages.zip -H "Content-Type: application/zip"
/usr/local/payara5/bin/asadmin stop-domain && /usr/local/payara5/bin/asadmin start-domain
Can anyone help me with this?
Best Regards,

Esta mensagem pode conter informação confidencial, sendo seu sigilo protegido por lei. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não pode usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor, avise imediatamente ao remetente, respondendo o e-mail e em seguida apague-a. Agradecemos sua cooperação.


This message may contain confidential information and its confidentiality is protected by law. If you are not the addressed or authorized person to receive this message, you must not use, copy, disclose or take any action based on it or any information herein. If you have received this message by mistake, please advise the sender immediately by replying the e-mail and then deleting it. Thank you for your cooperation.

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/3f33e7e4-a2e8-463e-9fdf-4d01214e22c9n%40googlegroups.com.

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Rene F. Gabriel Junior

unread,
Jun 14, 2024, 7:37:13 AMJun 14
to dataverse...@googlegroups.com
Dear Rondineli,

To fix this problem you need to change your pref language in Payara.

In file:

/usr/local/payara6/glassfish/domains/domain1/applications/dataverse-6.1/WEB-INF/faces-config.xml

change: en => pt (pref label)

Your language need to be "pt", not "br"

==> Bundle_pt.properties

To apply Restart the Payara


Prof. Dr. Rene Faustino Gabriel Junior
Universidade Federal do Rio Grande do Sul
Fone: 55(41)98811.9061
Lattes RiD OrcID LinkId |
CRB10-002775





Rondineli Gama Saad

unread,
Jun 14, 2024, 7:37:25 AMJun 14
to Dataverse Users Community
Hi Jim, how are you?
I believe this is not the case, because when I consulted my OS locale, it looked like this:
LANG=pt_PT.utf8
LC_CTYPE="pt_PT.utf8"
LC_NUMERIC="pt_PT.utf8"
LC_TIME="pt_PT.utf8"
LC_COLLATE="pt_PT.utf8"
LC_MONETARY="pt_PT.utf8"
LC_MESSAGES="pt_PT.utf8"
LC_PAPER="pt_PT.utf8"
LC_NAME="pt_PT.utf8"
LC_ADDRESS="pt_PT.utf8"
LC_TELEPHONE="pt_PT.utf8"
LC_MEASUREMENT="pt_PT.utf8"
LC_IDENTIFICATION="pt_PT.utf8"
LC_ALL=

I tried adding the locale directly to payara, add in Java Options. But the same problem continue.
Best Regards,

Rondineli Gama Saad

unread,
Jun 14, 2024, 7:38:49 AMJun 14
to Dataverse Users Community
Hi Jim, how are you?
I believe this is not the case, because when I consulted my OS locale, it looked like this:
LANG=pt_PT.utf8
LC_CTYPE="pt_PT.utf8"
LC_NUMERIC="pt_PT.utf8"
LC_TIME="pt_PT.utf8"
LC_COLLATE="pt_PT.utf8"
LC_MONETARY="pt_PT.utf8"
LC_MESSAGES="pt_PT.utf8"
LC_PAPER="pt_PT.utf8"
LC_NAME="pt_PT.utf8"
LC_ADDRESS="pt_PT.utf8"
LC_TELEPHONE="pt_PT.utf8"
LC_MEASUREMENT="pt_PT.utf8"
LC_IDENTIFICATION="pt_PT.utf8"
LC_ALL=
I tried adding the locale directly to payara as shown in the image below:payara-java-options.png
Best Regards,
Em quarta-feira, 12 de junho de 2024 às 14:50:12 UTC-3, Jim Myers escreveu:

James Myers

unread,
Jun 14, 2024, 8:17:05 AMJun 14
to dataverse...@googlegroups.com
Rene - thanks! So the date problem is from the locale rather than our language bundle, but the locale used comes from the default locale setting in faces-config.xml as you say. It looks like "pt_br" is a valid setting there for Portuguese along with just "pt", but "br" appears to reference Breton - https://lh.2xlibre.net/locale/br_FR/ which indeed has Ebr as the abbreviation for February.

I don't see anything about this in the guides, so an issue and/or PR to add this to the internationalization section or elsewhere would be welcome (or a pointer to where the info already is if I'm just missing it.)

  • Jim


From: dataverse...@googlegroups.com <dataverse...@googlegroups.com> on behalf of Rene F. Gabriel Junior <ren...@gmail.com>
Sent: Wednesday, June 12, 2024 1:45 PM
To: dataverse...@googlegroups.com <dataverse...@googlegroups.com>
Subject: Re: [Dataverse-Users] The Portuguese language pack does not work for the date field
 

Rondineli Gama Saad

unread,
Jun 15, 2024, 9:54:59 PMJun 15
to dataverse...@googlegroups.com
Hello, with Rene's help we managed to solve it. Follow the steps taken: The file: /usr/local/payara5/glassfish/domains/domain1/applications/dataverse-5.14/WEB-INF/faces-config.xml was changed in the locale_config section

From:
image.png
To:
image.png
Once that was done, I added the English and Portuguese language translation package:
git clone https://github.com/GlobalDataverseCommunityConsortium/dataverse-language-packs.git
cd dataverse-language-packs
git checkout dataverse-v5.14
rm -Rf /tmp/languages
mkdir /tmp/languages
cp -R en_US/*.properties /tmp/languages
cp -R pt_BR/*.properties /tmp/languages
cd /tmp/languages
All files containing _br.properties in the name were changed to _pt.properties
Once changed:

zip languages.zip *.properties
curl http://localhost:8080/api/admin/datasetfield/loadpropertyfiles -X POST --upload-file /tmp/languages/languages.zip -H "Content-Type: application/zip"
curl http://localhost:8080/api/admin/settings/:Languages -X PUT -d '[{"locale":"us","title":"English"}, {"locale":"pt","title":"Português"},]'

/usr/local/payara5/bin/asadmin stop-domain && /usr/local/payara5/bin/asadmin start-domain

Rondineli Saad
Coordenador de TI / Preservação Digital / Segurança da Informação
SciELO - Scientific Electronic Library Online
FAPESP - CAPES - CNPq - BVS-BIREME/OPAS/OMS - FapUNIFESP
______________________________

25-29 setembro, 2023

São Paulo, Brasil

https://25.scielo.org/



You received this message because you are subscribed to a topic in the Google Groups "Dataverse Users Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dataverse-community/JmpduSHoHos/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/SN6PR19MB2271A227F53CE361606E35D8BFC22%40SN6PR19MB2271.namprd19.prod.outlook.com.
Reply all
Reply to author
Forward
0 new messages