Install of migrated plugin

This forum is for general questions about extensions for Joomla! 2.5.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
jschmi
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Oct 08, 2008 7:14 am

Install of migrated plugin

Post by jschmi » Wed Jan 12, 2011 7:58 am

hi,
I've migrated my content plugin for Joomla1.5 to Joomla1.6. It installs and runs perfectly on Joomla1.6. But during install process (after getting "Installation of plugin successful") the description of plugin is not translated. (description **is** translated, when accessing plugin via plugin-manager later or if I do a reinstall of my plugin).
It seems that the installation process tries to access the language-files at a point of time where they are not in the filesystem.
Can you clarify?
You do not have the required permissions to view the files attached to this post.

User avatar
ot2sen
Joomla! Master
Joomla! Master
Posts: 10421
Joined: Thu Aug 18, 2005 9:58 am
Location: Hillerød - Denmark
Contact:

Re: Install of migrated plugin

Post by ot2sen » Wed Jan 12, 2011 8:34 am

Hi jschmi,

Joomla 1.6 now has extra sys.ini for system and adminmenu.
Try add an en-GB.plg_flashchart.sys.ini that hold the key/string for the xml description like:
PLG_FLASHCHART_XML_DESCRIPTION="Your text here"
Ole Bang Ottosen
Dansk frivillig Joomla! support websted - joomla.dk
OpenTranslators Core Team opentranslators.org

jschmi
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Oct 08, 2008 7:14 am

Re: Install of migrated plugin

Post by jschmi » Wed Jan 12, 2011 8:48 am

hi,
I've done this already - but did not change behaviour - see my definitions:
xml has:
...

Code: Select all

<languages folder="language">
      <language tag="de-DE">de-DE.plg_content_flashChart.ini</language>
      <language tag="en-GB">en-GB.plg_content_flashChart.ini</language>
      <language tag="de-DE">de-DE.plg_content_flashChart.sys.ini</language>
      <language tag="en-GB">en-GB.plg_content_flashChart.sys.ini</language>
   </languages>
...
file en-GB.plg_content_flashChart.sys.ini contains:

Code: Select all

PLG_FLASHCHART_XML_DESCRIPTION="<h1 style='font-size:14px;'>Open FlashChart Plugin Version 1.0</h1> This plugin lets you include one or more charts as flash-objects within your articles.<p />For question or suggestions please contact the author <a href='mailto:joachim.schmidt@oberquembach.de'>Joachim Schmidt</a> via Email.<br />Prior using flashChart please read first <a href='/plugins/content/flashChart/doc/readme.html' target='_new'>Documentation</a> about the features of flashChart."

mbabker
Joomla! Hero
Joomla! Hero
Posts: 2199
Joined: Sun Feb 28, 2010 8:26 pm

Re: Install of migrated plugin

Post by mbabker » Wed Jan 12, 2011 8:56 am

I know you have to encode double quotes in the language files, I'm not sure about single quotes though which may be causing your problem.

jschmi
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Oct 08, 2008 7:14 am

Re: Install of migrated plugin

Post by jschmi » Wed Jan 12, 2011 9:00 am

hi,
that is not the problem as description is translated correctly, if
(1) I reinstall plugin (means all language files are in the filesystem)
(2) If I access plugin settings via plugin manager

jschmi
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Oct 08, 2008 7:14 am

Re: Install of migrated plugin

Post by jschmi » Wed Jan 12, 2011 9:27 am

hi,
I run with debug and i get:

Code: Select all

**Parsing errors in language files**

**None**

**Language Files Loaded**

    * C:\joomla-1.6\administrator/language/en-GB/en-GB.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.lib_joomla.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.tpl_bluestork.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.com_installer.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.mod_submenu.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.mod_title.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.mod_toolbar.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.mod_status.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.mod_menu.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.com_banners.sys.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.com_contact.sys.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.com_messages.sys.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.com_newsfeeds.sys.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.com_search.sys.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.com_weblinks.sys.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.com_redirect.sys.ini 1
    * C:\joomla-1.6\administrator/language/en-GB/en-GB.plg_system_debug.ini 1

**Untranslated Strings**

**None**
with reinstall i get same Infos but then description get translated

jschmi
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Oct 08, 2008 7:14 am

Re: Install of migrated plugin

Post by jschmi » Thu Jan 13, 2011 9:16 am

hi,
did some further testing. Deinstalled plugin, then copied language files maually to "/administrator/language/..." and installed plugin. With this proc description is translated correctly.

Seems that install process is storing/reading language files in wrong order. (for me this is a bug in Joomla1.6 :'( )

Can anybody explain why this behaviour has been changed compared to Joomla1.5, where translation during/after install is working perfectly?

jschmi
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Oct 08, 2008 7:14 am

Re: Install of migrated plugin

Post by jschmi » Thu Jan 13, 2011 4:26 pm

hi,
I've found the problem/solution after having done some debugging and investigating the code.
You wiil have to provide following during installation so that the description gets translated:

(1.) in your provided language folder you must have directories "language-code" e.g. for english language "../language/en-GB" or for german language "..language/de-DE"
(2.) copy your language-sys-inis into the related directory. e.g. for english language the folder
"../language/en-GB" must contain "en-GB.plg_content_plugin-name.sys.ini" (for a content plugin)

Another problem I saw in the code (at least for my plugin): the name of the plugin is changed to lower-case by the installation - I'm quite sure that this may cause same problems for language translations during installation - so I changed the code in "/libraries/joomla/installer/adapters/plugin.php" in function "loadLanguage":
from
$name = strtolower((string)$file->attributes()->plugin);
to
$name = $file->attributes()->plugin;

jschmi
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Oct 08, 2008 7:14 am

Re: Install of migrated plugin

Post by jschmi » Thu Jan 13, 2011 5:01 pm

hi,

would be nice to have the Joomla Wiki updated ("howto create a .. plugin") especially section "ini"
(quite sure a couple of developers stumble over the same problem i had)

geetings!


Locked

Return to “Extensions for Joomla! 2.5”