openzim / phet

Scraper for PhET Science & Math Interactive Simulations
https://download.kiwix.org/zim/phet
Apache License 2.0
8 stars 3 forks source link

PHeT content in Russian please. #38

Closed kelson42 closed 4 years ago

kelson42 commented 6 years ago

From @julianharty on December 17, 2017 19:18

A user recently gave the Chemistry and Physics simulations app 1 star as it doesn't include Russian. There seem to be around 50 of the HTML5 simulations available in Russian according to https://phet.colorado.edu/en/simulations/translated/ru so it'd be great to make these available for users who prefer Russian.

New review on Dec 17, 2017 at 10:18 AM GMT ★ Что за бред, есть все языки кроме русского??!!!

Copied from original issue: kiwix/kiwix-android#333

kelson42 commented 6 years ago

This is to 90% a ZIM issue (if confirmed), should be moved to the phet scrapper git repo.

kelson42 commented 6 years ago

We do not provide Russian, but online Phets web site either https://phet.colorado.edu/. There is nothing we can do here. Simulations should be translated first.

julianharty commented 6 years ago

They are translated e.g. https://phet.colorado.edu/sims/html/acid-base-solutions/latest/acid-base-solutions_ru.html

The site https://phet.colorado.edu/en/simulations/translated lists 136 translated SIMs Russian | русский | 136, of these 50 are HTML5

kelson42 commented 6 years ago

@ISNIT0 I have added "ru" to the configuration file... but got a crash. Any idea about how to support more languages... looks like the stuff are translated in more languages that what we currently support.

Copying compressed images beginning with: ZW
Copying compressed images beginning with: ZX
Copying compressed images beginning with: ZY
Copying compressed images beginning with: ZZ
Copying compressed images beginning with: Zundefined
Copying compressed images beginning with: Zundefined
Copying compressed images beginning with: undefined0

> phetscraper@1.0.0 export /srv/phet
> node_modules/typescript/bin/tsc && node_modules/browserify/bin/cmd.js res/js/index.js  -t babelify --presets [es2015] -o res/js/dist.js && node_modules/ts-node/dist/bin.js steps/export.ts

Error: Cannot find module '../state/get/catalog.json'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/srv/phet/steps/export.ts:29:28)
    at Module._compile (module.js:570:32)
    at Module.m._compile (/srv/phet/node_modules/ts-node/src/index.ts:395:23)
    at Module._extensions..js (module.js:579:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/srv/phet/node_modules/ts-node/src/index.ts:398:12)
    at Module.load (module.js:487:32)

npm ERR! Linux 3.13.0-100-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "export"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! phetscraper@1.0.0 export: `node_modules/typescript/bin/tsc && node_modules/browserify/bin/cmd.js res/js/index.js  -t babelify --presets [es2015] -o res/js/dist.js && node_modules/ts-node/dist/bin.js steps/export.ts`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phetscraper@1.0.0 export script 'node_modules/typescript/bin/tsc && node_modules/browserify/bin/cmd.js res/js/index.js  -t babelify --presets [es2015] -o res/js/dist.js && node_modules/ts-node/dist/bin.js steps/export.ts'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the phetscraper package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node_modules/typescript/bin/tsc && node_modules/browserify/bin/cmd.js res/js/index.js  -t babelify --presets [es2015] -o res/js/dist.js && node_modules/ts-node/dist/bin.js steps/export.ts
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs phetscraper
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls phetscraper
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /srv/phet/npm-debug.log

npm ERR! Linux 3.13.0-100-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! phetscraper@1.0.0 start: `npm run setup && npm run get && npm run transform && npm run export`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phetscraper@1.0.0 start script 'npm run setup && npm run get && npm run transform && npm run export'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the phetscraper package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run setup && npm run get && npm run transform && npm run export
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs phetscraper
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls phetscraper
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /srv/phet/npm-debug.log
ISNIT0 commented 6 years ago

This error is happening because the scraper didn't find anything (I know, it should be clearer). It screen scrapes this url: https://phet.colorado.edu/ru/offline-access Which is a 404. It looks like not all the pages have been generated on PhET's end? I'll take a look into how long it'll take to implement the alternative page (in addition)

ISNIT0 commented 6 years ago

It seems the scraper will need a significant change to make it work. (Including figuring out a different way to get categories).

The scraper supports all languages in the 'Language' dropdown at the bottom of the page (as it needs translated categories etc.)

image

kelson42 commented 6 years ago

@ISNIT0 This was my first idea/asumption. But, for an unknown reason, it seems Phets has far more translations than what is displayed here. @julianharty Maybe the solution is just to ask Phets why they do not put Russian (and other languages with many simulations translated) in that list?

kelson42 commented 6 years ago

@ariel-phet Any idea why Phets Web site does not provide "Russian" in the language selector?

kelson42 commented 5 years ago

@ISNIT0 To me it looks like we don't get the list of supported languages the right way. We should get the list of languages from https://phet.colorado.edu/en/simulations/translated. We can also get the list of supported simulations from these (sub)-page(s).