Skip to content

About

Chrome extension for order-based translation review: maps a translation order file onto a live preview page, edit segments inline, download the updated file.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

TranslationReview - Chrome Extension

A Chrome browser extension for reviewing a translation order against its live preview page. You upload the order file (a list of data-pll-id segments), the extension maps each segment to the rendered page, you edit the translations, and it writes your changes back into the same file.

Features

  • 📄 Order upload: Load the translation order (.html export of <div data-pll-id> segments)
  • 🔗 Automatic mapping: Each segment is matched to its element on the live page by normalized text (tolerant of WordPress texturizing — curly quotes, en/em dashes, whitespace)
  • 🎯 Coverage view: Matched segments are highlighted on the page; unmatched ones (e.g. post title, hidden ACF fields) are flagged in the list
  • ✏️ Two-way editing: Edit a highlighted segment inline on the page, or edit any segment directly in the side-panel list
  • 💾 Download updated file: Regenerates the exact same file format with your edited text
  • ⌨️ Keyboard Shortcuts: Esc to exit edit mode, Ctrl+Z to restore a segment's original text

Installation

Load the Extension in Chrome

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable Developer mode (toggle in the top-right corner)
  3. Click Load unpacked
  4. Select the TranslationReview folder
  5. The extension icon should appear in your toolbar

Usage

Basic Usage

  1. Open the translated preview page in the active tab
  2. Click the TranslationReview icon to open the side panel
  3. Click Upload translation file and select the order .html export
  4. Matched segments are highlighted on the page; the list shows how many matched
  5. Click Enable Edit Mode, then click a highlighted segment to edit it — or edit any segment directly in the list
  6. Click Download updated file to save the order with your changes (<name>-reviewed.html)

Keyboard Shortcuts

  • Esc: Exit edit mode and stop editing
  • Ctrl+Z (or Cmd+Z on Mac): Undo changes to the currently focused element

Features in Action

  • Green Outline: Active editable elements are highlighted with a green outline
  • Notifications: Status messages appear in the top-right corner
  • Persistent Changes: Your edits remain until you refresh the page

How It Works

The extension uses:

  • Content Scripts: Injected into every webpage to enable editing functionality
  • Popup Interface: Toggle edit mode on/off
  • CSS Highlighting: Visual indicators for editable elements
  • Event Listeners: Capture clicks and keyboard shortcuts

File Structure

TranslationReview/
├── manifest.json         # Extension configuration
├── popup.html           # Popup interface
├── popup.css            # Popup styling
├── popup.js             # Popup functionality
├── content.js           # Main editing logic
├── content.css          # Editing interface styles
├── icons/               # Extension icons
│   ├── icon16.png
│   ├── icon48.png
│   └── icon128.png
└── README.md            # This file

Technical Details

  • Manifest Version: 3 (latest Chrome extension standard)
  • Permissions: activeTab, scripting
  • Content Script Injection: Runs on all URLs (<all_urls>)
  • Browser Compatibility: Chrome, Edge, and other Chromium-based browsers

Future Enhancements

This is version 1.0.0 with basic text editing functionality. Planned features include:

  • 🌍 Translation integration
  • 💾 Save and export changes
  • 📝 Change history and tracking
  • 🎨 Custom styling options
  • 🔄 Sync across devices
  • 📊 Statistics and analytics

Troubleshooting

Extension Not Working?

  1. Refresh the page after enabling edit mode for the first time
  2. Check permissions: Make sure the extension has access to the current site
  3. Reload extension: Go to chrome://extensions/ and click the reload icon
  4. Check console: Press F12 and look for error messages

Can't Edit Certain Elements?

Some elements like input fields, textareas, and already-editable content are skipped to avoid conflicts.

Development

To modify the extension:

  1. Make changes to the source files
  2. Go to chrome://extensions/
  3. Click the reload icon on the TranslationReview card
  4. Test your changes on a webpage

License

This extension is provided as-is for personal and educational use.

Version History

  • v1.0.0 (2024): Initial release with basic text editing functionality

Note: Changes made with this extension are temporary and will be lost when you refresh the page. Future versions will include save functionality.

About

Chrome extension for order-based translation review: maps a translation order file onto a live preview page, edit segments inline, download the updated file.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages