generated from extendr/helloextendr
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add FR translation for R-messages (#19)
* add FR message translation * wrap cli_abort for translation * add test * add NEWS * fix typos
- Loading branch information
Showing
8 changed files
with
88 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: tok 0.1.4.9000\n" | ||
"POT-Creation-Date: 2024-09-04 19:29+0200\n" | ||
"PO-Revision-Date: 2024-09-04 19:39+0200\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"Language: fr\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"X-Generator: Poedit 3.4.3\n" | ||
|
||
#: encoding.R:29 | ||
msgid "Expected class {.cls REncoding} but got {.cls {class(encoding)}}." | ||
msgstr "Classe attendue {.cls REncoding}. Ici la classe est {.cls {class(encoding)}}." | ||
|
||
#: tokenizer.R:86 tokenizer.R:97 | ||
msgid "This is a static method. Not available for tokenizers instances." | ||
msgstr "Il s'agit d'une méthode statique. Elle n'est pas disponible pour les instances de tokenizers." | ||
|
||
#: tokenizer.R:107 | ||
msgid "{.arg trainer} must inherit from {.cls tok_trainer}." | ||
msgstr "{.arg trainer} doit hériter de {.cls tok_trainer}." | ||
|
||
#: tokenizer.R:230 | ||
msgid "Can't be set this way, use {.fn enable_padding}." | ||
msgstr "Ne peut pas être défini de cette manière, vous devez utilisez {.fn enable_padding}." | ||
|
||
#: tokenizer.R:238 | ||
msgid "Can't be set this way, use {.fn enable_truncation}." | ||
msgstr "Ne peut pas être défini de cette manière, vous devez utilisez {.fn enable_truncation}." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: tok 0.1.4.9000\n" | ||
"POT-Creation-Date: 2024-09-04 19:29+0200\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||
"Language: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
|
||
#: encoding.R:29 | ||
msgid "Expected class {.cls REncoding} but got {.cls {class(encoding)}}." | ||
msgstr "" | ||
|
||
#: tokenizer.R:86 tokenizer.R:97 | ||
msgid "This is a static method. Not available for tokenizers instances." | ||
msgstr "" | ||
|
||
#: tokenizer.R:107 | ||
msgid "{.arg trainer} must inherit from {.cls tok_trainer}." | ||
msgstr "" | ||
|
||
#: tokenizer.R:230 | ||
msgid "Can't be set this way, use {.fn enable_padding}." | ||
msgstr "" | ||
|
||
#: tokenizer.R:238 | ||
msgid "Can't be set this way, use {.fn enable_truncation}." | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
test_that("R-level cli_abort messages are correctly translated in FR", { | ||
withr::with_envvar(c(HUGGINGFACE_HUB_CACHE = tempdir()), { | ||
try({ | ||
tok <- tokenizer$from_pretrained("gpt2") | ||
temp_json <- tempfile(fileext = ".json") | ||
withr::with_language(lang = "fr", | ||
expect_error( | ||
tok$train(temp_json, temp_json), | ||
regexp = "doit hériter de", | ||
fixed = TRUE | ||
)) | ||
}) | ||
}) | ||
|
||
}) |