fix: Allow file fields to be non translatable
Description
This addresses the issue where setting the translatable(false) method on a file field does not affect the field (i.e. Always translated) by adding a new disableTranslate() method on the file field.
Usage:
Files::make()
->name('single_file')
->label(twillTrans('Single file'))
->disableTranslate();
Related Issues
Fixes #1712
Why create a new disableTranslate when there is already translatable(false)?
Lets not make the API more confusing shall we
Let me clarify this. We can agree this is not pretty, but it is temporary to avoid a breaking change.
In https://github.com/area17/twill/pull/2525 I asked @zeezo887 to add a new option to work around the current situation with the translate prop on medias field that isn't working because of the global configuration option. Similarly, the files field currently forces translations without any ability to control it globally or at the field level.
To avoid breaking changes in Twill 3 while enabling the missing functionality we introduce these temporary methods. In a future breaking release we will fix the behavior of the translate prop and translatable method, remove the global configuration option for medias fields, as well as these unnecessary methods.