Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

translations preview #1609

Closed
wants to merge 25 commits into from
Closed

translations preview #1609

wants to merge 25 commits into from

Conversation

vabarbosa
Copy link
Contributor

@vabarbosa vabarbosa commented Oct 3, 2022

@vabarbosa
Copy link
Contributor Author

@Qiskit/qiskit-translation i created the branch (feat/translations) and this PR.

we can start previewing the translation effort in a live deployment. just submit updates to this branch instead of main.
commits/merges to this PR branch will trigger deployment with updated content. for example, you can check out the Introduction course for various languages:

 

with that said, there is a build issue with the Korean ch-states course (see the build logs).

there are also content/rendering issues with some of the translated notebooks (navigate through some of the translated pages and compare with English version).

for example, looking at Introduction course sidebar:

English

image

Spanish

image

Korean

image

 

a couple things to look out for is the headings in the notebooks and the latex/formulas. hopefully, these should not need to be changed during translation as they impact the sidebar and rendering.

let me know if you have any questions or need assistance troubleshooting some of these!


CC @ilyaspiridonov @kifumi @clausia

@clausia
Copy link
Contributor

clausia commented Oct 4, 2022

@vabarbosa
It's awesome that we can get a preview of the translations! Thank you for this :)

I have some questions regarding the use of this branch (feat/translations), I hope this is a good place to ask them (if not please ignore them):

  • What about the toc.yaml file that appears in GitLocalize? Will it just be ignored from now on? Because adding translated sections will be by creating a PR (to this branch first), is this correct?
  • So when we send a PR from GitLocalize it will be to this branch (feat/translations), right? Will it be automatic, or should we change the destination branch by hand once the PR is created using GitLocalize? Will we have permission to do this? (the moderators and/or the admins on GitLocalize)
  • The text "Reading time: ~xx min" that appears at the top of the pages seems to me that it is in the file "server/templates/textbook.pug", but in the case of Spanish, for example, it is already translated, but there is no such file under "translations/es", nor I see it in this branch (feat/translations), where can we update it?, the current translation is not quite right 😅
  • Is it possible that the reason that the menu on the left for the Spanish case is due to the fact that only the first notebook is included in the toc.yaml? I mention it, because since there are no other files in url: /introduction (inside the toc.yaml file), then there is no reason for any header to have LaTeX errors and that is causing bad rendering (the only notebook included in the toc file for Spanish it is /intro/why-quantum-computing and that does not have headers with LaTeX, in fact those headers look good in the menu on the left)

Thanks in advance!


CC @ilyaspiridonov @kifumi

@ilyaspiridonov
Copy link
Contributor

Some thoughts and PR:

  1. Created a pilot PR to this branch with some LaTex fixes: #1610 - is my understanding correct that we should send any fixes to this branch as PRs?
  2. GitLocalize sits on top of the main branch, so all translation pull requests with the actual translated notebooks will be sent to the main branch, not feat/translations
  3. Those could potentially be merged into main as done previously, and feat/translations could be used only when adding translated articles in localized toc.yaml (as only in this case the translated articles will be included in the build - hence the need to preview at this point only)
  4. LaTex being broken by GitLocalize is a know issue (as GitLocalize just can't parse those). It's now included in the dev pipeline as high priority (next task after the current 'Translate Metadata' task).

@vabarbosa
Copy link
Contributor Author

vabarbosa commented Oct 4, 2022

this feat/translations branch/PR is to help with preview of translated content as we prepare to publish them.

ideally, the only changes in this PR would be the config.yaml (i.e. languages to publish) to enable building/publishing of certain languages. everything else (e.g., updates to the notebooks or toc.yaml, adding new translated notebooks, etc) should go into `main'.

regarding to some of the comment

Is it possible that the reason that the menu on the left for the Spanish case is due to the fact that only the first notebook is included in the toc.yaml?

yes, you are correct.

So when we send a PR from GitLocalize it will be to this branch (feat/translations), right?

you should continue to work based off of the main branch as you are working now (no need to change your current workflow). we can rebase/update this branch as needed off of main to get preview of latest content.

The text "Reading time: ~xx min" that appears at the top of the pages seems to me that it is in the file "server/templates/textbook.pug", but in the case of Spanish, for example, it is already translated, but there is no such file under "translations/es", nor I see it in this branch (feat/translations), where can we update it?, the current translation is not quite right 😅

it should be in the strings.yaml in each language (e.g., translations/ja/strings.yaml). the strings.yaml contains all other text available on the pages but that are not part of the actual notebook content. i will need to investigate where the translations is coming from in this specific case.

Created a pilot PR to this branch with some LaTex fixes: #1610 - is my understanding correct that we should send any fixes to this branch as PRs?

yeah, any fixes to this branch should come in as PRs. however, it would be better submitting against main so that way the notebooks dont get out of sync with what is in main (and also avoid merge conflicts) when pulling updates from main into this branch. ideally, the only change in this branch is the config.yaml to enable specific languages.

thank you @clausia @ilyaspiridonov

@vabarbosa
Copy link
Contributor Author

vabarbosa commented Oct 4, 2022

@clausia the Spanish translation of Reading time was defaulting to the translation that was provided by the platform we use. i have added a strings.yaml for Spanish and added a translation of Reading time i got using Watson Language Translator. feel free to update as needed 😄

image

fyi, i also added the strings.yaml for Portuguese and Korean. all new languages added should include a strings.yaml that must also get translated.

related: #1611

@clausia
Copy link
Contributor

clausia commented Oct 4, 2022

@clausia the Spanish translation of Reading time was defaulting to the translation that was provided by the platform we use. i have added a strings.yaml for Spanish and added a translation of Reading time i got using Watson Language Translator. feel free to update as needed 😄

Thanks a lot, translation is perfect 😃

@ilyaspiridonov
Copy link
Contributor

@vabarbosa While this branch/PR idea sounds really great (thanks for implementing this!), would it make sense to add a GitHub action later on to run a test build (using Netlify or similar) on all incoming PRs to master (e.g. whenever a toc.yaml is updated for any language)?
I was thinking kind of what folks at Google are using (see Deploy preview): GoogleChrome/developer.chrome.com#3903
Not an expert though, so not sure if this would be a good fit :)

@vabarbosa
Copy link
Contributor Author

@ilyaspiridonov thanks... yeah, we actually have similar a GitHub Action setup for PRs created in this repo. we just have it disabled for the time being for translation PRs, but we will be visiting that again soon & see if we are ready to re-enable it (maybe right after the translation team reviews and we merge this PR)

@github-actions github-actions bot temporarily deployed to Preview October 28, 2022 03:09 Destroyed
@github-actions github-actions bot temporarily deployed to Preview October 28, 2022 04:17 Destroyed
@github-actions github-actions bot temporarily deployed to Preview October 28, 2022 06:04 Destroyed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants