Translation of the author's name

A solution for the problem (based on stable OJS 3.1.0)

1 Like

Hi @litvinovg,

Thanks for your work and for the update! Is there any chance it would be included in 3.1.1 or 3.1.0-1?

Hi all,

Huge thanks for contributing on this one, @litvinovg! I saw your pull requests arrive and they’re on my list to review.

This definitely won’t be included in OJS 3.1.0-1, and it’s unlikely that we’ll include it in 3.1.1 (because any implementation of this is likely to have large database implications). But it’s a high priority, and it’s possible/likely that we’ll be able to recommend a way to back-port this into an available release before it comes out officially.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

@litvinovg huge thanks for your job!
Can you make same thing for references? I made some customization for my ojs3, but it won’t work with quicksubmit plugin.

@litvinovg Is your modification work on 3_0_1-1? I tried to change files on my test site. Get errors when trying to add new author

[Sun Dec 03 14:19:55 2017] [warn] [client 213.129.40.141] mod_fcgid: stderr: PHP Notice: Array to string conversion in /home/mzsvfu/public_html/lib/pkp/classes/submission/PKPAuthorDAO.inc.php on line 221, referer: http://www.mzsvfu.ru/index.php/mz/submission/wizard/1?submissionId=2
[Sun Dec 03 14:19:55 2017] [warn] [client 213.129.40.141] mod_fcgid: stderr: PHP Notice: Array to string conversion in /home/mzsvfu/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 1021, referer: http://www.mzsvfu.ru/index.php/mz/submission/wizard/1?submissionId=2
[Sun Dec 03 14:19:55 2017] [warn] [client 213.129.40.141] mod_fcgid: stderr: PHP Notice: Array to string conversion in /home/mzsvfu/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 1021, referer: http://www.mzsvfu.ru/index.php/mz/submission/wizard/1?submissionId=2
[Sun Dec 03 14:19:55 2017] [warn] [client 213.129.40.141] mod_fcgid: stderr: ojs2: DB Error: Unknown column ‘Array’ in ‘field list’, referer: http://www.mzsvfu.ru/index.php/mz/submission/wizard/1?submissionId=2

I know about these problems. I am going to fix it soon.

1 Like

It should work now. I have commited fixes to the same branches.

authors and users tables should be changed like that:
alter table users MODIFY first_name varchar(255) DEFAULT NULL;
alter table users MODIFY middle_name varchar(255) DEFAULT NULL;
alter table users MODIFY last_name varchar(255) DEFAULT NULL;
alter table authors MODIFY first_name varchar(255) DEFAULT NULL;
alter table authors MODIFY middle_name varchar(255) DEFAULT NULL;
alter table authors MODIFY last_name varchar(255) DEFAULT NULL;

1 Like

@litvinovg Thank you for your hard work. I successifully used your code in ojs 3.0.1_1. Also changed getFirstName() etc to localized in Citation Style Language plugin.
Can you give me some advices on how to make references dual language. I need it to work with QuickSubmit, but my solution not support it.

What do you mean “references”? Could you give me some examples?

@litvinovg I mean the bibliography, literature. All fields in submission like keywords support multilanguage, but references not.

I agree the request for the multilingual Submission Metadata in particular in the References form. This is necessary for example in the Russian view of site displays a list of bibliography in the Russian standard for Russian scientific databases, and in the English view - in some international standard for example for SCOPUS or Web of Science etc.
In addition, can you make the list of Submission Metadata editable? For example, Russian journals often need the UDC field (Universal Decimal Classification - Wikipedia), which is also required for Russian scientific databases. Different countries and journals standards may need different information and it is easier to make this list editable with the check-box “multilanguage”.
Is it also possible in the journal settings to make the “Publisher”, “Mailing Address” and the “Name” field in “Principal Contact” and “Technical Support Contact” multilingual?

Hello every one, i am using google translate. You could also add that and it can translate every thing. For example

Modifications below should be enough to make citations (References) multilingual.
Dont forget to clean template cache after applying these changes.

3 Likes

Everything work like a charm! Thank you!

1 Like

Dear @litvinovg ,
Hi

Thanks for wonderful pull on GitHub for multi language support. I have implemented your changes on my OJS 3.1.0.1. I have a couple of questions about your codes.

First of all do you recommend to apply these changes to our journal now or it’s better to stay for the time these codes add to OJS codebase?

Because I have registered users from before, I have added firstName and lastName fields to user_settings and authors_setting table for my users and authors by running an SQL query manually.

Secondly, I have working with this new feature for about a week. All steps work functionally correct (users, metadata, and …). I have found a couple of bugs. One of these bugs is very annoying. I cannot search in submission. An error occurs while try to type. This is the error (this error is shown many times):

PHP Warning: Illegal string offset 'en_US' in /home/wjemir/public_html/lib/pkp/classes/core/DataObject.inc.php on line 133

PHP Strict Standards:  Declaration of CustomBlockPlugin::getSeq() should be compatible with BlockPlugin::getSeq($contextId = NULL) in /home/wjemir/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
PHP Strict Standards:  Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/wjemir/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
PHP Strict Standards:  Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/wjemir/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
PHP Strict Standards:  Declaration of CustomBlockPlugin::getContents() should be compatible with BlockPlugin::getContents($templateMgr, $request = NULL) in /home/wjemir/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
PHP Strict Standards:  Declaration of SubmissionFileDAO::fromRow() should be compatible with PKPSubmissionFileDAO::fromRow($row, $fileImplementation) in /home/wjemir/public_html/classes/article/SubmissionFileDAO.inc.php on line 23

I appreciate your help
Regards, S. Frost

Hi @Frosty!
As I understand these changes won’t be included in OJS in near future.
Have you used latest codes from my branches? It should work then.
GitHub - litvinovg/ojs at authors_multilanguage
GitHub - litvinovg/pkp-lib at authors_multilanguage

2 Likes

Hello @litvinovg! Thank you for the modifications for multilanguage author’s names and references. By what principle of multitasking fields is in OJS in the code? For example, I need to do for multilanguage additional fields: Publisher, Mailing Address, Principal Contact (only Name field), and Technical Support Contact (only Name field also).

Hello, @crosfield! You can look at my modifications to make citations filed multilingual and do similar modifications for your fields.
https://github.com/litvinovg/pkp-lib/commit/a498b80c0fd8b96ef30cdb7ad496bbac3adf82f9
https://github.com/litvinovg/ojs/commit/4b583b011c68a9ef2ccedbb7765a5ce55558bf14

1 Like

Hello @litvinovg!
At the review stage, we can not add a reviewer that is not registered in the journal.
I am hope for your help. Thank you

PHP Fatal error: Uncaught Error: Cannot return string offsets by reference in /opt/ojs/lib/pkp/classes/core/DataObject.inc.php:67\nStack trace:\n#0 /opt/ojs/lib/pkp/classes/identity/Identity.inc.php(286): DataObject->getLocalizedData(‘firstName’)\n#1 /opt/ojs/lib/pkp/classes/identity/Identity.inc.php(108): Identity->getLocalizedFirstName()\n#2 /opt/ojs/lib/pkp/classes/user/PKPUserDAO.inc.php(442): Identity->getInitials()\n#3 /opt/ojs/lib/pkp/controllers/grid/users/reviewer/form/CreateReviewerForm.inc.php(104): PKPUserDAO->insertObject(Object(User))\n#4 /opt/ojs/lib/pkp/classes/controllers/grid/users/reviewer/PKPReviewerGridHandler.inc.php(270): CreateReviewerForm->execute(Array, Object(Request))\n#5 /opt/ojs/lib/pkp/classes/controllers/grid/users/reviewer/PKPReviewerGridHandler.inc.php(242): PKPReviewerGridHandler->updateReviewer(Array, Object(Request))\n#6 /opt/ojs/lib/pkp/classes/core/PKPRouter.inc.php(372): PKPReviewerGridHandler->createReviewer(Array, Object(Request))\n#7 /opt/ojs/lib/pkp/classes…\n’, referer:

It should work fine now. Updates are in authors_multilanguage branch of my pkp-lib repo.

1 Like