View source: R/copyTranslations.R
copyTranslations | R Documentation |
Download translation files for a Weblate project, edit them and then reupload them to the same or a different Weblate project.
copyTranslations( components, to.language, from.project, from.language, conflict = "ignore", verbose = FALSE, download = TRUE, download.method = "api", upload = TRUE, editFunction = editTranslationFile, ... )
components |
A list of component names (slugs). |
to.language |
The language to copy to. |
from.project |
The project to copy from. |
from.language |
The language to copy from. |
conflict |
Optional. How to handle conflicts on the server. One of "ignore", "replace-translated" or "replace-approved". |
verbose |
Optional. Whether to print a detailed log to the console or not. |
download |
Optional. Whether to download translation files (uses files on disk if FALSE). |
download.method |
Optional. Which method to use to download the translation files. See |
upload |
Optional. Whether to upload translation files after download (and editing). |
editFunction |
Optional. The function to edit the translation files. Defaults to |
... |
Parameters to be passed to the editFunction. See |
Count of accepted new translations in the destination project.
## Not run: updateCount <- copyTranslations(components = "address", to.language = "de_CH", from.project = "gpde", from.language = "de", filter = "Deutschland", replace = as.data.frame(cbind(pattern = c("ß"), replace = c("ss")))) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.