Problem with submission header translation

In both 3.4.0-5 and 3.4.0-7 the “Make a submission” page header displays properly only in the English version of the system. In the Polish version, there is ##default.submission.step.beforeYouBegin## displayed all the time. The content of /lib/pkp/locale/pl/default.po does not influence the system behavior. Interestingly, the Default Translation Plugin does not work, leaving a bare key on the page. Also, copying English default.po into /lib/pkp/locale/pl/ do not help.
Is this a bug?

Hi @TruePepe,

Have you tried using the Custom Locale plugin?
https://docs.pkp.sfu.ca/translating-guide/en/customize-locale

Or is that the translation plugin that you are referring to?

That might be a better way to go about doing this, if there are just a few keys missing.

-Roger
PKP Team

Yes, I am using the plugin. The problem is there is no missing key, Custom Locale properly sees the key:


The problem is, the text from the key do not appear in the system.

And language files work properly systemwide, only in this one place not.
Pawel

Hi @TruePepe,

Okay - thanks for clarifying. Not sure what’s occurring here, but I’ll see if one of our team members can have a look when they have an opportunity.

Also: would you mind indicating which version of the plugin you’re using? It might be worth trying to upgrade the plugin if you’re not running the latest version.

-Roger
PKP Team

Thanks, Roger, my Custom Locale Plugin is v.1.2.0.1, the current one, I guess. I have checked the error logs and it looks like nothing is thrown.
Pawel

Hi @TruePepe,

I wonder if you’re encountering a caching problem. Try manually removing the cache files (cache/opcache/*) and ensure that the file permissions are such that OJS can create new files there. If that doesn’t help, how did you install the plugins you’re using? Through the plugin gallery, or another way?

Regards,
Alec Smecher
Public Knowledge Project Team

Dear Alec,
I have noticed that the system reads the key from the cache. My first thought was, that that kay is missing in the translation, so I have used grep to search through files and got cache. Each time I tried to change anything, I removed opcache and loaded the submission page. Nothing. I have three journals on OJS, on two different hostings, and the problem exists on one of them. Journals are served by two separate OJS systems to keep user pools separated. On one of the hostings, everything works perfectly, but on the second one, the problem exists. Plugins are installed using Plugin Gallery.
Pawel

Hi @TruePepe,

Is it possible that you have a typo in one of your .po files? (Do you see the missing key successfully compiled into one of the opcache files for all the languages you expect?)

Regards,
Alec Smecher
Public Knowledge Project Team

Dear Alec,
I have the same idea, so I have copied the English .po file into /pl catalog, and nothing. So I have copied the Polish .po into lib/pkp/locale/en directory and still, there is an English text displayed! Like it comes from somewhere else, but grep shows default.submission.step.beforeYouBegin key only in this file.
Pawel

Hi, all.
I have the same problem.
In english version:


In Lithuanian version:

What’s been done:

  1. po files copied from en folder to lt folder and translated using poedit software
  2. copied msgid “default.submission.step.beforeYouBegin” line from files in en folder to file in lt folder.
  3. triple-checked the msgid match for the English file :slight_smile:
  4. deleted all files from opcache folder
  5. I tried installing the customlanguage plugin. Neither through the plugins gallery nor by uploading a separate file from github - the installation gets stuck.
    After a little investigation I found interesting things in database (table journal_settings) - I serached entire database for “##” string and found these:

    But in my default.po file these lines are translated (one example):

    In my opinion first three lines are more interesting - there some of the text is translated and some of it shows only the untranslated variable name.

    I think the problem may be in transferring the values of the locale variables from the po files to the database - either there is an error in the code, or some of the variables are not in the list to be transferred…
    I use OJS 3.4.0.8, PHP 8.1, and Apache nginx/1.22.1
    I hope this additional information will help you find and fix the problem

Sincerely
Gintaras Kučinskas

Hi @GKucinskas / @TruePepe,

The default.submission.step.beforeYouBegin locale key is only translated when the journal is first created. After that the translated text (or lack thereof) is kept in the database, and will have to be corrected/modified through the setup form.

Regards,
Alec Smecher
Public Knowledge Project Team

This topic was automatically closed after 9 days. New replies are no longer allowed.