We had our journals listed at www.base-search.net which uses OAI to get the needed data. As it seems there are some untranslated locale keys within the records:
http://www.zjapanr.de/index.php/index/oai?verb=ListRecords&metadataPrefix=oai_dc
http://www.zchinnr.de/index.php/index/oai?verb=ListRecords&metadataPrefix=oai_dc
Here is an example:
http://www.zjapanr.de/index.php/index/oai?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai:zjapanr.de:article/47
Source: Zeitschrift für Japanisches Recht; Bd. 17, Nr. 34 (2012); 87–94
Source: Journal of Japanese Law; Bd. 17, Nr. 34 (2012); 87–94
OJS version is 2.4.6.0
Any idea how to fix this?
Hi @D_Schroeder_Micheel ,
I think there are no locale keys missing, but the issue information labels are retrieved based on the current locale and not on the language the metadata is in. Having mine set to English I got:
SourceZeitschrift für Japanisches Recht; Vol 17, No 34 (2012); 87–94
SourceJournal of Japanese Law; Vol 17, No 34 (2012); 87–94
The sources are retreived here:
$dc11Description->addStatement('dc:type', $driverVersion, METADATA_DESCRIPTION_UNKNOWN_LOCALE);
// Format
if ($article instanceof Submission) {
$articleGalleyDao = DAORegistry::getDAO('ArticleGalleyDAO'); /* @var $articleGalleyDao ArticleGalleyDAO */
$galleys = $articleGalleyDao->getByPublicationId($article->getCurrentPublication()->getId());
$formats = [];
while ($galley = $galleys->next()) {
$dc11Description->addStatement('dc:format', $galley->getFileType());
}
}
// Identifier: URL
import('classes.issue.IssueAction');
$issueAction = new IssueAction();
$request = Application::get()->getRequest();
$includeUrls = $journal->getSetting('publishingMode') != PUBLISHING_MODE_NONE || $issueAction->subscribedUser($request->getUser(), $journal, null, $article->getId());
if ($article instanceof Submission && $includeUrls) {
$dc11Description->addStatement('dc:identifier', $request->url($journal->getPath(), 'article', 'view', [$article->getBestId()]));
}
And this is how the issue identification is put together
}
return join(' ', $identification);
}
/**
* Return the string of the issue series identification
* eg: Vol 1 No 1 (2000)
*
* @return string
*/
public function getIssueSeries()
{
if ($this->getShowVolume() || $this->getShowNumber() || $this->getShowYear()) {
return $this->getIssueIdentification(['showTitle' => false]);
}
return null;
}
/**
* Get number of articles in this issue.
Hope this helps
Claudia Jürgen
Thanks for claryfying. I could reenact that behaviour. This only adds to the problem I guess. I also stumbled over an age old bug issue:
https://pkp.sfu.ca/bugzilla/show_bug.cgi?id=5555
Still would be nice to fix this somehow.
Hi @D_Schroeder_Micheel ,
as the metadata values for volume, number etc. are not “internationalized” maybe one could pass the locale of the sources at
$galleys = $articleGalleyDao->getByPublicationId($article->getCurrentPublication()->getId());
$formats = [];
while ($galley = $galleys->next()) {
$dc11Description->addStatement('dc:format', $galley->getFileType());
}
}
// Identifier: URL
import('classes.issue.IssueAction');
$issueAction = new IssueAction();
$request = Application::get()->getRequest();
$includeUrls = $journal->getSetting('publishingMode') != PUBLISHING_MODE_NONE || $issueAction->subscribedUser($request->getUser(), $journal, null, $article->getId());
if ($article instanceof Submission && $includeUrls) {
$dc11Description->addStatement('dc:identifier', $request->url($journal->getPath(), 'article', 'view', [$article->getBestId()]));
}
// Source (journal title, issue id and pages)
$sources = $journal->getName(null);
$pages = $article->getPages();
if (!empty($pages)) {
$pages = '; ' . $pages;
to
return $str;
}
/**
* Return the string of the issue identification based label format
* @param $default bool labelFormat type
* @param $breadcrumb bool return type of label
* @param $long bool long format of label
* @return string
*/
function getIssueIdentification($default = false, $breadcrumb = false, $long = false) {
if ($default) {
$showVolume = 1;
$showNumber = 1;
$showYear = 1;
$showTitle = 0;
} else {
$showVolume = $this->getData('showVolume');
$showNumber = $this->getData('showNumber');
$showYear = $this->getData('showYear');
and retrieve the volume identification based on the locale param or if this is null on the current param.
I’m new to OJS and know nothiing about PHP is there a function to retrieve a translation based on the key and locale without having to change the current locale?
Claudia Jürgen