User:So9q/How to mass translate descriptions

From Wikidata
Jump to navigation Jump to search
  1. start with a query like this
  2. download csv
  3. open https://docs.google.com/spreadsheets and log in
  4. in the fourth column paste this to translate: =GOOGLETRANSLATE(C2;"nb";"da") where C2 is the description
  5. search and replace to clean the qid column
  6. copy all 4 columns to LibreOffice
  7. in LibreOffice all cells are now text and editable, fix or delete the bad translations
  8. save as ods
  9. delete column 2,3 so only qid and Dda column is left
  10. export to csv
  11. open in Vim and run this to fix uppercases: ":s/,\([A-Z]\)/,\L\1/" which converts upper cases after a comma to lower case
  12. go through the file and switch to upper case where needed
  13. looking ready?
  14. Copy to clipboard:
    :%!xclip -sel clip
    (press "u" after this)
  15. insert in QS and run