Skip to content

Commit ae0eca8

Browse files
chore: update eslint rule for i18n
1 parent b276df7 commit ae0eca8

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

.eslintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@
3333
"no-nested-ternary": 0,
3434
"prettier/prettier": "off",
3535
"no-shadow": "warn",
36-
"camelcase": "warn"
36+
"camelcase": "warn",
37+
"@wordpress/i18n-text-domain": ["error", {
38+
"allowedTextDomain": ["templates-patterns-collection"]
39+
}]
3740
},
3841
"ignorePatterns": ["**/vendor/**"]
3942
}

editor/src/components/filters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const Filters = ( {
2727
return (
2828
<div className="filters">
2929
<div className="display-sorting">
30-
<div className="sorting-label">{ __( 'Sort by' ) }</div>
30+
<div className="sorting-label">{ __( 'Sort by','templates-patterns-collection' ) }</div>
3131

3232
<div className="sorting-filter">
3333
{ Object.keys( sortByOptions ).map( ( i ) => (

editor/src/components/list-item.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ const ListItem = ( {
158158
<div className="popover-content">
159159
<TextControl
160160
label={ __(
161-
'Template Name'
161+
'Template Name',
162+
'templates-patterns-collection'
162163
) }
163164
value={ itemName }
164165
onChange={ setItemName }
@@ -272,7 +273,7 @@ const ListItem = ( {
272273
<div className="row-controls">
273274
{ item.link ? (
274275
<Tooltip
275-
text={ __( 'This template is synced to a page.' ) }
276+
text={ __( 'This template is synced to a page.', 'templates-patterns-collection' ) }
276277
>
277278
<Button
278279
label={ __(

editor/src/components/preview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const Preview = ( { isFetching, importBlocks } ) => {
6262
<div className="tpc-modal-content">
6363
<div className="preview-header">
6464
<div className="left">
65-
{ item.template_name || __( 'Template' ) }
65+
{ item.template_name || __( 'Template','templates-patterns-collection' ) }
6666
</div>
6767

6868
<div className="right">

0 commit comments

Comments
 (0)