Upgrading to fbt 5
This release requires fbt 5, which collects
phrases in a new format. With the eloquent driver, run php artisan migrate (it widens the project column
of phrases to 100 characters).
The md5_digest configuration of this package stays hex, so the hashes of stored phrases and the keys of
translation files stay valid. Translation files don't have to be migrated (fbt:migrate-v5 --translations converts
their keys to base64).
-
Collect the source strings again:
php artisan fbt:collect-fbts --clean-cache=trueWith the
eloquentdriver, stored phrases (and their translations) are kept: once a phrase is collected again, it's moved from its fbt 4 source to the new one. Sources collected by fbt 4 aren't exported to.source_strings.jsonanymore. -
Translate the phrases which changed in fbt 5 again (e.g. inner strings of HTML elements nested in an fbt, whose descriptions now contain the whole enclosing string). With the
eloquentdriver, they are listed by:php artisan fbt:migrate-v5 --dry-runWith the
jsondriver, the missing translations are generated by:php artisan fbt:generate-translations -
Generate the translations:
php artisan fbt:translate
To switch to base64 (the default of fbt 5), set md5_digest to base64 and convert the stored hashes
(eloquent driver) or the keys of translation files (json driver):
php artisan fbt:migrate-v5 --digest=base64
php artisan fbt:migrate-v5 --digest=base64 --translations="./storage/fbt/translations/*.json"