Opened 4 years ago
Last modified 9 days ago
#6320 new defect (bug)
Translate: duplicate string translations sometimes lead fo translation status > 100%
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Component: | Translate Site & Plugins | Keywords: | has-patch |
| Cc: |
Description
Steps to reproduce
- Go to https://translate.wordpress.org/projects/wp-plugins/woocommerce/.
- Sort columns ascending by “Stable Readme”.
- See that fr_FR has a translation status of 102%.
Attachments (1)
Change History (10)
This ticket was mentioned in Slack in #polyglots by tobifjellner. View the logs.
4 years ago
#2
@
4 years ago
- Summary changed from WooCommerce shows translation status of 102% for fr_FR to Translate: duplicate string translations sometimes lead fo translation status > 100%
#4
@
4 years ago
Related upstream: https://github.com/GlotPress/GlotPress/issues/1312
These are all things I could find out this. If I missed one, feel free to comment so they can be added.
#5
@
5 months ago
If a plugin is first updated in dev and strings become fuzzy there, the fuzzy string is not transferred to stable. The fuzzy string is automatically released, along with the new translation that took place in dev, when the new version lands in stable.
So there is a logic error for fuzzy strings.
This ticket was mentioned in PR #553 on WordPress/wordpress.org by @timse201.
8 weeks ago
#6
- Keywords has-patch added
trac ticket: 6320
If we sync strings from dev to stable, the overwritten string in stable will fire gp_translation_prepare_for_save again (if I'm right). Because there is no check for old strings, it will become current again, which leads to 2 new current strings in stable.
This PR adds a check for status old.
#7
@
6 weeks ago
Tested Meta ticket #6320 live on translate.wordpress.org (March 2026).
Reproduction test on https://translate.wordpress.org/projects/wp-plugins/woocommerce/:
- Total locales visible: 30
- Locales exceeding 100% translation: 99% (101%)
fr_FR not visible in the default sorted view.
Root cause (from ticket): Duplicate strings in the source POT file cause some translations to be counted multiple times, leading the system to calculate >100% completion. This is a data integrity issue in how translate.wordpress.org aggregates string counts when duplicate source strings exist.
The issue can surface when:
- A source string appears more than once in the same project
- Both instances are translated
- The percentage calculation counts both translations against the unique string total
The fix should deduplicate source strings before calculating completion percentages, or handle duplicates in the counting logic.
#8
@
6 weeks ago
I did tests on our locale with fuzzy strings in dev. Strings that are released in dev first an published to stable weeks later are set to current if they are modified in dev in that time. If they are not modified, they will stay as fuzzy. All duplicated strings I have rejected seems to be modified that way. This patch should reduce or fix this behavior.
This ticket was mentioned in PR #591 on WordPress/wordpress.org by @timse201.
9 days ago
#9
related to trac ticket: 6320
fixes: 8217
If we sync strings from dev to stable, the overwritten (fuzzy) string in stable will fire gp_translation_prepare_for_save again. Since there is no check for old strings, this one becomes current again because it adopts the status from the map. As a result, there are 2 current strings in stable.
Let's use this ticket to keep track of all projects which have this issue so that we can start investigating why this happens.
As requested by Peter Smits on Slack, I'm adding this comment:
"Hi all, I have looked at it indeed, and I have the impression that the status of the previous translation is not set to "old" under circumstances. That leaves both records active. To solve it find the record with the tool from vladt which indicates if there are double records by showing the state. If you then change the last one to fuzzy or modify it, the problem is solved. It happens in several locales. So to me the base of the problem lies within network or performance. Sometimes it takes a long time before the message "saved" is shown"