Skip to content

Commit

Permalink
Merge pull request #313 from Program-AR/hotfixes
Browse files Browse the repository at this point in the history
Hotfixes
  • Loading branch information
dlopezalvas authored Oct 3, 2024
2 parents 85d4823 + 67834dd commit 196580d
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 32 deletions.
6 changes: 5 additions & 1 deletion locales/en-us/blocks.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@
"while": "Repeat until",
"chargerHere": "Is there a charger here?",
"trophyHere": "Is there a trophy here?",
"saladBowlHere": "Is there a salad bowl here?"
"saladBowlHere": "Is there a salad bowl here?",
"leftBorder": "Am I on the left edge?",
"rightBorder": "Am I on the right edge?",
"bottomBorder": "Am I on the bottom edge?",
"topBorder": "Am I on the top edge?"
},
"procedures": {
"definition": "Define",
Expand Down
6 changes: 5 additions & 1 deletion locales/es-ar/blocks.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@
"while": "Repetir hasta que",
"chargerHere": "¿Hay un cargador acá?",
"trophyHere": "¿Hay un trofeo acá?",
"saladBowlHere": "¿Hay una ensaladera acá?"
"saladBowlHere": "¿Hay una ensaladera acá?",
"leftBorder": "¿Estoy en el borde de la izquierda?",
"rightBorder": "¿Estoy en el borde de la derecha?",
"bottomBorder": "¿Estoy en el borde de abajo?",
"topBorder": "¿Estoy en el borde de arriba?"
},
"procedures": {
"definition": "Definir",
Expand Down
6 changes: 5 additions & 1 deletion locales/pt-br/blocks.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@
"while": "Repetir até que",
"chargerHere": "Há um cargador aqui?",
"trophyHere": "Há um troféu aqui?",
"saladBowlHere": "Há uma tigela de salada aqui?"
"saladBowlHere": "Há uma tigela de salada aqui?",
"leftBorder": "Estou na borda esquerda?",
"rightBorder": "Estou na borda direita?",
"bottomBorder": "Estou na borda inferior?",
"topBorder": "Estou na borda superior?"
},
"procedures": {
"definition": "Definir",
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"jest-watch-typeahead": "^2.2.2",
"makensis": "^2.0.8",
"mini-css-extract-plugin": "^2.4.5",
"pilas-bloques-exercises": "^1.4.31",
"pilas-bloques-exercises": "^1.4.34",
"postcss": "^8.4.4",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-loader": "^6.2.1",
Expand Down Expand Up @@ -97,7 +97,7 @@
"scripts": {
"postinstall": "sh scripts/copyEmberPB.sh && node ./scripts/change-pilas-versions.js",
"test": "jest",
"prestart": "rm node_modules/.vite/deps/* && node scripts/setEmberRoot.js public/emberPB ''",
"prestart": " [ -d node_modules/.vite/deps ] && rm node_modules/.vite/deps/*; node scripts/setEmberRoot.js public/emberPB ''",
"start": "vite",
"start:host": "vite --host",
"start:emberDev": "sh ./scripts/localEmber.sh",
Expand Down
2 changes: 1 addition & 1 deletion public/pilas.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<head>
<script src="libs/pilasweb.js?v=0.5.0"></script>
<script src="libs/pilas-bloques-exercises.js?v=1.4.31"></script>
<script src="libs/pilas-bloques-exercises.js?v=1.4.34"></script>
</head>

</html>
2 changes: 1 addition & 1 deletion scripts/copyEmberPB.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PB_APP_VERSION="1.17.6"
PB_APP_VERSION="1.17.9"

echo "==> Downloading Pilas Bloques app online..."
mkdir -p tmp
Expand Down
22 changes: 21 additions & 1 deletion src/components/blockly/blockly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const directionsColor = '#2ba4e2';
const othersColor = '#cc5b22';
const eventsColor = '#00a65a'; // == boton ejecutar

export const xmlBloqueEmpezarAEjecutar =`<xml xmlns="http://www.w3.org/1999/xhtml">
export const xmlBloqueEmpezarAEjecutar = `<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="al_empezar_a_ejecutar" x="15" y="15"></block>
</xml>`

Expand Down Expand Up @@ -925,6 +925,26 @@ const createSensorBlocks = (t: (key: string) => string) => {
'funcionSensor': 'tocando("Trofeo")',
}, 'icono.trofeo.png'
);

createSensorBlock('BordeIzquierdo', t('blocks.leftBorder'), {
'funcionSensor': 'enBordeIzquierdo()',
}, 'icono.izquierda.png'
);

createSensorBlock('BordeDerecho', t('blocks.rightBorder'), {
'funcionSensor': 'enBordeDerecho()',
}, 'icono.derecha.png'
);

createSensorBlock('BordeAbajo', t('blocks.bottomBorder'), {
'funcionSensor': 'enBordeAbajo()',
}, 'icono.abajo.png'
);

createSensorBlock('BordeArriba', t('blocks.topBorder'), {
'funcionSensor': 'enBordeArriba()',
}, 'icono.arriba.png'
);
}

const createValueBlocks = (t: (key: string) => string) => {
Expand Down
28 changes: 11 additions & 17 deletions src/components/blockly/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const categories: string[] = [
'alternatives',
'values',
'sensors',
'variables',
'operators'
]

Expand Down Expand Up @@ -64,18 +63,23 @@ export const commonBlocks: BlockType[] = [
categoryId: 'sensors'
},
{
id: 'TocandoDerecha',
intlId: 'canMoveRight',
id: 'BordeArriba',
intlId: 'topBorder',
categoryId: 'sensors'
},
{
id: 'TocandoAbajo',
intlId: 'canMoveDown',
id: 'BordeAbajo',
intlId: 'bottomBorder',
categoryId: 'sensors'
},
{
id: 'TocandoMeta',
intlId: 'cameToTheEnd',
id: 'BordeIzquierdo',
intlId: 'leftBorder',
categoryId: 'sensors'
},
{
id: 'BordeDerecho',
intlId: 'rightBorder',
categoryId: 'sensors'
},
{
Expand Down Expand Up @@ -133,16 +137,6 @@ export const commonBlocks: BlockType[] = [
intlId: 'math_arithmetic',
categoryId: 'operators'
},
{
id: 'param_get',
intlId: 'variables_get',
categoryId: 'variables'
},
{
id: 'param_set',
intlId: 'variables_set',
categoryId: 'variables'
},
{
id: 'Procedimiento',
intlId: 'Procedures',
Expand Down

0 comments on commit 196580d

Please sign in to comment.