Re: multiple [controllerName].po files + normal core.po?

2008-11-28 Thread Rafael Bandeira aka rafaelbandeira3

> PS a controller should itself have very few __ calls (only flash messages) ...

And be said that even this can be delegated to the view layer
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: multiple [controllerName].po files + normal core.po?

2008-11-28 Thread AD7six



On Nov 28, 11:37 am, "Mark (Germany)" <[EMAIL PROTECTED]>
wrote:
> anybody some idea on that? :)

where have you ever seen a core.po file? I assume you mean default.po

Why not create (and I think quite a few people do it this way) a
wrapper function such as "___" which determins/derives/takes from a
constant/whatever the domain and then calls __d (or __nd or __x etc. )
with the appropriate params.

You may find however that using such a granular po 'scheme' causes you
issues. - what's the reason for it? e.g. putting yourself in a
possition where your logic expects to find an entry in "blogs.po" when
in fact you've put it in "comments.po"

hth,

AD
PS a controller should itself have very few __ calls (only flash
messages) since translating fixed strings is in principle view logic.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: multiple [controllerName].po files + normal core.po?

2008-11-28 Thread Mark (Germany)

anybody some idea on that? :)
thx


On 26 Nov., 04:13, "Mark (Germany)" <[EMAIL PROTECTED]>
wrote:
> Several posts and blogs have been made to similar topics
> they usually end up with
> use eather core.po OR multiple controllerName.po etc
>
> the way cake works is:
> - if it finds a "domain".po, use it, abort
> - if not, try to find core.po, use it, abort
>
> well, is there (without the need to hack into i18n.php in /cake/libs)
> an easy way to
> always include core.php (main translation things as "edit" "delete"
> "add")
> + including a controller based .po file having the specific strings
> for each controller connected view?
>
> example, how the /LC_MESSAGES dir could look like:
>
> core.po (everything needed in every controller, always included)
> blogs.po
> posts.po
> config.po
> contact.po
> ...
> etc
>
> AND i probably have to add:
> without having to use the domain everywhere inside the translation
> strings like __('domain','string)
> as this is not very usability-friendly.
> they should still be of the type __('string') and just be merged from
> both the core.po and the actual controller we use right now.
>
> maybe in the beforeFilter() method, as this one is triggered only if
> some controller is used,
> otherwise only the core.po file is needed for the debug/error messages
> and the main layout etc.
>
> if it ends up to be a manual insert function, this would probably be
> ok, as well..
> i reckon its gonna be like that, as i searched the internet quite
> thoroughly
>
> thx in advance
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



multiple [controllerName].po files + normal core.po?

2008-11-25 Thread Mark (Germany)

Several posts and blogs have been made to similar topics
they usually end up with
use eather core.po OR multiple controllerName.po etc

the way cake works is:
- if it finds a "domain".po, use it, abort
- if not, try to find core.po, use it, abort

well, is there (without the need to hack into i18n.php in /cake/libs)
an easy way to
always include core.php (main translation things as "edit" "delete"
"add")
+ including a controller based .po file having the specific strings
for each controller connected view?

example, how the /LC_MESSAGES dir could look like:

core.po (everything needed in every controller, always included)
blogs.po
posts.po
config.po
contact.po
...
etc

AND i probably have to add:
without having to use the domain everywhere inside the translation
strings like __('domain','string)
as this is not very usability-friendly.
they should still be of the type __('string') and just be merged from
both the core.po and the actual controller we use right now.

maybe in the beforeFilter() method, as this one is triggered only if
some controller is used,
otherwise only the core.po file is needed for the debug/error messages
and the main layout etc.

if it ends up to be a manual insert function, this would probably be
ok, as well..
i reckon its gonna be like that, as i searched the internet quite
thoroughly

thx in advance
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---