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 waiting translations.
Any waiting translations above the limit are set to old status and are no longer shown in the waiting translations list.
It limits the number of old translations.
Any old translations above the limit are permanently deleted from the database.
Assume the limit is set to 2 translations per string.
When a single user submits multiple translations:
waitingwaiting translation becomes oldold translations exceeds the limit:
old translation is deletedResult:
– 1 waiting translation (latest)
– Up to 2 old translations (limited)
When multiple users submit translations for the same string:
waiting translationA new submission:
waiting (which becomes old)waiting translations if the total number of waiting translations exceeds the limitwaiting translation over the limit (regardless of user) becomes oldAll old translations are shared (counted globally per string)
waiting translations are shared (counted globally per string)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
} );