Beschrijving
Controls and optimizes translation history in GlotPress by enforcing limits on waiting and old entries per string,
reducing unnecessary revisions and keeping the database lean and efficient.
-
It limits the number of
waitingtranslations.
Anywaitingtranslations above the limit are set tooldstatus and are no longer shown in the waiting translations list. -
It limits the number of
oldtranslations.
Anyoldtranslations above the limit are permanently deleted from the database.
How the limit works
Assume the limit is set to 2 translations per string.
1. Single user behavior
When a single user submits multiple translations:
- The latest translation is always marked as
waiting - The previous
waitingtranslation becomesold - If the number of
oldtranslations exceeds the limit:- The oldest
oldtranslation is deleted
- The oldest
Result:
– 1 waiting translation (latest)
– Up to 2 old translations (limited)
2. Multiple users
When multiple users submit translations for the same string:
- Each user can have one
waitingtranslation -
A new submission:
- Replaces that user’s previous
waiting(which becomesold) - Does affect other users
waitingtranslations if the total number ofwaitingtranslations exceeds the limit - The oldest
waitingtranslation over the limit (regardless of user) becomesold
- Replaces that user’s previous
-
All
oldtranslations are shared (counted globally per string) - All
waitingtranslations are shared (counted globally per string)
Configuration
Once installed, GlotCore History Limiter is ready to use. The default limit is set to 3 history entries per string.
You can change this limit by defining the following constant in your wp-config.php file:
php
define( 'GLOTCORE_HISTORY_LIMIT', 3 ); // Change 3 to your desired limit
You can also modify the limit by hooking into the glotcore_history_limit filter in your theme or plugin:
php
add_filter( 'glotcore_history_limit', function( $limit ) {
return 3; // Change 3 to your desired limit
} );
Beoordelingen
Er zijn geen beoordelingen voor deze plugin.
Bijdragers & ontwikkelaars
“GlotCore History Limiter” is open source software. De volgende personen hebben bijgedragen aan deze plugin.
Bijdragers“GlotCore History Limiter” is vertaald in 2 localen. Dank voor de vertalers voor hun bijdragen.
Vertaal “GlotCore History Limiter” in je eigen taal.
Interesse in ontwikkeling?
Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.
Changelog
1.0
- Initial release.
