oforge / oforge-core

The oforge core module.
GNU General Public License v3.0
5 stars 6 forks source link

Allow i18n-snippets to have only a default value in only one language. #491

Closed kevinkoessl closed 4 years ago

kevinkoessl commented 4 years ago

There was a problem when trying to use i18n-snippets which only have a default value in one language. E.g. using a snippet with {{ i18n('frontend_success', {'en' : 'Success'}) }} would always return the english value although a German Translation is stored in the database.

Previously you would have to assign a default value to any language within the template. In this example {{ i18n('frontend_success', {'en' : 'Success', 'de' : 'Erfolg', it: 'Successo'}) }}, even if you don't speak the languages or don't even know which languages will be available at some point.

flkasper commented 4 years ago

Requires general discussion of initial snippet data and i18n function.

flkasper commented 4 years ago

Full fix in #494