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

fix: missing_translations_in_dq_button #9825

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

benbenben2
Copy link
Collaborator

What

@teolemon, I did not know what it means "missing translations in the Data Quality action button", I had to search.

In the provided example, there is another facet where the button is as expected. Let's look at it first.
We can find reference to this "action" in

  • data_quality.txt -> fix_action:en: add_origins - BUT not for all facets ( EcoScore - packaging - Packaging data missing, for example)

  • Products.pm -> add_origins + url suffix

  • en.po -> msgtxt "action_add_origins" + message in the box

origins_of_ingredients.tt.json -> 
	    	"element_type": "action",
            "action_element": {
                "html": `[% lang("action_add_origins") %]`,
                "actions": [
                    "add_origins",
                ]
            }

however, more generic in data_quality_tags.tt.json:

            [% IF fix_action != 'undef' %]
                {
                    "element_type": "action",
                    "action_element": {
                        "html": `[% lang(action_name) %]`,
                        "actions": [
                            "[% fix_action %]",
                        ]
                    },
                },

for serving quantity facet.

  • we have in data_quality.txt
en:Serving quantity defined but quantity undefined
fix_action:en: add_quantity
  • we also have add_quantity url define in Products.pm

  • However it is missing in en.pot. Which make sense because it is where we have translations (now, I understand message from @teolemon :-) )

  • so (following advice from @alexgarel in a previous PR: feat: allow_longer_user_name #9588 (comment)) we will add, in common.pot only.

msgctxt "action_add_quantity"
msgid "Add quantity for the product"
msgstr "Add quantity for the product"
  1. test. It does not work. Try also to add the translation in en.po. Yes, it works!

Screenshot

Screenshot_20240224_173146

Related issue(s) and discussion

@benbenben2 benbenben2 self-assigned this Feb 24, 2024
@benbenben2 benbenben2 requested a review from a team as a code owner February 24, 2024 16:42
Copy link
Contributor

@stephanegigandet stephanegigandet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@benbenben2 benbenben2 merged commit 8b81361 into main Feb 29, 2024
13 checks passed
@benbenben2 benbenben2 deleted the fix_missing_translations_in_dq_button branch February 29, 2024 20:48
john-gom pushed a commit that referenced this pull request May 24, 2024
* fix_missing_translations_in_dq_button

* applys suggestion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing translations in the Data Quality action button
2 participants