<div dir="ltr">Oh yes already Sukhdev, I will share the function call that has to be replaced everywhere, where we have file inclusion for privileges file. I will setup the project and I guess we can collaborate on that then.<div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 15, 2022 at 7:18 PM Sukhdev Mohan <<a href="mailto:s.mohan@myti.it">s.mohan@myti.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I like the second part. If I can help please let me know. I always disliked the user file exposed...</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il mar 15 mar 2022, 14:37 nilay khatri <<a href="mailto:nilay.spartan@gmail.com" target="_blank">nilay.spartan@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">The best approach is caching. There has been an update on the cache connector already. <div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Having a central repo in the database would be the next step towards cleanup.</div><div><br></div><div>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.</div><div><br></div><div>This way we can get rid of both file based dependencies present currently.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 15, 2022 at 6:02 PM Henry Cumbicus Rivera <<a href="mailto:hcumbicusr@gmail.com" rel="noreferrer" target="_blank">hcumbicusr@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Alan, thank you very much for your answers.<div><br>Here is my opinion regarding the questions:<br>1. It seems to me that it is better to have a centralized data dictionary using the DB.<br>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.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mar, 15 mar 2022 a las 6:58, Alan Lord (<<a href="mailto:alanslists@gmail.com" rel="noreferrer" target="_blank">alanslists@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 15/03/2022 11:43, Alan Lord wrote:<br>
<br>
> defaultvalue is optional, setPicklistValues($array) is not. That is what <br>
> populates the picklist tables with the values.<br>
<br>
One thing to be aware of is that setPicklistValues() doesn't check for <br>
duplicate entries (or it didn't last time I looked).<br>
<br>
So you either need to empty the table first (be careful with UIType 15 <br>
as there are now entries in vtiger_role2picklist too), or write your own <br>
code to check so if you try and recreate a picklist field you don't end <br>
up with multiple entries with the same value.<br>
<br>
HTH<br>
<br>
Al<br>
<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer noreferrer" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br><div>---------------------------------------------------------------</div><div>Ing. Henry C.</div><div>Tel.: +51 956727976</div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>