-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
core(deprecations): use translated strings from devtools repo #13961
Conversation
geolocationInsecureOriginDeprecatedNotRemoved: | ||
'`getCurrentPosition()` and `watchPosition()` are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details.', | ||
/** | ||
*@description TODO(crbug.com/1318858): Description needed for translation |
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.
Will translators still attempt to translate these strings without a description?
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 translators ask us why there isn't a context description, are we going to have to tell them that it's it not our fault, we got these from somewhere else.
Or in theory should that never happen, because these specific strings will be referred to the existing translations from DT.
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.
Or in theory should that never happen, because these specific strings will be referred to the existing translations from DT.
This
switch (deprecation.type) { | ||
case 'AuthorizationCoveredByWildcard': | ||
message = str_(UIStrings.authorizationCoveredByWildcard); | ||
milestone = 97; |
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.
If deprecations are added/changed we are going to need to update this like InspectorIssues
right?
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.
Should we have a CI check like inspector issues to force us to keep this updated?
Whats the process you used to slurp up the strings and the feature/milestone numbers? |
No process. I copied the function from devtools. |
I added a minor build step to make updating these string simple in the future. @paulirish, would |
todo: need to fix build-cdt-lib..
|
"message": "{PH1} is deprecated. Please use {PH2} instead." | ||
}, | ||
"lighthouse-core/audits/deprecations-strings.js | deprecationExample": { | ||
"message": "This is an example of a translated deprecation issue message." |
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.
uhhh
build/build-cdt-strings.js
Outdated
|
||
/** | ||
* @param {string} text | ||
* @param {string} needle |
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.
Is needle
common nomenclature for this? I would prefer startPattern
and endPattern
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.
indeed, I have seen needle as a term for replacements in many places.
geolocationInsecureOriginDeprecatedNotRemoved: | ||
'`getCurrentPosition()` and `watchPosition()` are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details.', | ||
/** | ||
*@description TODO(crbug.com/1318858): Description needed for translation |
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 translators ask us why there isn't a context description, are we going to have to tell them that it's it not our fault, we got these from somewhere else.
Or in theory should that never happen, because these specific strings will be referred to the existing translations from DT.
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.
I'll defer to you on the CI check, but otherwise LGTM
Fixes #13895
Putting this up, open question about what to do with all the missing translator strings. Wait, or fill them out ourselves?