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

Import French translations from Transifex (template issue for copying) #9481

Open
7 tasks done
jywarren opened this issue Apr 9, 2021 · 19 comments
Open
7 tasks done
Labels
Translation System issues which involve adding new translations, improving the translation system

Comments

@jywarren
Copy link
Member

jywarren commented Apr 9, 2021

@ebarry notes that a French translation team has been working on translations for a year (!! wow awesome!) and we'd like to import these. (cc lead French translator @XavCC)

I wanted to note steps here so we do this with good coordination:

  • check what's ready to be imported (do they need reviews?)
  • check what would be imported (i'm not sure we can do /only/ french translations so this might involve importing all new strings, which is OK too, just good to be clear about
  • run the import, generating a new pull request with all the new translations
  • add the language code (i.e. fr) to this line: https://github.com/publiclab/plots2/blob/main/config/application.rb#L58
  • merge it!
  • Check by going to https://publiclab.org/change_locale/fr
  • add new languages to the footer dropdown (via the Features system, so for example https://publiclab.org/change_locale/hi-IN for Hindi.)

We can run through part of this checklist each time we do it.

@jywarren jywarren added the Translation System issues which involve adding new translations, improving the translation system label Apr 9, 2021
jywarren added a commit that referenced this issue Apr 9, 2021
for #9481 (this is ALL french strings, not just reviewed ones)
@XavCC
Copy link

XavCC commented Apr 9, 2021

I could spend a few hours this weekend reviewing translated strings.

@jywarren
Copy link
Member Author

jywarren commented Apr 9, 2021

Hi, @XavCC !! Awesome to hear from you and thank you for all the excellent work!

Just an update from our dashboard, French is 100% translated, but about 15% reviewed, but marked "ready to use":

image

So, we can download either ALL the french translations OR just those that are reviewed:

Screen Shot 2021-04-09 at 11 01 54 AM

I wanted to see if we could get input from the reviewers team on whether to import all or just reviewed? Either seems pretty easy!

Also i see @XavCC, OscarTrente and jibe_b are reviewers but only @XavCC seems to have a github account under that name. Happy to hear from other reviewers if that's helpful!

@jywarren
Copy link
Member Author

jywarren commented Apr 9, 2021

Note /all/ translations are available in #9482 now, so if we don't want to review first, we can just merge this and do reviews in a later import! Thanks!

@jywarren
Copy link
Member Author

jywarren commented Apr 9, 2021

Interesting that we can do this in an automated way from the settings/integration dialog:

image

This can be part of a new documentation of how to run imports, on https://publiclab.org/wiki/translation

@govindgoel
Copy link
Member

@jywarren This is really awesome and now we can do it in an automated way too.

@jywarren
Copy link
Member Author

OK, we'll go ahead and merge the French set for now and we can make modifications later if folks want to review more! Thank you!!!

jywarren added a commit that referenced this issue Apr 13, 2021
for #9481 (this is ALL french strings, not just reviewed ones)
@jywarren
Copy link
Member Author

Noting a missing step - i found we need to add the language code fr to this line:

I18n.available_locales = [:en, :de, "zh-CN", :ar, :es, "hi-IN", :it, :ko, "pt-BR", :ru]

@jywarren
Copy link
Member Author

That worked! It should publish this coming weekend to the live site:

image

@jywarren
Copy link
Member Author

Reopening as we got an error in integration tests prob from the config change...

Reverting in #9504

https://github.com/publiclab/plots2/pull/9504/checks?check_run_id=2337234225#step:7:144

Minitest::UnexpectedError:         ActionView::Template::Error: missing interpolation argument :search in "Aucun résultat trouvé en cherchant \"%{search}\"" ({:tag=>"some-tag"} given)
            app/helpers/application_helper.rb:158:in `translation'
            app/views/tag/widget.html.erb:14:in `_app_views_tag_widget_html_erb__3684193017882036563_47228995284600'
            app/controllers/tag_controller.rb:250:in `widget'
            test/integration/I18n_test.rb:425:in `block (2 levels) in <class:I18nTest>'
            test/integration/I18n_test.rb:421:in `each'
            test/integration/I18n_test.rb:421:in `block in <class:I18nTest>'

== FAIL I18nTest#test_should_choose_i18n_for_user/_form_+_user/new (224.46s)
        <Nom d'utilisateur·ice> expected but was
        <Nom d'utilisat⋅eur·ice>..
        Expected 0 to be >= 1.
        test/integration/I18n_test.rb:198:in `block (2 levels) in <class:I18nTest>'
        test/integration/I18n_test.rb:194:in `each'
        test/integration/I18n_test.rb:194:in `block in <class:I18nTest>'

@jywarren jywarren reopened this Apr 13, 2021
jywarren added a commit that referenced this issue Apr 13, 2021
)

* move csrf token into formdata for PublicLab.Editor richTextModule

ref #9438

* remove ", :fr" from application.rb re #9481
@XavCC
Copy link

XavCC commented Apr 18, 2021

Hi,

I will correct this mistake in transiflex today

[…]
== FAIL I18nTest#test_should_choose_i18n_for_user/_form_+_user/new (224.46s)
        <Nom d'utilisateur·ice> expected but was
        <Nom d'utilisat⋅eur·ice>..
        Expected 0 to be >= 1.
        test/integration/I18n_test.rb:198:in `block (2 levels) in <class:I18nTest>'
        test/integration/I18n_test.rb:194:in `each'
        test/integration/I18n_test.rb:194:in `block in <class:I18nTest>'

Edit:

Done at 12:50 pm CET

@jywarren
Copy link
Member Author

Working on this in #9619! Next week i hope! 😅

@jywarren
Copy link
Member Author

Noting we had some translation strings change, and the parameter name changed too, and there might be some things to watch out for in future attempts around parameters. Notes in #9619 (comment). Hopefully it works now 🤞

jywarren added a commit that referenced this issue May 18, 2021
* 2nd attempt to add French translations

Building on #9481 and #9504!

* Update and rename for_use_publiclaborg_en-yml--master_fr.yml to fr.yml

* swap \" for '

* change "search" param to "tag"
@jywarren
Copy link
Member Author

This is working! Great work, folks. This can now be used as a template for other language imports.

image

@jywarren jywarren changed the title Import French translations from Transifex Import French translations from Transifex (template issue for copying) May 20, 2021
@jywarren
Copy link
Member Author

Thanks @XavCC for your work on this!

@jywarren
Copy link
Member Author

cc @imajit this is really promising for the upcoming workflows we're imagining. Take a look!

@Tlazypanda
Copy link
Collaborator

Hey @DalilaBA Looping you here to reach out to @XavCC for any queries you may have 😅 I am not that familiar with the transifex translation procedure so hoping this leads to some clarity ✌️

@DalilaBA
Copy link
Contributor

DalilaBA commented Oct 3, 2021

Alright thank you ☺️

reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this issue Oct 16, 2021
for publiclab#9481 (this is ALL french strings, not just reviewed ones)
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this issue Oct 16, 2021
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this issue Oct 16, 2021
…bliclab#9504)

* move csrf token into formdata for PublicLab.Editor richTextModule

ref publiclab#9438

* remove ", :fr" from application.rb re publiclab#9481
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this issue Oct 16, 2021
* 2nd attempt to add French translations

Building on publiclab#9481 and publiclab#9504!

* Update and rename for_use_publiclaborg_en-yml--master_fr.yml to fr.yml

* swap \" for '

* change "search" param to "tag"
@XavCC
Copy link

XavCC commented Nov 5, 2021

Hi,

Welcome @DalilaBA !

on the actual published version of the website, I tested french version.

I tried with disabled No-Script and Umatrix add-on, it works but only some few words appeared in french even only 6 words aren't translated in transiflex for french version.

For @jywarren and al.

Mozilla Firefox 92.0
Arch Linux x86_64
Javascript activated (just for PublicLab website)
WebGL activated  (just for PublicLab website)

By the way, I reviewed some translated strings today in transiflex french version. We reached 84% reviewed strings.

Also, I "called my twitter followers" to test french version and to send feedback

Hope reading or hearing you soon,

Take care!

@DalilaBA
Copy link
Contributor

DalilaBA commented Nov 5, 2021

hi @XavCC thank you 😄
I'm really new with the Transifex and the synchronization with the local files.
I just checked the fr.yml file for the ( layout._header.community.community_title) key and it is not there, even that it is in the en.yml and translated and verified in the Transifex.
So I might think that the problem is at the synchronisation, I don't really now what to do further then that, I hope it helped

billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this issue Dec 28, 2021
for publiclab#9481 (this is ALL french strings, not just reviewed ones)
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this issue Dec 28, 2021
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this issue Dec 28, 2021
…bliclab#9504)

* move csrf token into formdata for PublicLab.Editor richTextModule

ref publiclab#9438

* remove ", :fr" from application.rb re publiclab#9481
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this issue Dec 28, 2021
* 2nd attempt to add French translations

Building on publiclab#9481 and publiclab#9504!

* Update and rename for_use_publiclaborg_en-yml--master_fr.yml to fr.yml

* swap \" for '

* change "search" param to "tag"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Translation System issues which involve adding new translations, improving the translation system
Projects
None yet
Development

No branches or pull requests

5 participants