[locale]: Add different end tags to formatLocale (#30067)
This commit is contained in:
@@ -32,7 +32,7 @@ describe('formatString', () => {
|
||||
})
|
||||
|
||||
it('should allow replacing a range', () => {
|
||||
assert.equal(formatString('$1 in $2nz$2 say $3', {
|
||||
assert.equal(formatString('$1 in $2nz/$2 say $3', {
|
||||
$1: 'People',
|
||||
$2: 'NZ',
|
||||
$3: 'Kiora'
|
||||
@@ -40,7 +40,7 @@ describe('formatString', () => {
|
||||
})
|
||||
|
||||
it('should allow replacing with a range and a function', () => {
|
||||
assert.equal(formatString('$1 in $2nz$2 say $3', {
|
||||
assert.equal(formatString('$1 in $2nz/$2 say $3', {
|
||||
$1: 'People',
|
||||
$2: (content) => content.toUpperCase(),
|
||||
$3: 'Kiora'
|
||||
@@ -48,7 +48,7 @@ describe('formatString', () => {
|
||||
})
|
||||
|
||||
it('should fail if a replacement does not exist', () => {
|
||||
assert.throws(() => formatString('$1 in $2nz$2 say $3', {
|
||||
assert.throws(() => formatString('$1 in $2nz/$2 say $3', {
|
||||
$1: 'People',
|
||||
$2: (content) => content.toUpperCase(),
|
||||
$3: 'Kiora',
|
||||
@@ -57,7 +57,7 @@ describe('formatString', () => {
|
||||
})
|
||||
|
||||
it('should not fail if a replacement does not exist if noErrorOnMissingReplacement is true', () => {
|
||||
expect(formatString('$1 in $2nz$2 say $3', {
|
||||
expect(formatString('$1 in $2nz/$2 say $3', {
|
||||
$1: 'People',
|
||||
$2: (content) => content.toUpperCase(),
|
||||
$3: 'Kiora',
|
||||
@@ -78,32 +78,32 @@ describe('formatString', () => {
|
||||
})
|
||||
|
||||
it('should be able to return React nodes and take content as an argument', () => {
|
||||
assert.deepEqual(formatString('Hello $1world$1', {
|
||||
assert.deepEqual(formatString('Hello $1world/$1', {
|
||||
$1: (content) => <b>{content}</b>
|
||||
}), <>Hello <b>world</b></>)
|
||||
})
|
||||
|
||||
it('should be possible to mix text and React nodes', () => {
|
||||
assert.deepEqual(formatString('$1Shields are UP$1 for $2', {
|
||||
assert.deepEqual(formatString('$1Shields are UP/$1 for $2', {
|
||||
$1: (content) => <span>{content}</span>,
|
||||
$2: 'brave.com'
|
||||
}), <><span>Shields are UP</span> for {"brave.com"}</>)
|
||||
})
|
||||
|
||||
it('should be possible to only replace some keys', () => {
|
||||
assert.deepEqual(formatString('$1Shields are UP$1 for $2', {
|
||||
assert.deepEqual(formatString('$1Shields are UP/$1 for $2', {
|
||||
$1: (content) => <span>{content}</span>,
|
||||
}), <><span>Shields are UP</span> for $2</>)
|
||||
})
|
||||
|
||||
it('should be possible to only replace some keys out of order', () => {
|
||||
assert.deepEqual(formatString('$1Shields are UP$1 for $2', {
|
||||
assert.deepEqual(formatString('$1Shields are UP/$1 for $2', {
|
||||
$2: "brave.com",
|
||||
}), "$1Shields are UP$1 for brave.com")
|
||||
}), "$1Shields are UP/$1 for brave.com")
|
||||
})
|
||||
|
||||
it('one of everything', () => {
|
||||
assert.deepEqual(formatString('$1Shields are UP$1 for $2 (count: $3) $4nz$4', {
|
||||
assert.deepEqual(formatString('$1Shields are UP/$1 for $2 (count: $3) $4nz/$4', {
|
||||
$1: (content) => <span>{content}</span>,
|
||||
$2: "brave.com",
|
||||
$3: <span>over 9000</span>,
|
||||
@@ -114,30 +114,43 @@ describe('formatString', () => {
|
||||
})
|
||||
|
||||
it('should be possible to have a placeholder in a tag', () => {
|
||||
assert.deepEqual(formatString('Hello $1and goodbye $2$1', {
|
||||
assert.deepEqual(formatString('Hello $1and goodbye $2/$1', {
|
||||
$1: (content) => <span>{content}</span>,
|
||||
$2: <b>world</b>
|
||||
}), <>Hello <span><>and goodbye <b>world</b></></span></>)
|
||||
})
|
||||
|
||||
it('should not break for Czech shields', () => {
|
||||
assert.deepEqual(formatString('$1Štíty pro $2 jsou zapnuty$1', {
|
||||
assert.deepEqual(formatString('$1Štíty pro $2 jsou zapnuty/$1', {
|
||||
$1: content => <b>{content}</b>,
|
||||
$2: 'brave.com'
|
||||
}), <><b>Štíty pro brave.com jsou zapnuty</b></>)
|
||||
|
||||
assert.deepEqual(formatString('$1Štíty pro $2 jsou vypnuty$1', {
|
||||
assert.deepEqual(formatString('$1Štíty pro $2 jsou vypnuty/$1', {
|
||||
$1: content => <b>{content}</b>,
|
||||
$2: 'brave.com'
|
||||
}), <><b>Štíty pro brave.com jsou vypnuty</b></>)
|
||||
})
|
||||
|
||||
it('should be possible to nest tags', () => {
|
||||
assert.deepEqual(formatString('Hello $1and $3goodbye $2$3$1', {
|
||||
assert.deepEqual(formatString('Hello $1and $3goodbye $2/$3/$1', {
|
||||
$1: (content) => <span>{content}</span>,
|
||||
$3: content => <i>{content}</i>,
|
||||
$2: <b>world</b>
|
||||
}), <>Hello <span><>and <i><>goodbye <b>world</b></></i></></span></>)
|
||||
})
|
||||
|
||||
it('should be possible to replace multiple instances of the same key', () => {
|
||||
assert.deepEqual(formatString('Hello from $1 to $1', {
|
||||
$1: 'me'
|
||||
}), 'Hello from me to me')
|
||||
})
|
||||
|
||||
it('should be possible to replace multiple instances of the same key with tags and nesting', () => {
|
||||
assert.deepEqual(formatString('Hello from $2$1/$2 to $1. $2bob/$2 says hi too', {
|
||||
$1: 'me',
|
||||
$2: (content) => <span>{content}</span>
|
||||
}), <>Hello from <span>me</span>{" to "}{"me"}. <span>bob</span> says hi too</>)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
+30
-17
@@ -50,8 +50,8 @@ interface ReplacedRange {
|
||||
start: number
|
||||
end: number
|
||||
key: `$${number}`
|
||||
|
||||
children: ReplacedRange[]
|
||||
hasClosingTag: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,7 +67,7 @@ interface ReplacedRange {
|
||||
* $1: 'world'
|
||||
* }) // 'Hello world'
|
||||
*
|
||||
* formatString('Hello $1world$1', {
|
||||
* formatString('Hello $1world/$1', {
|
||||
* $1: (content) => <a href="#">{content}</a>
|
||||
* }) // 'Hello <a href="#">world</a>'
|
||||
*/
|
||||
@@ -76,7 +76,8 @@ export function formatString<T extends Replacement>(text: string, replacements:
|
||||
children: [],
|
||||
start: 0,
|
||||
end: text.length,
|
||||
key: `` as any
|
||||
key: `` as any,
|
||||
hasClosingTag: false
|
||||
}
|
||||
|
||||
const getReplacedContent = (range: ReplacedRange): Content | Content[] => {
|
||||
@@ -93,11 +94,14 @@ export function formatString<T extends Replacement>(text: string, replacements:
|
||||
bits.push(getReplacedContent(child))
|
||||
consumed = child.end
|
||||
}
|
||||
maybePushSlice(consumed, range.end - range.key.length)
|
||||
// If we have a closing tag (i.e. /$1) it is one character longer than the
|
||||
// start tag.
|
||||
const contentEnd = range.end - range.key.length - (range.hasClosingTag ? 1 : 0)
|
||||
maybePushSlice(consumed, contentEnd)
|
||||
|
||||
const childContent = bits.every(c => typeof c === 'string')
|
||||
? bits.join('')
|
||||
: React.createElement(React.Fragment, null, ...bits)
|
||||
: React.createElement(React.Fragment, null, ...bits.filter(b => !!b))
|
||||
|
||||
const replacement = replacements[range.key]
|
||||
if (!replacement) return childContent
|
||||
@@ -108,14 +112,16 @@ export function formatString<T extends Replacement>(text: string, replacements:
|
||||
}
|
||||
|
||||
const stack = [result]
|
||||
const regex = /\$(\d+)/gm
|
||||
const regex = /\/?\$(\d+)/gm
|
||||
|
||||
// Keep track of the keys we've seen, so we can throw an error if a key is
|
||||
// missing.
|
||||
const seen = new Set<string>()
|
||||
|
||||
for (const match of text.matchAll(regex)) {
|
||||
const key = match[0] as keyof typeof replacements
|
||||
const tag = match[0]
|
||||
const isClosingTag = tag.startsWith('/')
|
||||
const key = (isClosingTag ? tag.substring(1) : tag) as keyof typeof replacements
|
||||
|
||||
// If we should throw an error for missing replacements, keep track of the
|
||||
// keys we've seen.
|
||||
@@ -123,23 +129,29 @@ export function formatString<T extends Replacement>(text: string, replacements:
|
||||
seen.add(key)
|
||||
}
|
||||
|
||||
// If this is a closing tag, pop the element off the stack.
|
||||
if (stack.at(-1)!.key === key) {
|
||||
stack.pop()
|
||||
continue
|
||||
}
|
||||
|
||||
// We're not going to replace this key, so ignore it.
|
||||
if (!replacements[key]) { continue }
|
||||
|
||||
// If this is a closing tag, pop the element off the stack.
|
||||
if (isClosingTag) {
|
||||
if (stack.at(-1)!.key === key) {
|
||||
stack.pop()
|
||||
} else {
|
||||
throw new Error(`Mismatched closing tag: ${tag} in message "${text}"`)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
// Check if we have a closing tag for this key.
|
||||
let selfClosing = false
|
||||
let endIndex = text.indexOf(key, match.index + key.length)
|
||||
let hasClosingTag = true
|
||||
let endIndex = text.indexOf("/" + key, match.index + key.length)
|
||||
|
||||
// If we don't have a closing tag, the end tag is the same as the start tag.
|
||||
if (endIndex === -1) {
|
||||
endIndex = match.index
|
||||
selfClosing = true
|
||||
hasClosingTag = false
|
||||
} else {
|
||||
endIndex += 1 // Include the slash
|
||||
}
|
||||
|
||||
// Add the key length so it is fully included in the range.
|
||||
@@ -150,12 +162,13 @@ export function formatString<T extends Replacement>(text: string, replacements:
|
||||
end: endIndex,
|
||||
start: match.index,
|
||||
key: key as `$${number}`,
|
||||
hasClosingTag
|
||||
}
|
||||
stack.at(-1)!.children.push(range)
|
||||
|
||||
// If this is not a self-closing tag, push the element onto the stack, so
|
||||
// elements inside it can be added as children.
|
||||
if (!selfClosing) {
|
||||
if (hasClosingTag) {
|
||||
stack.push(range)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
About Leo
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_ABOUT_DESCRIPTION" desc="Outlining the functioning of AIChat (paragraph 1 of 3)" formatter_data="webui=AiChat">
|
||||
Brave Leo is a private AI smart assistant that enhances your use of the web. Leo is free to use with limited access. Brave Leo Premium offers more models, higher limits and gives subscribers early access to new features. The default model will change from time to time. See the <ph name="LINK_BEFORE">$1</ph>Brave Help Center<ph name="LINK_AFTER">$1</ph> for more details.
|
||||
Brave Leo is a private AI smart assistant that enhances your use of the web. Leo is free to use with limited access. Brave Leo Premium offers more models, higher limits and gives subscribers early access to new features. The default model will change from time to time. See the <ph name="LINK_BEFORE">$1</ph>Brave Help Center<ph name="LINK_AFTER">/$1</ph> for more details.
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_ABOUT_DESCRIPTION_2" desc="Outlining the functioning of AIChat (paragraph 2 of 3)" formatter_data="webui=AiChat">
|
||||
By default, when you ask Leo a question about a website or page you are viewing, the content of the webpage you are viewing or any text you highlight on a page, as well as your search query will be sent to Brave servers in order for Leo to provide a response. In some cases, Leo will send queries derived from your input to Brave Search and use the search results to better answer your question. Brave does not guarantee the accuracy of responses, and responses may include inaccurate, misleading, or false information. Don't submit sensitive or private information to Brave Leo, and use caution with any answers related to health, finance, personal safety, or similar. You can adjust Leo’s options in Settings any time. Go to Settings > Leo.
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_ABOUT_DESCRIPTION_3" desc="Outlining the functioning of AIChat (paragraph 3 of 3)" formatter_data="webui=AiChat">
|
||||
Leo does not collect identifiers such as your IP address that can be linked to you. We do not train our models based on your data, including your search queries or Brave Leo’s responses. No personal data is stored on our servers, or retained by Brave. See the <ph name="LINK_BEFORE">$1</ph>privacy policy<ph name="LINK_AFTER">$1</ph> for more information.
|
||||
Leo does not collect identifiers such as your IP address that can be linked to you. We do not train our models based on your data, including your search queries or Brave Leo’s responses. No personal data is stored on our servers, or retained by Brave. See the <ph name="LINK_BEFORE">$1</ph>privacy policy<ph name="LINK_AFTER">/$1</ph> for more information.
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_PLACEHOLDER_ATTACHED_PAGES_LABEL" desc="Placeholder text for when there are attached pages in the input box" formatter_data="webui=AiChat">
|
||||
{PAGE_COUNT, plural,
|
||||
@@ -85,25 +85,25 @@
|
||||
Configure
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_INTRO_MESSAGE_CHAT_AUTOMATIC" desc="AI Chat intro message for the default model" formatter_data="webui=AiChat">
|
||||
Model changes dynamically to use the best one for the task.<ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">$1</ph>
|
||||
Model changes dynamically to use the best one for the task.<ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_INTRO_MESSAGE_CHAT_BASIC" desc="AI Chat intro message for the basic model" formatter_data="webui=AiChat">
|
||||
Hi, I'm Leo. I'm a fully hosted AI assistant by Brave. I'm powered by Llama 3.1 8B, a model created by Meta to be performant and applicable to many use cases. Llama is Brave-hosted through our own secure infrastructure.<ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">$1</ph>
|
||||
Hi, I'm Leo. I'm a fully hosted AI assistant by Brave. I'm powered by Llama 3.1 8B, a model created by Meta to be performant and applicable to many use cases. Llama is Brave-hosted through our own secure infrastructure.<ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_INTRO_MESSAGE_CHAT_QWEN" desc="AI Chat intro message for the qwen model" formatter_data="webui=AiChat">
|
||||
Hi, I'm Leo. I'm a fully hosted AI assistant by Brave. I'm powered by Qwen 14B, a model created by Alibaba Cloud to be performant and applicable to many use cases. Qwen is Brave-hosted through our own secure infrastructure.<ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">$1</ph>
|
||||
Hi, I'm Leo. I'm a fully hosted AI assistant by Brave. I'm powered by Qwen 14B, a model created by Alibaba Cloud to be performant and applicable to many use cases. Qwen is Brave-hosted through our own secure infrastructure.<ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_INTRO_MESSAGE_CHAT_DEEPSEEK_R1" desc="AI Chat intro message for the deepseek-r1 model" formatter_data="webui=AiChat">
|
||||
Hi, I'm Leo. I'm a fully hosted AI assistant by Brave. I'm powered by DeepSeek R1, a model created by DeepSeek to perform deep reasoning tasks. <ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">$1</ph>
|
||||
Hi, I'm Leo. I'm a fully hosted AI assistant by Brave. I'm powered by DeepSeek R1, a model created by DeepSeek to perform deep reasoning tasks. <ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_INTRO_MESSAGE_CHAT_CLAUDE_INSTANT" desc="AI Chat intro message for the Claude Instant model" formatter_data="webui=AiChat">
|
||||
Hi, I'm Leo. I'm proxied by Brave and powered by Claude Instant, a model created by Anthropic to power conversational and text processing tasks. Claude Instant is Brave-hosted through our own secure infrastructure.<ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">$1</ph>
|
||||
Hi, I'm Leo. I'm proxied by Brave and powered by Claude Instant, a model created by Anthropic to power conversational and text processing tasks. Claude Instant is Brave-hosted through our own secure infrastructure.<ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_INTRO_MESSAGE_CHAT_CLAUDE_HAIKU" desc="AI Chat intro message for the Claude Haiku model" formatter_data="webui=AiChat">
|
||||
Hi, I'm Leo. I'm proxied by Brave and powered by Claude Haiku, a model created by Anthropic to power conversational and text processing tasks. Claude Haiku is Brave-hosted through our own secure infrastructure.<ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">$1</ph>
|
||||
Hi, I'm Leo. I'm proxied by Brave and powered by Claude Haiku, a model created by Anthropic to power conversational and text processing tasks. Claude Haiku is Brave-hosted through our own secure infrastructure.<ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_INTRO_MESSAGE_CHAT_CLAUDE_SONNET" desc="AI Chat intro message for the Claude Sonnet model" formatter_data="webui=AiChat">
|
||||
Hi, I'm Leo. I'm proxied by Brave and powered by Claude Sonnet, a model created by Anthropic to power conversational and text processing tasks. Claude Sonnet is Brave-hosted through our own secure infrastructure.<ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">$1</ph>
|
||||
Hi, I'm Leo. I'm proxied by Brave and powered by Claude Sonnet, a model created by Anthropic to power conversational and text processing tasks. Claude Sonnet is Brave-hosted through our own secure infrastructure.<ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_MODEL_PREMIUM_LABEL_NON_PREMIUM" desc="Label indentifying that an AI Chat model is a premium model" formatter_data="webui=AiChat">
|
||||
Premium
|
||||
@@ -235,7 +235,7 @@
|
||||
Provide feedback here
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_FEEDBACK_PREMIUM_NOTE" desc="Note about the benefits of a premium subscription" formatter_data="webui=AiChat">
|
||||
Leo Premium provides access to an expanded set of language models for even greater answer nuance. <ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">$1</ph>
|
||||
Leo Premium provides access to an expanded set of language models for even greater answer nuance. <ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_SUBMIT_BUTTON_LABEL" desc="Button label to submit data/form" formatter_data="webui=AiChat">
|
||||
Submit
|
||||
@@ -343,7 +343,7 @@
|
||||
Response Feedback
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_RATE_MESSAGE_PRIVACY_MODAL_DESCRIPTION" desc="A description for the rate message privacy modal" formatter_data="webui=AiChat">
|
||||
Liking or disliking an answer will send rating, conversation, model, language, version, and premium status to Brave in order to improve Leo. <ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">$1</ph>
|
||||
Liking or disliking an answer will send rating, conversation, model, language, version, and premium status to Brave in order to improve Leo. <ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
<message name="IDS_CHAT_UI_SEND_CHAT_BUTTON_LABEL" desc="A button label for sending a chat message" formatter_data="webui=AiChat">
|
||||
Send message to Leo
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
Follow your favorite sources, in a single feed. Just open a tab in Brave, scroll down, and… voila!
|
||||
</message>
|
||||
<message name="IDS_BRAVE_NEWS_INTRO_DESCRIPTION_TWO" desc="Description second paragraph for introduction to Brave News news feed section. Do not translate the title Brave News." formatter_data="webui=BraveNews">
|
||||
Brave News is ad-supported with private, anonymized ads. <ph name="LINK_START">$1</ph>Learn more.<ph name="LINK_END">$1</ph>.
|
||||
Brave News is ad-supported with private, anonymized ads. <ph name="LINK_START">$1</ph>Learn more.<ph name="LINK_END">/$1</ph>.
|
||||
</message>
|
||||
<message name="IDS_BRAVE_NEWS_OPT_IN_ACTION_LABEL" desc="Button text for opting in to Brave News" formatter_data="webui=BraveNews">
|
||||
Turn on Brave News
|
||||
@@ -19,7 +19,7 @@
|
||||
Brave News
|
||||
</message>
|
||||
<message name="IDS_BRAVE_NEWS_BACK_TO_DASHBOARD" desc="Label for the back to dashboard button" formatter_data="webui=BraveNews">
|
||||
Back to <ph name="BEGIN_BOLD">$1</ph>Dashboard<ph name="END_BOLD">$1</ph>
|
||||
Back to <ph name="BEGIN_BOLD">$1</ph>Dashboard<ph name="END_BOLD">/$1</ph>
|
||||
</message>
|
||||
<message name="IDS_BRAVE_NEWS_BACK_BUTTON" desc="Label for the back button" formatter_data="webui=BraveNews">
|
||||
Back
|
||||
|
||||
@@ -13,24 +13,24 @@
|
||||
</message>
|
||||
|
||||
<message name="IDS_BRAVE_SHIELDS_UP" desc="Status label for when Brave Shields is enabled.">
|
||||
<ph name="STATUS_BEFORE">$1</ph>Shields are UP<ph name="STATUS_AFTER">$1</ph> for <ph name="HOST">$2</ph>
|
||||
<ph name="STATUS_BEFORE">$1</ph>Shields are UP<ph name="STATUS_AFTER">/$1</ph> for <ph name="HOST">$2</ph>
|
||||
</message>
|
||||
|
||||
<message name="IDS_BRAVE_SHIELDS_DOWN" desc="Status label for when Brave Shields is disabled.">
|
||||
<ph name="STATUS_BEFORE">$1</ph>Shields are DOWN<ph name="STATUS_AFTER">$1</ph> for <ph name="HOST">$2</ph>
|
||||
<ph name="STATUS_BEFORE">$1</ph>Shields are DOWN<ph name="STATUS_AFTER">/$1</ph> for <ph name="HOST">$2</ph>
|
||||
</message>
|
||||
|
||||
<message name="IDS_BRAVE_SHIELDS_BROKEN" desc="A footnote below the main Shields switch button.">
|
||||
If this site seems broken, try Shields down.
|
||||
<ph name="NOTE_BEFORE">$1</ph>Note: this may reduce Brave's privacy protections.<ph name="NOTE_AFTER">$1</ph>
|
||||
<ph name="NOTE_BEFORE">$1</ph>Note: this may reduce Brave's privacy protections.<ph name="NOTE_AFTER">/$1</ph>
|
||||
</message>
|
||||
|
||||
<message name="IDS_BRAVE_SHIELDS_BLOCKED_NOTE" desc="Description to convey trackers, advertisement and more are being blocked.">
|
||||
Trackers, ads, and more blocked <ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">$1</ph>
|
||||
Trackers, ads, and more blocked <ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
|
||||
<message name="IDS_BRAVE_SHIELDS_NOT_BLOCKED_NOTE" desc="Description to convey trackers, advertisement and more are not being blocked. Do not translate Brave SHields.">
|
||||
Not protected by Brave Shields <ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">$1</ph>
|
||||
Not protected by Brave Shields <ph name="LINK_BEFORE">$1</ph>Learn more<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
|
||||
<message name="IDS_BRAVE_SHIELDS_ADVANCED_CTRLS" desc="A button label to expand/collapse more options.">
|
||||
|
||||
@@ -61,11 +61,11 @@
|
||||
</message>
|
||||
|
||||
<message name="IDS_BRAVE_WELCOME_SEND_REPORTS_LABEL" desc="A checkbox label for user to opt-in opt-out to send diagnostic reports">
|
||||
Send diagnostic reports if you experience a crash or freeze. <ph name="LINK_BEFORE">$1</ph>Learn more.<ph name="LINK_AFTER">$1</ph>
|
||||
Send diagnostic reports if you experience a crash or freeze. <ph name="LINK_BEFORE">$1</ph>Learn more.<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
|
||||
<message name="IDS_BRAVE_WELCOME_SEND_INSIGHTS_LABEL" desc="A checkbox label for user to opt-in opt-out to share anonymous, product insights information">
|
||||
Share private and anonymous product insights about what features are being used by Brave's users. <ph name="LINK_BEFORE">$1</ph>Learn more.<ph name="LINK_AFTER">$1</ph>
|
||||
Share private and anonymous product insights about what features are being used by Brave's users. <ph name="LINK_BEFORE">$1</ph>Learn more.<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
|
||||
<message name="IDS_BRAVE_WELCOME_SETUP_COMPLETE_LABEL" desc="A title for screen when user has completed all the steps">
|
||||
@@ -73,11 +73,11 @@
|
||||
</message>
|
||||
|
||||
<message name="IDS_BRAVE_WELCOME_CHANGE_SETTINGS_NOTE" desc="A footnote with a link to change settings.">
|
||||
Change these choices at any time in Brave at <ph name="LINK_BEFORE1">$1</ph>brave://settings/privacy<ph name="LINK_AFTER2">$1</ph>.
|
||||
Change these choices at any time in Brave at <ph name="LINK_BEFORE1">$1</ph>brave://settings/privacy<ph name="LINK_AFTER2">/$1</ph>.
|
||||
</message>
|
||||
|
||||
<message name="IDS_BRAVE_WELCOME_PRIVACY_POLICY_NOTE" desc="A footnote with a link to Brave's privacy polcy.">
|
||||
Read our full <ph name="LINK_BEFORE">$1</ph>Privacy Policy<ph name="LINK_AFTER">$1</ph>
|
||||
Read our full <ph name="LINK_BEFORE">$1</ph>Privacy Policy<ph name="LINK_AFTER">/$1</ph>
|
||||
</message>
|
||||
|
||||
<message name="IDS_BRAVE_WELCOME_SELECT_THEME_LABEL" desc="A title for screen to select color theme">
|
||||
|
||||
@@ -324,8 +324,8 @@
|
||||
<message name="IDS_BRAVE_WALLET_ICON_URL" desc="Visible assets modal Icon URL label">Icon URL</message>
|
||||
<message name="IDS_BRAVE_WALLET_ADD_ASSET" desc="Asset Panel add asset button">Add asset</message>
|
||||
<message name="IDS_BRAVE_WALLET_ACCOUNT_SETTINGS_DISCLAIMER" desc="Account settings modal warning">WARNING: Never share your private key. Anyone with this private key can take your assets forever.</message>
|
||||
<message name="IDS_BRAVE_WALLET_FIL_EXPORT_PRIVATE_KEY_FORMAT_DESCRIPTION" desc="Filecoin private key format description">NOTE: Private key is provided as a hex-encoded JSON that contains private key and protocol information. <ph name="LINK_START">$1</ph>Learn more<ph name="LINK_END">$1</ph>.</message>
|
||||
<message name="IDS_BRAVE_WALLET_FIL_IMPORT_PRIVATE_KEY_FORMAT_DESCRIPTION" desc="Filecoin private key format description">NOTE: Private key must be provided as a hex-encoded JSON that contains private key and protocol information. <ph name="LINK_START">$1</ph>Learn more<ph name="LINK_END">$1</ph>.</message>
|
||||
<message name="IDS_BRAVE_WALLET_FIL_EXPORT_PRIVATE_KEY_FORMAT_DESCRIPTION" desc="Filecoin private key format description">NOTE: Private key is provided as a hex-encoded JSON that contains private key and protocol information. <ph name="LINK_START">$1</ph>Learn more<ph name="LINK_END">/$1</ph>.</message>
|
||||
<message name="IDS_BRAVE_WALLET_FIL_IMPORT_PRIVATE_KEY_FORMAT_DESCRIPTION" desc="Filecoin private key format description">NOTE: Private key must be provided as a hex-encoded JSON that contains private key and protocol information. <ph name="LINK_START">$1</ph>Learn more<ph name="LINK_END">/$1</ph>.</message>
|
||||
<message name="IDS_BRAVE_WALLET_BTC_IMPORT_PRIVATE_KEY_FORMAT_DESCRIPTION" desc="Bitcoin private key input format description">NOTE: Only <ph name="FORMAT"><ex>zprv</ex>$1</ph> extended keys are supported.</message>
|
||||
<message name="IDS_BRAVE_WALLET_ACCOUNTS_EXPORT" desc="Account list item Export button">Export</message>
|
||||
<message name="IDS_BRAVE_WALLET_ACCOUNTS_DEPOSIT" desc="Account list item Deposit button">Deposit</message>
|
||||
@@ -635,7 +635,7 @@
|
||||
<message name="IDS_BRAVE_WALLET_BUY_DISCLAIMER" desc="Brave disclaimer text in buy screen">Financial and transaction data is processed by our onramp partners. Brave does not collect or have access to such data.</message>
|
||||
<message name="IDS_BRAVE_WALLET_TRANSACTIONS_PARTNER" desc="Transactions partner modal title">Transactions partner</message>
|
||||
<message name="IDS_BRAVE_WALLET_TRANSACTION_PARTNER_CONSENT" desc="Meld consent description">Brave Wallet uses Meld.io to help aggregate and surface various crypto providers for your region. We will share information with Meld.io to complete the transaction, including your wallet address and country code. For more information please read Meld’s terms of use.</message>
|
||||
<message name="IDS_BRAVE_WALLET_MELD_TERMS_OF_USE" desc="Meld terms of use checkbox label">I have read and agree to the <ph name="LINK_BEFORE">$1</ph>Meld's Terms of use<ph name="LINK_AFTER">$1</ph></message>
|
||||
<message name="IDS_BRAVE_WALLET_MELD_TERMS_OF_USE" desc="Meld terms of use checkbox label">I have read and agree to the <ph name="LINK_BEFORE">$1</ph>Meld's Terms of use<ph name="LINK_AFTER">/$1</ph></message>
|
||||
<message name="IDS_BRAVE_WALLET_BEST_OPTION" desc="Best option label for buy option">Best Option</message>
|
||||
<message name="IDS_BRAVE_WALLET_EXCHANGE_RATE_WITH_FEES" desc="Buy exchange rate with fees label">Exchange rate with fees</message>
|
||||
<message name="IDS_BRAVE_WALLET_FEES" desc="Buy fees label">Fees</message>
|
||||
@@ -923,7 +923,7 @@
|
||||
<message name="IDS_BRAVE_WALLET_DISCLOSURES_TITLE" desc="Title text for Wallet Disclosures page">Before we begin</message>
|
||||
<message name="IDS_BRAVE_WALLET_DISCLOSURES_DESCRIPTION" desc="Description text for Wallet Disclosures page">We require that you acknowledge the items below</message>
|
||||
<message name="IDS_BRAVE_WALLET_SELF_CUSTODY_DISCLOSURE_CHECKBOX_TEXT" desc="Self-custody wallet responsibility acknowledgement text">I understand that this is a self-custody wallet, and that I am solely responsible for any associated funds, assets, or accounts, and for taking any appropriate action to secure, protect, and back up my wallet. I understand that Brave cannot access my wallet or reverse transactions on my behalf, and that my recovery phrase is the ONLY way to regain access in the event of a lost password, stolen device, or similar circumstance.</message>
|
||||
<message name="IDS_BRAVE_WALLET_TERMS_OF_SERVICE_CHECKBOX_TEXT" desc="Wallet Terms of use acknowledgement text">I have read and agree to the <ph name="LINK_BEFORE">$1</ph>Terms of use<ph name="LINK_AFTER">$1</ph>.</message>
|
||||
<message name="IDS_BRAVE_WALLET_TERMS_OF_SERVICE_CHECKBOX_TEXT" desc="Wallet Terms of use acknowledgement text">I have read and agree to the <ph name="LINK_BEFORE">$1</ph>Terms of use<ph name="LINK_AFTER">/$1</ph>.</message>
|
||||
<message name="IDS_BRAVE_WALLET_BUY_CRYPTO_BUTTON" desc="Buy crypto button text">Buy crypto</message>
|
||||
<message name="IDS_BRAVE_WALLET_DEPOSIT_CRYPTO_BUTTON" desc="Deposit Crypto button text">Deposit</message>
|
||||
<message name="IDS_BRAVE_WALLET_CHECKING_INSTALLED_EXTENSIONS" desc="Loading text while checking for installed crypto wallet extensions">Checking for wallet extensions...</message>
|
||||
@@ -1077,13 +1077,13 @@
|
||||
<message name="IDS_BRAVE_WALLET_REMOVE_NFT_MODAL_CONFIRM" desc="Remove NFT modal confirm action">Remove</message>
|
||||
<message name="IDS_BRAVE_WALLET_EDIT_NFT_MODAL_TITLE" desc="NFT Import NFT modal title">Edit NFT</message>
|
||||
<message name="IDS_BRAVE_WALLET_ENABLE_NFT_AUTODISCOVERY_MODAL_HEADER" desc="Enable NFT auto-discovery modal header">Want your NFTs displayed automatically?</message>
|
||||
<message name="IDS_BRAVE_WALLET_ENABLE_NFT_AUTODISCOVERY_MODAL_DESCRIPTION" desc="Enable NFT auto-discovery modal description">Brave Wallet can use a third-party service to automatically display your NFTs. Brave will share your wallet addresses with <ph name="BEFORE_UNDERLINE">$1</ph>SimpleHash<ph name="AFTER_UNDERLINE">$1</ph> to provide this service. <ph name="BEFORE_URL">$2</ph>Learn more.<ph name="AFTER_URL">$2</ph></message>
|
||||
<message name="IDS_BRAVE_WALLET_ENABLE_NFT_AUTODISCOVERY_MODAL_DESCRIPTION" desc="Enable NFT auto-discovery modal description">Brave Wallet can use a third-party service to automatically display your NFTs. Brave will share your wallet addresses with <ph name="BEFORE_UNDERLINE">$1</ph>SimpleHash<ph name="AFTER_UNDERLINE">/$1</ph> to provide this service. <ph name="BEFORE_URL">$2</ph>Learn more.<ph name="AFTER_URL">/$2</ph></message>
|
||||
<message name="IDS_BRAVE_WALLET_ENABLE_NFT_AUTODISCOVERY_MODAL_CONFIRM" desc="Enable NFT auto-discovery modal confirm button text">Yes, proceed</message>
|
||||
<message name="IDS_BRAVE_WALLET_ENABLE_NFT_AUTODISCOVERY_MODAL_CANCEL" desc="Enable NFT auto-discovery modal cancel button text">No thanks, I’ll do it manually</message>
|
||||
<message name="IDS_BRAVE_WALLET_AUTO_DISCOVERY_EMPTY_STATE_HEADING" desc="NFTs tab empty state heading when auto discovery is enabled">No NFTs to display</message>
|
||||
<message name="IDS_BRAVE_WALLET_AUTO_DISCOVERY_EMPTY_STATE_SUB_HEADING" desc="NFTs tab empty state sub heading when auto discovery is enabled">Once an NFT is detected, it’ll be displayed here.</message>
|
||||
<message name="IDS_BRAVE_WALLET_AUTO_DISCOVERY_EMPTY_STATE_FOOTER" desc="NFTs tab empty state footer when auto discovery is enabled">Can’t see your NFTs?</message>
|
||||
<message name="IDS_BRAVE_WALLET_AUTO_DISCOVERY_EMPTY_STATE_ACTIONS" desc="NFTs tab empty state action button text when auto discovery is enabled"><ph name="REFRESH_START">$1</ph>Refresh<ph name="REFRESH_END">$1</ph> or <ph name="IMPORT_START">$2</ph>Import Manually<ph name="IMPORT_END">$2</ph></message>
|
||||
<message name="IDS_BRAVE_WALLET_AUTO_DISCOVERY_EMPTY_STATE_ACTIONS" desc="NFTs tab empty state action button text when auto discovery is enabled"><ph name="REFRESH_START">$1</ph>Refresh<ph name="REFRESH_END">/$1</ph> or <ph name="IMPORT_START">$2</ph>Import Manually<ph name="IMPORT_END">/$2</ph></message>
|
||||
<message name="IDS_BRAVE_WALLET_AUTO_DISCOVERY_EMPTY_STATE_REFRESH" desc="NFTs tab empty state refreshing text">Refreshing</message>
|
||||
<message name="IDS_BRAVE_WALLET_NETWORK_FEES" desc="Label for blockchain network fees">Network fees</message>
|
||||
<message name="IDS_WALLET_EIP6963_PROVIDER_NAME" desc="Provider name which will be return when announce ethereum provider">Brave Wallet</message>
|
||||
@@ -1120,7 +1120,7 @@
|
||||
<message name="IDS_BRAVE_WALLET_TRANSACTION_SIMULATION_DETECT_PHISHING" desc="Bullet point for transaction-simulation feature (detect phishing attempts)">Help detect phishing attempts</message>
|
||||
<message name="IDS_BRAVE_WALLET_BUTTON_NO_THANKS" desc="Button text for declining an action">No thanks</message>
|
||||
<message name="IDS_BRAVE_WALLET_BUTTON_ENABLE" desc="Button text for enabling a feature">Enable</message>
|
||||
<message name="IDS_BRAVE_WALLET_TRANSACTION_SIMULATION_TERMS" desc="Explanation of terms of service for transaction simulations">This service is provided by <ph name="BOLD_BEFORE">$1</ph>Blowfish.xyz<ph name="BOLD_AFTER">$1</ph> and is subject to their <ph name="TERMS_LINK_BEFORE">$2</ph>Terms of Service<ph name="TERMS_LINK_AFTER">$2</ph> and <ph name="PRIVACY_POLICY_LINK_BEFORE">$3</ph>Privacy Policy<ph name="PRIVACY_POLICY_LINK_AFTER">$3</ph></message>
|
||||
<message name="IDS_BRAVE_WALLET_TRANSACTION_SIMULATION_TERMS" desc="Explanation of terms of service for transaction simulations">This service is provided by <ph name="BOLD_BEFORE">$1</ph>Blowfish.xyz<ph name="BOLD_AFTER">/$1</ph> and is subject to their <ph name="TERMS_LINK_BEFORE">$2</ph>Terms of Service<ph name="TERMS_LINK_AFTER">/$2</ph> and <ph name="PRIVACY_POLICY_LINK_BEFORE">$3</ph>Privacy Policy<ph name="PRIVACY_POLICY_LINK_AFTER">/$3</ph></message>
|
||||
<message name="IDS_BRAVE_WALLET_AVAILABLE" desc="Available balance label">Available</message>
|
||||
<message name="IDS_BRAVE_WALLET_AVAILABLE_BALANCE_DESCRIPTION" desc="Available balance tooltip description">Funds available for you to use.</message>
|
||||
<message name="IDS_BRAVE_WALLET_PENDING" desc="Pending balance label">Pending</message>
|
||||
|
||||
Reference in New Issue
Block a user