Skip to content
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

Dataverse v4.11 facets translation and dataverse-language-packs develop branch #2

Open
juancorr opened this issue Mar 12, 2019 · 5 comments

Comments

@juancorr
Copy link
Contributor

Dataverse v4.11 facets are not properly translated to French and Spanish. This issue affect to dataverse-language-pack project too. There are some facets that are not translated, other facets with a wrong translation and other that are properly translated:

  • "Dataverse Category", "Publication Year" and "Subject" are not translated.
  • "Auteur Nom" and "Mot-Clé Terme" should be "Auteur", "Mot-Clé" or "Auteur: Nom", "Mot-Clé: Terme"

image

This issue is related with IQSS/dataverse#5623 .

@JayanthyChengan
Copy link
Collaborator

@juancorr - these were handled in PR IQSS/dataverse#5618 (Still in code review)
also we deployed in production: https://dataverse.scholarsportal.info/dataverse.xhtml

@juancorr
Copy link
Contributor Author

Thanks @JayanthyChengan . We have used a similar system in e-cienciaDatos : https://github.com/Consorcio-Madrono/dataverse/blob/v4.9.3InternatMadro/src/main/webapp/search-include-fragment.xhtml

I was thought that you would like take out the solr code from the main Bundle . It could be done with the related pull request and a little more code in SearchServiceBean class. Changing the line
facetLabel.setName(facetLabel.getName());
to
facetLabel.setName(getLocaleSolrTitle (facetLabel.getName()));

public String getLocaleSolrTitle(String title) {
    try {
        return BundleUtil.getStringFromPropertyFile(title, "solr");
    } catch (MissingResourceException e) {
        return title;
    }
}

An advantage is to have solr translation entries in a different file.
You can see this code in https://github.com/Consorcio-Madrono/dataverse/blob/v4.11eDatos/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java .

@JayanthyChengan
Copy link
Collaborator

Hi @juancorr - As you mentioned, instead of adding keys to bundle.properties and changing search-include-fragment.xhtml , we can go through your approach of creating separate solr.properties file and do changes in SearchServiceBean.java. Did you had a chance to test this approach and verify whether facet search is working fine? Please feel free to give the pull request to IQSS, if you have it ready and so they can review both. Thanks.

@juancorr
Copy link
Contributor Author

We have a test server in English, French (not completed, only with the develop dataverse-language-packs files) and Spanish: http://oaimadrono.uned.es:8080/

@JayanthyChengan
Copy link
Collaborator

@juancorr - I saw your question at http://irclog.iq.harvard.edu/dataverse/2019-03-13#i_87995 .
As a first step, I guess you should add your comments/solution in the corresponding issue - IQSS/dataverse#5207 , where https://github.com/scolapasta will take a look at it. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants