🚀 [Story performance] Remove default translation and use english as default #36632
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the default translation JSON is separate from
en.js
but contains the same translations (sincedefault.json
is in english). However,default.json
is missing many of the translation strings, making it a bad fallback from other languages.We can remove
deafult.json
from the codebase and binary, saving 1kb on uncompressed bundle size foramp-story.js
while simplifying the selection of fallback localizations and preventing redundancy.Also, when no language is present, we can just use
default
(mapped toen.js
) instead of["en", "default"]
since no locale bundles have a different default than the english bundle.amp-story-auto-ads
already setsdefault
toen.js
which has worked great.