GlobalDataverseCommunityConsortium / dataverse-previewers

A collection of Datafile Previewers that can be configured to work with Dataverse
MIT License
13 stars 39 forks source link

Translation of dataverse-previewers #17 #18

Closed juancorr closed 4 years ago

juancorr commented 5 years ago

This pull request is to request the translation of the dataverse-previewers . We have used the jquery.i18n library https://github.com/wikimedia/jquery.i18n which have a dual GPL / MIT license: https://github.com/wikimedia/jquery.i18n/issues/136 .

qqmyers commented 5 years ago

Thanks for the pull request! This is a great feature to have. I haven't gotten to try it out yet but have a few initial comments:

I'll set up to test your changes locally and await your comments/changes on the above. Once those are resolved, I'll go ahead and merge. For any sites like QDR where we're pulling the previewers directly from github.io (as set up by the curl commands in the Readme file), that will immediately deploy the internationalized version.

juancorr commented 5 years ago

Thanks @qqmyers .

pdurbin commented 5 years ago

Related: Translate dataverse-previewers #17

kaitlinnewson commented 4 years ago

Hi all, are there any updates on this PR? We're interested in working on a French translation for this and are hoping to use the work in this PR to get started.

qqmyers commented 4 years ago

@kaitlinnewson - I think the main thing I was waiting on was an additional change to use the Dataverse locale information rather than having a separate list of language options in the previewer page (and for embedded previews on the file pages). If @juancorr doesn't have the time to make that update, I may be able to , or someone else from the community might be able to help out. Regardless, I'm sure this will go forward in some form, so if you have/will have another translation, at a minimum I can go ahead and make a separate branch that you can submit it to. (And anyone who wanted to use that branch before the i18n work is merged into the default branch (being used live by some Dataverse instances) could do so.)

juancorr commented 4 years ago

Hi @kaitlinnewson https://github.com/kaitlinnewson,

You can find the translation code related to this PR and the Spanish translation here: https://github.com/Consorcio-Madrono/dataverse-previewers/tree/translation https://github.com/Consorcio-Madrono/dataverse-previewers/tree/translation/previewers/i18n

We have tested it with Dataverse 4.11, but latest Dataverse versions have a greater integration. I am sorry but @qqmyers is right. I won't have time next months to continue this development, but I think that finish it won't be too difficult.

El mié., 12 feb. 2020 a las 15:38, Kaitlin Newson (notifications@github.com) escribió:

Hi all, are there any updates on this PR? We're interested in working on a French translation for this and are hoping to use the work in this PR to get started.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers/pull/18?email_source=notifications&email_token=AACPSCDSHRIDRGTFRV4SZ6DRCQCXLA5CNFSM4JBMLFT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELQ732Y#issuecomment-585235947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPSCHWM7PEGJGCSVMFFXLRCQCXLANCNFSM4JBMLFTQ .

qqmyers commented 4 years ago

@juancorr - could you make a pull request for this work against the new develop branch? As discussed in https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers/issues/40 I've created a separate branch so that 'master' is what's deployed through github.io and the develop branch will be where we merge contributions and test before pushing them out.

Once you do that, I'll merge your work and @kaitlinnewson can go ahead and work on a French translation as a PR to 'develop'.

juancorr commented 4 years ago

@qqmyers, it is done: https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers/pull/41

Juan Corrales

El sáb., 15 feb. 2020 a las 0:07, qqmyers (notifications@github.com) escribió:

@juancorr https://github.com/juancorr - could you make a pull request for this work against the new develop branch? As discussed in #40 https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers/issues/40 I've created a separate branch so that 'master' is what's deployed through github.io and the develop branch will be where we merge contributions and test before pushing them out.

Once you do that, I'll merge your work and @kaitlinnewson https://github.com/kaitlinnewson can go ahead and work on a French translation as a PR to 'develop'.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers/pull/18?email_source=notifications&email_token=AACPSCCT2X75JRLPTK5FMQDRC4P2PA5CNFSM4JBMLFT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL2XWHI#issuecomment-586513181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPSCDDNZ25OQP7VJJXYGLRC4P2PANCNFSM4JBMLFTQ .

qqmyers commented 4 years ago

Going to close without merging since we've accepted the PR to the develop branch ( #41 )

qqmyers commented 4 years ago

I updated what @juancorr sent to use the localCode from Dataverse and removed the buttons which were no longer needed. I also made a quick update to move the previewer-specific translations into the previewer's custom js file, and merged some changes from the master branch, etc.

@kaitlinnewson - the develop branch should now being doing translations based on the localeCode being sent by Dataverse. I think all you need to do to create another translation is to provide the appropriate previewers/i18n/\<code>/json file in a PR.

@juancorr - note I found two more strings to translate - "File uploaded on", which I was able to translate via Google, and the long error message, which I didn't want to attempt on Google. For now, the error remains in English, but if you let me know what it should be, I can add it (or make a PR).

If anyone wants to test: Since the develop branch is not available via github.io, the way I tested (lightly) was to download the repository as a zip and dropping the unzipped version in Dataverse (a dataverse-previewers folder in the same dir as all of Dataverse's .xhtml files) and modifying the toolUrl from what's on the readme page to point to my local machine (e.g. https://dv.dev-aws.qdr.org/dataverse-previewers/previewers/TextPreview.html for the text Previewer). With that choice of location and toolUrl, all of the script paths, etc. work.

juancorr commented 4 years ago

@qqmyers, the translation could be: "errorText" : "Inténtelo de nuevo por favor. El problema más común es que su sesión haya caducado. Si el problema continúa puede contactar con el equipo de soporte de su repositorio de datos. Por favor, indique los códigos de estado que encontrará al final de este mensaje."

Thanks, your test method is much easier than mine. I have installed Apache and managed access permission.

Juan Corrales

El mar., 18 feb. 2020 a las 0:35, qqmyers (notifications@github.com) escribió:

I updated what @juancorr https://github.com/juancorr sent to use the localCode from Dataverse and removed the buttons which were no longer needed. I also made a quick update to move the previewer-specific translations into the previewer's custom js file, and merged some changes from the master branch, etc.

@kaitlinnewson https://github.com/kaitlinnewson - the develop branch should now being doing translations based on the localeCode being sent by Dataverse. I think all you need to do to create another translation is to provide the appropriate previewers/i18n//json file in a PR.

@juancorr https://github.com/juancorr - note I found two more strings to translate - "File uploaded on", which I was able to translate via Google, and the long error message, which I didn't want to attempt on Google. For now, the error remains in English, but if you let me know what it should be, I can add it (or make a PR).

If anyone wants to test: Since the develop branch is not available via github.io, the way I tested (lightly) was to download the repository as a zip and dropping the unzipped version in Dataverse (a dataverse-previewers folder in the same dir as all of Dataverse's .xhtml files) and modifying the toolUrl from what's on the readme page to point to my local machine (e.g. https://dv.dev-aws.qdr.org/dataverse-previewers/previewers/TextPreview.html for the text Previewer). With that choice of location and toolUrl, all of the script paths, etc. work.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers/pull/18?email_source=notifications&email_token=AACPSCCYSEPS34TYHVC7C5LRDMNKVA5CNFSM4JBMLFT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL77O2Q#issuecomment-587200362, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPSCHIREGJZG7GPDDFSX3RDMNKVANCNFSM4JBMLFTQ .