-
Notifications
You must be signed in to change notification settings - Fork 444
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
pkp/pkp-lib#3525 Give the possibility to choose language of template … #3579
Conversation
… in ReviewerForm
@@ -651,24 +651,48 @@ function reviewHistory($args, $request) { | |||
* @param $request PKPRequest | |||
* @return JSONMessage JSON object | |||
*/ | |||
/** | |||
* @copydoc PKPReviewerGridHandler::fetchTemplateBody() |
There was a problem hiding this comment.
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; | ||
} |
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
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)
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 :( |
(Note to self: see also pkp/ojs#1909 for minified JS update) |
Sorry for the noise; disregard de1d1d4, which is for a different issue. |
|
Closing this as outdated. @forgive38, you may want to check ongoing work at #5717. |
…messages in ReviewerForm
It's a first solution for #3525.
And we replace some variables like {$title} server side before sending template.
I use #2180 for client side.
This PR also refers to #3523.