rainlab/translate-plugin

New translation strings are not added after scanning

igor-tv opened this issue · 1 comments

When I add new translation keys that have not previously been seen in the templates, and add translation messages for those keys to the theme's translation file, I expect the translation to appear after the messages are scanned. But I only see translation keys on the frontend. Only scanning with purge all messages first helps.

theme.yaml file has setting translate: config/lang.yaml.
lang.yaml has this structure:

en:
    example.string: 'Example string'

RainLab.Translate version 2.2.6

Hey @igor-tv

This has been tested and is working normally. Remember that the scan does not overwrite existing translations unless you purge/delete the messages first. If the translation key is never seen, it will be included without purging first.

image

It sounds like the scanner is not scanning the correct theme. You can check for the active theme by opening the editor, and whatever theme is active, here is the theme that will be scanned.

We've added some code to make this more obvious in: 168e4fb

If you still think this could be a bug, mention my username, and we can take another look.

Thanks!