-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internationalization - Facet Category/Facet Label #5207
Comments
@4tikhonov mentioned the need to translate facets in last week's community call: https://groups.google.com/d/msg/dataverse-community/71kuJ6TdUIg/1NtdQPEcBAAJ I had asked him to leave a comment on #4684 but now that this issue exists, we should have the conversation here instead. |
hi @pdurbin and @JayanthyChengan, this is exactly what I have asked during Community call. We have already requested translation of SOLR schema to all languages from DataverseEU community members. |
For facet categories, I would think it would be just straightforward to take what solr returns and use that as a key into a bundle file. Did that not work so straightforwardly? For facet labels: So not sure what is best here. we could store the "key" in solr and then translate that with the bundles? but not sure if it would be weird that some of the metadata is translated and some is not. I think we need to decide what the behavior we want is, before we decide on how to do that. |
The biggest problem is a maintenance of all properties in all languages in bundle file and solr. We're considering possibility to turn all properties to RDF that will be checked by some tool after every Dataverse update and will show all new/not translated properties with some provenance information who is responsible for the specific language. |
@scolapasta As we implemented at https://dataverse.scholarsportal.info/ , where key=value pairs are added to bundle property files |
@JayanthyChengan @juancorr there are two issues related to facets and internationalization, this one and #5623. I'd like to suggest we close one and have the discussion in one. (and arbitrarily chose this one, but am fine switching). Is that OK? (if we do we should connect the other PR to this one.) That said, I have thoughts on both PRs. We had a meeting here (tech hours) where we discussed, and while I'm not yet sure what our final guidance might be, we have some thoughts.
Please add some discussion if we can figure out how to move forward. My suggestion is that we start with a variation of @juancorr's pr (modifying it to support facets from any metadata block) and we would get the facet categories first. |
@JayanthyChengan @juancorr I went ahead and consolidated the issues - but feel free to let us know if you prefer it the other way around. Could you please provide comments on my suggestion above? |
@scolapasta : I am fine with continuing the discussion in this issue. So, as a first step, I was looking only at translating the facet categories. In the current code, the Facet Category related to any dataset field from metadata block is translated properly in the interface. here
But there are some facet fields added to the solrQuery https://github.com/scholarsportal/dataverse/blob/develop/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java#L227 and I guess they are not specific to any metadata block. Please check staticsearchfield at here Can we add those to bundle.properties? Correct me if I am wrong. |
@JayanthyChengan Yes, for the static ones, having them in the main bundle is fine. |
@scolapasta Please check the pull request #5697 ,where I tried both FacetCategoryName and FacetLabels to be translated from metadatablock property files and added staticSearchField in bundle.properties The staticSearchField are coming from SearchFields.java, so added all those fields in Bundle.properties Haven't handled compound names in facetCategory. Please review my code and let me know your opinion. Thanks |
@scolapasta - is there any update on the PR #5697 ? Thanks |
@scolapasta, @JayanthyChengan, @juancorr Why not use the e.g.:
|
Hi @mhvezina, I closed this because it was marked as delivered in 4.16. If there's still specific work to be done, can you you create this in a new issue? Thank you for all of your work on internationalization !! |
No need to delete it, and thanks for creating the new issue so quickly! |
Noticed the FacetCategory and FacetLabel remains in English and not toggling with language.
So, thought of adding those terms as key=value pairs in the bundle property files and implement as below in search-include-fragment.xhtml
https://github.com/IQSS/dataverse/blob/develop/src/main/webapp/search-include-fragment.xhtml#L177
<h:outputText value="#{facetCategory.friendlyName}" styleClass="facetCategoryName"/>
modify to
<h:outputText value="#{bundle[facetCategory.friendlyName]}" styleClass="facetCategoryName"/>
Example:
FacetCategory:
#search-include-fragment.xhtml bundle[facetCategory.friendlyName]
Dataverse\u0020Category=Catégorie Dataverse
Publication\u0020Date=Date de publication
Author-Name=Nom \u2014 Auteur
Subject=Sujet
Deposit\u0020Date=Date de dépôt
File\u0020Type=Type de fichier
File\u0020Tag=Libellé de fichier
Access=Accès
Keyword-Term=Mot-clé \u2014 Terme
Author\u0020Affiliation=Affiliation de l'auteur
Language=Langue
Kind\u0020of\u0020Data=Type de données
Publication\u0020Status=Statut de publication
FacetLabel:
Researcher=Chercheur
Research\u0020Project=Projet de recherche
Journal=Revue
Organizations\u0020or\u0020Institutions=Organisation ou établissement
Teaching\u0020Course=Cours
Uncategorized=Sans catégorie
Research\u0020Group=Groupe de recherche
Laboratory=Laboratoire
Agricultural\u0020Sciences=Sciences de l'agriculture
Arts\u0020and\u0020Humanities=Arts et sciences humaines
Astronomy\u0020and\u0020Astrophysics=Astronomie et astrophysique
Business\u0020and\u0020Management=Affaires et gestion
Chemistry=Chimie
Earth\u0020and\u0020Environmental\u0020Sciences=Sciences de la terre et de l'environnement
Engineering=Génie
Medicine,\u0020Health\u0020and\u0020Life\u0020Sciences=Médecine, santé et sciences de la vie
Computer\u0020and\u0020Information\u0020Science=Informatique et science de l'information
Law=Droit
Mathematical\u0020Sciences=Sciences mathématiques
Physics=Physique
Social\u0020Sciences=Sciences sociales
Other=Autre
Published=Published
Unpublished= Non publiée
Draft= Version provisoire
In\u2000Review= En révision
Deaccessioned=Retirée
@scolapasta: please advice
Thanks
The text was updated successfully, but these errors were encountered: