My hidsidebars plugin is not showing the translations.
On the Translator Plugin the locale folder is not showing up either.
I deleted all the unused translations and ran php tools/upgrade.php upgrade, but the plugin doesn’t seem to register…
require_once('hideSidebarsBlockPlugin.inc.php');
return new HideSidebarsBlockPlugin();
HideSidebarsBlockPlugin.inc.php
import('lib.pkp.classes.plugins.BlockPlugin');
class HideSidebarsBlockPlugin extends BlockPlugin {
/**
* Install default settings on system install.
* @return string
*/
function getInstallSitePluginSettingsFile() {
return $this->getPluginPath() . '/settings.xml';
}
/**
* Install default settings on journal creation.
* @return string
*/
function getContextSpecificPluginSettingsFile() {
return $this->getPluginPath() . '/settings.xml';
}
/**
* Get the display name of this plugin.
* @return String
*/
function getDisplayName() {
return __('plugins.block.hidesidebars.displayName');
}
/**
* Get a description of the plugin.
*/
function getDescription() {
return __('plugins.block.hidesidebars.description');
}
}
And when you browse to User Home → Journal Manager → System Plugins → Block Plugins, you see an untranslated title of "##plugins.block.hidesidebars.displayName##"regardless of the locale selected?
Yes, @ctgraham!!
That’s exactly what happens.
All translation keys are displayed as such, instead of the value/message.
And, in the locale file list in the Translator Plugin, the locale files are not displayed, which means to me, there’s something wrong with registering the plugin.
Here’s the Translator Plugin locale file list, showing the block plugins.
You’ll see that the locale file for this plugin is not available.
What is your system’s default locale? Do you have a locale folder for that locale in your plugin directory? If your system’s default locale is not en_US, have you tried adding a directory and file for en_US as well?
Our system is multilingual, with Portuguese (pt_BR), English (en_US) and Spanish (es_ES), enabled, so, I’ve tried as much as I could make translations as similar as possible.
For all plugins I’ve made, I’ve created language files for all languages.
I have tried registering the plugin before and after removing all languages except those, and it doesn’t work…
There’s an alt text on the image when displaying the block plugin.
Also, on my install, the displayName is not shown on journal setup Step 5 block positioning form fields…
I had issues with large file sizes, memory_limit settings and so forth.
Users have crappy data on them, but nothing that actually caused problems when importing, but may add strange characters in the database…
I’d like to report that the plugin hidesidebars is working now.
But only with 755 permissions…
Any other combination (644 or 655), it doesn’t even show up.
The difference between 6 and 7 in the first bit is whether or not the user who owns the file or directory can “execute” it. For files, execution means running the file, for example interpreting a script. For directories, execution means stat’ing the directory, that is, reading the directory contents.
Generally, your directories should have the execute bit set, and your files should not have the execute bit set.
If you are on a single-user system where other folks shouldn’t be working with your files (like a shared host), you probably want the second permissions bit to be restrictive. If you are on a multi-user system where other folks will be also working at the file level with you, you probably want less restrictive permissions for the shared group.