What does the length of the sentences have to do with the way it should be
used? You are duplicating your effort by creating a slug to represent a full
sentence. Keep in mind the .po file is only needed for translations not the
default language.

So in English this:

__('Why duplicate your effort');

would not even have a po file.

But in German you would have a po file with (Used google to translate this):

msgid "Why duplicate your effort"
msgid "Warum doppelte Ihre Bemühungen"

Just advising you on the way I wrote the code to work. You can use it anyway
you like I guess, but from a maintenance side distributing your .po files to
a group of translators where they can open them in the editor and see the
exact string that needs to be translated vs trying to find the meaning of
your slug is a plus.

-- 
/**
* @author Larry E. Masters
* @var string $userName
* @param string $realName
* @returns string aka PhpNut
* @access  public
*/

On Tue, Oct 13, 2009 at 11:12 AM, Miles J <mileswjohn...@gmail.com> wrote:

>
> I am personal extremely against naming your ids the full sentence,
> what purpose does that serve? Its longer in both the .po and .ctp file
> and its a lot easier to reference slugs. To each his own I guess.
>
> On Oct 13, 7:42 am, "Larry E. Masters aka PhpNut" <php...@gmail.com>
> wrote:
> > Another thing I forgot to mention. You should be using full strings you
> want
> > translated for the msgid.Example:
> >
> > msgid "By registering on this web site you are..."
> >
> > This is the way the core was designed to handle translations. You will
> also
> > find it much easier for people to translate your application if they have
> > everything they need in the 1 .po file vs looking for the text related to
> a
> > place holder.
> >
> > --
> > /**
> > * @author Larry E. Masters
> > * @var string $userName
> > * @param string $realName
> > * @returns string aka PhpNut
> > * @access  public
> > */
> >
> > On Tue, Oct 13, 2009 at 9:13 AM, Rob <rob...@catchit.pl> wrote:
> >
> > > Any1 thought about creating little snippet which could speed up
> > > hardcoded localization process.
> > > Here is the simple scenerio:
> > > 1) find strings within __('...') __('...',true) string patterns in /
> > > app folder
> > > 2) build arrays from default locale *.po files containing locale keys
> > > 3) append to end of these files missing id keys in form:
> > > msgid "_register_disclaimer"
> > > msgstr "TOODOO"
> >
> > > i create many multilang apps and i believe it could be major speed
> > > boost for ppl like me.
> > > we dont need to update these files manually every time we use __(). we
> > > just run script when app is ready or changed and just update TOODOO
> > > strings or send them to translators.
> >
> > > If some1 came up with idea how this could be easly done i would
> > > apreciate this.
> >
> > > regular expressions? if so, how to build fault free one?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to