Page 1 of 6

Joomla 1.5 Language Files Manager Component

Posted: Thu Nov 30, 2006 10:16 am
by igevans
This is a component I wrote to help me translate the Joomla! language files.  Also a first attempt at an admin component for J1.5.

It will automatically create required language files against a reference language (en-GB by default), show progress for each file and translation/fileset; publish/unpublish files; checkin/checkout files; do a global search for language strings; translate quotes to backticks; etc.

I found it to be useful, maybe it will help others too.  Thought I'd post it here first, since it probably still has a few bugs, so I'm calling it version 1.0 beta.  Anyone wants to try it out and tell me of any issues, that would be great.

Ifan

Re: Joomla 1.5 Language Files Manager Component

Posted: Thu Nov 30, 2006 11:00 am
by ot2sen
Hi igevans,

Sounds interesting. Just tested on a clean install of Joomla! 1.5 beta, and the component installed fine but returns an error when clicking the newly created component menu 'Translation Manager'
Fatal error: Class 'JHTMLSelect' not found in C:\xampplite\htdocs\15bsprogtest\administrator\components\com_fftranslation\admin.fftranslation.php on line 779

Re: Joomla 1.5 Language Files Manager Component

Posted: Thu Nov 30, 2006 11:05 am
by infograf768
Great. This look really worth while we wait for the Official Translation Component.

Did not find out yet how to create from the existing english folders and ini files a new language altogether
For the moment it looks like it may update files.
Could you explain?

@ot2sen: I do have this error here on last SVN  ;)

Re: Joomla 1.5 Language Files Manager Component

Posted: Thu Nov 30, 2006 11:32 am
by ot2sen
infograf768 wrote: Great. This look really worth while we wait for the Official Translation Component.

Did not find out yet how to create from the existing english folders and ini files a new language altogether
For the moment it looks like it may update files.
Could you explain?

@ot2sen: I do have this error here on last SVN  ;)
@infograf768: When you do have this error, I wont update  :P Works fine using rev.:5896  ;)

Now default english language files show up fine and can be edited. (noticed a IE7 problem for adding new)
Can´t figure out either how to create new language from reference language files.

Lets hear more igevans  :)

Re: Joomla 1.5 Language Files Manager Component

Posted: Thu Nov 30, 2006 12:14 pm
by igevans
JHTMLSelect is a new class from about 2 weeks ago which replaces the previous select builder - I'm currently using a nightly build (5781 2006-11-15).

The component doesn't create a full new installation set, but it will create the individual files.  You need to create the directories and the XML files (admin and site) for a new language set, and from then on it will create the individual language files automatically, based on the file list in the reference language directory.  This also works as you add new extensions, as long as they create a file in the reference language directory.

Shouldn't be too difficult to create directories and xml files - will work on it over the weekend.

It handles publishing/unpublishing by renaming the files (prefixing them with 'xx.' so that they are not recognised by Joomla!).  You cannot unpublish the reference language files.

Ifan

Re: Joomla 1.5 Language Files Manager Component

Posted: Fri Dec 01, 2006 9:16 am
by ivo.apostolov
Looks quite promising.
Adding new strings is not working and giving back an JS error

Re: Joomla 1.5 Language Files Manager Component

Posted: Fri Dec 01, 2006 11:27 am
by igevans
The javascript error was because IE won't allow setting of innerHTML on a table row object.  Have corrected this and will upload over weekend after a few other improvements.

Ifan

Joomla 1.5 Language Manager Component UPDATED

Posted: Fri Dec 15, 2006 4:56 pm
by igevans
Updated version tested with Joomla 1.5 nightly build 6005 14 Dec 2006 on Mozilla Firefox.

Changes:

Fixed Javascript IE6 problems.
Added create/delete for languages.
Added create/delete for translation files.
Added AutoCorrect for input boxes (useful for extended/non-keyboard characters).
Added tooltips etc for new functionality & configuration.
Tidied up the code and functions a bit.

Hope somebody finds this useful.  ANy bugs report in this thread and I'll do my best to sort them out.

Re: Joomla 1.5 Language Files Manager Component

Posted: Thu Dec 21, 2006 5:15 pm
by infograf768
Have been testing and it is going along fine.

Some oddities/suggestions:

The "New" feature is supposed to create a new xml file starting from the Site or Admin Client radio button chosen.
But
1. it does not create the new folder if not present
2. the iso tag field is not writable and this is important as it is the base for new folder and language creation

Installation languages are not presented in the Manager.

Re: Joomla 1.5 Language Files Manager Component

Posted: Thu Jan 25, 2007 4:54 pm
by igevans
Latest version of the Translation Manager has now been uploaded to a new project on sourceforge:

http://forge.joomla.org/sf/frs/do/viewR ... ersion_1_5

Tested with the latest nightly build [6355].

Handles site, admin and installation files (but needs directory rights). 
Creates and deletes new languages (XML files and folders). 
Create, delete, publish, unpublish, checkin, checkout of language files (INI files).

Shows translation progress against reference language (very handy with the regular changes to nightly builds).
Shows translation progress for entire language sets.

Search all the files in a language set for phrase(s) with customisable CSS highlighting of matches.
Customisable "AutoCorrect" of text entry (handy for unusual characters/diacritics).
Customisable change of single-quotes to backticks.
Customisable global replace of a key=phrase combination (handy when the same combo is in many language files).

Thanks for the comments over the last couple of months.  Haven't really got the hang of sourceforge, so would welcome comments/bugs in the forum for the time being.

Hope someone finds it useful - it's been a good way of getting to know Joomla 1.5 for me.

Ifan

Re: Joomla 1.5 Language Files Manager Component

Posted: Thu Jan 25, 2007 5:56 pm
by infograf768
You forgot to let users have access to the project on Forge.  ;)

Re: Joomla 1.5 Language Files Manager Component

Posted: Fri Jan 26, 2007 5:53 pm
by igevans
infograf768 wrote: You forgot to let users have access to the project on Forge.  ;)
Hmm, yes, so I did.  I told you I didn't really understand SourceForge...

Sorry about that, the access permissions have now been changed.

Ifan

Re: Joomla 1.5 Language Files Manager Component

Posted: Fri Jan 26, 2007 7:07 pm
by infograf768
Testing.

Some Notices (php 5.16, SVN 6385)
Translation Manager
Notice: Undefined property: stdClass::$client_name in /Library/WebServer/Documents/joomla11new/libraries/joomla/utilities/array.php on line 252
Notice: Undefined property: stdClass::$client_name in /Library/WebServer/Documents/joomla11new/libraries/joomla/utilities/array.php on line 255

Translation Manager -> New
Warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents/joomla11new/administrator/components/com_fftranslation/admin.fftranslation.php on line 658

Notice: Undefined variable: refStrings in /Library/WebServer/Documents/joomla11new/administrator/components/com_fftranslation/admin.fftranslation.php on line 261

Suggestion: display the language chosen to edit after the Title "Translation Manager"
for example:
Translation Manager - Administrator French(Fr)

Your work is really impressive and improving.  :)

Re: Joomla 1.5 Language Files Manager Component

Posted: Mon Feb 05, 2007 12:40 pm
by igevans
infograf768 wrote: Testing.
These bugs and suggestions addressed in latest version just posted to forge, as well as a couple of other minor issues.  Thanks for the comments and support.

http://forge.joomla.org/sf/frs/do/viewR ... ersion_1_5

Tested with today's build [6474].

igevans

Re: Joomla 1.5 Language Files Manager Component

Posted: Mon Feb 05, 2007 4:20 pm
by infograf768
6511

These are still there:

Notice: Undefined property: stdClass::$client_name in /Library/WebServer/Documents/joomla11new/libraries/joomla/utilities/array.php on line 252
Notice: Undefined property: stdClass::$client_name in /Library/WebServer/Documents/joomla11new/libraries/joomla/utilities/array.php on line 255

Also, I found out some discrepancies between the number of files.
Looking further, I found some older ini files (from August) in my French admin (obsolete files btw), which Manager Component did not trace and display in the files view while counting them in Language view
See picture below

Re: Joomla 1.5 Language Files Manager Component

Posted: Mon Feb 05, 2007 4:27 pm
by infograf768
Hmmm... maybe the updated files were not yet available?
I see "1.0 beta #6005" in the fftranslation.xml

Re: Joomla 1.5 Language Files Manager Component

Posted: Mon Feb 05, 2007 4:31 pm
by infograf768
That was it:
the link above is to the ancient version
Your new version is here:
http://forge.joomla.org/sf/frs/do/viewR ... n_1_5_6474

Testing

Re: Joomla 1.5 Language Files Manager Component

Posted: Mon Feb 05, 2007 4:40 pm
by infograf768
OK, Notices gone.
The little bug about the language icon not reloading the main language display is gone.

Number of file oddity still here.

+ one suggestion:

in the main "Language screen, introduce a filter with 3 choices: administrator, site, installation

Re: Joomla 1.5 Language Files Manager Component

Posted: Mon Feb 05, 2007 6:12 pm
by igevans
Sorry, still getting to grips with forge.
infograf768 wrote: Number of file oddity still here.
OK, this was because it just used the reference language directory as a master list.  I've changed this so that it scans both directories and builds a "composite" file list.

site-admin-installation filter should be quite easy, and will add this.

Can you tell me what's happened to overlib / can you point me at a new implementation for tooltips?

Thanks

Ifan

Re: Joomla 1.5 Language Files Manager Component

Posted: Tue Feb 06, 2007 12:34 am
by Predator
As JM knows i had started 1 1/2 years ago which the official language editor, due to the heavy changes of the API all the time i stop the further developing, latest SVN (if you can't see it i have it also attached as file) here:

http://forge.joomla.org/integration/vie ... m=exsy1002

JM has followed in the past the progress as he also did here (good work JM). I did a look to your current work and was impressed what you have done.

It doesn't makes sense to me to start again the developing of the langeditor so it would be more efficent to bundle the force and support you with helping coding and also to show you what maybe is missing or to modified the code to fit with the new API and the MVC structure, the end result i would propose to release as the Offical Langeditor with full credits for you ;)

What do you mean? I guess JM is also seeing the positives on doing us together insteed of working seperated on the some stuff.

If you like to dicuss this with me my Skypename is PredatorJoomla


Regards

Marko

Re: Joomla 1.5 Language Files Manager Component

Posted: Tue Feb 06, 2007 4:26 am
by vhv_alex
I have installed your component above on Joomla SVN 6515.

It was installed successful but return an error, i took a screenshot for you

PHP : 5.2.0
Apache : 2.2.3
MySQL : 5.0.27-community-nt


The second error appeared when i opened com_langeditor , it opened am error page , i captured in error2.png

Re: Joomla 1.5 Language Files Manager Component

Posted: Tue Feb 06, 2007 8:24 am
by infograf768
@predator & igevans

I guess masterchief, to whom I shown this component, totally agrees on this too.

If igevans agrees, that would be our best bet and I am ready to advertise this component right now to our Translation workgroup as a whole.

@igevans
Can you tell me what's happened to overlib / can you point me at a new implementation for tooltips?
Could you be more specific? Overlibs do work here.
What we may need, I guess, is some more tooltips for the "Extra" of the style "These are not present in the reference language, untick to delete when saving file", or something. Maybe also somewhere an explanation for newbies about the green and the red bars, maybe as a legend on top of the file, in the "Details" part.

Also, one has to check what should be the copyright per default (OSM has to be there somewhere as default, non-editable) and see if we use or not some lines in the xml headers concerning Creative Commons or FDL for Translators (debate still on as far as I know)

Re: Joomla 1.5 Language Files Manager Component

Posted: Tue Feb 06, 2007 12:00 pm
by igevans
I've got no problem with sharing this, but I wouldn't know where to start in running or co-ordinating a project, and have never used SVN, so maybe someone else should take the lead from here?

OVERLIB:
The main overlib script file is no longer included by JCommonHTML::loadOverlib() - it now only jimports "joomla.html.tooltips".  On build 6474 I can replicate the missing overlib in the Administrator Content-Article Manager screen, where there used to be a popup in the Published column.  Other components now appear to use a different functionality using class and title...

LEGEND:
Yes, a legend would be a good idea, also on the file list view to show the different status symbols.

COPYRIGHT:
Would OSM have copyright on a translation file for a 3rd-party component/plugin? - changing the default is easy, but do you mean non-editable default or non-editable in the files?

igevans

Re: Joomla 1.5 Language Files Manager Component

Posted: Tue Feb 06, 2007 12:33 pm
by Predator
No Problem we can handle this together and teach you wht to do so you can expand your experience also in that way :)

We are also talking in the Core Team how to support you best way.

Re: Joomla 1.5 Language Files Manager Component

Posted: Tue Feb 06, 2007 3:28 pm
by infograf768
igevans wrote: COPYRIGHT:
Would OSM have copyright on a translation file for a 3rd-party component/plugin? - changing the default is easy, but do you mean non-editable default or non-editable in the files?
No, you are right. Maybe the easiest would be to have the OSM copyright automatically showing in the field and could be changed at will when 3rd party extension would be concerned.

Re: Joomla 1.5 Language Files Manager Component

Posted: Tue Feb 06, 2007 3:49 pm
by ibnhafsun
Maybe the easiest would be to have the OSM copyright automatically showing in the field and could be changed at will when 3rd party extension would be concerned.
With a tooltip and a link to the translation policy?

PS: the option to import or create new language from extensions/language manager would be great. If you wan to import a language, then , the installer is used; if you want to use a new language, then the extension would duplicate the english (or the selected language), like Drupal does. Got it! It was from components/translation manager/new and then files. Really nice work!

Re: Joomla 1.5 Language Files Manager Component

Posted: Wed Feb 07, 2007 1:54 am
by igevans
Hello all,

Been working on a few things suggested by JM (file count, client choices, key/legend), and also a first attempt at an MVC structure (actually concentrates on a Controller and Views which can be templated).  There are surely a few things which need tidying up, and not sure I have quite got the MVC concept (is there a guide somewhere online?) so before I post to forge I thought I'd post an interim zipfile of the component directory here for comment.

igevans

Re: Joomla 1.5 Language Files Manager Component

Posted: Wed Feb 07, 2007 11:14 am
by ibnhafsun
You need to update fftranslation.xml.

Re: Joomla 1.5 Language Files Manager Component

Posted: Fri Feb 09, 2007 1:19 am
by igevans
Latest Version on forge:

http://forge.joomla.org/sf/frs/do/viewR ... n_1_5_6520

Refactored code to controller and views (template files can override the views)
Changed tooltips from overlib to mootools
Improved navigation and user info
Composite file count
Warning on files that are not UTF-8 (eg ms-MY installation)
Other minor issues

igevans

Re: Joomla 1.5 Language Files Manager Component

Posted: Fri Feb 09, 2007 7:48 am
by infograf768
For the moment
1. the View Files icon not working. Clicking on the figure in the column works.
2. When language debugging is on in Global Config, xml column icons  and Files number show the ??  ?? as if these strings had to be translated.