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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ [Story localization] Fetch strings for localization files if in experiment #37843
✨ [Story localization] Fetch strings for localization files if in experiment #37843
Changes from 34 commits
6aabe91
dc1fa87
d707e5b
0e3df75
a3f7bd0
8c5119c
77f8435
16e712e
8088eb7
3858b2a
e12d2f6
2a29105
a5b781f
b8006ee
a04f6d2
9c4f9b9
07e3ca5
879fa46
5dfb927
bc9c7ed
e53661a
55274f6
595c683
ed4ecaf
5b923de
6f8c1ca
1d419c3
72070cf
1361273
5b49fff
b293243
ec2c791
3a5e409
b3b7b17
0900d28
59ebcb5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plz report the experiment as enabled to the CSI metrics so we can filter our dashboards and measure performance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plz report the experiment as enabled to the CSI metrics so we can filter our dashboards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When does this happen, if the AMP Cache falls back to english for an unknown
languageCode
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Locally you could create a demo with a language that doesn't exist and this will show in the console. Also the cache doesn't do this now, but will be implemented soon. Also if the language doesn't have a valid format (let's say someone uses
../../..
oren/us
or some other complex string that the cache might not be able to fallback due to the path being broken).All these can avoid breaking the code by catching the error. We could use regex for some of these, but in case anything goes wrong, catching the error makes the most sense IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't launch this till the AMP Cache does this fallback then, otherwise all docs with wrong
lang
parameters would start failing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we can trigger the experiment flag when the cache works better. This
catch
is still useful if the language breaks the url, the network drops, etc. Having a regex (\w+(-\w+)*
) would fix the former but not the latter.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and in the main code file, please be consistent with your vocabulary. locales/localizationStrings etc, please pick one and stick to it for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code overall doesn't seem to be extremely consistent but will try with this PR to keep all the changes using
localization
.