Skip to content

Commit

Permalink
issue#85
Browse files Browse the repository at this point in the history
Scraper localization using banana-i18n

Tests were fixed because HTML moved from the base template to the corresponding file.

Set En for default language.
If translations file not found then use default language.
If the translations file contains the wrong JSON then the process stops with an error.

npm ci fixed

styles fixes.
Main page title moved vertically to the middle of the logo.
Main page subtitle is smaller.
Text size of the buttons Load and Cancel changed
  • Loading branch information
pavel-karatsiuba committed Dec 29, 2022
1 parent 5ea8ced commit a88f781
Show file tree
Hide file tree
Showing 9 changed files with 337 additions and 142 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.26.0",
"babelify": "^10.0.0",
"banana-i18n": "^2.3.3",
"browserify": "^17.0.0",
"cheerio": "^1.0.0-rc.12",
"cli-progress": "^3.11.2",
Expand Down
38 changes: 31 additions & 7 deletions res/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,33 @@ label {
#header {
width: 100%;
color: #f2f2f2;
padding: 5%;
padding: 1% 5%;
background: #244b59;
float: left;
text-align: center;
}

#header img {
width: calc(100% - 32px);
float: none;
display: block;
#header #logoContainer {
width: 100%;
float: inherit;
display: flex;
align-items: center;
}

#header #logoContainer img{
padding-right: 10px;
padding-bottom: 10px;
width: 18vw;
float: left;
}

#header #logoContainerText {
font-size: 7vw;
text-align: left;
}

#header #translateSlogan {
font-size: 2.5rem;
}

#ractive-target label {
Expand Down Expand Up @@ -174,6 +191,10 @@ select {
margin-top: 30px;
}

.swal2-actions .swal2-styled.swal2-confirm,
.swal2-actions .swal2-styled.swal2-cancel {
font-size: 17px;
}
.flex-cont {
justify-content: space-around;
display: none;
Expand All @@ -186,9 +207,12 @@ select {
}

.description {
margin: 10px;
display: block;
text-align: center;
display: table;
font-size: 2rem;
min-width: 660px;
padding: 10px 10% 0;
margin: auto;
}

@media only screen and (min-width: 320px) and (max-width: 1023px) and (orientation: landscape) {
Expand Down
Binary file modified res/img/phetlogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
87 changes: 87 additions & 0 deletions res/js/i18n/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"@metadata": {
"authors": [
"s/kiwix/Kiwix/"
],
"last-updated": "21.12.2022",
"locale": "en"
},
"zim-title": "PhET Interactive Simulations",
"zim-description": "Interactive simulations for Science and Math",
"helping-students-engage-in-science-and-mathematics": "Helping students engage in science and mathematics.",
"document-title": "PhET Interactive Simulations for Science and Math",
"load-button": "Load",
"cancel-button": "Cancel",
"logo-text": "PhET Interactive Simulations",
"category-all-categories": "All categories",
"category-biology": "Biology",
"category-biology-biology": "Biology / Biology",
"category-biology-earth-science": "Biology / Earth Science",
"category-biology-electricity-magnets-and-circuits": "Biology / Electricity, Magnets & Circuits",
"category-biology-general-chemistry": "Biology / General Chemistry",
"category-biology-heat-and-thermo": "Biology / Heat & Thermo",
"category-biology-light-and-radiation": "Biology / Light & Radiation",
"category-biology-math-applications": "Biology / Math Applications",
"category-biology-math-concepts": "Biology / Math Concepts",
"category-biology-motion": "Biology / Motion",
"category-biology-quantum-chemistry": "Biology / Quantum Chemistry",
"category-biology-quantum-phenomena": "Biology / Quantum Phenomena",
"category-biology-sound-and-waves": "Biology / Sound & Waves",
"category-biology-work-energy-and-power": "Biology / Work, Energy & Power",
"category-chemistry": "Chemistry",
"category-chemistry-biology": "Chemistry / Biology",
"category-chemistry-earth-science": "Chemistry / Earth Science",
"category-chemistry-electricity-magnets-and-circuits": "Chemistry / Electricity, Magnets & Circuits",
"category-chemistry-general-chemistry": "Chemistry / General Chemistry",
"category-chemistry-heat-and-thermo": "Chemistry / Heat & Thermo",
"category-chemistry-light-and-radiation": "Chemistry / Light & Radiation",
"category-chemistry-math-applications": "Chemistry / Math Applications",
"category-chemistry-math-concepts": "Chemistry / Math Concepts",
"category-chemistry-motion": "Chemistry / Motion",
"category-chemistry-quantum-chemistry": "Chemistry / Quantum Chemistry",
"category-chemistry-quantum-phenomena": "Chemistry / Quantum Phenomena",
"category-chemistry-sound-and-waves": "Chemistry / Sound & Waves",
"category-chemistry-work-energy-and-power": "Chemistry / Work, Energy & Power",
"category-earth-science": "Earth Science",
"category-earth-science-biology": "Earth Science / Biology",
"category-earth-science-earth-science": "Earth Science / Earth Science",
"category-earth-science-electricity-magnets-and-circuits": "Earth Science / Electricity, Magnets & Circuits",
"category-earth-science-general-chemistry": "Earth Science / General Chemistry",
"category-earth-science-heat-and-thermo": "Earth Science / Heat & Thermo",
"category-earth-science-light-and-radiation": "Earth Science / Light & Radiation",
"category-earth-science-math-applications": "Earth Science / Math Applications",
"category-earth-science-math-concepts": "Earth Science / Math Concepts",
"category-earth-science-motion": "Earth Science / Motion",
"category-earth-science-quantum-chemistry": "Earth Science / Quantum Chemistry",
"category-earth-science-quantum-phenomena": "Earth Science / Quantum Phenomena",
"category-earth-science-sound-and-waves": "Earth Science / Sound & Waves",
"category-earth-science-work-energy-and-power": "Earth Science / Work, Energy & Power",
"category-math": "Math",
"category-math-biology": "Math / Biology",
"category-math-earth-science": "Math / Earth Science",
"category-math-electricity-magnets-and-circuits": "Math / Electricity, Magnets & Circuits",
"category-math-general-chemistry": "Math / General Chemistry",
"category-math-heat-and-thermo": "Math / Heat & Thermo",
"category-math-light-and-radiation": "Math / Light & Radiation",
"category-math-math-applications": "Math / Math Applications",
"category-math-math-concepts": "Math / Math Concepts",
"category-math-motion": "Math / Motion",
"category-math-quantum-chemistry": "Math / Quantum Chemistry",
"category-math-quantum-phenomena": "Math / Quantum Phenomena",
"category-math-sound-and-waves": "Math / Sound & Waves",
"category-math-work-energy-and-power": "Math / Work, Energy & Power",
"category-physics": "Physics",
"category-physics-biology": "Physics / Biology",
"category-physics-earth-science": "Physics / Earth Science",
"category-physics-electricity-magnets-and-circuits": "Physics / Electricity, Magnets & Circuits",
"category-physics-general-chemistry": "Physics / General Chemistry",
"category-physics-heat-and-thermo": "Physics / Heat & Thermo",
"category-physics-light-and-radiation": "Physics / Light & Radiation",
"category-physics-math-applications": "Physics / Math Applications",
"category-physics-math-concepts": "Physics / Math Concepts",
"category-physics-motion": "Physics / Motion",
"category-physics-quantum-chemistry": "Physics / Quantum Chemistry",
"category-physics-quantum-phenomena": "Physics / Quantum Phenomena",
"category-physics-sound-and-waves": "Physics / Sound & Waves",
"category-physics-work-energy-and-power": "Physics / Work, Energy & Power"
}
Loading

0 comments on commit a88f781

Please sign in to comment.