Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scraper localization using banana-i18n #178

Merged
merged 4 commits into from
Dec 25, 2022
Merged

Conversation

pavel-karatsiuba
Copy link
Collaborator

Fixes #85

@kelson42
Copy link
Contributor

@Abijeet is this format of translation files, see "en.json" indgestable by Translatewiki?

@pavel-karatsiuba pavel-karatsiuba marked this pull request as ready for review December 23, 2022 17:28
{
"@metadata": {
"authors": [
"kiwix"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/kiwix/Kiwix/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavel-karatsiuba Please answer and close the discussion when it is fixed.

"locale": "en"
},
"helping-students-engage-in-science-and-mathematics": "Helping students engage in science and mathematics.",
"document-title": "PhET INTERACTIVE SIMULATIONS",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PhET Interactive Simulations for Science and Math

@kelson42 kelson42 force-pushed the issue-85-scraper-localization branch from f350be9 to 6574593 Compare December 24, 2022 12:14
@kelson42
Copy link
Contributor

kelson42 commented Dec 24, 2022

  • Be carefuly I have rebased on master. Please provide feature branches which are rebased on master to review.

  • It seems also your version of npm is outdated. I get this:

npm WARN old lockfile The package-lock.json file was created with an old version of npm
  • Another problem, I have added fr.json and only translated a few strings... and it seems in such a scenario none of the strings are taken.

  • I wonder also if the ZIM metadata title and description are translated as well? I don't see them in the translation file.

  • Last point, with the "mul" ZIM file, the language of the browser (first in the list) should be detected and the proper translation should be loaded. I believe this does not work.

Scraper localization using banana-i18n
Tests were fixed because HTML moved from the base template to the corresponding file.
Set En for default language.
Remove all empty translation files.
If translations file not found then use default language.
lint fixes
@kelson42 kelson42 force-pushed the issue-85-scraper-localization branch from 6574593 to adf6db8 Compare December 25, 2022 10:51
@kelson42 kelson42 merged commit 86aab9c into main Dec 25, 2022
@kelson42 kelson42 deleted the issue-85-scraper-localization branch December 25, 2022 11:12
@kelson42 kelson42 restored the issue-85-scraper-localization branch December 25, 2022 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce localization of the scraper
2 participants