Skip to content

Commit

Permalink
fix: devtools check issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tin900 committed Aug 23, 2024
1 parent 24aae24 commit 1821540
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 54 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Title: Translate Text
Version: 1.5.2
Authors@R:
person("Tomer", "Iwan", , "t.iwan@vu.nl", role = c("aut", "cre", "cph"))
Description: The goal of the this package is to provide easy methods to
translate pieces of text. Functions send requests to translation services online.
Description: Provide easy methods to translate pieces of text.
Functions send requests to translation services online.
License: MIT + file LICENSE
URL: https://github.com/Tomeriko96/polyglotr/,
https://tomeriko96.github.io/polyglotr/
Expand Down
2 changes: 2 additions & 0 deletions R/create_translation_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
#' @export
#'
#' @examples
#' \dontrun{
#' words <- c("Hello", "Translate", "Table", "Script")
#' languages <- c("es", "fr", "de", "nl")
#' translations <- create_translation_table(words, languages)
#' print(translations)
#' }
create_translation_table <- function(words, languages) {
original_word <- NULL
translations <- data.frame(original_word = words)
Expand Down
2 changes: 2 additions & 0 deletions R/create_transliteration_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
#' @export
#'
#' @examples
#' \dontrun{
#' words <- c("Hello world", "Goodbye", "Thank you", "Please")
#' languages <- c("ar", "he", "el", "ru", "fa")
#' transliterations <- create_transliteration_table(words, languages)
#' print(transliterations)
#' }
create_transliteration_table <- function(words, languages) {
original_word <- NULL
transliterations <- data.frame(original_word = words)
Expand Down
2 changes: 2 additions & 0 deletions R/google_is_valid_language_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
#' @export
#'
#' @examples
#' \dontrun{
#' google_is_valid_language_code("en") # TRUE
#' google_is_valid_language_code("fr") # TRUE
#' google_is_valid_language_code("xx") # FALSE
#' }
google_is_valid_language_code <- function(language_code) {
if (language_code == "auto") {
return(TRUE)
Expand Down
2 changes: 1 addition & 1 deletion R/google_translate_long_text.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @export
#'
#' @examples
#' \donttest{
#' \dontrun{
#' long_text <- paste(rep("This is a long text to translate.", 100), collapse = " ")
#' google_translate_long_text(
#' long_text, target_language = "de",
Expand Down
2 changes: 2 additions & 0 deletions man/create_translation_table.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/create_transliteration_table.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/google_is_valid_language_code.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/google_translate_long_text.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 0 additions & 40 deletions tests/testthat/test-google_translate.R

This file was deleted.

7 changes: 0 additions & 7 deletions tests/testthat/test-language_detect.R

This file was deleted.

3 changes: 2 additions & 1 deletion vignettes/Linguee.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ vignette: >
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
comment = "#>",
eval = FALSE
)
```

Expand Down
3 changes: 2 additions & 1 deletion vignettes/Movie_Reviews.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ vignette: >
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
comment = "#>",
eval = FALSE
)
```

Expand Down
3 changes: 2 additions & 1 deletion vignettes/polyglotr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ vignette: >
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
comment = "#>",
eval = FALSE
)
```

Expand Down

0 comments on commit 1821540

Please sign in to comment.