Yarko, I am leaning towards accepting your proposal for two reasons: 1) it was seconded (by Thedeus) 2) you are right that this results in an incorrect behavior for Admin/ Examples/Welcome
I still stand that those apps have a bug (because when we added translations I did not set the current language) not languages.py. Nevertheless it is easier to change the default behavior than change three apps. If no objection from people overseas, I will change this in trunk. To people overseas: If your app is in polish (for example) and you provide an english translation, the english translation will not work anymore until you re-set the current language to polish. Now it does not make any assumption about the current language. Massimo On Nov 23, 11:12 am, Yarko Tymciurak <[email protected]> wrote: > On Mon, Nov 23, 2009 at 12:20 AM, Thadeus Burgess > <[email protected]>wrote: > > > if web2py is mostly written in English, then it needs to default to > > English, and allow for easy overriding of this default. > > I agree. > > More explicitly - whatever the web2py distribution default is should behave > correctly; > > If an application declares it's own default language (and it should be easy, > and clear - how should that look to the application writer?), then that > should override the distribution default for requests to that application. > > To see why there is currently a bug, > > - set your languages to more than one in (for example) Firefox > - e.g. [1] 'en'; [2] 'it' > - go tohttp://www.web2py.com/examples/simple_examples/hello6 (or any of > the simple examples) > - despite 'en' being the first language, the example displays "Slave > Mondo' (incorrect behavior) > > The current default behavior is incorrect; the proposal (which is fine for > overriding a site defailt) is that EACH APPLICATION must declare the default > language. > > This (currently) is necessary for the system to behave reasonably. > > The reason Massimo's proposed "solution" is NOT sufficient for the > installation default should now be quite evident: the "patch" for the bug > MUST propogate to EACH AND EVERY APP for the system behavior to be correct. > > This is NOT a bug in examples; this is a bug in gluon/languages.py. To see > this yet another way, write a unit test for gluon/languages.py. > > Since examples do not behave correctly, and - in general - with Massimo's > proposal multiple, and constantly changing (as applications are > installed) points of correction must be made in order to accomplish > reasonable behavior: this by itself is sufficient evidence to point > directly to the bug in gluon/languages.py. Additionally, a suggestion that > "examples" has a bug (it does not) is a suggestion which breaks "backward > compatibility" (but backward compatibility is not the point at all here - > that correcting a bug at its source is the proper approach is what is in > discussion here) > > Once all recognize this clearly, then we can move on to talking about what a > good solution would look like. > > - Yarko > > > > > -Thadeus > > > On Sun, Nov 22, 2009 at 10:04 PM, mdipierro <[email protected]>wrote: > > >> rammer always explicitly say which languages do not need > >> transla > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

