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

The app should send the two letters language code instead of the extended one #3491

Open
Tracked by #4166
teolemon opened this issue Aug 30, 2020 · 2 comments
Open
Tracked by #4166
Labels
editing Issues relating to allowing the user to edit products i18n Translations OpenFoodAPIClient translations Issues related to translation of applications

Comments

@teolemon
Copy link
Member

teolemon commented Aug 30, 2020

The product name is not loaded for some languages. I've opened a bug to solve this server side: openfoodfacts/openfoodfacts-server#4091

The app should send only the two letters language code (eg. "en" or "it" or "fr") instead of the extended one ("en-US", "it-IT").

Examples

2020-08-30 14:12:34.559 14146-21396/? D/OkHttp: --> GET https://ssl-api.openfoodfacts.org/api/v0/product/3700946806496.json?fields=ingredients_text_b%2Bsr%2BLatn%2Cproduct_name_b%2Bsr%2BLatn
2020-08-30 14:12:34.607 14146-21396/? D/OkHttp: <-- 200 https://ssl-api.openfoodfacts.org/api/v0/product/3700946806496.json?fields=ingredients_text_b%2Bsr%2BLatn%2Cproduct_name_b%2Bsr%2BLatn (47ms, unknown-length body)
2020-08-30 14:13:09.827 14146-21396/? D/OkHttp: --> GET https://ssl-api.openfoodfacts.org/api/v0/product/3700946806496.json?fields=ingredients_text_nl-BE%2Cproduct_name_nl-BE
2020-08-30 14:13:09.885 14146-21396/? D/OkHttp: <-- 200 https://ssl-api.openfoodfacts.org/api/v0/product/3700946806496.json?fields=ingredients_text_nl-BE%2Cproduct_name_nl-BE (57ms, unknown-length body)
2020-08-30 14:13:33.953 14146-21396/? D/OkHttp: --> GET https://ssl-api.openfoodfacts.org/api/v0/product/3700946806496.json?fields=ingredients_text_pt-BR%2Cproduct_name_pt-BR
2020-08-30 14:13:34.051 14146-21396/? D/OkHttp: <-- 200 https://ssl-api.openfoodfacts.org/api/v0/product/3700946806496.json?fields=ingredients_text_pt-BR%2Cproduct_name_pt-BR (97ms, unknown-length body)
2020-08-30 14:13:49.761 14146-21396/? D/OkHttp: --> GET https://ssl-api.openfoodfacts.org/api/v0/product/3700946806496.json?fields=ingredients_text_zh-CN%2Cproduct_name_zh-CN
2020-08-30 14:13:49.808 14146-21396/? D/OkHttp: <-- 200 https://ssl-api.openfoodfacts.org/api/v0/product/3700946806496.json?fields=ingredients_text_zh-CN%2Cproduct_name_zh-CN (46ms, unknown-length body)
@teolemon
Copy link
Member Author

We're going to have to implement our own workaround for now.

@VaiTon VaiTon changed the title The product name is not loaded for some languages The app should send the two letters language code instead of the extended one Oct 29, 2020
@teolemon teolemon added editing Issues relating to allowing the user to edit products i18n Translations OpenFoodAPIClient translations Issues related to translation of applications labels May 8, 2021
@teolemon
Copy link
Member Author

teolemon commented May 8, 2021

#2789 is related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editing Issues relating to allowing the user to edit products i18n Translations OpenFoodAPIClient translations Issues related to translation of applications
Projects
Status: No status
Development

No branches or pull requests

1 participant