pkp / translator Goto Github PK
View Code? Open in Web Editor NEWPKP Translator plugin for OMP 1.1.1+ and OJS 3.0+
License: GNU General Public License v2.0
PKP Translator plugin for OMP 1.1.1+ and OJS 3.0+
License: GNU General Public License v2.0
When checking locale errors, "edit" links in section Differing Email Parameter Lists could open in a new window.
Currently it issues the following error warning:
Be sure to save any changes made on this page before continuing or they will be lost. Do you wish to continue? If so, any unsaved changes will be lost.
Of course, the user can always right-click and open the edit link in a new window (shift-click doesn't seem to work), but some users may be scared by the warning.
When you choose locale to translate and go to its tab and set for example Items per page to 100 (to see all files you have to translate) and then open file for translation and get back to list of files all settings are gone. I realise that page is refreshing on every visit for updating new statistics of translated keys but when you are translating 3. or 4. page it is irritating waiting for page to reload.
This could maybe be override by setting default value to 100 items per page but strange thing is that I can't find where is it controlled.
Hello.
We installed plugin translator
cd plugins/generic
git clone https://github.com/pkp/translator
cd ../../ && php tools/upgrade.php upgrade
[x] Translator
error.log
[Fri Jul 06 13:43:14.274488 2018] [cgi:error] [pid 31189] [client XX.XX.XX.43:58439] AH01215: PHP Fatal error: Call to undefined method TranslatorPlugin::getTemplateResource() in /web/plugins/generic/translator/controllers/grid/LocaleGridHandler.inc.php on line 99, referer: https://XXXXXXXX/index.php/eual/management/settings/website?uid=5b3f55699e43e
Thanks
The file "{$filename}" will be created using the English version; you will need to translate all strings in the file. Do you wish to continue?
This is no longer the plugin's behaviour, right? It creates an empty file, but not a file containing English strings (which caused some pain in the past ;-)).
The translator plugin lists /locale/.../countries.xml
under Miscellaneous Files
. However, the countries files have been automatically generated and in the existing versions of this file we ask translators to
Please don't edit or translate. This file is automatically generated using the ISO 3166 files of Debian's iso-codes package (https://packages.debian.org/sid/all/iso-codes) using the tools/poToCountries.php tool.
The file should thus be excluded from the plugin. (Maybe the plugin can trigger running the poToCountries script.)
In addition and not related to this plugin: the en_US file should have the same comment about "please don't translate", and the script creating the files should be rerun from time to time, especially when we receive new locales (ar_IQ comes to mind).
several en_US strings refer to "OMP", "press manager", etc. since the plugin is also intended to be used by OJS installations, this should be changed to generic language.
We updated ojs to the last version and also added the last version of the translator plugin but when visiting the page we get an empty page.
in the logs I see this:
[18-Jun-2018 09:09:29 Europe/Brussels] PHP Fatal error: Call to undefined method TranslatorPlugin::getTemplateResource() in /opt/ojs/plugins/generic/translator/controllers/grid/LocaleGridHandler.inc.php on line 99
[18-Jun-2018 09:09:29 Europe/Brussels] PHP Stack trace:
[18-Jun-2018 09:09:29 Europe/Brussels] PHP 1. {main}() /opt/ojs/index.php:0
[18-Jun-2018 09:09:29 Europe/Brussels] PHP 2. PKPApplication->execute() /opt/ojs/index.php:69
[18-Jun-2018 09:09:29 Europe/Brussels] PHP 3. Dispatcher->dispatch() /opt/ojs/lib/pkp/classes/core/PKPApplication.inc.php:247
[18-Jun-2018 09:09:29 Europe/Brussels] PHP 4. PKPComponentRouter->route() /opt/ojs/lib/pkp/classes/core/Dispatcher.inc.php:134
[18-Jun-2018 09:09:29 Europe/Brussels] PHP 5. PKPRouter->_authorizeInitializeAndCallRequest() /opt/ojs/lib/pkp/classes/core/PKPComponentRouter.inc.php:256
[18-Jun-2018 09:09:29 Europe/Brussels] PHP 6. call_user_func:{/opt/ojs/lib/pkp/classes/core/PKPRouter.inc.php:372}() /opt/ojs/lib/pkp/classes/core/PKPRouter.inc.php:372
[18-Jun-2018 09:09:29 Europe/Brussels] PHP 7. LocaleGridHandler->index() /opt/ojs/lib/pkp/classes/core/PKPRouter.inc.php:372
Hi. Unfortunately the Translator plugin cannot be enabled -- it's not listed in the section for Generic plugins, although it's listed in the tab for Plugin library (so I assume it's installed properly).
I've tried both our local installation and the OJS3 testdrive (made available by PKP, using the administrator login):
Maybe the problem is related to the following caveat mentioned in the README?
Note that this plugin must be able to read and write translation-related files on the server.
Hello! after installing and enabling plugin i've got balnk screen in "translate" section
Current version: 3.1.1.2 (July 15, 2018 - 02:13 PM)
I've got 500 error
[17/Jul/2018:22:54:07 +0200] "GET /index.php/uars/$$$call$$$/plugins/generic/translator/controllers/grid/locale-grid/index?_=1531860709500 HTTP/1.1" 500 429 "https://uars.info/index.php/uars/management/settings/website$
[Tue Jul 17 22:54:07.994113 2018] [:error] [pid 8459] [client 192.168.1.105:53567] PHP Fatal error: Call to undefined method TranslatorPlugin::getTemplateResource() in /web/sites/uars/plugins/generic/translator/controllers/grid/LocaleGridHandler.inc.php on line 99, referer: https://uars.info/index.php/uars/management/settings/website
As i understand it calles to file named "locales.tpl"
But that file present at my site
I have attached google chrome error
uars.info-1531861615516.log
My server info: Setting Name | Setting Value |
---|---|
OS platform | Linux |
PHP version | 5.6.30-7+0 |
Apache version | Apache/2.4.10 (Debian) |
Database driver | mysql |
Database server version | 10.1.26-MariaDB-0+deb9u1 |
Hi,
in my case translation plugin is not working in OJS 3.0. After installing it and enabling I have "Translate" link (.../management/settings/website?uid=57dad65587c86#translate) but it forwards me to Website->Apperance tab.
See http://forum.pkp.sfu.ca/t/translate-plugin-add-item-dont-work/31156.
The "Add Item" button doesn't appear to work consistently (it worked for me only after I deleted another item in the locale file); also the translation appears to be discarded when a newly-added item is bounced back from the server. (After the bounce, it can be edited without problems.)
When the translator plugin creates new files, some of the XML file header lines differ from the en_US original file (at least with plugin translations):
This results in us getting translations that need unnecessary cleanup, because at least the dtd error has to be removed.
To verify:
head locale/en_US/locale.xml
head locale/xx_XX/locale.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE locale SYSTEM "../../../../../lib/pkp/dtd/locale.dtd">
<!--
* plugins/generic/googleScholar/locale/en_US/locale.xml
*
* Copyright (c) 2014-2017 Simon Fraser University
* Copyright (c) 2003-2017 John Willinsky
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE locale SYSTEM "../../../../lib/pkp/dtd/locale.dtd">
<!--
* locale/de_DE/locale.xml
*
* Copyright (c) 2014-2016 Simon Fraser University Library
* Copyright (c) 2003-2016 John Willinsky
It would be nice to have a search filter per language. I think it should query translation key and/or text in English or other language in all locale files and provide a lit of phrases. Such a search would help to translate OJS system with a pleasure as you do not need to translate it completely or try to guess where the translation is.
Looking forward.
The reference text (in English) appears next to the text for the language being edited (also English in this case). When bounced off the server in closing an edit row, the value becomes "Array" (presumably because both English copies are sent to the server).
For users who are fluent in multiple languages, but who do not have English as a first language, it would be helpful to translate from a first language (e.g. using Spanish as a reference for Portuguese).
We could display the reference for the translation in the user's selected language, rather than in the MASTER_LOCALE
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.