Skip to content

Commit 8c8f06d

Browse files
committed
pattern match translations in jsx
1 parent 8716464 commit 8c8f06d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

config/i18n-tasks.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,12 @@ search:
9898
# - '{devise,simple_form}.*'
9999

100100
## Consider these keys used:
101-
ignore_unused:
102-
- 'patient.call_log.table.view_more'
103-
- 'patient.call_log.table.view_less'
101+
# ignore_unused:
102+
# - 'activerecord.attributes.*'
103+
# - '{devise,kaminari,will_paginate}.*'
104+
# - 'simple_form.{yes,no}'
105+
# - 'simple_form.{placeholders,hints,labels}.*'
106+
# - 'simple_form.{error_notification,required}.:'
104107

105108
## Exclude these keys from the `i18n-tasks eq-base' report:
106109
# ignore_eq_base:
@@ -129,3 +132,8 @@ ignore_unused:
129132
#
130133
# <%# I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
131134
# patterns: [['\bSpree\.t[( ]\s*%{key}', 'spree.%{key}']] %>
135+
136+
<% I18n::Tasks.add_scanner 'I18n::Tasks::Scanners::PatternMapper',
137+
paths: ['app/javascript'],
138+
only: %w(*.jsx),
139+
patterns: [['\bi18n\.t\(\s*%{key}', '%{key}']] %>

0 commit comments

Comments
 (0)