Plots2: Import French translations from Transifex (template issue for copying)

Created on 9 Apr 2021  路  15Comments  路  Source: publiclab/plots2

@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:

  • [x] check what's ready to be imported (do they need reviews?)
  • [x] 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
  • [x] run the import, generating a new pull request with all the new translations
  • [x] add the language code (i.e. fr) to this line: https://github.com/publiclab/plots2/blob/main/config/application.rb#L58
  • [x] merge it!
  • [x] Check by going to https://publiclab.org/change_locale/fr
  • [x] 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.

Translation System

Most helpful comment

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鈰卐ur路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

All 15 comments

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

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!

Note /all/ translations are available in https://github.com/publiclab/plots2/pull/9482 now, so if we don't want to review first, we can just merge this and do reviews in a later import! Thanks!

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

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

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!!!

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

https://github.com/publiclab/plots2/blob/8c729b2fdd9e2428f4a9607111ecde5534c11d8e/config/application.rb#L58

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

image

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

Reverting in https://github.com/publiclab/plots2/pull/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鈰卐ur路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>'

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鈰卐ur路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

Working on this in #9619! Next week i hope! 馃槄

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 https://github.com/publiclab/plots2/pull/9619#issuecomment-843583807. Hopefully it works now 馃

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

image

Thanks @XavCC for your work on this!

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RuthNjeri picture RuthNjeri  路  3Comments

grvsachdeva picture grvsachdeva  路  3Comments

first-timers[bot] picture first-timers[bot]  路  3Comments

keshavsethi picture keshavsethi  路  3Comments

bronwen9 picture bronwen9  路  3Comments