Joomla 1.5 Language Files Manager Component

A place to discuss Joomla! translation matters.

Moderator: wendhausen

igevans
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 09, 2006 10:36 am
Location: Wales

Joomla 1.5 Language Files Manager Component

Post by igevans » Thu Nov 30, 2006 10:16 am

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
Last edited by imanickam on Thu Jun 18, 2020 2:57 am, edited 2 times in total.
Reason: Changed the Topic Type from Sticky to Normal

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

Re: Joomla 1.5 Language Files Manager Component

Post by ot2sen » Thu Nov 30, 2006 11:00 am

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
Ole Bang Ottosen
Dansk frivillig Joomla! support websted - joomla.dk
OpenTranslators Core Team opentranslators.org

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Joomla 1.5 Language Files Manager Component

Post by infograf768 » Thu Nov 30, 2006 11:05 am

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  ;)
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

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

Re: Joomla 1.5 Language Files Manager Component

Post by ot2sen » Thu Nov 30, 2006 11:32 am

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  :)
Ole Bang Ottosen
Dansk frivillig Joomla! support websted - joomla.dk
OpenTranslators Core Team opentranslators.org

igevans
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 09, 2006 10:36 am
Location: Wales

Re: Joomla 1.5 Language Files Manager Component

Post by igevans » Thu Nov 30, 2006 12:14 pm

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

ivo.apostolov
I've been banned!
Posts: 1868
Joined: Thu Aug 25, 2005 2:33 pm

Re: Joomla 1.5 Language Files Manager Component

Post by ivo.apostolov » Fri Dec 01, 2006 9:16 am

Looks quite promising.
Adding new strings is not working and giving back an JS error

igevans
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 09, 2006 10:36 am
Location: Wales

Re: Joomla 1.5 Language Files Manager Component

Post by igevans » Fri Dec 01, 2006 11:27 am

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

igevans
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 09, 2006 10:36 am
Location: Wales

Joomla 1.5 Language Manager Component UPDATED

Post by igevans » Fri Dec 15, 2006 4:56 pm

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.
You do not have the required permissions to view the files attached to this post.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Joomla 1.5 Language Files Manager Component

Post by infograf768 » Thu Dec 21, 2006 5:15 pm

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.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

igevans
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 09, 2006 10:36 am
Location: Wales

Re: Joomla 1.5 Language Files Manager Component

Post by igevans » Thu Jan 25, 2007 4:54 pm

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

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Joomla 1.5 Language Files Manager Component

Post by infograf768 » Thu Jan 25, 2007 5:56 pm

You forgot to let users have access to the project on Forge.  ;)
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

igevans
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 09, 2006 10:36 am
Location: Wales

Re: Joomla 1.5 Language Files Manager Component

Post by igevans » Fri Jan 26, 2007 5:53 pm

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

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Joomla 1.5 Language Files Manager Component

Post by infograf768 » Fri Jan 26, 2007 7:07 pm

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.  :)
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

igevans
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 09, 2006 10:36 am
Location: Wales

Re: Joomla 1.5 Language Files Manager Component

Post by igevans » Mon Feb 05, 2007 12:40 pm

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

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Joomla 1.5 Language Files Manager Component

Post by infograf768 » Mon Feb 05, 2007 4:20 pm

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
You do not have the required permissions to view the files attached to this post.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Joomla 1.5 Language Files Manager Component

Post by infograf768 » Mon Feb 05, 2007 4:27 pm

Hmmm... maybe the updated files were not yet available?
I see "1.0 beta #6005" in the fftranslation.xml
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Joomla 1.5 Language Files Manager Component

Post by infograf768 » Mon Feb 05, 2007 4:31 pm

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
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Joomla 1.5 Language Files Manager Component

Post by infograf768 » Mon Feb 05, 2007 4:40 pm

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
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

igevans
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 09, 2006 10:36 am
Location: Wales

Re: Joomla 1.5 Language Files Manager Component

Post by igevans » Mon Feb 05, 2007 6:12 pm

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

User avatar
Predator
Joomla! Ace
Joomla! Ace
Posts: 1823
Joined: Wed Aug 17, 2005 10:12 pm
Location: Germany-Bad Abbach
Contact:

Re: Joomla 1.5 Language Files Manager Component

Post by Predator » Tue Feb 06, 2007 12:34 am

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
You do not have the required permissions to view the files attached to this post.
Last edited by Predator on Tue Feb 06, 2007 12:37 am, edited 1 time in total.
The "Humor, Fun and Games" forum has  more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team :D

vhv_alex
Joomla! Explorer
Joomla! Explorer
Posts: 311
Joined: Mon Apr 03, 2006 12:26 am
Location: Ho Chi Minh - Viet Nam
Contact:

Re: Joomla 1.5 Language Files Manager Component

Post by vhv_alex » Tue Feb 06, 2007 4:26 am

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
You do not have the required permissions to view the files attached to this post.
Last edited by vhv_alex on Tue Feb 06, 2007 4:31 am, edited 1 time in total.
Joomla! Việt Nam Translation Coordinator
// The best way to have a good idea is to have a lot of ideas
// Dr Linus Pauling
http://www.joomlaviet.org

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Joomla 1.5 Language Files Manager Component

Post by infograf768 » Tue Feb 06, 2007 8:24 am

@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)
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

igevans
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 09, 2006 10:36 am
Location: Wales

Re: Joomla 1.5 Language Files Manager Component

Post by igevans » Tue Feb 06, 2007 12:00 pm

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

User avatar
Predator
Joomla! Ace
Joomla! Ace
Posts: 1823
Joined: Wed Aug 17, 2005 10:12 pm
Location: Germany-Bad Abbach
Contact:

Re: Joomla 1.5 Language Files Manager Component

Post by Predator » Tue Feb 06, 2007 12:33 pm

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.
Last edited by Predator on Tue Feb 06, 2007 12:35 pm, edited 1 time in total.
The "Humor, Fun and Games" forum has  more than 2500 Posts, so why not build a "Humor, Fun and Games Working" Group?
.....
Malicious tongues say we have this WG right from the start, they call it core team :D

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Joomla 1.5 Language Files Manager Component

Post by infograf768 » Tue Feb 06, 2007 3:28 pm

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.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

ibnhafsun
Joomla! Hero
Joomla! Hero
Posts: 2318
Joined: Fri Aug 19, 2005 9:41 pm
Contact:

Re: Joomla 1.5 Language Files Manager Component

Post by ibnhafsun » Tue Feb 06, 2007 3:49 pm

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!
Last edited by ibnhafsun on Tue Feb 06, 2007 6:43 pm, edited 1 time in total.
...nam qui dabat olim imperium, fasces, legiones, omnia, nunc se continet atque duas tantum res anxius optat, panem et circenses...
http://www.todosjuntos.org
http://inmo-e.com

igevans
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 09, 2006 10:36 am
Location: Wales

Re: Joomla 1.5 Language Files Manager Component

Post by igevans » Wed Feb 07, 2007 1:54 am

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
You do not have the required permissions to view the files attached to this post.

ibnhafsun
Joomla! Hero
Joomla! Hero
Posts: 2318
Joined: Fri Aug 19, 2005 9:41 pm
Contact:

Re: Joomla 1.5 Language Files Manager Component

Post by ibnhafsun » Wed Feb 07, 2007 11:14 am

You need to update fftranslation.xml.
...nam qui dabat olim imperium, fasces, legiones, omnia, nunc se continet atque duas tantum res anxius optat, panem et circenses...
http://www.todosjuntos.org
http://inmo-e.com

igevans
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Thu Feb 09, 2006 10:36 am
Location: Wales

Re: Joomla 1.5 Language Files Manager Component

Post by igevans » Fri Feb 09, 2007 1:19 am

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

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Joomla 1.5 Language Files Manager Component

Post by infograf768 » Fri Feb 09, 2007 7:48 am

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.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group


Locked

Return to “Translations”