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

Fixes #7133 Correctly load translations in some cases + remaining doing_it_wrong warning #7134

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

remyperona
Copy link
Contributor

Description

Fixes #7133

Make sure the translations are always correctly loaded

Type of change

  • Bug fix (non-breaking change which fixes an issue).

Detailed scenario

First example:

  • using Divi, translation is not loaded on any admin apge

Second example:

  • using any theme on plugins page, translation is not loaded (but they are on other pages)

Technical description

Documentation

The value in the Domain of the main plugin file was missing the / at the start.

Also removes translation in API requests (they were not used and causing a doing_it_wrong() warning).

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.

@remyperona remyperona added type: bug Indicates an unexpected problem or unintended behavior i18n Issues related to translation labels Nov 22, 2024
@remyperona remyperona requested a review from a team November 22, 2024 17:22
@remyperona remyperona self-assigned this Nov 22, 2024
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 4542d7b1 66.67% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (4542d7b) Report Missing Report Missing Report Missing
Head commit (0cb1956) 38228 16731 43.77%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#7134) 3 2 66.67%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@Mai-Saad
Copy link
Contributor

  • checked with Divi (with permalinks with/without /) on apache and nginx
  • checked other themes : Astra, Avada, betheme, flatsome , beaver builder
  • checked different languages EN, FR, FR ca, IT, ES, DE noting that the dynamic list section is not translated for IT, ES (same on 3.16.4)
  • After the update from 3.17.3 to the PR, if we hover admin bar while we didn't refresh the admin, we will see the EN translation while the profile is FR.. however, after refresh then hover, FR is displayed
    @piotrbak what do you think about the last 2 points?

@wordpressfan
Copy link
Contributor

@wordpressfan wordpressfan added this pull request to the merge queue Nov 25, 2024
Merged via the queue into develop with commit 59e6a0e Nov 25, 2024
15 checks passed
@wordpressfan wordpressfan deleted the fix/7133-i18n branch November 25, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Issues related to translation type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI is not translated when DIVI theme is active
4 participants