@the-bearded-bear/claude-craft 8.8.1 → 8.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dev/i18n/de/Angular/commands/check-compliance.md +218 -168
- package/Dev/i18n/de/Common/agents/refactoring-specialist.md +146 -69
- package/Dev/i18n/de/Common/commands/add-technology.md +166 -68
- package/Dev/i18n/de/Common/commands/setup-ci.md +216 -33
- package/Dev/i18n/de/Laravel/commands/check-compliance.md +223 -115
- package/Dev/i18n/de/Python/checklists/new-feature.md +319 -44
- package/Dev/i18n/de/React/rules/02-architecture.md +483 -322
- package/Dev/i18n/de/React/rules/03-coding-standards.md +584 -368
- package/Dev/i18n/de/Symfony/commands/check-compliance.md +186 -114
- package/Dev/i18n/de/Symfony/rules/07-testing-symfony.md +679 -10
- package/Dev/i18n/de/UIUX/commands/a11y-component.md +284 -26
- package/Dev/i18n/de/UIUX/commands/design-tokens.md +199 -35
- package/Dev/i18n/de/UIUX/commands/user-flow.md +179 -16
- package/Dev/i18n/de/VueJS/commands/check-compliance.md +227 -102
- package/Dev/i18n/es/Angular/commands/check-compliance.md +217 -167
- package/Dev/i18n/es/Common/commands/add-technology.md +158 -60
- package/Dev/i18n/es/Laravel/commands/check-compliance.md +223 -115
- package/Dev/i18n/es/React/commands/check-testing.md +263 -169
- package/Dev/i18n/es/ReactNative/commands/check-testing.md +256 -198
- package/Dev/i18n/es/Symfony/commands/check-compliance.md +189 -117
- package/Dev/i18n/es/Symfony/commands/check-testing.md +301 -102
- package/Dev/i18n/es/Symfony/commands/migration-plan.md +267 -34
- package/Dev/i18n/es/UIUX/commands/a11y-component.md +274 -16
- package/Dev/i18n/es/UIUX/commands/design-tokens.md +186 -22
- package/Dev/i18n/es/UIUX/commands/user-flow.md +173 -10
- package/Dev/i18n/es/VueJS/commands/check-compliance.md +227 -102
- package/Dev/i18n/fr/Angular/commands/check-compliance.md +217 -167
- package/Dev/i18n/fr/Common/commands/ralph-run.md +138 -60
- package/Dev/i18n/fr/Laravel/commands/check-compliance.md +223 -115
- package/Dev/i18n/fr/React/commands/check-architecture.md +370 -53
- package/Dev/i18n/fr/React/commands/check-code-quality.md +454 -64
- package/Dev/i18n/fr/React/commands/check-testing.md +476 -102
- package/Dev/i18n/fr/Symfony/commands/check-compliance.md +188 -116
- package/Dev/i18n/fr/VueJS/commands/check-compliance.md +227 -102
- package/Dev/i18n/pt/Angular/commands/check-compliance.md +225 -175
- package/Dev/i18n/pt/Common/agents/ralph-conductor.md +211 -30
- package/Dev/i18n/pt/Common/commands/add-technology.md +149 -51
- package/Dev/i18n/pt/Common/commands/ralph-run.md +239 -35
- package/Dev/i18n/pt/Flutter/commands/analyze-performance.md +331 -46
- package/Dev/i18n/pt/Flutter/commands/check-compliance.md +234 -29
- package/Dev/i18n/pt/Flutter/commands/generate-feature.md +526 -51
- package/Dev/i18n/pt/Flutter/commands/generate-widget.md +515 -27
- package/Dev/i18n/pt/Flutter/commands/golden-update.md +322 -46
- package/Dev/i18n/pt/Flutter/commands/localization-check.md +278 -37
- package/Dev/i18n/pt/Laravel/commands/check-compliance.md +212 -104
- package/Dev/i18n/pt/React/commands/accessibility-check.md +151 -42
- package/Dev/i18n/pt/React/commands/bundle-analyze.md +300 -25
- package/Dev/i18n/pt/React/commands/check-architecture.md +369 -34
- package/Dev/i18n/pt/React/commands/check-code-quality.md +440 -34
- package/Dev/i18n/pt/React/commands/check-compliance.md +232 -62
- package/Dev/i18n/pt/React/commands/check-security.md +370 -31
- package/Dev/i18n/pt/React/commands/check-testing.md +473 -43
- package/Dev/i18n/pt/React/commands/generate-component.md +454 -19
- package/Dev/i18n/pt/React/commands/generate-hook.md +425 -24
- package/Dev/i18n/pt/React/commands/storybook-story.md +520 -35
- package/Dev/i18n/pt/ReactNative/commands/app-size.md +358 -387
- package/Dev/i18n/pt/ReactNative/commands/check-code-quality.md +246 -75
- package/Dev/i18n/pt/ReactNative/commands/check-compliance.md +191 -85
- package/Dev/i18n/pt/ReactNative/commands/check-security.md +363 -115
- package/Dev/i18n/pt/ReactNative/commands/check-testing.md +269 -79
- package/Dev/i18n/pt/ReactNative/commands/generate-screen.md +491 -324
- package/Dev/i18n/pt/ReactNative/commands/native-module.md +539 -82
- package/Dev/i18n/pt/ReactNative/commands/store-prepare.md +429 -185
- package/Dev/i18n/pt/ReactNative/rules/02-architecture.md +1084 -31
- package/Dev/i18n/pt/Symfony/commands/check-compliance.md +195 -123
- package/Dev/i18n/pt/UIUX/commands/a11y-audit.md +208 -24
- package/Dev/i18n/pt/UIUX/commands/a11y-component.md +281 -23
- package/Dev/i18n/pt/UIUX/commands/design-tokens.md +197 -33
- package/Dev/i18n/pt/UIUX/commands/user-flow.md +183 -20
- package/Dev/i18n/pt/VueJS/commands/check-compliance.md +228 -103
- package/Dev/i18n/pt/Workflow/commands/analyze.md +147 -146
- package/Dev/i18n/pt/Workflow/commands/design.md +205 -204
- package/Dev/i18n/pt/Workflow/commands/implement.md +184 -184
- package/Project/i18n/de/Sprint/commands/dev.md +339 -86
- package/Project/i18n/es/Sprint/commands/dev.md +342 -91
- package/Project/i18n/pt/Sprint/commands/dev.md +343 -92
- package/bundles/cursor/.cursorrules +1 -1
- package/bundles/windsurf/.windsurfrules +1 -1
- package/package.json +1 -1
|
@@ -1,79 +1,320 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Verificação de Traduções
|
|
3
|
+
argument-hint: [arguments]
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
#
|
|
6
|
+
# Verificação de Traduções
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Você é um desenvolvedor Flutter sênior. Você deve verificar a completude e a coerência das traduções (i18n) do projeto.
|
|
8
9
|
|
|
9
|
-
##
|
|
10
|
+
## Argumentos
|
|
11
|
+
$ARGUMENTS
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
Argumentos:
|
|
14
|
+
- (Opcional) Idioma a verificar (ex: `fr`, `en`, `all`)
|
|
15
|
+
|
|
16
|
+
Exemplo: `/flutter:localization-check all`
|
|
17
|
+
|
|
18
|
+
## Modo de Planejamento
|
|
19
|
+
|
|
20
|
+
> O modo de planejamento é ativado automaticamente quando o escopo abrange múltiplos módulos ou requer investigação transversal.
|
|
21
|
+
|
|
22
|
+
## MISSÃO
|
|
23
|
+
|
|
24
|
+
### Etapa 1: Identificar a Configuração i18n
|
|
12
25
|
|
|
13
26
|
```yaml
|
|
14
27
|
# pubspec.yaml
|
|
15
28
|
dependencies:
|
|
16
29
|
flutter_localizations:
|
|
17
30
|
sdk: flutter
|
|
18
|
-
intl:
|
|
31
|
+
intl: ^0.19.0
|
|
19
32
|
|
|
20
33
|
flutter:
|
|
21
34
|
generate: true
|
|
22
|
-
```
|
|
23
35
|
|
|
24
|
-
```yaml
|
|
25
36
|
# l10n.yaml
|
|
26
37
|
arb-dir: lib/l10n
|
|
27
38
|
template-arb-file: app_en.arb
|
|
28
39
|
output-localization-file: app_localizations.dart
|
|
40
|
+
output-class: AppLocalizations
|
|
29
41
|
```
|
|
30
42
|
|
|
31
|
-
### 2
|
|
43
|
+
### Etapa 2: Analisar os Arquivos ARB
|
|
32
44
|
|
|
33
45
|
```bash
|
|
34
|
-
#
|
|
35
|
-
|
|
46
|
+
# Listar os arquivos de tradução
|
|
47
|
+
ls -la lib/l10n/
|
|
36
48
|
|
|
37
|
-
#
|
|
38
|
-
|
|
49
|
+
# Gerar os arquivos Dart
|
|
50
|
+
flutter gen-l10n
|
|
39
51
|
```
|
|
40
52
|
|
|
41
|
-
### 3
|
|
53
|
+
### Etapa 3: Verificar as Chaves
|
|
54
|
+
|
|
55
|
+
```dart
|
|
56
|
+
// Script de verificação (executar manualmente ou via teste)
|
|
57
|
+
import 'dart:convert';
|
|
58
|
+
import 'dart:io';
|
|
59
|
+
|
|
60
|
+
void main() {
|
|
61
|
+
final arbFiles = Directory('lib/l10n')
|
|
62
|
+
.listSync()
|
|
63
|
+
.whereType<File>()
|
|
64
|
+
.where((f) => f.path.endsWith('.arb'));
|
|
65
|
+
|
|
66
|
+
final Map<String, Map<String, dynamic>> translations = {};
|
|
67
|
+
|
|
68
|
+
for (final file in arbFiles) {
|
|
69
|
+
final lang = file.path.split('app_').last.replaceAll('.arb', '');
|
|
70
|
+
final content = jsonDecode(file.readAsStringSync()) as Map<String, dynamic>;
|
|
71
|
+
translations[lang] = content;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Encontrar o idioma de referência (template)
|
|
75
|
+
final reference = translations['en']!;
|
|
76
|
+
final referenceKeys = reference.keys
|
|
77
|
+
.where((k) => !k.startsWith('@'))
|
|
78
|
+
.toSet();
|
|
79
|
+
|
|
80
|
+
print('Idioma de referência: en');
|
|
81
|
+
print('Quantidade de chaves: ${referenceKeys.length}');
|
|
82
|
+
print('');
|
|
83
|
+
|
|
84
|
+
for (final entry in translations.entries) {
|
|
85
|
+
if (entry.key == 'en') continue;
|
|
86
|
+
|
|
87
|
+
final keys = entry.value.keys
|
|
88
|
+
.where((k) => !k.startsWith('@'))
|
|
89
|
+
.toSet();
|
|
90
|
+
|
|
91
|
+
final missing = referenceKeys.difference(keys);
|
|
92
|
+
final extra = keys.difference(referenceKeys);
|
|
93
|
+
|
|
94
|
+
print('Idioma: ${entry.key}');
|
|
95
|
+
print(' Chaves: ${keys.length}');
|
|
96
|
+
print(' Faltando: ${missing.length}');
|
|
97
|
+
print(' Extras: ${extra.length}');
|
|
98
|
+
|
|
99
|
+
if (missing.isNotEmpty) {
|
|
100
|
+
print(' Chaves faltando:');
|
|
101
|
+
for (final key in missing) {
|
|
102
|
+
print(' - $key');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
print('');
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Etapa 4: Verificar o Uso
|
|
42
111
|
|
|
43
112
|
```bash
|
|
44
|
-
#
|
|
45
|
-
|
|
113
|
+
# Procurar chaves hardcoded
|
|
114
|
+
grep -rn "Text('" lib/ --include="*.dart" | grep -v "AppLocalizations"
|
|
115
|
+
grep -rn 'Text("' lib/ --include="*.dart" | grep -v "AppLocalizations"
|
|
46
116
|
|
|
47
|
-
#
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
117
|
+
# Procurar usos corretos
|
|
118
|
+
grep -rn "AppLocalizations.of(context)" lib/ --include="*.dart"
|
|
119
|
+
grep -rn "context.l10n" lib/ --include="*.dart" # Se extensão disponível
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Etapa 5: Gerar o Relatório
|
|
51
123
|
|
|
52
|
-
# Encontrar chaves faltantes
|
|
53
|
-
comm -23 <(jq -r 'keys[]' app_en.arb | sort) <(jq -r 'keys[]' app_pt.arb | sort)
|
|
54
124
|
```
|
|
125
|
+
══════════════════════════════════════════════════════════════
|
|
126
|
+
🌍 RELATÓRIO DE LOCALIZAÇÃO
|
|
127
|
+
══════════════════════════════════════════════════════════════
|
|
128
|
+
|
|
129
|
+
──────────────────────────────────────────────────────────────
|
|
130
|
+
📊 RESUMO
|
|
131
|
+
──────────────────────────────────────────────────────────────
|
|
132
|
+
|
|
133
|
+
| Idioma | Chaves | Completude | Status |
|
|
134
|
+
|----------|--------|------------|--------|
|
|
135
|
+
| en (ref) | 145 | 100% | ✅ |
|
|
136
|
+
| fr | 142 | 98% | ⚠️ |
|
|
137
|
+
| de | 130 | 90% | ⚠️ |
|
|
138
|
+
| es | 145 | 100% | ✅ |
|
|
139
|
+
| ja | 120 | 83% | ❌ |
|
|
140
|
+
|
|
141
|
+
──────────────────────────────────────────────────────────────
|
|
142
|
+
❌ CHAVES FALTANDO
|
|
143
|
+
──────────────────────────────────────────────────────────────
|
|
144
|
+
|
|
145
|
+
### fr (3 chaves faltando)
|
|
55
146
|
|
|
56
|
-
|
|
147
|
+
| Chave | Valor EN | Prioridade |
|
|
148
|
+
|------------------|-------------------|------------|
|
|
149
|
+
| `orderCancelled` | "Order cancelled" | Alta |
|
|
150
|
+
| `paymentFailed` | "Payment failed" | Alta |
|
|
151
|
+
| `retryButton` | "Retry" | Média |
|
|
152
|
+
|
|
153
|
+
### de (15 chaves faltando)
|
|
154
|
+
|
|
155
|
+
| Chave | Valor EN | Prioridade |
|
|
156
|
+
|------------------|------------|------------|
|
|
157
|
+
| `settingsTitle` | "Settings" | Alta |
|
|
158
|
+
| `profileSection` | "Profile" | Média |
|
|
159
|
+
| ... | ... | ... |
|
|
160
|
+
|
|
161
|
+
### ja (25 chaves faltando)
|
|
162
|
+
|
|
163
|
+
[Lista completa no arquivo report_ja.md]
|
|
164
|
+
|
|
165
|
+
──────────────────────────────────────────────────────────────
|
|
166
|
+
⚠️ CHAVES NÃO UTILIZADAS
|
|
167
|
+
──────────────────────────────────────────────────────────────
|
|
168
|
+
|
|
169
|
+
As seguintes chaves estão definidas mas não são utilizadas no código:
|
|
170
|
+
|
|
171
|
+
| Chave | Idiomas | Ação |
|
|
172
|
+
|---------------------|------------|----------|
|
|
173
|
+
| `oldFeatureTitle` | en, fr, de | Remover? |
|
|
174
|
+
| `deprecatedMessage` | en, fr | Remover? |
|
|
175
|
+
| `testKey` | en | Remover |
|
|
176
|
+
|
|
177
|
+
──────────────────────────────────────────────────────────────
|
|
178
|
+
🔍 TEXTOS HARDCODED
|
|
179
|
+
──────────────────────────────────────────────────────────────
|
|
180
|
+
|
|
181
|
+
Arquivos com textos potencialmente não traduzidos:
|
|
182
|
+
|
|
183
|
+
| Arquivo | Linha | Texto |
|
|
184
|
+
|------------------------------|-------|-----------------------------|
|
|
185
|
+
| lib/screens/home.dart | 45 | `Text('Welcome')` |
|
|
186
|
+
| lib/widgets/header.dart | 23 | `Text("Loading...")` |
|
|
187
|
+
| lib/screens/error.dart | 12 | `Text('An error occurred')` |
|
|
188
|
+
|
|
189
|
+
──────────────────────────────────────────────────────────────
|
|
190
|
+
📝 BOAS PRÁTICAS
|
|
191
|
+
──────────────────────────────────────────────────────────────
|
|
192
|
+
|
|
193
|
+
### Extensão Recomendada
|
|
57
194
|
|
|
58
195
|
```dart
|
|
59
|
-
//
|
|
60
|
-
|
|
196
|
+
// lib/core/extensions/l10n_extension.dart
|
|
197
|
+
import 'package:flutter/widgets.dart';
|
|
198
|
+
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
|
199
|
+
|
|
200
|
+
extension L10nExtension on BuildContext {
|
|
201
|
+
AppLocalizations get l10n => AppLocalizations.of(this)!;
|
|
202
|
+
}
|
|
61
203
|
|
|
62
|
-
//
|
|
63
|
-
Text(
|
|
204
|
+
// Uso
|
|
205
|
+
Text(context.l10n.welcomeMessage)
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Formato das Chaves
|
|
64
209
|
|
|
65
|
-
|
|
66
|
-
|
|
210
|
+
```json
|
|
211
|
+
// app_en.arb
|
|
212
|
+
{
|
|
213
|
+
"welcomeMessage": "Welcome, {name}!",
|
|
214
|
+
"@welcomeMessage": {
|
|
215
|
+
"description": "Welcome message with user name",
|
|
216
|
+
"placeholders": {
|
|
217
|
+
"name": {
|
|
218
|
+
"type": "String",
|
|
219
|
+
"example": "John"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"itemCount": "{count, plural, =0{No items} =1{1 item} other{{count} items}}",
|
|
224
|
+
"@itemCount": {
|
|
225
|
+
"description": "Number of items",
|
|
226
|
+
"placeholders": {
|
|
227
|
+
"count": {
|
|
228
|
+
"type": "int"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
67
233
|
```
|
|
68
234
|
|
|
69
|
-
|
|
235
|
+
──────────────────────────────────────────────────────────────
|
|
236
|
+
🔧 COMANDOS
|
|
237
|
+
──────────────────────────────────────────────────────────────
|
|
238
|
+
|
|
239
|
+
# Gerar os arquivos de localização
|
|
240
|
+
flutter gen-l10n
|
|
241
|
+
|
|
242
|
+
# Verificar a sintaxe ARB
|
|
243
|
+
dart run intl_utils:check
|
|
70
244
|
|
|
71
|
-
|
|
245
|
+
# Extrair novas chaves (se estiver usando intl_utils)
|
|
246
|
+
dart run intl_utils:extract
|
|
247
|
+
|
|
248
|
+
──────────────────────────────────────────────────────────────
|
|
249
|
+
🎯 AÇÕES PRIORITÁRIAS
|
|
250
|
+
──────────────────────────────────────────────────────────────
|
|
251
|
+
|
|
252
|
+
1. [ ] Traduzir 3 chaves faltando em francês (crítico)
|
|
253
|
+
2. [ ] Traduzir 15 chaves faltando em alemão
|
|
254
|
+
3. [ ] Remover 3 chaves não utilizadas
|
|
255
|
+
4. [ ] Converter 3 textos hardcoded em chaves i18n
|
|
256
|
+
5. [ ] Atualizar as traduções em japonês (25 chaves)
|
|
257
|
+
```
|
|
72
258
|
|
|
73
|
-
|
|
259
|
+
### Etapa 6: Template ARB
|
|
74
260
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
-
|
|
261
|
+
```json
|
|
262
|
+
// lib/l10n/app_en.arb
|
|
263
|
+
{
|
|
264
|
+
"@@locale": "en",
|
|
265
|
+
"@@last_modified": "2024-01-15T10:30:00Z",
|
|
266
|
+
|
|
267
|
+
"appTitle": "My App",
|
|
268
|
+
"@appTitle": {
|
|
269
|
+
"description": "The title of the application"
|
|
270
|
+
},
|
|
271
|
+
|
|
272
|
+
"welcomeMessage": "Welcome, {userName}!",
|
|
273
|
+
"@welcomeMessage": {
|
|
274
|
+
"description": "Welcome message shown on home screen",
|
|
275
|
+
"placeholders": {
|
|
276
|
+
"userName": {
|
|
277
|
+
"type": "String",
|
|
278
|
+
"example": "John"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
|
|
283
|
+
"itemsInCart": "{count, plural, =0{Your cart is empty} =1{1 item in cart} other{{count} items in cart}}",
|
|
284
|
+
"@itemsInCart": {
|
|
285
|
+
"description": "Shows number of items in shopping cart",
|
|
286
|
+
"placeholders": {
|
|
287
|
+
"count": {
|
|
288
|
+
"type": "int",
|
|
289
|
+
"format": "compact"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
|
|
294
|
+
"orderDate": "Ordered on {date}",
|
|
295
|
+
"@orderDate": {
|
|
296
|
+
"description": "Shows when an order was placed",
|
|
297
|
+
"placeholders": {
|
|
298
|
+
"date": {
|
|
299
|
+
"type": "DateTime",
|
|
300
|
+
"format": "yMMMd"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
|
|
305
|
+
"price": "{amount}",
|
|
306
|
+
"@price": {
|
|
307
|
+
"description": "Formatted price",
|
|
308
|
+
"placeholders": {
|
|
309
|
+
"amount": {
|
|
310
|
+
"type": "double",
|
|
311
|
+
"format": "currency",
|
|
312
|
+
"optionalParameters": {
|
|
313
|
+
"symbol": "€",
|
|
314
|
+
"decimalDigits": 2
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
```
|