Skip to content

Commit

Permalink
Merge pull request #26 from cedis-epublishing/upgrade-ojs-3.3
Browse files Browse the repository at this point in the history
Add multiligual support for givenname, familiyname and bio
  • Loading branch information
ajnyga authored Feb 23, 2024
2 parents bc35149 + ceae8d1 commit b927ff8
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 41 deletions.
84 changes: 44 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,57 +39,57 @@ Only validate by adding -v:
5. The script will create one XML per year.

## Article
| Field | Description | Required|
|----------|:--------:|:--------:|
| prefix | "The", "A" | |
| title | Article title | x |
| subTitle | Article subtitle | |
| abstract| Article abstract | |
| articleSeq | Article sequence inside an issue, first article '1' | x |
| pages| For example "23-45" | |
| language| Article language "en", "fi", "sv", "de", "fr" | x |
| keywords| Word 1; Word 2; Word3 | |
| disciplines| History; Political science; Astronomy | |
| articleCopyrightYear| 2005 | |
| articleCopyrightHolder| "John Doe" | |
| articleLicenseUrl| http://creativecommons.org/licenses/by/4.0 | |
| doi| "10.1234/art.182" | |
| Field | Description | Required| Multilingual Support|
|----------|:--------:|:--------:|:--------:|
| prefix | "The", "A" | | x | |
| title | Article title | x | x |
| subTitle | Article subtitle | | x |
| abstract| Article abstract | | x |
| articleSeq | Article sequence inside an issue, first article '1' | x | |
| pages| For example "23-45" | | |
| language| Article language "en", "fi", "sv", "de", "fr" | x | |
| keywords| Word 1; Word 2; Word3 | | x |
| disciplines| History; Political science; Astronomy | | x |
| articleCopyrightYear| 2005 | | |
| articleCopyrightHolder| "John Doe" | | |
| articleLicenseUrl| http://creativecommons.org/licenses/by/4.0 | | |
| doi| "10.1234/art.182" | | |

## Issue
| Field | Description | Required|
|----------|:--------:|:--------:|
| issueDatepublished | Issue publication date, yyyy-mm-dd. Note! has to be unique for each individual issue. | x |
| issueVolume | Issue volume | |
| issueNumber | Issue number | |
| issueYear | Issue year | x |
| issueTitle | Issue title | |
| sectionTitle | Section title, eg. "Articles" | x |
| sectionAbbrev | Section abbreviation, eg. "ART" | x |
| Field | Description | Required| Multilingual Support|
|----------|:--------:|:--------:|:--------:|
| issueDatepublished | Issue publication date, yyyy-mm-dd. Note! has to be unique for each individual issue. | x | |
| issueVolume | Issue volume | | |
| issueNumber | Issue number | | |
| issueYear | Issue year | x | |
| issueTitle | Issue title | | x |
| sectionTitle | Section title, eg. "Articles" | x | x |
| sectionAbbrev | Section abbreviation, eg. "ART" | x | |

## Multiplied fields
An article can have multiple authors or full text files. Every article has to have at least one author and one file.

If an article has for example three authors, the excel file should include columns for each author with the number behind the column name changing. The first name of the third author will be saved to a field called *authorFirstname3*.

### Authors
| Field | Description | Required|
|----------|:--------:|:--------:|
| authorFirstname1| Given name | x |
| authorMiddlename1| Middle name | |
| authorLastname1| Family name | |
| authorEmail1| Email | |
| authorAffiliation1| Affiliation | |
| country1| "FI", "SE", "DK", "CA", "US" | |
| orcid1| Orcid ID, should include "https://". Note that adding Orcid ID's this way is not recommended by Orcid. | |
| authorBio1| Biography | |
| Field | Description | Required| Multilingual Support|
|----------|:--------:|:--------:|:--------:|
| authorFirstname1| Given name | x | x |
| authorMiddlename1| Middle name | | |
| authorLastname1| Family name | | x |
| authorEmail1| Email | | |
| authorAffiliation1| Affiliation | | x |
| country1| "FI", "SE", "DK", "CA", "US" | | |
| orcid1| Orcid ID, should include "https://". Note that adding Orcid ID's this way is not recommended by Orcid. | | |
| authorBio1| Biography | | x |

### Files
| Field | Description | Required|
|----------|:--------:|:--------:|
| file1| Name of the file, "article1.pdf" or url for remote galley| x |
| fileLabel1| Usually "PDF"| x |
| fileGenre1| Usually "Article Text"| x |
| fileLocale1| "en", "fi" etc. | x |
| Field | Description | Required| Multilingual Support|
|----------|:--------:|:--------:|:--------:|
| file1| Name of the file, "article1.pdf" or url for remote galley| x | |
| fileLabel1| Usually "PDF"| x | x |
| fileGenre1| Usually "Article Text"| x | |
| fileLocale1| "en", "fi" etc. | x | |

## Importing multilingual data

Expand All @@ -104,6 +104,10 @@ en - English
sv - Swedish
fr - French
de - German
ru - Russian
no - Norwegian
da - Danish
es - Spanish

## Licence
The conversion tool is distributed under the GNU GPL v3.
Expand Down
6 changes: 5 additions & 1 deletion convert.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,12 @@
fwrite ($xmlfile,"\t\t\t\t\t<author include_in_browse=\"true\" user_group_ref=\"".$defaultUserGroupRef[$defaultLocale]."\" seq=\"".$i."\" id=\"".$authorId."\">\r\n");

fwrite ($xmlfile,"\t\t\t\t\t\t<givenname locale=\"".$articleLocale."\"><![CDATA[".$article['authorFirstname'.$i].(!empty($article['authorMiddlename'.$i]) ? ' '.$article['authorMiddlename'.$i] : '')."]]></givenname>\r\n");
fwrite ($xmlfile, searchLocalisations('authorFirstname'.$i, $article, 6, 'givenname'));

if (!empty($article['authorLastname'.$i])){
fwrite ($xmlfile,"\t\t\t\t\t\t<familyname locale=\"".$articleLocale."\"><![CDATA[".$article['authorLastname'.$i]."]]></familyname>\r\n");
}
fwrite ($xmlfile, searchLocalisations('authorLastname'.$i, $article, 6, 'familyname'));

if (!empty($article['authorAffiliation'.$i])){
fwrite ($xmlfile,"\t\t\t\t\t\t<affiliation locale=\"".$articleLocale."\"><![CDATA[".$article['authorAffiliation'.$i]."]]></affiliation>\r\n");
Expand All @@ -424,7 +427,8 @@
if (!empty($article['authorBio'.$i])){
fwrite ($xmlfile,"\t\t\t\t\t\t<biography locale=\"".$articleLocale."\"><![CDATA[".$article['authorBio'.$i]."]]></biography>\r\n");
}

fwrite ($xmlfile, searchLocalisations('authorBio'.$i, $article, 6, 'biography'));

fwrite ($xmlfile,"\t\t\t\t\t</author>\r\n");


Expand Down

0 comments on commit b927ff8

Please sign in to comment.