write_dict() is only called if you have a new translation string that is
not in the languages file. If you call [update all languages] before
deployment, it should never be called in production unless you have:
T("something %s" % variable)
instead of
T("something %s") % variable
which means web2py is trying to translate every instance of the variables.
On Monday, 15 October 2012 11:47:43 UTC-5, Fran wrote:
>
> On my Production servers I don't like the languages/* files to be writable
> - I prefer to keep these files part of the application's version control &
> translated outside the application.
>
> Currently this leads to a performance overhead as there are many times
> that write_dict() is called and so gluon attempts to update the file &
> throws an Exception.
>
> I'd ideally like to have a setting to not update these files at all, so
> just return inside this function (as is currently done if __corrupted__ in
> contents).
> The right place for this would appear to be request.global_settings
>
> How does this sound to people?
>
> If we agree on a strategy, I can write the code, as this doesn't seem hard
> to implement.
>
> Best Wishes,
> Fran.
>
--