Closed da1nerd closed 5 years ago
I've determined that tA is not processed at all by the ts v2 api. The english tW was manually uploaded in 2017.
As a result, we've decided not to build this feature into the deprecated tS v2 API. Support for tA is available in the v3 API and apps that want to access it can use it there.
This does mean that tS v12 won't support viewing tA in other languages.
As a backup/workaround, we can use the tN pdf to have access to tA through tN. https://www.unfoldingword.org/utn
I'd suggest that we don't touch the catalog but rather have tS hit https://api.door43.org/v3/subjects/Translation_Academy.json directly. Since there isn't any code in tS to handle tA right now anyway, makes sense to just add the code there to get it from the latest published location.
Originally, all of the api content was downloaded and managed from a separate library. Because translationAcademy will be coming from a different api end point and format, we'll need to provide a new way to view, update, and download translationAcademy translations.
@jag3773 can you provide some feedback on the below approach?
Concerns: Will any of the tA links within tN become invalid because we are using tA from the v3 api? There have been some structural changes to tA since the v2 days. If this is a problem, we can solve this with a map from v2 to v3 tA entries.
@neutrinog That approach sounds like a good way to go.
Regarding your concerns, I don't think that will be a problem, especially because the tN content is being updated while the tA content has not been. In other words, having the latest tA available is likely to fix areas where there might have been a link mismatch. However, in the vast majority of cases we have tried to not change the paths/links to any of the articles.
Some articles have been added and a couple of the manuals were removed, but the removed manuals were the ones not linked to from tN anyway (tech and audio).
Note that @klappy has some code in https://github.com/unfoldingWord-box3/translation-helps for showing Markdown as HTML including rendering the RC links. If there is a straightforward way to use that then great :)
There are plans in the not so distant future to abstract that out as it’s own library on npm.
Here’s the file that handles the above: https://github.com/unfoldingWord-box3/translation-helps/blob/master/src/components/Viewer/Workspace/TranslationHelps/RCLinkContainer.js
@jag3773 yes, but tN is going through the tS api. I'll need to double check that we aren't doctoring any of the links before it gets to tS.
Just about finished. There's a few usability things I need to add including:
Checking for updates
Downloading tA
Opening tA from a contextual link
Opening tA from a contextual link when the translation of tA has not yet been downloaded.
Looking really good @neutrinog ! One thing that I want to make sure that we preserve is fall back to English tA if tA is not available in the GL. Also, if the user doesn't want to download the GL version, then English should be shown.
@jag3773 what translations of tA should be bundled with the app?
Let's do all that are published.
Regarding tS translationAcademy, these are my observations. Please let me know if this is the desired behavior:
@elsylambert @jag3773 one feature I didn't mention was you can open the language selection menu at any time by pressing ctrl+o
. You can also delete the selected language from that same dialog by holding down ctrl
and pressing on the delete
button that appears.
I added those mostly for my sanity in testing things, but we could potentially expose those to users in a friendlier way.
@neutrinog Ctrl+o works well to bring the language selection menu and able to change the language. The issue here is, when I cancel on the language selection menu, it closes tA, instead of closing the Menu window. Ctrl and delete works fine.
@elsylambert In my testing, if I have a Hindi translation active in the source pane and click on a link to tA from the words pane then I do get tA in Hindi (even though I previously had opened it in English). I think this is the desired behavior.
Basically, on Mac, the language that tA opens with depends on the language of the resource it was launched from. So if I click a tA link from a Hindi tW article, I get tA in Hindi. If I click a tA link from an English article, I get tA in English.
Are you seeing something different @elsylambert ? And on which platform?
@jag3773 Yes, I am seeing the same behaviour. Previously I had English Translation active so tA opened in English. Looks good.
tA has been translated to Croatian and users would like to access it inside of tS.
Right now only english is processed and uploaded to the tS v2 api.
Example:
en
https://api.unfoldingword.org/ta/txt/1/en/audio_2.jsonhr
https://api.unfoldingword.org/ta/txt/1/hr/audio_2.json (broken)Once the api has been updated we'll need to improve the android client and node client to also support other languages. Both are currently hard coded to English.
Finally, the Android and desktop apps will need to be updated to display the correct translation of tA. This should depend on the selected source translation in the project (Android already does this).
Here are some key locations in the code: