644 Posts in 282 Topics by 161 members
|Go to End||Next >|
8 May 2009 at 11:29pm
I'm bumping into odd behaviour as well..
first, If I translate a child-page , it creates a translation for both the child and it's parent page (this seems logical). If I then go back to translate a sibling (so a child of the same parent page which was just translated) , it creates a translated version for the page , but I cannot see it in the translated site-tree.
Another bug pops up when you click "show deleted pages" in a translated site-tree. It now shows the sitetree of another language.
ps(Is this the right thread to talk about the new Translatable features?) ....
8 May 2009 at 11:41pm Last edited: 8 May 2009 11:48pm
Do you mean when translating sibblings you don't end up with a new tree every time? You just keep one tree but lose the earlier sibblings? Did you change the default language as I did?
Because in the ticket I saw mentioned what you describe: the loosing/exchanging of siblings in the translated tree, whereas I get all these extra trees - it could be two different bugs. Do you get any Existing translations mentioned in you default language?
8 May 2009 at 11:44pm
Indeed, default language is dutch.
I don't end up with a new tree ever time. It just refuses to add new translated children to the already translated parent... So it is basically the opposite of what happens on your installation..... ;)
8 May 2009 at 11:52pm Last edited: 9 May 2009 4:36am
This is weird - we should have the same results then. I'll try a new installation later on. Using FF 3.0.10 for that matter...
BTW - is there an svn for this version? I'm using the original download from the blog...
Downloaded 2.3.2beta1 again from the blog. Did a fresh install (Debian Etch, Apache2, MySQL5), tested in FF3.0.1 (XP), IE6 (XP) IE7 (Vista). Same thing: translating a sibbling results in creating a second tree. In both IE, translating a sibbling resulted in an error message 'I can't handle sub-URLs of a CMSMain object'. I then have to reload to see that the second tree was still created.
9 May 2009 at 2:11pm
OK, looks like we have some work to do - thanks for testing! Having a default language other than "en_US" definetly complicates things - I've tested this of course, but there can be more side effects and wrong assumptions.
I've created a ticket for the missing parent relation on translated children:
And another ticket for optionally translating a subtree or the whole page tree:
This won't make it into 2.3.2 - patches are welcome of course, don't think translating a subtree will be too hard to set up.
10 May 2009 at 1:00am Last edited: 11 May 2009 7:39pm
While waiting for stable - is there maybe a tiny little patch to make the frontend at least acknowledge a different locale in 2.3.1? I'm only working on Dutch sites now, I wouldn't mind using some hardcoding for the time being just to change the default. I could plow through the code of course - but if anybody has already done this? Please?
simplest solution: for the time being I hardcoded Content-Language in SiteTree.php: $tags .= "<meta http-equiv=\"Content-Language\" content=\""...
10 May 2009 at 2:57am Last edited: 10 May 2009 3:15am
I don't know how do you managed to actually create some translations! Here, on a fresh install of 2.3.2beta1, I can go as far as building the database with the Locale field correctly set to 'en_GB' (not default locale), I checked the database. Then, when I try to enter the CMS, I get:
[Notice] Undefined index: en_GB
Line 1350 in C:\Users\Juan\Documents\Travail en cours\Web\silverstripe-v2.3.2-beta1\cms\code\CMSMain.php
That's the LangSelector function.
Any ideas? (as I continue debugging)
I understand now: the problem is that CMSMain looks for the default locale (set here to en_GB) in the common_locales array, where en_GB is not defined, as soon as I change this list or the function get_common_locales to get_locale_list in LangSelector, I can access the CMS.
So: when starting a new site, verify that your locale is in the list of common_locales or include it!
Should I consider that a bug or a feature? ;)
10 May 2009 at 3:36am
Ingo, please, would you consider adding this to _config.php as good SilverStripe practice? I'm not good at phpâ€¦
/* Multilingual content */
// Enable Translatable
//Define allowed locales overriding those present in i18n::$common_locales
$allowed_locales = array(
'en_GB' => array('English', 'English'),
'es_ES' => array('Spanish', 'español')
i18n::$common_locales = $allowed_locales;
Thanks in advance,
|Go to Top||Next >|