[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpgroupware-developers] phplib template class in HEAD
From: |
Dave Hall |
Subject: |
Re: [Phpgroupware-developers] phplib template class in HEAD |
Date: |
Sat, 14 Oct 2006 23:25:44 +1000 |
On Sat, 2006-10-14 at 08:12 -0500, Chris Weiss wrote:
> hm. i'm torn on some of this.
>
> on restricting the regex:
> on one side, restricting the "key" characters so that you have to use
> a "key phrase" instead of a "default translation" like we have now can
> make translating easier since unknowns will stand out more strongly
> (not just and * but also not a proper sentance).
>
> on the other, having a "default translation" as the key can make
> development a lot simpler since you'll have a usable site whether or
> not you have bother to enter the primary language.
>
>
The default translations would also be translated. I see little or no
need to include "?" as a template variable
> on changing our "style":
> what are the drawbacks of allowing any character in the key? does it
> make the translations notably slower?
>
The regex is more complex so it takes longer (I haven't done a speed
comparison as yet). It means we will again be maintaining a hacked up
version of the class.
> And, could we submit a patch upstream to make it so a developer can
> choose a limited regex like the new one or a more complex one like
> ours? it seems like, short term anyway, this would be a lot easier to
> do, and we can worry about our "style" after 1.0 when i'm hoping a lot
> of the UI will be changed anyway.
>
I hope things change for 1.0, but rewriting admin and setup won't happen
for 18, so I don't know if it will happen for 1.0. This is the phpdocs
for the variable which controls the regex
/**
* Determines the regular expression used to find unknown variable tags.
* "loose" = traditional match all curly braces with no whitespace between
* "strict" = adopts PHP's variable naming rules
* ("loose" has a nasty habit of deleting JavaScript RegEx
components)
* (should future major version releases of PHPLib default this
"strict"?)
*
* @var string
* @access public
*/
var $unknown_regexp = "strict";
Cheers
Dave
>
> On 10/14/06, Dave Hall <address@hidden> wrote:
> > Hi all,
> >
> > Some time ago I synced the template class in HEAD with the upstream
> > version, something which hadn't been done for a very long time.
> >
> > I have been aware of a major down side of this change, that being it
> > breaks some templates. The regex matching of the new template class is
> > stricter than the hacked up version we have used in <= 0.9.16. I have
> > not had time to look into fixing as yet.
> >
> > The main thing which is broken is setup and admin where we use more than
> > 0-9a-Z_ (and a few other characters) as the template variables. I
> > personally would like to took at simplify the text used in admin and
> > setup to make it clearer for users and so possibly reduce the need for
> > additional characters. What do you think? Also are you willing to get
> > your hands dirty to help with the fixes?
> >
> > I also hope to move our remaining hacks out of the class so we have
> > phpgwapi/inc/class.Template.inc.php which extends
> > phpgwapi/inc/phplib/class.Template.inc.php This change should make
> > syncing with upstream easier.
> >
> > Cheers
> >
> > Dave
> > --
> > Dave Hall (aka skwashd)
> > API Coordinator
> > phpGroupWare
> > e address@hidden
> > w phpgroupware.org
> > j address@hidden
> > sip address@hidden
> > _ ____ __ __
> > _ __ | |__ _ __ / ___|_ __ ___ _ _ _ _\ \ / /_ _ _ __ ___
> > | '_ \| '_ \| '_ \| | _| '__/ _ \| | | | '_ \ \ /\ / / _` | '__/ _ \
> > | |_) | | | | |_) | |_| | | | (_) | |_| | |_) \ V V / (_| | | | __/
> > | .__/|_| |_| .__/ \____|_| \___/ \__,_| .__/ \_/\_/ \__,_|_| \___|
> > |_| |_| |_|Web based collaboration platform
> >
> >
> >
> >
> > _______________________________________________
> > Phpgroupware-developers mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
> >
>
>
> _______________________________________________
> phpGroupWare-developers mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
--
LLLLL
L*LLL
LLLLL
LLLLL DAVE
LLLLL HALL
CONSULTING
Open Source
Business Solutions
p +61 410 47 42 55
e address@hidden
w davehall.com.au