1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-12 22:44:11 +00:00

[CL-134] Rename key attribute to reduce typing

This commit is contained in:
Shane Melton
2023-10-06 10:21:50 -07:00
parent 01d8afb89b
commit e297e782e8
3 changed files with 8 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ interface I18nStringPart {
* tags.
*
* @example
* <div bit-i18n key="exampleI18nKey">
* <div bit-i18n="exampleI18nKey">
* <a *bit-i18n-part="let text" routerLink="./first-link">{{ text }}</a>
* <a *bit-i18n-part="let text" routerLink="./bold-link">
* <strong>{{ text }}</strong>
@@ -55,7 +55,7 @@ interface I18nStringPart {
standalone: true,
})
export class I18nComponent implements AfterContentInit {
@Input("key")
@Input("bit-i18n")
translationKey: string;
/**

View File

@@ -31,7 +31,7 @@ content will be rendered as is.
"This is an example with <0>link</0> tags and <1>bold</1> tags.
The entire sentence can be <2>translated as a whole</2> and re-arranged according to each language's grammar rules."
-->
<div bit-i18n key="basicExample">
<div bit-i18n="basicExample">
<!-- <0></0> -->
<a *bit-i18n-part="let text" routerLink="./">{{ text }}</a>
<!-- <1></1> -->
@@ -59,7 +59,7 @@ be rendered as is.
"This is an example with <0>link</0> tags and <1>bold</1> tags.
The entire sentence can be <2>translated as a whole</2> and re-arranged according to each language's grammar rules."
-->
<div bit-i18n key="basicExample">
<div bit-i18n="basicExample">
<!-- <0></0> -->
<a *bit-i18n-part="let text" routerLink="./">{{ text }}</a>
<!-- <1></1> -->
@@ -82,7 +82,7 @@ You can also pass arguments to the `i18nService.t()` method via the `[args]` inp
<!-- argExample in messages.json
`This is an example with <0>link</0> tags and $SOME_ARG$.`
-->
<div bit-i18n key="argExample" [args]="['passed args']">
<div bit-i18n="argExample" [args]="['passed args']">
<!-- <0></0> -->
<a *bit-i18n-part="let text" routerLink="./">{{ text }}</a>
</div>

View File

@@ -47,7 +47,7 @@ export const Basic: Story = {
render: (args) => ({
props: args,
template: `
<div bit-i18n key="basicExample">
<div bit-i18n="basicExample">
<a *bit-i18n-part="let text" href="javascript:;">{{ text }}</a>
<strong *bit-i18n-part="let text">{{ text }}</strong>
<a *bit-i18n-part="let text" href="https://localization.blog/2022/05/16/i18n-best-practices-keep-it-together/">
@@ -62,7 +62,7 @@ export const ArgsExample: Story = {
render: (args) => ({
props: args,
template: `
<p bit-i18n key="argExample" [args]="['passed args']">
<p bit-i18n="argExample" [args]="['passed args']">
<a *bit-i18n-part="let text" href="javascript:;">{{ text }}</a>
<strong *bit-i18n-part="let text">{{ text }}</strong>
</p>
@@ -74,7 +74,7 @@ export const MissingTemplate: Story = {
render: (args) => ({
props: args,
template: `
<p bit-i18n key="basicExample">
<p bit-i18n="basicExample">
<a *bit-i18n-part="let text" href="javascript:;">{{ text }}</a>
<strong *bit-i18n-part="let text">{{ text }}</strong>
</p>