You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `W303` rule ensures that HTML tags in the `msgstr` match the `msgid`. This is crucial for catching broken markup (e.g., missing closing tags).
249
+
250
+
##### Handling intentional deviations and false positives
251
+
252
+
Some W303 warnings are intentional or result from upstream false positives.
253
+
Use the `dennis-ignore: W303` comment in the source files (templates or Python code) within a `TRANSLATORS` comment to suppress these warnings.
254
+
This ensures the ignore instruction is extracted into the `.po` files.
255
+
256
+
-**CJK italic policy**: When replacing `<i>` with locale-conventional quotation marks, tags will no longer match.
257
+
-**Upstream false positive**: Dennis misinterprets certain HTML tags (e.g., `<title>`) within `msgstr`. See https://github.com/mozilla/dennis/issues/213.
258
+
259
+
**Examples in Jinja2 templates:**
260
+
261
+
```jinja
262
+
{# TRANSLATORS: CJK fonts lack native italics; allow substitution with conventional local styling. dennis-ignore: W303 #}
263
+
<p>{{ _('These settings are <strong><i>added</i></strong> to any existing watch configurations.')|safe }}</p>
0 commit comments