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

pkp/pkp-lib#3525 Give the possibility to choose language of template … #3579

Conversation

forgive38
Copy link
Contributor

…messages in ReviewerForm

It's a first solution for #3525.

  • this adds an option in Settings> Website> Languages: for each language, user can enable this language to be proposed for email templates.
  • for the moment, this functionality is just for reviewerForm but I hope we can do something more generic for all forms where you can select a mail template.

And we replace some variables like {$title} server side before sending template.
I use #2180 for client side.

This PR also refers to #3523.

@@ -651,24 +651,48 @@ function reviewHistory($args, $request) {
* @param $request PKPRequest
* @return JSONMessage JSON object
*/
/**
* @copydoc PKPReviewerGridHandler::fetchTemplateBody()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good to replace duplicated code self-documentation with @copydoc, but this PR leaves the old header in as well. I'd suggest removing the old one.

$templateId = $request->getUserVar('template_'.$templateLocale);
if (strlen($templateLocale) < 2 ) {
$templateLocale = NULL;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Extra indent)

// $permittedSettings = array('supportedFormLocales', 'supportedSubmissionLocales', 'supportedLocales','supportedMailLocales');
// if (in_array($settingName, $permittedSettings) && $locale) {
// $currentSettingValue = (array) $context->getSetting($settingName);
// if (AppLocale::isLocaleValid($locale) && array_key_exists($locale, $availableLocales)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Dead code should be removed)

@asmecher
Copy link
Member

Thanks for contributing, @forgive38! Before I do some local testing, there are a couple of quick cleanup comments -- would you mind pushing those up? Then I'll do some work over here.

I'd also suggest creating a pull request following these instructions to cause the JS linter to run on your changes -- unfortunately it's pretty picky about indentation and things :(

@asmecher
Copy link
Member

(Note to self: see also pkp/ojs#1909 for minified JS update)

crism added a commit to UIUCLibrary/pkp-lib that referenced this pull request Apr 18, 2018
@crism
Copy link
Contributor

crism commented Apr 18, 2018

Sorry for the noise; disregard de1d1d4, which is for a different issue.

crism added a commit to UIUCLibrary/pkp-lib that referenced this pull request Apr 20, 2018
crism added a commit to UIUCLibrary/pkp-lib that referenced this pull request Apr 24, 2018
crism added a commit to UIUCLibrary/pkp-lib that referenced this pull request Apr 27, 2018
crism added a commit to UIUCLibrary/pkp-lib that referenced this pull request May 4, 2018
crism added a commit to UIUCLibrary/pkp-lib that referenced this pull request May 7, 2018
crism added a commit to UIUCLibrary/pkp-lib that referenced this pull request May 10, 2018
crism added a commit to UIUCLibrary/pkp-lib that referenced this pull request May 15, 2018
crism added a commit to UIUCLibrary/pkp-lib that referenced this pull request May 18, 2018
crism added a commit to UIUCLibrary/pkp-lib that referenced this pull request May 21, 2018
@CLAassistant
Copy link

CLAassistant commented Jul 31, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@NateWr
Copy link
Contributor

NateWr commented Dec 16, 2021

Closing this as outdated. @forgive38, you may want to check ongoing work at #5717.

@NateWr NateWr closed this Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants