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

Internationalization (French/English) of interface #16

Closed
tw4l opened this issue Jan 8, 2018 · 17 comments
Closed

Internationalization (French/English) of interface #16

tw4l opened this issue Jan 8, 2018 · 17 comments
Assignees
Milestone

Comments

@tw4l
Copy link
Collaborator

tw4l commented Jan 8, 2018

No description provided.

@tw4l tw4l added this to the beta milestone Jan 11, 2018
@jraddaoui
Copy link
Collaborator

16h -> To setup Django i18n and fix current strings. This doesn't include internationalization of data tables, only GUI messages.

@jraddaoui
Copy link
Collaborator

Hi @stefanabreitwieser,

I've deployed the internationalization setup in the test instance. Some notes about it:

Language menu

As you can see, there is a submit button inside it that you need to click to change the language. I tried to avoid it but Django requires to send the language change as a POST request. To avoid the submit button and be able to change the language just by clicking in a drop-down link would require to add some Javascript to trigger the POST request or to overwrite the default Django language change view. Please, let me know if that's important for you and I'll estimate the time required to do so.

Messages file

The French messages file is located in:
https://github.com/CCA-Public/dip-access-interface/blob/master/accesspoc/locale/fr/LC_MESSAGES/django.po

Ideally, we'd add the translations directly in this repository over that file and create a PR to merge the translations until a service like Transifex is implemented. Of course, if that's not possible, I could send you the file and add it to the repository once I get it back with the translations.

To detail a little more the translations process:

  • When changes are made over the sorce code, a CLI command should be executed to update the translations files (./manage.py makemessages from the accesspoc folder).
  • Translators are notified to update the French messages file.
  • When translators are working on the messages file, the CLI command should not be executed until their translations are merged, to avoid conflicts on the messages files.
  • The translations are merged in the repository.

That's why it's important that we know when the translators are working on the messages, to avoid running the command until their changes are merged, and a visible PR will help with that. I think I'm currently the only making those kind of changes, so notifying me could be enough for now.

Please, let me know if you need more information.

@stefanabreitwieser
Copy link
Collaborator

Tagging my colleague @mireilleN who will be working on the French translations.

@bunekcca -- Do you have an opinion about the UI for the Submit button on the internationalization menu? Should we get a time estimate to fix it?

@jraddaoui -- So if I'm understanding correctly, we can directly edit the French messages file and add French strings until Transifex is implemented? Is there a time in particular that is usually good for you, maybe late-afternoon?

@bunekcca
Copy link
Collaborator

Hi @jraddaoui
In an ideal world, the user wouldn't need to click on the submit button to switch. Could you estimate the time you'd need to change it ?

Have a good day.

@mireilleN
Copy link
Contributor

@jraddaoui Hi! I'll be working on the French translation for Scope. I helped a little with Archivematica French translation last year so I'm familiar with this type of work, and I already have an account on Transifex if you'd prefer for us to work this way.
Otherwise, if I understand correctly, I would simply Edit https://github.com/CCA-Public/dip-access-interface/blob/master/accesspoc/locale/fr/LC_MESSAGES/django.po And then make a PR?

If this is right, how do you want me to integrate the text within the elements? As a new element of msgid or within the "" of the msgstr below each msgid?

Thanks and looking forward working with you on this project.

@jraddaoui
Copy link
Collaborator

@stefanabreitwieser and @bunekcca, 3 hours should be enough to remove the submit button, replace the radio buttons with normal drop-down links and add Javascript code to send the POST request with the required data on link click. Other small style changes, like using the language code capitalized instead of the globe icon, could be addressed in #64, without affecting that estimate.

Hi @mireilleN! Glad to hear that you'll be working on the French translations. Right now, without having some tasks developed to push and fetch the messages from Transifex, and specially if you're going to be the only one working on the translations, using Transifex will require some extra work to do that manually, and it may also have some costs. I think that making the translation directly in here makes more sense in this stage of the project.

A PR would be great, I'll not update the messages files until you're "done" and that PR is merged, we can do that in chunks to avoid having a lot of changes at the end, when the messages files are regenerated with the updates in the source code.

You should only add the translations in the French messages file, translating the msgid strings within the "" of the msgstr bellow. If you want to make changes over the English strings inside msgid, they need to be done over the source code and regenerate the messages files. If you ping me in the PR you're working to do so, I could make those changes and regenerate the files.

Please, don't hesitate to ask me if you need something else.

@mireilleN
Copy link
Contributor

Hi @jraddaoui This sounds good. I should start working on it in the second half of next week.
Thanks for following up so quickly.

@bunekcca
Copy link
Collaborator

Hi @jraddaoui 3 hours is fine for me. Let's do it.

@jraddaoui
Copy link
Collaborator

jraddaoui commented Jul 26, 2018

Hi @bunekcca, the language drop-down changes are ready for review in the test site.

@jraddaoui
Copy link
Collaborator

Hi @stefanabreitwieser,

The French messages file has been updated in test site with the changes from #81. There was an issue with a few strings in the home and FAQ pages, which won't appear translated until the next round of translation. There are also some strings added to the messages files in recent work that won't appear translated either. More info in #81.

It may be better to leave this open and test it latter in September, but if you switch languages, you should see a lot of translations already.

@bunekcca
Copy link
Collaborator

Hi @jraddaoui ,

I noticed that some texts are not in french yet on the test site:
french_translation.png

Could we have them translated for the demo on Wednesday?
Have a good day.

@stefanabreitwieser
Copy link
Collaborator

Hi @bunekcca -- these will be fixed with Mireille's translations, which were completed on Friday. (You'll notice plenty of English on other parts of the site as well.) Once Radda incorporates her pull request in the demo version, it should be fine. Thanks!

@jraddaoui
Copy link
Collaborator

Hi @bunekcca and @stefanabreitwieser,

Some of the initial translations are missing due to a bad formatting in the templates on my end. I merged a few hours ago the latest translations added by @mireilleN in #109, which should fix that issue and add a few more French strings.

I'm waiting for approval on #104 to see if I can deploy both changes at the same time. And, as I noted in #81, a few more translations will be needed after that for the new strings added into the settings page.

Best regards.

@jraddaoui
Copy link
Collaborator

Hi @bunekcca, @stefanabreitwieser,

The latest translations were sent by @mireilleN via email and all the interface should be translated now, including the settings page added in #7.

@bunekcca
Copy link
Collaborator

Hi @jraddaoui
It looks great ! Thanks.

@stefanabreitwieser
Copy link
Collaborator

Mireille mentioned she might do a quick review of her translations, but I'm really happy with how this deployment looks. Thanks Radda!!

@mireilleN
Copy link
Contributor

Thanks @jraddaoui, this is great!

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

No branches or pull requests

7 participants