ajnyga / tsvConverter

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

Missing adding localised givenname and familyname (but affiliation is working) #25

Closed mirkh closed 10 months ago

mirkh commented 10 months ago

When we want to convert journal info with several languages in one record (multilingual data, alternative 3), the resulting xml-file will include author affiliation in several languages but missing givenname and familyname, which makes the OJS import script fail with

PHP Fatal error: Uncaught Error: Call to a member function getLocale() on null in /usr/local/ojs/lib/pkp/plugins/importexport/native/filter/NativeXmlPKPAuthorFilter.inc.php:127

Could add something like

400a406,407

                            // added getting givenname for extra locale
                            fwrite ($xmlfile, searchLocalisations('authorFirstname'.$i, $article, 6, 'givenname'));

402a410,411 // added getting familyname for extra locale fwrite ($xmlfile, searchLocalisations('authorLastname'.$i, $article, 6, 'familyname'));

Kind regards, Maria

ronste commented 10 months ago

I added multiligual support for givenname, familyname and bio. PR is on its way. Note that middlename is not yet supported (see new Readme).

mirkh commented 10 months ago

Thank you! The most important part for us is givenname and familyname. I will test it soon.

mirkh commented 10 months ago

I added what is in the commit efa9440450106f753b7c368e878a4dcf3d569bb3 and ran the conversion, and now the OJS import was working. Thanks a lot!