How the skeleton is regenerated after a save

POM Translate creates or refreshes a post’s content skeleton after WordPress has saved an eligible canonical object. This timing ensures that extraction uses the persisted source rather than an unsaved editor draft.

The post must be eligible

The normal save workflow stops when the object is:

  • an autosave or revision;
  • a post type that is not enabled for translation;
  • a post state that should not retain translation data;
  • deliberately excluded from translation.

For an eligible post type, the individual Title, Content, Excerpt, and Meta settings determine which source fields are processed.

Programmatic imports, scheduled synchronization, and command-line updates can also reach the post-save workflow. POM Translate does not require a logged-in editor at that point because WordPress or the calling integration has already performed the write.

Generation follows the saved source

For a normal post save, POM Translate:

  1. records the source title and excerpt when those fields are enabled;
  2. scans the source body for supported custom URLs;
  3. parses the body with the appropriate content parser;
  4. extracts translatable attributes;
  5. extracts text containers, loose text, and supported shortcode values;
  6. freezes supported inline elements as protected markers;
  7. assigns stable positions to the extracted values;
  8. stores the resulting skeleton and its parser version;
  9. processes allowed custom fields;
  10. removes source values that are no longer used;
  11. records the source slug and initializes missing target slugs.

The save does not translate new text. It prepares the current source set so editors or an authorized machine-translation workflow can act on it later.

Empty and disabled content are intentional states

When body translation is disabled for the post type, POM Translate stores an empty body representation and continues processing any enabled metadata. The same applies when the source body is empty.

This prevents an obsolete skeleton from continuing to render body translations after the site owner has disabled that field or removed all body content.

Parser fallback protects the save

The standard body parser loads the source into an HTML document. If that document or its body cannot be prepared safely, POM Translate stores the full source body as a fallback translation unit instead of abandoning the post save.

The fallback is less granular than the normal container-based extraction. A translation editor may see one larger body value rather than separate paragraphs or headings, but the source content remains available.

Visual Composer-style shortcode content uses a dedicated path so supported shortcode structure and text can be processed without treating the complete shortcode document as ordinary HTML.

Changed source invalidates stale associations

Each source unit is identified by its subject, field, stable position, exact original value, placeholder map, and normalized hash. When that definition changes, POM Translate removes translations tied to the previous version of that unit before storing the new source.

It then checks for a non-empty exact-match translation associated with the same normalized source text. Exact matches can be reused; approximate or merely similar text is not accepted automatically.

This is why a small source edit may return one row to Pending while unchanged rows remain complete.

Removed source values are cleaned up

The parser records which values were used during the current save. Rows that belonged to the post but were not encountered again are deleted, along with their obsolete target translations.

For example, deleting a paragraph from the source and saving the post removes that paragraph from the active translation set. It is not kept as hidden public content.

Regenerate deliberately

Save the canonical post again when:

  • the post predates the current extraction system;
  • a newly enabled field does not yet appear;
  • parser behavior changed after a plugin update;
  • the source layout or shortcode configuration changed;
  • the translation interface reports no values for an otherwise eligible post.

Then verify the post under Translations → Translate contents. Do not edit the generated markers or attempt to repair the representation directly.

A focused regeneration check

  1. Save a post containing two paragraphs.
  2. Confirm both appear in the target locale’s translation view.
  3. Translate both rows and verify the public target route.
  4. Edit the first source paragraph, delete the second, and add a heading.
  5. Save the post again.
  6. Confirm the changed paragraph needs review, the deleted paragraph is gone, and the heading is new.
  7. Verify the public route contains no unresolved markers.

Continue with How protected markers preserve inline structure to understand the validation applied inside each extracted unit.