Skip to content

Conversation

@Dropries
Copy link

I added the missing french translations for each CSV file with a local_language_id (i.e. *_names.csv and *_prose.csv), except for files related with Conquest.
The name translations come from the section "In_other_languages" of bulbapedia.

I also fixed a few errors I noticed during the translation.

@Naramsim
Copy link
Member

Thanks a lot for all the translations!

@Naramsim
Copy link
Member

Did you use a script to gather all the data? Can it be run on other languages as well?

@Naramsim
Copy link
Member

It appears that in the file pokemon_species_prose.csv there's a value longer than 1000 chars.

django.db.utils.DataError: value too long for type character varying(1000)

We either need to cut it or lenghten the field

@Naramsim Naramsim mentioned this pull request Jan 20, 2026
487,9,"Forms have different stats and can learn different moves from tutors. Moves are retained through form changes. Giratina transforms into Origin Forme in the []{location:distortion-world} or while holding a []{item:griseous-orb}. Otherwise, it assumes its Altered Forme.
In Generation IV, the Griseous Orb returns to the bag upon entering the Wi-Fi Club or the Union Room."
492,5,"Les formes ont des stats différentes et peuvent apprendre différentes capacités des Mâitres de Capacités. Les capacités sont retenues en changeant de forme. Shaymin prend se transforme en Forme Céleste en utilisant une []{item:gracidea}. Il est limité à la Forme Terrestre la nuit, quand [frozen]{mechanic:frozen}, et dans les boites du PC; sous ces conditions, Shaymin Forme Céleste revient à la Forme Terrestre, et la Gracidée n’a pas d’effet. La Gracidée peut être réutilisée pour reprendre la Forme Céleste.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this is 1078 chars.

@Naramsim Naramsim merged commit 6938e93 into PokeAPI:master Jan 20, 2026
9 checks passed
@pokeapi-machine-user
Copy link

A PokeAPI/api-data refresh has started. In ~45 minutes the staging branch of PokeAPI/api-data will be pushed with the new generated data.

The staging branch will be deployed in our staging environment and the entire API will be ready to review.

A Pull Request (master<-staging) will be also created at PokeAPI/api-data and assigned to the PokeAPI Core team to be reviewed. If approved and merged new data will soon be available worldwide at pokeapi.co.

@pokeapi-machine-user
Copy link

The updater script has finished its job and has now opened a Pull Request towards PokeAPI/api-data with the updated data.

The Pull Request can be seen deployed in our staging environment when CircleCI deploy will be finished (check the start time of the last build).

Naramsim pushed a commit to PokeAPI/api-data that referenced this pull request Jan 20, 2026
@Dropries
Copy link
Author

Dropries commented Jan 20, 2026

Did you use a script to gather all the data? Can it be run on other languages as well?

Yes, I used a R script (perhaps not optimal with the workflow?) to extract the names of all the .csv files in data/v2/csv with a local_language_id column.
Then, for each of them, I exported a temporary file with all combinations of id and local_language_id (adding the one we are interested in) and translated the missing fields.

Here is my code with an example :

library(dplyr)
library(tidyr)
library(purrr)

files_to_edit <- function(id_language){
  
  # check every .csv in "data/v2/csv 
  map_dfr(list.files("data/v2/csv", pattern = ".csv$", full.names = T), ~{
    file <- .x
    csv <- read.csv(file)
    
    # check if "local_language_id" is in the .csv
    if(!"local_language_id" %in% names(csv)) return(NULL)
    
    # get all combinations of id and id_language 
    full_csv <- crossing(csv %>% select(1),
                           local_language_id = c(unique(csv$local_language_id), id_language)) %>%
      left_join(csv) %>%
      filter(local_language_id == id_language | if_all(3:ncol(.), ~ !is.na(.x))) %>%
      mutate_all(~ifelse(is.na(.), "", .))
    
    # is there new lines (= missing translations) ?
    if(nrow(full_csv) == nrow(csv)) return(NULL)
    
    tibble(diff_rows = nrow(full_csv) - nrow(csv),
           file = sprintf("- [ ] %s (%.0f missing translations)", file, diff_rows))
    
  }) %>%
    # print result sorted by number of missing translations
    arrange(desc(diff_rows)) %>%
    pull(file) %>%
    paste(collapse = "\n") %>%
    cat
}

files_to_edit(2)

file_to_complete <- function(filename, language_id){
  csv <- read.csv(filename, sep = ",")
  
  crossing(csv %>% select(1),
           local_language_id = c(unique(csv$local_language_id), language_id)) %>%
    left_join(csv) %>%
    filter(local_language_id == language_id | if_all(3:ncol(.), ~ !is.na(.x))) %>%
    mutate_all(~ifelse(is.na(.), "", .))
}

file_to_complete("data/v2/csv/pokemon_species_names.csv", 2)

Does this answer your question ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants