You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.
In order to keep translations small, I've been providing only differences from English in my translation files, and then having all locales fall back to the en-US translation file if nothing else can be found.
It would be cool to allow this to be generated automatically through a config option, like:
yo skatejs:translation fr-CA --fallback fr-FR,en-US
or something similar, to do the following in the Translation helper automatically
where merge is likeObject.assign except that it supports deep merging of keys with an object for a value. My personal implementation uses deepmerge, which might be an appropriate initial approach.
Provide fallback option that allows a locale to fall back to other arbitrary locales
Fail if a fallback locale does not exist
Automatically install deepmerge and set up the merge function the first time only
When the fallback option is provided, generate the map's value by merging locales instead of simply using the imported file
The text was updated successfully, but these errors were encountered:
In order to keep translations small, I've been providing only differences from English in my translation files, and then having all locales fall back to the
en-US
translation file if nothing else can be found.It would be cool to allow this to be generated automatically through a config option, like:
or something similar, to do the following in the Translation helper automatically
where
merge
is likeObject.assign
except that it supports deep merging of keys with an object for a value. My personal implementation usesdeepmerge
, which might be an appropriate initial approach.fallback
option that allows a locale to fall back to other arbitrary localesdeepmerge
and set up themerge
function the first time onlyfallback
option is provided, generate the map's value by merging locales instead of simply using the imported fileThe text was updated successfully, but these errors were encountered: