OJS 2.4.5 | Issue in french translation

Hi there,

I found an issue in my OJS install.
It’s in french and was updated from 2.2.1.0.

The tag ##plugins.block.navigation.searchScope## keeps showing up, instead of the corresponding “translation” which I already checked is in /plugins/blocks/navigation/locale/fr_FR/locale.xml. The remaining messages in this XML are shown correctly.

Any ideas?

Best,
Taliesin

If you’ve just recently upgraded, can you try clearing your template and data caches from the Site Administration menu?

OK, I just did that through the Admin Menu (clear data and template cache). I’m not sure it worked, because there’s some files in /cache, /cache/t_compile, /cache/HTML.
Should I manually delete these too?
The tag is still not translated.

If you have fc-locale* files in /cache which do not appear to have been deleted, this could be the cause of the problem. If they are not cleared with the link in the Admin Menu, you might want to check the file ownership and permissions before manually deleting them. Normally they should be owned and writable by your webserver user (“apache”, “nobody”, or similar). If owned by another user and/or if not writable by the webserver user, this will cause issues.

OK, I’ve corrected the file permissions. The “apache” user is now write-enabled.
Even after clearing the cache, there’s always fc-locale* files (timestamped immediately after the last cache clear).
When I use the translation plugin verifier, none of the alerts to this specific message (searchScope). Apart from the original problem, what concerns me is that I try to comply with the verifier, checking the instruction “Delete X key from locale/fr_FR/manager.xml” and then applying. Nothing happens and the X key is still in the file…

So now the ##plugins.block.navigation.searchScope## tag keeps showing and I’m sure “apache” can read, write and execute every file but it didn’t delete a certain key.

There are a few different considerations here. It sounds like the locale cache files are being re-written, but not with the content you expect. The “Delete X key from locale/fr_FR/manager.xml” is probably NOT what you want.

The Site Admin menu options Clear Template Cache and Clear Data Cache will operate on the cache/ folder contents.

The Translate plugin will operate on the *.xml files under the locale/ directories scattered throughout the system (generally under the OJS root, the lib/pkp root, and each plugin root).

The Apache user should have read/write (but does not need execute) for the files under cache/. The cache/ directory and subdirectories should have the execute permission, because in a directory context “execute” really means “stat” (traverse the directory structure).

If you want to edit the xml files via the Translate plugin, each xml file listed in that plugin should be r/w to Apache. Again, execute is generally not wanted, and generally you do not want Apache to be able to write to the files outside of the cache and public files directory.

All that said, given your current description (confirmed presence of the key in the locale file, confirmed clearing and recreation of the cache files), I’m not sure where the breakdown would be. Perhaps someone else might have another debugging suggestion?

Ctgraham,

Thanks a lot for the explanation.
I just edited the field manually over the /plugins/blocks/navigation/block.tpl file until I find some other way.
I wish I knew how to debug this, but I don’t even understand this “translate key” function (is it a function?).

I’ll be watching for new comments. Again, thank you.

Yes, Smarty is calling the PKP translate function ( pkp-lib/PKPLocale.inc.php at ojs-stable-2_4_6 · pkp/pkp-lib · GitHub ) via pkp-lib/PKPTemplateManager.inc.php at ojs-stable-2_4_6 · pkp/pkp-lib · GitHub .