[Vtigercrm-developers] UITYPES and Translation files

nilay khatri nilay.spartan at gmail.com
Tue Mar 15 13:30:35 GMT 2022


The best approach is caching. There has been an update on the cache
connector already.

We already worked on this and will send a PR soon. Currently the
translations are stored in files itself, but the cache builds up once read.

Also it is not just about the files, there are some database queries that
are done for translations. I can't recall right away but I guess for field
labels and module labels.

Having a central repo in the database would be the next step towards
cleanup.

Similar approach can be taken for user privileges and sharing privileges,
instead of reading from file, the data can be read from the database and
stored in cache on first read. We are currently working on this. The added
benefit would be in terms of random inclusion of current user files in
various places.

This way we can get rid of both file based dependencies present currently.


On Tue, Mar 15, 2022 at 6:02 PM Henry Cumbicus Rivera <hcumbicusr at gmail.com>
wrote:

> Alan, thank you very much for your answers.
>
> Here is my opinion regarding the questions:
> 1. It seems to me that it is better to have a centralized data dictionary
> using the DB.
> 2. Personally it is more useful to have the translations in DB, with the
> caching functionality you mentioned. That way we avoid changing the
> translation files through source code.
>
> El mar, 15 mar 2022 a las 6:58, Alan Lord (<alanslists at gmail.com>)
> escribió:
>
>> On 15/03/2022 11:43, Alan Lord wrote:
>>
>> > defaultvalue is optional, setPicklistValues($array) is not. That is
>> what
>> > populates the picklist tables with the values.
>>
>> One thing to be aware of is that setPicklistValues() doesn't check for
>> duplicate entries (or it didn't last time I looked).
>>
>> So you either need to empty the table first (be careful with UIType 15
>> as there are now entries in vtiger_role2picklist too), or write your own
>> code to check so if you try and recreate a picklist field you don't end
>> up with multiple entries with the same value.
>>
>> HTH
>>
>> Al
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
> --
>
> ---------------------------------------------------------------
> Ing. Henry C.
> Tel.: +51 956727976
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220315/15be02b8/attachment.html>


More information about the vtigercrm-developers mailing list