Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
RFC - Translation cache
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alexandre Salomé  
View profile  
 More options Dec 15 2011, 7:38 am
From: Alexandre Salomé <alexandre.sal...@gmail.com>
Date: Thu, 15 Dec 2011 04:38:17 -0800 (PST)
Local: Thurs, Dec 15 2011 7:38 am
Subject: RFC - Translation cache

Hello,

  I recently worked on translation system, and I had some tricky needs
(translations are stored in database, cached in Redis and each
domain/locale should have a Redis key with the last update of catalog).

  Currently, the implementation is very raw (option cache_dir) and suffer
from lot of limitations:

   - Not warmed
   - Clear cache to update translations
   - And so on

  I would like to develop this part to add some warming/cache mechanism,
powerful enough to support the case I have (even if I need to adapt it to
my work).

  We could also take benefit from resource watching to detect catalog
updates with file systems. Well it's a big topic in translations and I
would like to have your advice about it.

  Should probably be discussed during a IRC meeting, but first, let's
discuss of it here.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lukas Kahwe Smith  
View profile  
 More options Dec 17 2011, 5:56 pm
From: Lukas Kahwe Smith <m...@pooteeweet.org>
Date: Sat, 17 Dec 2011 23:56:01 +0100
Local: Sat, Dec 17 2011 5:56 pm
Subject: Re: [symfony-devs] RFC - Translation cache

On Dec 15, 2011, at 13:38 , Alexandre Salomé wrote:

> Hello,

>   I recently worked on translation system, and I had some tricky needs (translations are stored in database, cached in Redis and each domain/locale should have a Redis key with the last update of catalog).

>   Currently, the implementation is very raw (option cache_dir) and suffer from lot of limitations:
>    • Not warmed
>    • Clear cache to update translations
>    • And so on
>   I would like to develop this part to add some warming/cache mechanism, powerful enough to support the case I have (even if I need to adapt it to my work).

>   We could also take benefit from resource watching to detect catalog updates with file systems. Well it's a big topic in translations and I would like to have your advice about it.

>   Should probably be discussed during a IRC meeting, but first, let's discuss of it here.

I havent done much with the translation layer myself and in the few places where I did it was very limited.
But sounds like this is indeed an important topic to address.

Just FYI for the cache layer there is a PR that might be relevant for cache clearing:
https://github.com/symfony/symfony/pull/2857

regards,
Lukas Kahwe Smith
m...@pooteeweet.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexandre Salomé  
View profile  
 More options Dec 19 2011, 7:11 am
From: Alexandre Salomé <alexandre.sal...@gmail.com>
Date: Mon, 19 Dec 2011 04:11:15 -0800 (PST)
Local: Mon, Dec 19 2011 7:11 am
Subject: Re: RFC - Translation cache

The most difficult here is the @api interface, because it cannot be
changed. I think it's a problem, because here, it would be great to move
the "loader/resource" logic to some back-end service.

Here is the @api contract:

*Translator*

class Translator implements TranslatorInterface
{
    public function __construct($locale, MessageSelector $selector)
    public function addLoader($format, LoaderInterface $loader)
    public function addResource($format, $resource, $locale, $domain =
'messages')
    public function setLocale($locale)
    public function getLocale()
    public function setFallbackLocale($locale)
    public function trans($id, array $parameters = array(), $domain =
'messages', $locale = null)
    public function transChoice($id, $number, array $parameters = array(),
$domain = 'messages', $locale = null)

}

*LoaderInterface*

interface LoaderInterface
{
    function load($resource, $locale, $domain = 'messages');


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »