Closed gabrielcbe closed 2 years ago
Not sure - I'll look into it!
hello @gabrielcbe , I think I can contribute with that translation, send me a note to garrapato@me.com please
@garrapato The extensions are all here - if you can offer any tips on technically how they can be NLS-enabled that would be much appreciated!
https://github.com/IBM/taxinomitis/blob/master/resources/scratchx-text-classify.js https://github.com/IBM/taxinomitis/blob/master/resources/scratchx-images-classify.js https://github.com/IBM/taxinomitis/blob/master/resources/scratchx-numbers-classify.js
The mechanism used by Scratch 2.0 is through files of substitute character strings, so for each language, there should be a file with the format aa.po or aa-bb.po, where aa is the language identifier and bb It is the country identifier, for example: pt-br.po, for Brazilian Portuguese.
These files must be placed in the 'locale' subdirectory, where 'Scratch.swf' resides, see links to graphics, for example, in my case:
/Users/garrapato/scratchx/locale/pt-br.po
example: pt-br.po append the lines below to translate the statics strings in the MLK extensions:
#------------------------------------------------------------------------------------
# Machine Learning for Kids extensions
#------------------------------------------------------------------------------------
# Semaphore
# RED
msgid "No models trained yet - only random answers can be chosen"
msgstr "Nenhum modelo treinado ainda - apenas respostas aleatórias podem ser escolhidas"
# YELLOW
msgid "Model not ready yet"
msgstr "Modelo ainda não está pronto"
# GREEN
msgid "Ready"
msgstr "Pronto"
# Image Classify extension
msgid "recognise image %s (label)"
msgstr "reconhecer imagem %s (etiqueta)"
msgid "recognise image %s (confidence)"
msgstr "reconhecer imagem %s (confiança)"
msgid "add training data %s to %m.labels"
msgstr "adicione dados de treinamento %s a %m.labels"
msgid "add training data %s to %s"
msgstr "adicione dados de treinamento %s a %s"
# Text Classify extension
msgid "recognise text %s (label)"
msgstr "reconhecer texto %s (etiqueta)"
msgid "recognise text %s (confidence)"
msgstr "reconhecer texto %s (confiança)"
# Number Clasiffy extension
# N/A - Dinamiclally generated
@dalelane will have to update that file so that the Scrtatchx version of MLK can use the translation.
Once this file is updated, when selecting the language (Brazilian Portuguese), Scratchx will replace static strings with those found in the translation file. Do not forget to refresh the page.
The Number Classification extension does not contain static strings, so it is not possible to translate.
Next, examples of the translation of the semaphore status are shown.
The Brazilian Portuguese and Mexican Spanish files below
I hope you find this information useful.
Regards
closing as I don't think further investment in ScratchX is worth it any more
Hello, Dale.
With the recent updates is now possible to have the translated version of the blocks "Recognise text/image (label/confidence)" in Scratch 3.0, is it too much trouble/can you apply these changes to ScratchX as well?
Due to a limitations in the Raspberry Pi we use as primary computer during classes, my students are still going to use ScratchX over the newer Scratch 3.0 and it'd be great to have the blocks translated there too.
Thanks a lot!