ajnyga / tsvConverter

Excel to OJS3 XML conversion tool
GNU General Public License v3.0
17 stars 12 forks source link

Clarify relative metadata locale #12

Closed martinpub closed 5 years ago

martinpub commented 5 years ago

Currently, tsvConvert seems to treat localisable metadata fields with locale prefix null as relative to the language field for each records. Maybe this could be clarified. It would be even better if tsvConverter could support explicit locale prefixes metadata fields that are in the default (record) locale. Right now I get a lot of "ERROR: article title missing for the given default locale" since I use the title field with null prefix only for titles in the language that corresponds to the default locale set in the config.

See attached file for example (default locale in config: sv_SE):

localetest-mini-2.xlsx

ajnyga commented 5 years ago

The way it works now is that you can use a language column to define the language of the specific article. The fields like en:title are just an addition to the main locale of the submission. The default locale defined in the config is a fall back.

If a field does not have a locale defined, then the locale defined in the language column is used. This means that for example the title field always needs to have a value.

Basically you only need fields like en:title or en:abstract to define additional metadata to the article. For example in the situation that the article is in Swedish (defined in the language column) but you also have an English abstract, you can add a en:abstract field and add the value there.

I am sure that the current system does not cover all possible combinations, but probably the most usual use cases.

ajnyga commented 5 years ago

localetest-mini-2-fix.xlsx Something like that. Notice that there are no fields like no:title, because the main language of all articles is Norvegian and the values are given in the title field.

martinpub commented 5 years ago

Thanks for the clarification, perhaps it could be added to the README. We'll update our data to reflect this logic.

ajnyga commented 5 years ago

sure, the language column was a later addition when I realized that using just en:title fields was not enough.

martinpub commented 5 years ago

I see! (The journal I'm working on has articles in Swedish, Norwegian, Danish, and English. And abstracts almost always in English only.)

ajnyga commented 5 years ago

see https://github.com/ajnyga/tsvConverter#importing-multilingual-data

Does that need further details?

martinpub commented 5 years ago

It didn't state clearly that for metadata fields matching the language field of the record, tsvConverter does not accept an explicit locale prefix, but requires the null locale prefix. Perhaps it's implied, but it wasn't clear to me at least :-)