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

Add a link to the translated Trinket or Scratch project #8

Open
pcolladosoto opened this issue Jul 31, 2020 · 5 comments
Open

Add a link to the translated Trinket or Scratch project #8

pcolladosoto opened this issue Jul 31, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@pcolladosoto
Copy link
Collaborator

pcolladosoto commented Jul 31, 2020

Description

If trinket or scratch links are present, replace those with the corresponding translated link. Maja and I (Nina) can keep a spreadsheet of links that can be pulled.

Applicable to

step_1.md

Acceptance criteria

  • Ensure that if step_1.md contains Trinket or Scratch embedded links, those are updated with corresponding translated versions.
  • The “translated” links are taken from a Google Spreadsheet(s).
  • If for some reason “translated” links cannot be pulled from the spreadsheet(s) (no internet access, no access rights, missing info...) a clear warning should be displayed and nttt should proceed to its next steps.

Open questions

  • Define criteria by which we can recognise the embedded links in step_1.md.
  • Define the structure of the spreadsheet(s).
  • Determine proper access rights to the spreadsheet(s) so that translators could have access to it as well.
  • Shall embedded links to the next projects be updated on the last page as well?

Ideas

  • Regarding the spreadsheet(s) structure we could use a table that maps English Trinket/Scratch links to translated links. Use a table per language.
    • This makes the tooling easier to implement and the tables easier to maintain.
    • We could use a single Google Spreadsheet document for all links with separate tabs (sheets) per project.
@pcolladosoto pcolladosoto added the enhancement New feature or request label Jul 31, 2020
@pcolladosoto
Copy link
Collaborator Author

Some projects also have embedded Trinket or Scratch links to starter projects in step 2. Is it possible to use a similar idea - if the spreadsheet contains a starter link for the given language code, use that, if not, stick to the original link.

I suggest this as the spreadsheet to be used.

If the final page project exists in the language being published then we should also replace the link. I added a column for that in the above spreadsheet.

Original author: Raspberry Pi Translation

@pcolladosoto
Copy link
Collaborator Author

Some finished project links may occur in multiple projects: as finished project link on the first page of the corresponding project, but also in one or more other projects on the final page, as you mentioned above.

Another design of the spreadsheet could be to have a column per locale, where the first column is the original language, i.e. English (en), and the other columns contain the translated languages (like ar-SA, nl-NL, uk-UA). Each row starts with the link to the English Scratch/Trinket project, and each successive column contains the link to the translated Scratch/Trinket project.

The advantage of this approach is that it may be difficult for NTTT (or any other automated tool) to see whether a link is a starter project link, a finished project link, a what’s next project link or another link.

Original author: Robert-Jan (@robertjank)

@pcolladosoto
Copy link
Collaborator Author

That's a great idea! I will still include a column for the repository name so we know which link belongs to which project without having to click on the link.

Original author: Raspberry Pi Translation

@pcolladosoto
Copy link
Collaborator Author

You could even add another column which describes the link for easy look-up for humans.

Original author: Robert-Jan (@robertjank)

@torarve
Copy link

torarve commented Aug 18, 2021

After trying out some projects I have found some cases we need to handle:

  1. URLs in inline HTML, for example https://raw.githubusercontent.com/raspberrypilearning/archery/master/en/step_1.md
  2. Redirects - some links are redirects, for example http://rpf.io/p/ar-SA/poetry-generator-go -> https://2fgskr35qg.execute-api.eu-west-2.amazonaws.com/prod/zipURL/ar-SA/poetry-generator-go
  3. Sometimes extra blank lines are inserted (not sure if this is manually or by Crowdin), but ignoring empty lines seems to match up lines correctly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants