Feature: Every translation are defined in the translations folder, problem is, as the file is stored directly in the folder, it can be difficult to optimize the performance during the translation process.
In order to ease the process, every translation should be stored using Redis. A command should be created.
Specifications:
A TranslationWarmerCommand should be created.
This command should ask for: a locale, the channel of the translations.
The translation is done via GCP API Cloud Translation.
The command should retrieve the file using the locale and the channel, once the file is found, the content should be prepared and sent to Redis using the RedisTranslationWriter.
If Redis already contains the translations (up to date), the process should be stopped, the RedisTranslationRepository should be used in order to retrieve the Redis items.
Constraints:
If a cache item is found and it contains the whole translations up to date, the command should be stopped and an information message should be displayed.
Performances:
[ ] The whole command should consume less than 1mb during the whole process.
Feature: Every translation are defined in the
translations
folder, problem is, as the file is stored directly in the folder, it can be difficult to optimize the performance during the translation process. In order to ease the process, every translation should be stored using Redis. A command should be created.Specifications:
TranslationWarmerCommand
should be created.locale
, thechannel
of the translations.API Cloud Translation
.RedisTranslationWriter
.RedisTranslationRepository
should be used in order to retrieve the Redis items.Constraints:
Performances:
1mb
during the whole process.200kb
.