| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
//chromeos/ash/components/boca/babelorca changes LGTM!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Also cc April and Ahmed as FYI.
| Code-Review | +1 |
LGTM with a nit
return std::make_unique<base::Value>(std::string(
ash::StartupUtils::GetInitialLocale(local_state).tag_string()));`base::Value` has a constructor that takes a `std::string_view`.
```suggestion
return std::make_unique<base::Value>(
ash::StartupUtils::GetInitialLocale(local_state).tag_string());
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
return std::make_unique<base::Value>(std::string(
ash::StartupUtils::GetInitialLocale(local_state).tag_string()));`base::Value` has a constructor that takes a `std::string_view`.
```suggestion
return std::make_unique<base::Value>(
ash::StartupUtils::GetInitialLocale(local_state).tag_string());
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Looks like an unrelated change may have snuck into this patch.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Looks like an unrelated change may have snuck into this patch.
no, actually, had to change that, the locales 'sk-g1' are not considered valid by LanguageTag (because they are not 'g1' is not a valid region subtag). This is one solution I had for making the tests pass. WDYT?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Danilo TedeschiLooks like an unrelated change may have snuck into this patch.
no, actually, had to change that, the locales 'sk-g1' are not considered valid by LanguageTag (because they are not 'g1' is not a valid region subtag). This is one solution I had for making the tests pass. WDYT?
I'll defer to an owner here but is it okay that other locales like "en-us" are shortened to "en"?
Danilo TedeschiLooks like an unrelated change may have snuck into this patch.
Reilly Grantno, actually, had to change that, the locales 'sk-g1' are not considered valid by LanguageTag (because they are not 'g1' is not a valid region subtag). This is one solution I had for making the tests pass. WDYT?
I'll defer to an owner here but is it okay that other locales like "en-us" are shortened to "en"?
reverted that, now I decided to correct the locale name in third_party/liblouis/tables.json
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
chrome/renderer/accessibility/read_anything/read_anything_app_controller.cc LGTM
Thanks! Are there any behavioral changes as part of this CL? It's not obvious.
Thanks! Are there any behavioral changes as part of this CL? It's not obvious.
Nope, it is no-op.
There was only a single place where the tests had to be adapted due to folks using fake region codes that are not valid, such as g1, g2.
| Code-Review | +1 |
std::replace(locale_with_dashes.begin(), locale_with_dashes.end(), '_',Above you eliminated this code, whereas here you didn't. Is there a reason for the difference?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::replace(locale_with_dashes.begin(), locale_with_dashes.end(), '_',Above you eliminated this code, whereas here you didn't. Is there a reason for the difference?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
11 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: chrome/browser/ash/guest_os/guest_os_registry_service.cc
Insertions: 1, Deletions: 5.
@@ -164,12 +164,8 @@
base::DictValue result;
for (const auto& strings_with_locale : repeated_locale_string.values()) {
const std::string& locale = strings_with_locale.locale();
-
- std::string locale_with_dashes(locale);
- std::replace(locale_with_dashes.begin(), locale_with_dashes.end(), '_',
- '-');
if (!locale.empty() && !base::i18n::LanguageTagConverter::GetInstance()
- .FromString(locale_with_dashes)
+ .FromString(locale)
.has_value()) {
continue;
}
```
Replace IsValidLocaleSyntax in favor of LanguageTag usage
I'm making small changes to third_party/liblouis/tables.json following
the pattern in that file to have ids like "sk-g1" and locale: "sk". I
had to change that because "sk-g1" is not a valid bcp47 language tag as
"g1" is not a valid region subtag:
https://www.rfc-editor.org/info/rfc5646/#section-2.1
```
region = 2ALPHA ; ISO 3166-1 code
/ 3DIGIT ; UN M.49 code
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::replace(locale_with_dashes.begin(), locale_with_dashes.end(), '_',Danilo TedeschiAbove you eliminated this code, whereas here you didn't. Is there a reason for the difference?
Done.
For clarity, can you explain why it's a no-op to eliminate this code?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::replace(locale_with_dashes.begin(), locale_with_dashes.end(), '_',Danilo TedeschiAbove you eliminated this code, whereas here you didn't. Is there a reason for the difference?
Colin BlundellDone.
For clarity, can you explain why it's a no-op to eliminate this code?
Yep, the LanguageTagConverter::FromString code has a step to convert legacy ICU4C locale format to BCP47 format. You can see it here: https://source.chromium.org/chromium/chromium/src/+/main:base/i18n/tag_converters.cc;l=135;drc=0ce06599d4f0c331bfc4018b20e0b196f375cdc2
This is a centralized way of doing that convertion that has more steps than just replacing underscores with dashes. It also goes into possible extensions (what goes after '@' symbol).
std::replace(locale_with_dashes.begin(), locale_with_dashes.end(), '_',Danilo TedeschiAbove you eliminated this code, whereas here you didn't. Is there a reason for the difference?
Colin BlundellDone.
Danilo TedeschiFor clarity, can you explain why it's a no-op to eliminate this code?
Yep, the LanguageTagConverter::FromString code has a step to convert legacy ICU4C locale format to BCP47 format. You can see it here: https://source.chromium.org/chromium/chromium/src/+/main:base/i18n/tag_converters.cc;l=135;drc=0ce06599d4f0c331bfc4018b20e0b196f375cdc2
This is a centralized way of doing that convertion that has more steps than just replacing underscores with dashes. It also goes into possible extensions (what goes after '@' symbol).
Thanks! I figured it was something like that. In the future, that's the kind of info that is great to put in the CL description to benefit reviewers (and future readers).