Openfoodnetwork: Missing translations on inventory page

Created on 31 Jul 2019  路  7Comments  路  Source: openfoodfoundation/openfoodnetwork

Description


The button "save changes" at the bottom of the page is not translated on inventory page + the support text "default stock" is also not translated in the default stock column.

URL of the page: /admin/inventory

Capture du 2019-07-31 16-13-35

Context


Noticed when updating french user guide and retesting stuff.

Severity

S3

Your Environment

  • OFN Platform instance where you discovered the bug, and which version of the software they are using : French 2.2.1
bug-s3 good first issue hackathon

All 7 comments

@myriamboure mind if I work on this?

Hi @andrewjprice and welcome :) Please do work on it! If you have any question, join us on Slack

let me move slack conversation to the issue:

andrew price Today at 6:37 AM
What resources did you guys use to find translations? I'm working on https://github.com/openfoodfoundation/openfoodnetwork/issues/4105 and there isn't a "Default stock" translation defined in the yml's.

lin-d-hop 12 hours ago
'Default Stock' is also called on_hand in other places. You might also use earlier revisions of this file to find out if there was a translation used previously.

Luis Ramos 1 minute ago
hello! default stock is not exactly on_hand, it鈥檚 a specific field in variant overrides that is used when the variant override is reset. the variant override count_on_hand value gets reset to the value in default stock. (edited)

Luis Ramos < 1 minute ago
if it isnt in the en.yml file it means you need to add it in the correct place

see app/views/admin/variant_overrides/_products_variants.html.haml line 17
"Default Stock" needs to be changed to a call to something like t("admin.variant_overrides.index.default_stcok")
and then a key needs to be added after line 591 in en.yml ;-)

@luisramos0 For general consistency, is it better to add a translation for this placeholder in other language yml's? By adding it only to en.yml and doing as you suggested, other language translations will not see a placeholder.

Thank you for the feedback 馃檪.

Hi @andrewjprice, we use an external service called Transifex to handle the other translations, and only update en.yml directly :+1:

Was this page helpful?
0 / 5 - 0 ratings