Skip to content

SPO/7388 lang attributes in ddi export#7958

Merged
kcondon merged 54 commits intoIQSS:developfrom
GlobalDataverseCommunityConsortium:SPO/7388-lang_attributes_in_DDI_export
Aug 10, 2021
Merged

SPO/7388 lang attributes in ddi export#7958
kcondon merged 54 commits intoIQSS:developfrom
GlobalDataverseCommunityConsortium:SPO/7388-lang_attributes_in_DDI_export

Conversation

@qqmyers
Copy link
Member

@qqmyers qqmyers commented Jun 21, 2021

What this PR does / why we need it: This PR adds xml:lang attributes to the DDI xml metadata export to improve compatibility with CESSDA's requirements. To support this, per Merce's preference, the PR adds a new metadata languages setting and a mechanism to let collection admins set the metadata language for new datasets (from the allowed list in the setting). The mechanism does not enforce using a specific language but does indicate the requested language when editing and again when metadata is displayed.

Which issue(s) this PR closes:

Closes #7388

Special notes for your reviewer: This is one of several PRs from Sciences PO work that increate i18n support. This PR is required for #6751 and should be reviewed/merged before the PR for that issue.

Suggestions on how to test this: Testing the basic mechanism should be simple - add a setting to list the allowed languages (e.g. {"English":"en", "French":"fr"} ) and verify that one can pick the language when editing a collection (edit/general info) and that a new dataset created in that collection uses that language and retains it even when the collection is changed to have a new choice. Publishing a dataset created this way should then allow checking that xml;:lang tags are added to the DDI XML output. The PR adds tags to the codebook element as well as the title, abstract, and distributor elements.

Does this PR introduce a user interface change? If mockups are available, please link/include them here: Yes - see description above.

Is there a release notes update needed for this change?:

Additional documentation:will document new setting in guide

qqmyers added 27 commits April 30, 2021 17:31
Conflicts:
	src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
may be uses that expects the raw value, but those should call
getRawValue
@qqmyers qqmyers added the GDCC: SciencesPO related to GDCC work for Sciences PO label Jun 21, 2021
@qqmyers qqmyers mentioned this pull request Jun 21, 2021
@kcondon kcondon self-assigned this Jul 28, 2021
@kcondon
Copy link
Contributor

kcondon commented Aug 6, 2021

Testing Status:

  1. The functionality, as designed, works -setting the :MetadataLanguage setting selects from among configured languages at the individual dataverse level to be the language used both when editing a dataset, esp. CVV list, and persists when viewing saved dataset's metadata CVV. Note that the setting only applies to data entered and currently only CVV -the field lables, eg. title, etc, will reflect whichever language is selected from menu, eg. fr but CVV could be in en if :MetadataLanguages is set that way.
    Issues:
  2. There is currently no documentation -the new :MetadataLanguage setting needs documenting, as well as behavior, including how it relates to existing :Languages setting, esp for installations currently using that setting. Also, whether or not there is a default value if not set and the behavior in that case.
  3. As discussed, a change in behavior when :MetadataLanguage setting is not explicitly configured might be a good idea, as in the case of a current installation using :Languages but not interested in using :MetadataLanguage. Currently, if :MetadataLanguage is not set, the selection list still appears in the UI (perhaps it shouldn't?) it shows the languages of en and null and null is selected. This corresponds to "default", which is en. The suggestion or discussion to retain consistent behavior with :Languages only setting would be for it to behave as it does now, so the language setting from the menu or "view" setting is the only reference in this case so when editing a dataset, CVV and labels and subsequent viewing of metadata will reflect the currently selected menu language. (after some thought, though this makes sense to me, maybe it should get a quick ok from Design/Danny).

@kcondon kcondon assigned qqmyers and unassigned kcondon Aug 6, 2021
@kcondon
Copy link
Contributor

kcondon commented Aug 9, 2021

OK, we're almost there! These are my test cases, please correct the technical details or otherwise provide feedback as needed :)

Config scenarios: default, :Languages only, :MetadataLanguages+:Languages, :MetadataLanguages only

  1. no lang settings, check edit labels, check cvv list lang, check saved display labels, cvv, check ddi export text, xml lang setting, check harvest still works.
    OK, this use case works.

  2. language only settings, check the above, all ui elements should reflect the currently selected lang in menu. export xml lang, not sure, maybe en/default, harvest still works
    Issues: (both fixed)
    -CVV (eg. subjects) does not reflect language selected, ie. always shows english in edit and display when fr is chosen.
    -When creating a dataset with :Languages only defined, resulting Dataset displays this, This dataset has been configured to use null (Default) as the language for all metadata entries.

  3. languages + metadatalanguages, check the above except, UI elements differ: Labels always reflect the currently selected languages from menu, cvv for edit and subsequent saved viewing will be in the dv selected metadata lang, dii export xml lang value should match dv metadatalanguage selection at time of ds creation, actual cvv will export in en for this release and have no lang tag, to be added in SPO/6751 cvv i18n #7959 , harvest still works
    OK, this use case works

  4. metadatalanguages only: same as 3 above but no menu lang option so no label display choice.
    OK, this use case works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GDCC: SciencesPO related to GDCC work for Sciences PO

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language missing in the OAI-DDI

5 participants