Skip to content

LIT default translations don't update correctly #161

Description

@bkroeker

Changing the default translation does not correctly update the value in LIT. Here's the behaviour, as best I can tell.

t('key_one', default: 'My Translation') # => 'My Translation'
t('key_one', default: 'A different translation') #=> 'My Translation'

t('key_two') # => missing translation
t('key_two', default: 'My Translation') #=> 'My Translation'
t('key_two', default: 'A different translation') #=> 'A different translation'

In the former case, 'My translation' is saved as the translation for 'key_one' in the database, and used for all subsequent translations. In the latter case, null is saved as the translation for 'key_two' in the database, and any provided defaults will take priority for all subsequent translations while maintaining null in the database.

Neither case is ideal. What I'd ideally expect to see is that any passed defaults will be saved in LIT and will overwrite any existing value in LIT unless the translation was flagged as human approved, at which point it should be locked.

An example scenario where this is relevant is when I, as a developer, wish to provide more detail in a translation, or fix a typo. My improved default won't actually be applied, because the original default was saved when the translation was first instantiated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions