mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-08 12:53:45 +08:00
There are severals places in the DevTools frontend UI where we need
to update existing strings to ensure that they are localizable.
1. Updated strings that are conditionaly plural into their singular and
plural forms.
2. Updated strings that use concatenation to instead use variable
substitution.
3. Fixed a couple other minor issues.
Regarding the use of variable substitution instead of concatenation.
Consider:
Common.UIString(palette.colors[i] +
'. Long-click to show alternate shades.');
Here, the location of the color isn't captured, instead the actual hex
value is. What we really need is a string with a marker for the
variable substitution.
Instead, we should do the following:
Common.UIString('%s. Long-click to show alternate shades.',
palette.colors[i]);
Or,
ls`${palette.colors[i]}. Long-click to show alternate shades.`;
Change-Id: Ica7253f7c69e9a2478452d0a944147680b4ca8d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504254
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#638193}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5e6c21ed70371dcdb04b9f86552ef8537c5e683f