Skip to content

Commit cd5831a

Browse files
Deploying to gh-pages from @ 4f3ce50 🚀
1 parent b0c6c6c commit cd5831a

10 files changed

Lines changed: 106 additions & 19 deletions

articles/custom-diagnostic.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

articles/developers.html

Lines changed: 37 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

articles/developers.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,38 @@ paste0("<a href='/index.html'>", tr_("Home page"), "</a>")
350350
Generally, you want to help the translator spend as much time as
351351
possible helping you out.
352352

353+
### Skipping translation
354+
355+
Another way to help translators is to not ask them to translate things
356+
that don’t need translation. There are three ways to suppress
357+
translation extraction, all using comments:
358+
359+
- Add `# notranslate` to the end of a line to prevent any messages on
360+
that line from being extracted.
361+
362+
``` r
363+
# Don't extract this message
364+
message("A message for the developer") # notranslate
365+
```
366+
367+
- You can also surround a block of code with `# notranslate start` and
368+
`# notranslate end`. Any messages inside that block will not be
369+
extracted.
370+
371+
``` r
372+
# notranslate start
373+
message("A message for the developer")
374+
message("Another message for the developer")
375+
# notranslate end
376+
```
377+
378+
This is useful when you have a block of code that generates messages
379+
that are not intended for the user.
380+
381+
The same comment works in both R and C/C++ code; in the latter case,
382+
note that it must be part of a normal C comment,
383+
e.g. `// # notranslate`.
384+
353385
### Googling
354386

355387
It’s worth noting that that non-English messages are often harder to

pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ articles:
55
custom-diagnostic: custom-diagnostic.html
66
developers: developers.html
77
translators: translators.html
8-
last_built: 2025-12-19T09:16Z
8+
last_built: 2025-12-20T06:04Z
99
urls:
1010
reference: https://michaelchirico.github.io/potools/reference
1111
article: https://michaelchirico.github.io/potools/articles

reference/get_message_data.html

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reference/get_message_data.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ A `data.table` with the following schema:
9393
- `is_templated`, `logical`, whether the string is templatable (e.g.,
9494
uses `%s` or other formatting markers)
9595

96+
## Skipping translation
97+
98+
It is possible to skip translation for certain messages by adding a
99+
comment with `# notranslate` on the same line as the message. For more
100+
details, see the "Skipping translation" section in
101+
[`vignette("developers", package = "potools")`](https://michaelchirico.github.io/potools/articles/developers.md).
102+
96103
## See also
97104

98105
[`translate_package()`](https://michaelchirico.github.io/potools/reference/translate_package.md),

reference/notranslate.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="refresh" content="0;URL=https://michaelchirico.github.io/potools/reference/get_message_data.html" />
4+
<meta name="robots" content="noindex">
5+
<link rel="canonical" href="https://michaelchirico.github.io/potools/reference/get_message_data.html">
6+
</head>
7+
</html>
8+

reference/write_po_file.html

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reference/write_po_file.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ print(metadata)
278278
#> msgstr ""
279279
#> "Project-Id-Version: potoolsExample 0.0.1\n"
280280
#> "Report-Msgid-Bugs-To: https://github.com/ruser/potoolsExample/issues\n"
281-
#> "POT-Creation-Date: 2025-12-19 09:16+0000\n"
282-
#> "PO-Revision-Date: 2025-12-19 09:16+0000\n"
281+
#> "POT-Creation-Date: 2025-12-20 06:04+0000\n"
282+
#> "PO-Revision-Date: 2025-12-20 06:04+0000\n"
283283
#> "Last-Translator: R User <ruser@gmail.com>\n"
284284
#> "Language-Team: ar_SY\n"
285285
#> "Language: ar_SY\n"
@@ -298,8 +298,8 @@ writeLines(readLines(tmp_po))
298298
#> msgstr ""
299299
#> "Project-Id-Version: potoolsExample 0.0.1\n"
300300
#> "Report-Msgid-Bugs-To: https://github.com/ruser/potoolsExample/issues\n"
301-
#> "POT-Creation-Date: 2025-12-19 09:16+0000\n"
302-
#> "PO-Revision-Date: 2025-12-19 09:16+0000\n"
301+
#> "POT-Creation-Date: 2025-12-20 06:04+0000\n"
302+
#> "PO-Revision-Date: 2025-12-20 06:04+0000\n"
303303
#> "Last-Translator: R User <ruser@gmail.com>\n"
304304
#> "Language-Team: ar_SY\n"
305305
#> "Language: ar_SY\n"
@@ -327,7 +327,7 @@ writeLines(readLines(tmp_pot))
327327
#> msgstr ""
328328
#> "Project-Id-Version: potoolsExample 0.0.1\n"
329329
#> "Report-Msgid-Bugs-To: https://github.com/ruser/potoolsExample/issues\n"
330-
#> "POT-Creation-Date: 2025-12-19 09:16+0000\n"
330+
#> "POT-Creation-Date: 2025-12-20 06:04+0000\n"
331331
#> "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
332332
#> "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
333333
#> "Language-Team: LANGUAGE <LL@li.org>\n"

search.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)