Multilingual instances

There are a variety of instances that will require multiple languages on their instance.

UK - English/Welsh @lin_d_hop @NickWeir
Scandinavia - Norwegian/Swedish/Danish/Finnish @CynthiaReynolds
Switzerland - French/German/Italian… @devincent
Belgium - French/Flemish/Dutch…
Canada - English/French @tschumilas
India - @sreeharsha
South Africa - @ofnsa

Here we can discuss funding options, development requirements and the process moving forward.

Funding opportunities: please add links

Development steps (can someone put this on Github?)

Expected Interaction Experience:

  • only multilingual interface or also multilingual content?

please tag anyone else who should be part of this discussion.
@danielle @sstead

2 Likes

Thanks @CynthiaReynolds for starting the discussion.
Tagging @elf-pavlik .He has discussed with me and a couple of other people on how to address this from technology point of view.

1 Like

@NickWeir do you know if the Welsh and Belgian groups are applying for funding as local community hub startups or as national/regional platforms? Trying to see how we can contribute :wink:

AFAIK @devincent works on Switzerland instance (not Belgium) so French/German/Italian + one more less common language.

@maikel made comment about dynamic switching of languages in Internationalisation project notes

Maybe he could create github issue with more technical details as a reference for potential developers. This discussion here could focus on non technical aspects. For example:

  • expected interaction experience
  • only multilingual interface or also multilingual content
  • who could work on it and various funding related discussions
3 Likes

Hi @CynthiaReynolds I think the Welsh group is applying for EU funding as a local startup but I am not sure. My contact with the Welsh group is on holiday until next week but I am putting her in touch with @MyriamBoure who will be exploring connections with the Belgian group. Let me know if/how I can help with this.
We are also working with other groups in Wales who want to have a Welsh translation of OFN. One of them has already set up a shopfront on OFN UK. There is funding available from the Welsh Government for Welsh translations. We are exploring how we can tap into this

2 Likes

@danielle @maikel
Would the Aus team be able to spec and quote this work on updating language on the fly for the UK team please? We now need this speced for a funding application, and happy to pay for the specification work of course.

  • Essentially we want instances to be able to select, from within super-admin, which language options a user should be able to switch between.
  • A user would then be able to click a link to switch between languages.
  • The available languages would assumably link to the language files available in config/locales.

Please post any questions or assumptions here for the community to answer.

Thanks!

2 Likes

That is just switching the app language, not the content, right?

Some people talked about translations of product names etc. as well.

@maikel
You are right. We would also want to be able to translate product details, enterprise details…
Would you be able to quote this in two stages? It might be that the enterprise can make it work with just app language flexibility in the short term.
Thank you :slight_smile:

Will chat with @maikel about your request @lin_d_hop and get back to you :slight_smile:

I had a chat with Danni and we would like to estimate the estimation first. :wink:

  • I need to look into the current state and what’s still missing (3h)
  • Estimate the work on unfinished internationalisation (1h)
  • Estimate the work on flexible Javascript translations (1h)
  • Estimate UI changes to choose another language (1h)
  • Research current ways for multi-language db models (2h)
  • Estimate the integration of the top contenders (4h)
  • Summarise the results in a nice document (2h)

That are 14h for the estimates which should give us a good understanding of what is to do and be detailed enough for a grant application. The research should also speed-up the development, because most questions have been asked already. That said, you never know where hurdles are hiding.

3 Likes

Nice estimate estimate :slight_smile:
@NickWeir @Sara @mags Are we happy to go ahead with this estimate in preparation for the HOWL funding application? I would hope that the implementation costs could be shared with @CynthiaReynolds and others.

We are still working on funding (we will know more in December) but we will happily go in on it to the extent that we can.

yes I am happy for us to commit to this if @Sara is OK with it. Thanks Maikel

Totally fine with me!

Great. @danielle @maikel When you get the time would you do this estimate based on the estimate estimate please? :slight_smile: Thanks!

1 Like

@maikel let’s chat about timing of this on Friday, taking into consideration the standing orders work you’re doing as well.

OK, so we’ve scheduled for @maikel to take a break from standing orders next week and spend his 2 days getting this estimate done (alongside of your remaining PR @lin_d_hop). So by next Friday you should have a breakdown under an epic in GitHub that shows the work to be done, the issues within that epic, and estimates on all of the tasks + testing + a round of changes based on feedback + deployment.

@maikel let’s chat about the estimates to add for those non-dev sections of the quote once you’ve done your dev estimates.

Cheers all!

1 Like

First Draft (22 October 2016)

Updated: 26 October 2016

The task list:

  • Look into the current state and what’s still missing (3h)
  • Estimate the work on unfinished internationalisation (1h)
  • Estimate the work on flexible Javascript translations (1h)
  • Estimate UI changes to choose another language (1h)
  • Research current ways for multi-language db models (2h)
  • Estimate the integration of the top contenders (4h)
  • Summarise the results in a nice document, broken down into small tasks (2h)

Work done: 9 of 14 hours

Results:

Outstanding work for multi-language interface

I found 83 files that contain language and need placeholders. (8 hours)

The “open” and “closed” icons still need to be replaced.
We need to discuss and decide which icons to use (3h).
And we need to replace these icons in the current symbol font (3h).

We need to pre-compile a Javascript locale file for each language.
That requires one asset file per language.
We can then compile only those locales defined in the app configuration. (4h)

The Javascript lacks a fall-back feature to show text of the default locale
if the selected locale doesn’t have the translated text.
For example, if the British English translation is not complete, the missing
parts would be displayed in Australian English. (6h)

The previous three tasks could be solved by: https://github.com/fnando/i18n-js
The documentation is good, it’s actively developed and the author works for Heroku. Using this gem is probably much better than developing everything on our own. Just for the worst case that we try to do this for a few hours and find out that it doesn’t work, I would add a worst case estimate (3h)

We need a user interface to switch the language.
That could be a simple button in the navigation bar.
It sets the new locale for the user and then reloads the page in the new language.
The Javascript UI just uses the asset the was loaded depending on the locale setting. (8h)

Optionally, the UI would probably look better if a designer could work on that. (8h)

In the end of this round, we need to test everything, get feedback and react on that. (6h)

Total: 49 hours

Outstanding work for multi-language data

I found only two solutions to store multi-language data in the database:

Globalize seems to be the most popular solution (968,446 downloads) while Hstore Translate (43,269 downloads) is bound to a Postgresql feature. There is also the Spree Globalize gem for newer Spree versions (3.1+). We use Spree 1.3 at the moment. And there is a nice Railscast introcution to Globalize.

Globalize changes our database layout quite a bit. It will add extra work for all future development. Whenever we introduce or change a new data field that should be translatable, we need to change the translation tables as well. Planned Spree upgrades are better done before introducing multi-language features.

Fields to translate

The essentials:

  • product name
  • product type / category (taxon)
  • product properties
  • amount unit
  • delivery method
  • shipping method name
  • payment method name
  • tax category name
  • enterprise fee name
  • enterprise description
  • shop messages
  • group description

For discussion:

  • ~ enterprise names
  • ~ enterprise images
  • ~ enterprise contact details
  • ~ addresses (countries, states, suburbs)
  • ~ group names
  • ~ group images
  • ~ group contact details
  • ~ order cycle name
  • ~ product unit
  • ~ product scale

The tasks:

  • Discuss data structure change with other developers (10h)
  • Add Globalize to the OFN project (2h)
  • Change model classes (5h)
  • Add initial database migration (5h)
  • Possible difficulties / conflict solving (20h)
  • Denote translatable fields (5h)
  • Add language switcher to the admin interface (6h)
  • Final testing and reacting to feedback (11h)

Total: 64 hours

Total of both projects: 113 hours

Doesn’t seem too bad. I expected this project to be bigger.

Not included:

  • Multi currency setup
  • Locale dependent OpenStreetMaps settings.

Resources

Files containing language:

app/views/admin/enterprise_roles/_enterprise_role.html.haml
app/views/admin/enterprise_roles/_form.html.haml
app/views/admin/enterprise_roles/index.html.haml
app/views/admin/enterprises/_actions.html.haml
app/views/admin/enterprises/_change_type_form.html.haml
app/views/admin/enterprises/_enterprise_user_index.html.haml
app/views/admin/enterprises/_new_form.html.haml
app/views/admin/enterprises/edit.html.haml
app/views/admin/enterprises/form/_about_us.html.haml
app/views/admin/enterprises/form/_address.html.haml
app/views/admin/enterprises/form/_contact.html.haml
app/views/admin/enterprises/form/_enterprise_fees.html.haml
app/views/admin/enterprises/form/_images.html.haml
app/views/admin/enterprises/form/_inventory_settings.html.haml
app/views/admin/enterprises/form/_payment_methods.html.haml
app/views/admin/enterprises/form/_primary_details.html.haml
app/views/admin/enterprises/form/_shipping_methods.html.haml
app/views/admin/enterprises/form/_social.html.haml
app/views/admin/enterprises/form/_tag_rules.html.haml
app/views/admin/enterprises/form/_users.html.haml
app/views/admin/enterprises/form/tag_rules/_default_rules.html.haml
app/views/admin/enterprises/index.html.haml
app/views/admin/enterprises/new.html.haml
app/views/admin/enterprises/welcome.html.haml
app/views/admin/order_cycles/_exchange_form.html.haml
app/views/admin/order_cycles/_exchange_supplied_products_form.html.haml
app/views/admin/order_cycles/_form.html.haml
app/views/admin/order_cycles/_name_and_timing_form.html.haml
app/views/admin/order_cycles/_row.html.haml
app/views/admin/order_cycles/_simple_form.html.haml
app/views/admin/producer_properties/_form.html.haml
app/views/admin/variant_overrides/_controls.html.haml
app/views/admin/variant_overrides/_filters.html.haml
app/views/admin/variant_overrides/_loading_flash.html.haml
app/views/admin/variant_overrides/_show_more.html.haml
app/views/checkout/_shipping_ship_address.html.haml
app/views/spree/admin/products/_distributors_form.html.haml
app/views/spree/admin/products/bulk_edit/_indicators.html.haml
app/views/spree/admin/products/bulk_edit/_products.html.haml
app/views/spree/admin/products/bulk_edit/_products_product.html.haml
app/views/spree/admin/products/bulk_edit/_products_variant.html.haml
app/views/spree/admin/products/bulk_edit/_save_button_row.html.haml
app/views/spree/admin/products/product_distributions.html.haml
app/views/spree/admin/variants/_autocomplete.js.erb
app/views/spree/order_mailer/invoice_email.html.haml
app/views/spree/products/_source.html.haml

app/views/admin/business_model_configuration/edit.html.haml
app/views/admin/cache_settings/show.html.haml
app/views/admin/contents/edit.html.haml
app/views/admin/enterprises/_admin_index.html.haml
app/views/admin/enterprises/form/_business_details.html.haml
app/views/admin/enterprises/form/_shop_preferences.html.haml
app/views/admin/order_cycles/_advanced_settings.html.haml
app/views/admin/producer_properties/index.html.haml
app/views/map/index.html.haml
app/views/producer_mailer/order_cycle_report.text.haml
app/views/spree/admin/orders/_invoice_table.html.haml
app/views/spree/admin/orders/bulk_management.html.haml
app/views/spree/admin/orders/edit.html.haml
app/views/spree/admin/orders/invoice.html.haml
app/views/spree/admin/overview/_enterprises_header.html.haml
app/views/spree/admin/overview/_enterprises_hubs_tab.html.haml
app/views/spree/admin/overview/_order_cycles.html.haml
app/views/spree/admin/products/bulk_edit/_filters.html.haml
app/views/spree/admin/reports/bulk_coop.html.haml
app/views/spree/admin/reports/sales_tax.html.haml
app/views/spree/admin/reports/xero_invoices.html.haml

app/assets/javascripts/templates/admin/info_dialog.html.haml
app/assets/javascripts/templates/admin/links_dropdown.html.haml
app/assets/javascripts/templates/admin/modals/tag_rule_help.html.haml
app/assets/javascripts/templates/admin/new_tag_rule_dialog.html.haml
app/assets/javascripts/templates/admin/panels/enterprise_package.html.haml
app/assets/javascripts/templates/admin/panels/enterprise_producer.html.haml
app/assets/javascripts/templates/admin/panels/enterprise_status.html.haml
app/assets/javascripts/templates/admin/panels/exchange_supplied_products.html.haml
app/assets/javascripts/templates/admin/panels/exchange_tags.html.haml
app/assets/javascripts/templates/admin/tag_rules/filter_order_cycles_input.html.haml
app/assets/javascripts/templates/admin/tag_rules/filter_payment_methods_input.html.haml
app/assets/javascripts/templates/admin/tag_rules/filter_products_input.html.haml
app/assets/javascripts/templates/admin/tag_rules/filter_shipping_methods_input.html.haml
app/assets/javascripts/templates/out_of_stock.html.haml
app/assets/javascripts/templates/single_line_selectors.html.haml
2 Likes

thanks for the great work and detailed info @maikel

The open/closed icons can likely come from FontAwesome.io - we could use two different icons, or one icon two colours. I think something very simple is the best way to convey the idea across all languages.
Maybe something like this:


for reference these are here: cart and clock
they also have a cart with a plus in it.

Thanks @maikel for splitting up the whole task list. Kudos !!
For Indian OFN system to succeed language would play a key role and I would try to bounce this of a few OpenSource contributors who work on languages specifically to Mapping !!
Btw, we also need to account changes in OpenStreetMaps also right to localise the maps ?