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

Revert "Pluralize admin products search result [OFN-12532]" #12730

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

filipefurtad0
Copy link
Contributor

@filipefurtad0 filipefurtad0 commented Aug 2, 2024

Closes #12731.
Reverts #12665.

@wandji20
Copy link
Contributor

wandji20 commented Aug 2, 2024

Hi @filipefurtad0

I just pulled the latest master branch and noticed a weird translation with en_FR which certainly causes a server error
Can you please confirm what local you did assign before getting this new error?

@filipefurtad0
Copy link
Contributor Author

Hey @wandji20, thanks for looking into this!

The locale assigned to staging-FR is fr.yml:
image

I've pulled the latest translations into master. Maybe I should re-stage master after this...

noticed a weird translation with en_FR which certainly causes a server erro

Which translation do you mean?

@wandji20
Copy link
Contributor

wandji20 commented Aug 2, 2024

Which translation do you mean?

In config/locales/en_FR.yml line 816

image
The variable name should be count and not total

@rioug rioug self-requested a review August 4, 2024 23:36
@rioug rioug force-pushed the revert-12665-wb-OFN-12532 branch from 1edf4a5 to 7939bf8 Compare August 5, 2024 00:04
Copy link
Collaborator

@rioug rioug left a comment

Choose a reason for hiding this comment

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

Looks good 👍 . It's a pretty safe change so I am going to merge it now to not block the release

@rioug rioug merged commit 4805ade into master Aug 5, 2024
98 checks passed
@rioug rioug deleted the revert-12665-wb-OFN-12532 branch August 5, 2024 00:29
@filipefurtad0
Copy link
Contributor Author

Thanks @rioug for reverting the PR.

The variable name should be count and not total

In any case, I agree with @wandji20, this does not seem right.

Now we've gone down the path of reverting this PR, so I think we'd need to revert the latest translations from master too, 0afbdf1. Right?

@rioug
Copy link
Collaborator

rioug commented Aug 5, 2024

I am not sure to be honest. I think if this fix the problematic translations we should be good as it is. @openfoodfoundation/core-devs any input ?

@dacook
Copy link
Member

dacook commented Aug 6, 2024

Thanks for spotting this Wandji. Indeed, en_FR is wrong, this may be due to user mistake (I can see that fr was also updated):
0afbdf1#diff-afc33b29ea937814856ce867d17a71bf7dae5c8eec30212046e5e538275217fcL813-R817

All other changes in that commit look valid. But it's interesting that a lot of valid translations were also removed, for example: 0afbdf1#diff-e76a11e9b4a84e1653a37d620ec4ce380841d3763e51f37e5a415a5a7d21a028L758

So I agree with Filipe that commit also contributes to the problem and can be reverted. I'll discuss in Slack and make sure that's done before we test the release again.
Edit: It looks like Filipe already did that: https://github.com/openfoodfoundation/openfoodnetwork/commits/v4.5.4

Going forward, I think we could fix this up by manually fixing the dodgy translation changes. As far as I understand, it's appropriate in this case to manually edit the translation files. @wandji20, would you be interested to try that, or should I?

@mkllnk
Copy link
Member

mkllnk commented Aug 6, 2024

manually edit the translation files

I think that any manual edits would get overridden through Transifex again. Manual updates have to happen in Transifex.

Next time we should rename the translation key if we change the parameter variable names. It may just be that translations were not updated yet and still using the old variable which then results in a server error.

@wandji20
Copy link
Contributor

wandji20 commented Aug 6, 2024

rename the translation key

I have opened a PR with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUU, FR locale] Error 500 when accessing the products page
5 participants