Itemid refactoring in 1.5

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Fri Mar 09, 2007 7:59 am

kenmcd wrote: Obviously trying to be tactful is not working.
How about this . . .
The : is a bad idea.
The _ is a bad idea.
The - is the best option for a default separator.
Is that clear enough?
Very clear. I eagerly look forward to your patch. Maybe you can also have a look at the pathway and mod_rewrite problems you have detected ? Thanks for the help !

PS. SVN works again.
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: Itemid refactoring in 1.5

Post by tcp » Fri Mar 09, 2007 10:21 am

ianmac wrote: yes...  but remember that the devs have to use the same SVN...  it isn't fun for them either!

Ian
Oh, the party has just started!

Image
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Downgrading a character to it's ASCII equivalent - Transliteration

Post by yvolk » Thu Mar 22, 2007 8:11 pm

Jinx wrote: @newart : URL's can only use ASCII characters and thus need to encode any other characters into an ASCII format. You correctly point out that this makes the URL's less readable. Instead of converting the non-ASCII characters to their respective entity formats I have implemented a function that downgrades a character to it's ASCII equivalent. For example, é will become e, or µ will be come u. This is not a 100% perfect but it is better then using entities.
Hi, Jinx!

I've just tested this "downgrading function" (yesterday's build) and it doesn't work with Cyrillic characters: all Cyrillic characters are escaped and unreadable. By the way, colon ":" is also escaped (I agree with those asking to change it to the dash "-").
"Search Engine Friendly URLs" option works incorrectly with Cyrillic characters. For example, for the menu item with the title: "Отдых и путешествия" - I have this link: "http://mysite-local/index.php/--" - all characters are gone except two spaces  :D

I looked into the code (function stringURLSafe) and I think that you should use here (and also for "Search Engine Friendly URLs") other method for what you called "downgrading". This is "transliteration", see description in http://en.wikipedia.org/wiki/Transliteration.

As I understand, the method of transliteration is Language-specific (not character specific!), so this function should use some (global) parameter, that sets method of transliteration.

I understand, that it is impossible to implement many (named) methods of transliteration quickly, but you may start with a couple and create carcass, that will be filled with new transliteration methods later... (I may fill "Russian transliteration"...)
... And it appears, that this Transliteration function should be part of Joomla i18n (Internationalization) library

In fact, the above link to Wikipedia contains much info about transliterations.

PS: Of cause, smart transliteration requires "Language" attribute for every string, so there would be no need for any global "Transliteration method" parameter...

Thank you for your work,
--
Yuri
Last edited by yvolk on Fri Mar 23, 2007 5:51 am, edited 1 time in total.
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

User avatar
markuz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 225
Joined: Tue Nov 08, 2005 6:43 pm
Location: the Netherlands
Contact:

Re: Itemid refactoring in 1.5

Post by markuz » Sun Mar 25, 2007 8:46 pm

markuz wrote:
Jinx wrote: @Markuz : Makes sense, what about moving the amp replacing to JRoute and adding a function parameter to turn it off and on ?
Sounds very good Jinx!

By the way... Did you already have a look at my other question / issue that I posted in this thread on 3 March? It is about the ignoring behaviour of the default Itemid. Thanks in advance.

So long for now,
Mark
Until now I couldn't find the implementation of redirect/javascript-safe urls in JRoute? And how about my other question in this thread?

So long... Mark

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

Re: Itemid refactoring in 1.5

Post by infograf768 » Mon Mar 26, 2007 6:49 am

To a non-coder, the transliteration suggestion above by yuri does make sense.
If it is the method ultimately chosen, it would be useful to know if the tables of equivalence (other than a default extended latin one that should be IMO included in core) would/could/should be taken care of by Translation partners.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: Itemid refactoring in 1.5

Post by newart » Tue Mar 27, 2007 6:47 am

infograf768 wrote: To a non-coder, the transliteration suggestion above by yuri does make sense.
If it is the method ultimately chosen, it would be useful to know if the tables of equivalence (other than a default extended latin one that should be IMO included in core) would/could/should be taken care of by Translation partners.
I like the idea of transliteration but... by a joomla developper point of view, does it make sense or not?
former Q&T WorkGroup Joomla member - Italian Translation Team Member

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Tue Mar 27, 2007 3:29 pm

Hi all,

I'm back on track after my Asia Adventure. Following changes have been made to the routing API :

- Improved slugs to always use a '-' instead of a '_' to seperate the id from the slug.
- Added support for URL escaping, to allow safe javascript URL's. JRoute, now has an extra parameter to turn escaping on and off. By default it's on.

Johan
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12781
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Itemid refactoring in 1.5

Post by brian » Tue Mar 27, 2007 3:30 pm

Thanks. Off to download and test now.
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Tue Mar 27, 2007 3:41 pm

Transliteration could indeed be a possible solution to solve the 'URL' downgrading problems. The issue with transliteration is that PHP doesn't offer a solution to do it. Which means we need to reside to PHP libraries that can handle this. We could use Harry his utf8_to_asciilibrary which he ported from Perl Text::Unicode solution. As Harry describes in his blog postit is not full proof and doesn't offer support for all languages.

In an ideal world we should not need to reside to using transliteration for URL's slugs. Browsers these days are capable of showing encoded URL's in a readable way. Opera does this and so does IE. FireFox on the other hand doesn't, you need to change the FF settings to make it do this. This is done for security reasons and to prevent phising.

So far I'm undecided about the best possible solution and it seems we are not the only CMS struggling with this kind of problem, I found the following post on the django mailing list : http://groups.google.com/group/django-d ... e24ad26ded
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
alledia
Joomla! Ace
Joomla! Ace
Posts: 1067
Joined: Tue Jul 18, 2006 3:55 pm
Contact:

Re: Itemid refactoring in 1.5

Post by alledia » Tue Mar 27, 2007 4:02 pm

Agreed, this is not just a problem for CMS systems but the internet as a whole.

Even after 20 years, ICANN is still struggling and testing to roll out TLDs with utf8 characters. They may have them ready in 2008 (http://www.allheadlinenews.com/articles/7006729310). From what I've read their solution maybe to place an upper limit on the number of characters that can be transliterated and say "Sorry for now..." to the languages left out.
Joomla extensions and templates: http://Joomlashack.com

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

Re: Itemid refactoring in 1.5

Post by infograf768 » Tue Mar 27, 2007 4:54 pm

Just checking if what I get is what is supposed to be obtained:

7042: The slug is taken from the Content Title Alias while the page Title is from the Content Title (for a content).
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Tue Mar 27, 2007 6:51 pm

infograf768 wrote: Just checking if what I get is what is supposed to be obtained:

7042: The slug is taken from the Content Title Alias while the page Title is from the Content Title (for a content).
At the moment the slug is either taken form the alias if present or it is auto-generated based on the title of the item (for example in weblinks). For content articles, page title are generated based on the title of the article. Slug and page title are unrelated in terms of code and API's.
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

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

Re: Itemid refactoring in 1.5

Post by infograf768 » Wed Mar 28, 2007 5:30 am

Hmmm... maybe this is the solution?

I mean, taking the slug from the alias title systematically. It would therefore be the responsability of the admin/publisher to make sure it only contains ANSI glyphs?

My 2 cents.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: Itemid refactoring in 1.5

Post by newart » Wed Mar 28, 2007 6:19 am

infograf768 wrote: I mean, taking the slug from the alias title systematically. It would therefore be the responsability of the admin/publisher to make sure it only contains ANSI glyphs?
It seems to me a simple (or perfect) ready solution with no problem for our developpers too :)
former Q&T WorkGroup Joomla member - Italian Translation Team Member

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Wed Mar 28, 2007 12:32 pm

That's a solution, means we need add alias support to all parts of the system that don't have it at the moment. This requires a database change, i'll need to discuss this with the dev working group.
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Re: Taking the slug from the alias title systematically

Post by yvolk » Wed Mar 28, 2007 8:18 pm

infograf768 wrote: Hmmm... maybe this is the solution?

I mean, taking the slug from the alias title systematically. It would therefore be the responsability of the admin/publisher to make sure it only contains ANSI glyphs?
This is a formal solution: "No ANSI title alias - no slug in the URL"  ;D. In life it may work for sections and categories, that are added relatively seldom. But I think, that many users won't bother to spend their time, manually "transliterating" titles of "news". This is dull and and tedious work, and the System should be kind enough to its users to help them especially in such tasks!

I think, that users must have an option for every item: whether alias (and so - slug) is generated automatically (and changed in sync with title), using transliteration, or alias is manually edited by user ("Custom alias"). With ability to choose default behaviour for new items.

So, automatic transliteration is not an alternative to the alias, but is a smart optional behaviour, "feature" of the System.
And, in any case, the System should not generate slugs for items, that don't have "good" title alias.
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Wed Mar 28, 2007 11:25 pm

Well that all makes sense, you wanna put that in code  :pop
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Implementing transliteration

Post by yvolk » Thu Mar 29, 2007 9:59 am

Well, I may make a code to implement transliteration in Joomla.

Current task, that it will solve, would be to transliterate string from "Content language" (Article already has such "Advanced parameter", but as I see, it is not stored anywhere yet  :( ...) to English. But I think, that the "transliteration API" should handle any pair of languages. If somebody will need additional transliteration method, he will add it (in a form of some language.ini file...)
As I see it now, result of my work may be:
1. Additional method of JLanguage class (The class is initialized with the "Source Language"):
  function Transliterate( $StringToTransliterate, $DestinationLanguage = 'en-GB', $TransliterationMethod = 'default') { ... }
2. Some method to list all existing transliterations ( SourceLanguage, DestintionLanguage, TransliterationMethod). To be used by user interface to set user preferences...
3. Implemented transliteration from 'ru-RU' to 'en-GB' - as an example for other implementations.
4. Some description and usage suggestions...

Everything else is out of my scope.
Is it OK?
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Thu Mar 29, 2007 10:11 am

You can definitly go ahead with this, I only don't think we will be able to get it all into 1.5. Currently we are trying hard to finish up beta 2 and transliteration is going to be a too big off a change to get in. This doesn't mean that your work will be invain. It could prove very valuable for a future version, or you could probably even put it in a plugin tio improve the routing in that way.
Last edited by Jinx on Thu Mar 29, 2007 10:17 am, edited 1 time in total.
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Re: Itemid refactoring in 1.5

Post by yvolk » Thu Mar 29, 2007 12:33 pm

Jinx wrote: You can definitly go ahead with this, I only don't think we will be able to get it all into 1.5. Currently we are trying hard to finish up beta 2 and transliteration is going to be a too big off a change to get in. This doesn't mean that your work will be invain. It could prove very valuable for a future version, or you could probably even put it in a plugin tio improve the routing in that way.
Unfortunately, intellectual usage of this transliteration function, as we discussed it before, has to be integrated deep inside Joomla code (e.g. in the content edit procedure..., in "slug construction" procedures for Sections and Categories...).  So, Joomla has to (or may) call Transliterate method from a number of places.
I mean, my work makes sense only if these calls to the Transliterate method will be inserted in the Joomla core. After this, my work to actually implement transliteration will be in only one file from the Joomla core: "libraries\joomla\i18n\language.php".

Jinx, if you're planning to make some refactoring of the "slug construction" (that currently doesn't work for e.g. cyrillic characters...), I think it will be proper time to insert calls to Transliteration method (described in my previous message) right now?! Currently this method may simply return the same string, that is on its input (and this will be the same for "English language content" transliterating to en-GB after implementing the transliteration).

... I thought a while, and I think, that I may prepare (post here or what?)  first implementation of this transliteration functions in a couple of days.
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Thu Mar 29, 2007 12:38 pm

yvolk wrote: ... I thought a while, and I think, that I may prepare (post here or what?)  first implementation of this transliteration functions in a couple of days.
Oke, let's do that and then take it from there.
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

language.php file refactored (second version)

Post by yvolk » Fri Mar 30, 2007 12:48 pm

As a first step in preparation to implement Transliteration, I refactored (in fact, cleaned a little) "www\libraries\joomla\i18n\language.php" file (see attachement). Here are my notes:

1. "$lang =& JFactory::getLanguage();" - returns userdefined or site default language, so THIS language can not be (inconditionally) used for transliteration.

I propose to add (optional) parameter to the JFactory::getLanguage()
JFactory::getLanguage($langTag = 'default')
(and, of cause JFactory should store several languages)
- so this funtion may be used to get desired language (e.g. language of the content to transliterate)

2. function _parseINILanguageFiles
seems to be some rudiment of the past:
- it uses undefined (legacy) function JParameter::parse
- it is not used anywhere in Joomla code

I propose to delete it.

3. I refactored the file, changing "$lang" and "$language" to "langTag" where it IS a tag (e.g. 'EN-GB')
and leaving '$lang', where it is JLanguage class/object ( $lang is generally used in Joomla code for "JLanguage" ).
Also renamed "$languages" to "$langTags" for array of tags.

4. Descriptions were corrected and made more consistent:
- "Language tag" term instead of different variations: "language", "language code", "name of the language", etc.

5. function load( $prefix = '', $basePath = JPATH_BASE )
parameter $prefix renamed to $suffix, because it actually IS suffix:
---
  $filename = empty( $prefix ) ?  $this->_langTag : $this->_langTag . '.' . $prefix ;
---

6. Fixed: function exists($langTag, $basePath = JPATH_BASE)
- it gave wrong result, if called with different $basePath-s
- if exists it returned langTag, but not boolean true.

7. I don't know PHP well enough, but what is the reason to call method of the JLanguage class from inside the class with 'JLanguage::' prefix?
e.g. is it the same inside JLanguage class?!
$knownLanguages = JLanguage::_parseLanguageFiles($dir);
$knownLanguages = self::_parseLanguageFiles($dir);

I didn't changed this, because I don't see any use of "self" keyword in Joomla code :( .

8. In JLanguage class deleted the "protected" var:
var $_identifyer = null;
- it is just the same as another var ( var $_langTag = null;)
- it is not used anywhere.
You do not have the required permissions to view the files attached to this post.
Last edited by yvolk on Fri Mar 30, 2007 7:16 pm, edited 1 time in total.
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Transliteration implemented, v.003

Post by yvolk » Mon Apr 02, 2007 3:12 pm

Jinx wrote:
yvolk wrote: ... I thought a while, and I think, that I may prepare (post here or what?)  first implementation of this transliteration functions in a couple of days.
Oke, let's do that and then take it from there.
Hi, Jinx!

I prepared first implementation of Transliteration functionality, see file transliteration003.zip attached.
It contains:
1. www\language\ru-RU\ru-RU.xml - updated Russian language file, containing transliteration metadata
2. www\libraries\joomla\i18n\language.php - updated JLanguage class + new JTransliteration class
3. www\components\com_content\views\article\tmpl\default.php - "article" view template to which I appended "JLanguage and transliteration test".

Your move  :)
--
Yuri
You do not have the required permissions to view the files attached to this post.
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: Itemid refactoring in 1.5

Post by newart » Tue Apr 03, 2007 6:47 am

Compliments to yvolk - What a fast work done! Great!
former Q&T WorkGroup Joomla member - Italian Translation Team Member

User avatar
markuz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 225
Joined: Tue Nov 08, 2005 6:43 pm
Location: the Netherlands
Contact:

Re: language.php file refactored (second version)

Post by markuz » Tue Apr 03, 2007 9:12 am

yvolk wrote: 7. I don't know PHP well enough, but what is the reason to call method of the JLanguage class from inside the class with 'JLanguage::' prefix?
e.g. is it the same inside JLanguage class?!
$knownLanguages = JLanguage::_parseLanguageFiles($dir);
$knownLanguages = self::_parseLanguageFiles($dir);

I didn't changed this, because I don't see any use of "self" keyword in Joomla code :( .
Calling the class this way is for PHP4 compatibility reasons, bacause self is not supported by PHP4. It IS supported by PHP5.
Sounds like good work, these developments.

Cheers, Mark

whurley
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 103
Joined: Thu Aug 24, 2006 3:59 pm

Re: Itemid refactoring in 1.5

Post by whurley » Tue Apr 03, 2007 2:26 pm

There's one issue with JRouter in older versions of PHP.  Namely in _parseApplicationRoute there is a call to strpos( $url, $item->route ), but when $item->route is empty (when you have a separator menu item) it throws an error.  The following is a fix for that:

Code: Select all

--- /libraries/joomla/application/router.php	(revision 7084)
+++ /libraries/joomla/application/router.php	(working copy)
@@ -312,7 +312,7 @@
 			$itemid = null;
 			foreach ($items as $item)
 			{
-				if(strpos($url, $item->route) === 0)
+				if(strlen($item->route) > 0 && strpos($url, $item->route) === 0)
 				{
 					$itemid = $item->id;
 					$url    = str_replace($item->route, '', $url);

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: language.php file refactored (second version)

Post by tcp » Tue Apr 03, 2007 4:28 pm

Just to reply to this topic as I've been working w/ JLanguage quite a bit lately.

JLanguage updated in Rev 7085.
yvolk wrote: As a first step in preparation to implement Transliteration, I refactored (in fact, cleaned a little) "www\libraries\joomla\i18n\language.php" file (see attachement). Here are my notes:

2. function _parseINILanguageFiles
seems to be some rudiment of the past:
- it uses undefined (legacy) function JParameter::parse
- it is not used anywhere in Joomla code

I propose to delete it.
It does not appear to be used within the Joomla 1.5 system, but that doesn't mean no one else is using it.  Not sure.  I'll ask some of the other devs where it comes from.
yvolk wrote:
5. function load( $prefix = '', $basePath = JPATH_BASE )
parameter $prefix renamed to $suffix, because it actually IS suffix:
---
  $filename = empty( $prefix ) ?  $this->_langTag : $this->_langTag . '.' . $prefix ;
---
Has been renamed to $extension.
yvolk wrote:
6. Fixed: function exists($langTag, $basePath = JPATH_BASE)
- it gave wrong result, if called with different $basePath-s
- if exists it returned langTag, but not boolean true.
Yes, I see the problem with the basePath, but with the current code it does return a boolean value.  I've fixed the code.
yvolk wrote:
8. In JLanguage class deleted the "protected" var:
var $_identifyer = null;
- it is just the same as another var ( var $_langTag = null;)
- it is not used anywhere.
I'm not sure what the original intention of this variable was.
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Re: I've been working w/ JLanguage quite a bit lately

Post by yvolk » Thu Apr 05, 2007 6:02 am

tcp wrote: Just to reply to this topic as I've been working w/ JLanguage quite a bit lately...
Hi, tcp!

As I see, we did some work on this language.php file in parallel, and naturally, solved some issues in different ways.

But, I made _MUCH_ more changes to the language.php file, that you cited (see file attached to my message dated March 30, 2007, 04:48:37 PM)! These changes and corrections are both in code and comments (i.e. documentation) of this file.
Please, do not let this work to get lost: merge my changes to the code repository (I'm not eligible to do this myself  :) ). - Now I don't talk about my later additions concerning JTransliteration class. It's another story, that waits for Jinx...

Thank you.
--
Yuri
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: Itemid refactoring in 1.5

Post by tcp » Fri Apr 06, 2007 3:37 pm

I spoke to Jinx ( we're in DC now ) and this is also a architectural issue as well as a code issue.  At the moment we're focusing on finishing Beta 2 and transliteration will have to wait, I'm afraid.  Sorry, but please understand everyone is itching to have B2 done.

In San Fran, they want Joomla B2.
[img width=400]http://laughingsquid.com/wp-content/upl ... s_sf_4.jpg[/img]

In Lego Land, they want Joomla B2.
[img width=400]http://www.brickshelf.com/gallery/Nabii ... ombies.jpg[/img]

So if we don't get B2 done, I don't even want to think what will happen.  Save Yourself!

[img width=400]http://www.horrordvds.com/reviews/a-m/m ... shot4l.jpg[/img]

So at the moment, my priority is not to be eaten alive by zombies.  If you find any bugs w/ JLanguage or would like to make suggestions, we have a thread going on here.
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Fri Apr 06, 2007 4:40 pm

@Yvolk : More changes to JLanguage

- _parseINILanguageFiles removed
- identifier class variable removed

@Whurley : fix for JRouter applied

Johan
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work


Locked

Return to “Joomla! 1.5 Coding”