How to locate missing translations showing up between ## on live site

We’ve just added gd-GB to our live site and run into a problem. Several strings in the UI show up ##between double hashes##. We’re guessing they’re missing translations but I would have assumed that en-US would server as a fallback for missing strings.

  1. Is there a way of doing a target search for such strings? I tried looking for ##common.language## by doing a search for common.language but nothings seems to come up. How do I formulate a search so I can find the missing string for (for example) ##common.language## and ##navigation.login##?

  2. Is there a way of making en-US the fallback language in case of missing translations if this is not automatic?

Hello @akerbeltz,

  1. If you are looking to locate & add missing translations locally via the Custom Locale plugin, there are a few methods for locating the proper locale file and string listed in this document. Personally I find it easiest to just search “common.language” or “navigation.login” in the pkp-lib repository to find the relevant .po file to be edited in Custom Locale.
    image
    It seems both of your examples belong to common.po.

  2. Installing the “Default Translation” plugin from the plugin gallery will display en-US if a translation in a language is missing.

By the way, we are always welcoming any contributions to missing translations if you are interested in sharing them with the community via Weblate, we have a guide for that as well. :slight_smile:

Best,
Emma.

Thanks for the search suggestion, not the most user-friendly search but it’ll do :slight_smile: I’m already signed up on Weblate to work on the locale in question, I just couldn’t figure out how to locate strings.

Re fallback … that’s rather bizarra, I don’t think I’ve ever come across a project that didn’t have an automatic fallback locale and would instead choose to display string names. I wonder what the use case for that might be and if that shouldn’t be change? I mean, I can see the sense in allowing an admin to select a fallback during installation (say Russian for Kazakh, rather than English for Kazakh) but requiring a plugin seems very strange.

Ok this is annoying. We have installed and ticked the Default Translation Plugin but we’re STILL getting stuff between hashes. How do we fix that? Other than translating the strings I mean, it’s not realistic at this stage for us to attempt a complete translation and we can’t spend days browsing round the site to find UI strings between ## which may only appear after certain actions in any case. See the linked work-in-progress page below.

Aiste – Rannsachadh air Litreachas Gàidhlig (glasgow.ac.uk)

I must say OJS approach to a fallback language is unnecessairly complicated…

Hi @akerbeltz,

I don’t see any ##untranslated.locale.keys## there – but if you’ve been encountering them here and there I suspect it’s because certain localized content is installed to the database when the journal is created (e.g. the default menus and a few other things), and if the translation isn’t “present” when the journal is created, the ##untranslated.locale.keys## will appear instead. I’m afraid this will mean finding the culprits in the journal setup interface and correcting them there.

The reason for missing translation content not appearing in e.g. English as a fallback (without the plugin, that is) is an intentional decision going back to the first days of coding OJS 2.x. The standard gettext multilingual software toolset assumes that content will be hard-coded in English (or another primary language), and mapped from there to other languages. However, we didn’t want to follow that double standard (which I believe was a pragmatic decision in order to permit already-existing monolingual software to be easily translated) and went with synthetic locale keys instead, for all languages including English. The Default Translation Plugin was added much later to better support incomplete translations without changing a long-standing behaviour built into the software.

Regards,
Alec Smecher
Public Knowledge Project Team

This is what I see
Capture

It includes stuff which I would expect to be part of default navigation and not linked to a journal/issue setup, if I understood you correctly:
Capture2

Hi @akerbeltz,

Ah, of course, I was browsing in English :man_facepalming:

I’ve just tried it locally and it seems to work OK. How did you install the Default Translation plugin? After installing it (e.g. via the Plugin Gallery), did you enable it in the plugins list in Settings > Website > Plugins?

Regards,
Alec Smecher
Public Knowledge Project Team

Umm yes, I said so ^

Capture3

Hi @akerbeltz,

How did you install the plugin? Via the plugin gallery, or upload to the plugins page, or manual (e.g. uploading files via CPanel)?

Regards,
Alec Smecher
Public Knowledge Project Team

Our tech guy says “via the OJS administration backend as it wasn’t showing up in the gallery”

Hi @akerbeltz,

Could you clarify with him whether that means uploading the plugin’s contents manually (e.g. via CPanel), or uploading the plugin .tar.gz file into the “Upload A New Plugin” tool on the Plugins page, or something else? If it was installed through some other means than OJS, then that would explain it; part of the plugin installation process involves registering the plugin with the system, and just unpacking the plugin files into the website will miss that step.

The reason that the plugin wasn’t appearing in the plugin gallery is that you appear to be using a 3.3.0 Release Candidate, and we haven’t added plugin compatibility statements for most plugins. I’ve double-checked that the plugin is compatible with 3.3.0rc2 and added a compatibility statement, so it should show up there shortly. However, you’ll have to apply this change in the lib/pkp subdirectory/submodule for plugin installation to work.

(You’re probably already aware, but the Release Candidate isn’t intended for production use – it’s for community testing – so you’ll encounter the odd issue like this while we’re collecting feedback, performing testing, and fixing any issues encountered along the way.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hello, I’m just jumping in since I’m involved in the same project.

I’ve reverted back to version 3.2.1-2, and the quickSubmit plugin is still not showing in the gallery.

I previously installed it by uploading the .tar.gz file into the “Upload A New Plugin” tool on the Plugins page.

Hi @luca.g,

Was quickSubmit a typo? That plugin is for the quick entry of article back-content through a web-based form. I’m referring to the Default Translation plugin, which allows OJS to fall back on English when a translation isn’t complete.

Regards,
Alec Smecher
Public Knowledge Project Team

Apologies. I confused things because we’re also battling with another plugin.

So, Default Translation plugin doesn’t come up in the ‘search’ either. What could the reason be?

I don’t remember how I installed it before, but, again, probably via the ‘upload plugin’ in the plugins page.

Hi @luca.g,

Do you have plugins showing up in the Plugin Gallery in general? If not, is your system maybe behind a firewall or proxy that might prevent it from getting the available plugin list from the PKP website?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

yes I do:

Settings OpenURL 1.0 meta-data Contributes OpenURL 1.0 schemas and application adapters.
Settings Dublin Core 1.1 meta-data Contributes Dublin Core version 1.1 schemas and application adapters.
Settings MODS 3.4 meta-data Contributes MODS 3.4 schemas and application adapters.
Authorization Plugins (0)
No Items
Block Plugins (6)
Settings “Developed By” Block This plugin provides sidebar “Developed By” link.
Settings Subscription Block This plugin provides sidebar subscription information.
Settings Language Toggle Block This plugin provides the sidebar language toggler.
Settings Browse Block This plugin provides sidebar “browse” tools.
Settings Information Block This plugin provides sidebar information link.
Settings “Make a Submission” Block This plugin provides a sidebar block with a “Make a Submission” link.
Gateway Plugins (1)
Settings Resolver Plugin This plugin resolves issues and articles based on citation information.
Generic Plugins (19)
Settings Usage Statistics Present data objects usage statistics. Can use server access log files to extract statistics.
Settings ORCID Profile Plugin Allows for the import of user profile information from ORCID.
Settings Announcement Feed Plugin This plugin produces RSS/Atom web syndication feeds for journal announcements.
Settings Google Scholar Indexing Plugin This plugin enables indexing of published content in Google Scholar.
Settings Google Analytics Plugin Integrate OJS with Google Analytics, Google’s web site traffic analysis application. Requires that you have already setup a Google Analytics account. Please see the Google Analytics site for more information.
Settings Dublin Core Indexing Plugin This plugin embeds Dublin Core meta tags in article views for indexing purposes.
Settings eLife Lens Article Viewer This plugin provides rendering support for JATS XML galleys using eLife Lens.
Settings Custom Block Manager This Plugin lets you manage (add, edit and delete) custom sidebar blocks.
Settings Web Feed Plugin This plugin produces RSS/Atom web syndication feeds for the current issue.
Settings PDF.JS PDF Viewer This plugin uses the pdf.js PDF viewer to embed PDFs on the article and issue galley view pages.
Settings Usage event Creates a hook that provides usage event in a defined format.
Settings Recommend Similar Articles This plugin adds a list of similar articles to the article abstract page.
Settings Recommend Articles by Author This plugin inserts a list of articles by the same author on the article abstract page.
Settings DRIVER The DRIVER plugin extends the OAI-PMH interface according to the DRIVER Guidelines 2.0, helping OJS journals to become DRIVER compliant.
Settings Citation Style Language Allow readers to get a published article’s citation in one of several formats supported by the Citation Style Language.
Settings Static Pages Plugin This plugin allows Static Content Management.
Settings Acron Plugin This plugin attempts to reduce the dependence of the application on periodic scheduling tools such as ‘cron.’
Settings TinyMCE Plugin This plugin enables WYSIWYG editing of textareas using the TinyMCE content editor.
Settings HTML Article Galley This plugin provides rendering support for HTML Article Galleys.
Import/Export Plugins (7)
Settings PubMed XML Export Plugin Export article metadata in PubMed XML format for indexing in MEDLINE.
Settings DOAJ Export Plugin Export Journal for DOAJ.
Settings DataCite Export/Registration Plugin Export or register issue, article, galley and supplementary file metadata in DataCite format.
Settings CrossRef XML Export Plugin Export article metadata in CrossRef XML format.
Settings Users XML Plugin Import and export users
Settings Native XML Plugin Import and export articles and issues in OJS’s native XML format.
Settings mEDRA Export/Registration Plugin Export issue, article and galley metadata in Onix for DOI (O4DOI) format and register DOIs with the mEDRA registration agency.
OAI Metadata Format Plugins (4)
Settings DC Metadata Format Structures metadata in a way that is consistent with the Dublin Core format.
Settings MARC21 Metadata Format Structures metadata in a way that is consistent with the MARC21 format.
Settings RFC1807 Metadata Format Structures metadata in a way that is consistent with the RFC1807 format.
Settings MARC Metadata Format Structures metadata in a way that is consistent with the MARC format.
Payment Plugins (2)
Settings Manual Fee Payment The manager will manually record receipt of a user’s payment (outside of this software).
Settings Paypal Fee Payment Payments will be processed using the PayPal service.
Public Identifier Plugins (2)
Settings DOI This plugin enables the assignment of the Digital Object Identifiers to issues, articles and galleys in OJS.
Settings URN This plugin enables the assignment of the Uniform Resource Names to the issues, articles and galleys in OJS.
Report Plugins (6)
Settings PKP Usage statistics report PKP Default usage statistics report (COUNTER ready)
Settings COUNTER Reports The COUNTER plugin allows reporting on journal activity, using the COUNTER standard. These reports alone do not make a journal COUNTER compliant. To offer COUNTER compliance, review the requirements at the Project COUNTER website.
Settings View Report This plugin implements a CSV report describing readership for each article.
Settings Review Report This plugin implements a CSV report containing a list of review assignments for a journal.
Settings Subscriptions Report This plugin implements a CSV report containing a list of subscriptions and their info.
Settings Articles Report This plugin implements a CSV report containing a list of articles and their info.
Theme Plugins (1)
Settings Default Theme This theme implements the default theme.

Hello again @asmecher,

from the server logs I see a long list of these errors:

[Thu Dec 17 09:20:04.110264 2020] [php7:notice] [pid 21541] [client 82.0.31.56:34572] PHP Notice: unserialize(): Error at offset 0 of 771 bytes in /var/www/html/clog.glasgow.ac.uk/www/ojs/lib/pkp/classes/db/DAO.inc.php on line 357

around line 357 of that file there is:

    function convertFromDB($value, $type) {
    		switch ($type) {
[...]
    	    case 'array':
    		$value = unserialize($value);
    			break;

@asmecher

In general, is there a built-in utility for checking the consistency of the database’s structure and eventually fix issues (without touching the content of course)?

Hi @luca.g,

About plugins listed in the Plugin Gallery: that looks like the installed plugins list; check for a second tab called “Plugin Gallery”, which is where you would discover and install plugins that are not currently on your system.

In general, is there a built-in utility for checking the consistency of the database’s structure and eventually fix issues (without touching the content of course)?

Not at the moment, but we have very recently rewritten our database toolset to use Laravel’s Illuminate database toolset and migrations rather than the old ADODB database abstraction library that we’ve relied on for ~15 years. This will allow us to make some long-awaited improvements, like introducing database consistency checks, which we’ll be adding over the next several releases (starting with version 3.3.0).

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher, where is the plugin gallery supposed to be? I don’t seem to see it.Screenshot_2020-12-17 Settings(1)