mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 17:57:36 +08:00
Add some FAQs for Loc V2. Bug: 941561 Change-Id: I23ce46bc01d567f20764c7de8ccd5d7583e017b0 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238608 Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com> Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Christy Chen <chrche@microsoft.com>
1.1 KiB
1.1 KiB
Description
Good descriptions can improve localizability as it will provide more context to the translators.
Good description:
const UIStrings = {
/**
* @description Tooltip text that appears when hovering over the 'Focusable' attribute name under the Computed Properties section in the Accessibility pane of the Elements pane.
*/
computedPropertyTooltip: 'If true, this element can receive focus.',
};
Bad description:
const UIStrings = {
/**
* @description Elements pane 'Focusable' tooltip.
*/
computedPropertyTooltip: 'If true, this element can receive focus.',
};
What information should I provide in the message description?
- Where is the text located? (e.g. button, title, link, pull-down menu in the Sources pane)
- What triggers the string and/or what is the result? What page or text comes before and after?
- What do the placeholders stand for? Will this message replace a placeholder in another message? Do they need to be arranged in a certain way?
- Is this a verb or a noun? If it's an adjective, what does it refer to?
- Who is the message intended for (e.g. accessible label)?