Translator_XH doesn't open some plugins' language files

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Post Reply
Tata
Posts: 2750
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Translator_XH doesn't open some plugins' language files

Post by Tata » Wed Dec 13, 2017 8:43 pm

I try to make translation to all available plugins that are compatible to v1.7.1. Some of plugins needed small changes in admin.php. I have found that some language files are not opened by translator and some even show no backend.
Installed plugins:
acdivs foldergallery meta_tags simpleplugins_xh
advanced_search forum meta_tags_plus sitemapper
advancedform fotorama minicounter sitr
boilerplate googlemaps monorder slideshow
browserupdate hi_backup morepagedata socialshareprivacy
calendar hi_fancybox news syntaxhighlighter
chat hi_kcfinder newsletter tablesorter
coco hi_updatecheck newsrotator teaser
codeeditor hi-admin page_params themeswitcher
countdown hoverbox pagemanager tinymce4
dlcounter imgalbum pdfviewer tooltip
downloadcontrol imgflip pfw translator
editor_tab imgrotator poll twocents
elfinder_xh imgslider privacy uploader
expandcontract imgzoom quoteoftheday video
fa jm_cookie_control realblog w_plan_pro
facebook jm_iframe recaptcha wdir
feedview jm_landingpage register week_plan_xh
fhs_adminmenu jquery remotecontent yanp
filebrowser legendbox seocheck youtube
flexslider memberpages shariff


Not readable language files:
hi_admin
morepagedata
quoteoftheday
recaptcha - missing expressions in en.php, e.g.:

Code: Select all

$plugin_tx['recaptcha']['captcha_instructions_visual']="";
$plugin_tx['recaptcha']['captcha_instructions_audio']="";
$plugin_tx['recaptcha']['captcha_play_again']="";
...
etc
$plugin_tx['recaptcha']['captcha_incorrect_try_again']=""; 

youtube

EDIT: Even after making the translation in external editor, after trying to open it in the translator, the file doesn't apear and after "saving" it in translator it goes empty.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 12719
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Translator_XH doesn't open some plugins' language files

Post by cmb » Thu Dec 14, 2017 1:53 pm

Tata wrote:Not readable language files:
hi_admin
morepagedata
quoteoftheday
recaptcha - […]youtube
I've only checked quoteoftheday, and there the problem is that en.php is empty. So either copy default.php to en.php, or save the language file from the back-end while you're in the English language. Afterwards Translator_XH should work as expected.

I assume that the other plugins have the same issue.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Tata
Posts: 2750
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Translator_XH doesn't open some plugins' language files

Post by Tata » Thu Dec 14, 2017 2:54 pm

Yes, with all listed plugins but youtube by jerry is was the case. Youtube keep loading the back-end without language files. There are default, en und sk with the same variables

Code: Select all

<?php
 $plugin_tx['utf8-marker'] = "æøå";
 $plugin_tx['cf_youtube']['width'] = "youtube frame width";
?>
but loading them to the translator there comes only
youtube.png
After saving, the sk.php is empty.
You do not have the required permissions to view the files attached to this post.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 12719
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Translator_XH doesn't open some plugins' language files

Post by cmb » Thu Dec 14, 2017 3:22 pm

Tata wrote:

Code: Select all

<?php
 $plugin_tx['utf8-marker'] = "æøå";
The file encoding appears to be broken. Make sure the file is encoded as UTF-8 (without BOM).
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Tata
Posts: 2750
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Translator_XH doesn't open some plugins' language files

Post by Tata » Thu Dec 14, 2017 3:38 pm

I have rewritten the files with

Code: Select all

<?php
 $plugin_tx['utf8-marker'] = "ľščťžýáíéäňôßü";
 $plugin_tx['cf_youtube']['width'] = "youtube frame width";
and made sure about the encoding. Nothing has changed. REsp. everything works but language. It doesn't appear nor in back-end or in the translator.
youtube2.png
youtube3.png
And this is the modified admin.php

Code: Select all

...
/***
initvar('youtube');
if($youtube){
***/
if (function_exists('XH_registerStandardPluginMenuItems')) {
    XH_registerStandardPluginMenuItems(true);
}
if (XH_wantsPluginAdministration('youtube')) {
  global $sn,$sv,$sl,$pth,$plugin;

  $plugin=basename(dirname(__FILE__),"/");
  $admin = isset($_GET['admin']) ? $_GET['admin'] : '';
  $admin .= isset($_POST['admin']) ? $_POST['admin'] : '';


  $o.=print_plugin_admin('off');

    if($admin<>'plugin_main'){
        $o.=plugin_admin_common($action,$admin,$plugin);
    }
    if($admin=='') {
        $o.=tag("br")."Youtube plugin ver. 1.0.0 &copy; <a href='http://simplesolutions.dk'>simpleSolutions</a> ";
        $o.=tag("br").'Released under Linkware license.';
    }    
}
You do not have the required permissions to view the files attached to this post.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 12719
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Translator_XH doesn't open some plugins' language files

Post by cmb » Thu Dec 14, 2017 3:55 pm

Tata wrote:I have rewritten the files with

Code: Select all

<?php
 $plugin_tx['utf8-marker'] = "ľščťžýáíéäňôßü";
 $plugin_tx['cf_youtube']['width'] = "youtube frame width"; 
Wow! Have a closer look at the $plugin_tx keys. Actually, the file should be:

Code: Select all

<?php
 $plugin_tx['youtube']['utf8-marker'] = "æøå";
 $plugin_tx['youtube']['cf_width'] = "youtube frame width";
?>
The key of the "first dimension" of $plugin_tx is supposed to be the plugin name.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Tata
Posts: 2750
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Translator_XH doesn't open some plugins' language files

Post by Tata » Thu Dec 14, 2017 4:12 pm

Zum Teufel, Chris, wie machst Du das?
Ist dein Tennenbaum groß genug, um alle Glückwünsche umzuarmen?
Seit Übermorgen werde ich kräfftig auf Dich denken.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply