Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for issue title to Citation Style Language (CSL) plugin #7602

Open
NateWr opened this issue Jan 10, 2022 · 4 comments
Open

Add support for issue title to Citation Style Language (CSL) plugin #7602

NateWr opened this issue Jan 10, 2022 · 4 comments
Labels
Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days.

Comments

@NateWr
Copy link
Contributor

NateWr commented Jan 10, 2022

Describe the problem you would like to solve
OJS does not show the issue title in the citation, even when a citation style supports it.

Describe the solution you'd like
Add the issue title to the citation metadata passed to the citation generator, so that it will be shown when the citation style supports it.

Who is asking for this feature?
Reported in the forum for a journal using the MLA citation style.

Additional information
CSL supports this data through the volume-title property, which could be added alongside the volume or number data in the CSL plugin.

@NateWr NateWr added the Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days. label Jan 10, 2022
@felixhelix
Copy link

felixhelix commented Feb 7, 2022

Hi @NateWr,

I tried to clone the repo into my local test installation and work on the issue title. So I deleted the plugin in OJS, forked the repo and cloned it in the respective plugin folder.
However, that didn't work: When I want to access the plugin list OJS claims "Uncaught Error: Class 'PKP\plugins\GenericPlugin' not found in ... plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.inc.php:25".
Also I noticed that there is a folder "lib" in this plugin's folder in the OJS distribution that is not in the plugin's repo?

So, I wonder what would be a good way for working on this or other plugins?

Your's
Felix

@NateWr
Copy link
Contributor Author

NateWr commented Feb 7, 2022

To set up a local dev environment based on git, have a look at https://docs.pkp.sfu.ca/dev/documentation/en/getting-started.

(You may be able to get your existing install going by checking out the appropriate branch of the CSL plugin. If you're running 3.3.0-x, try the stable-3_3_0 branch of CSL.)

@felixhelix
Copy link

Thanks @NateWr, finally got it working :-)

I made a change in the plugin so that it includes the issue name if getShowTitle is true.
I also created an issue in the "Citation Style Language" repo, since the csl file and the localization files also had to be changed
citation-style-language/styles#5906
As soon as this is done, I would make a pull request for the PKP plugin.

yours
Felix

@NateWr
Copy link
Contributor Author

NateWr commented Feb 10, 2022

Thanks @felixhelix! Instead of checking getShowTitle, can you use getLocalizedTitle instead? Our own internal logic will always use the title if it exists, regardless of getShowTitle, so this will make sure we're consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days.
Projects
None yet
Development

No branches or pull requests

2 participants