Skip to content

NekoJonez/wpgp-tools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WP GlotPress Tools

This is a Chrome/Edge/UserScript extension to help you translate faster.

You can find the Settings for this extension in the top blue navigation menu Tools Settings

#1 Consistency Tools - view Demo

Search a string in:

  • current project, current locale
  • WordPress development project, current locale
  • consistency tool, current locale
  • a plugin of your choice

Quick links: copy URL or open in new tab

  • Permalink
  • History
  • Consistency

GoogleTranslate button

Suggestions directly from Consistency

  • Button or Alt + C
  • Translation Memory sometimes has bad translations (see #meta5340)
  • This shows Consistency translations directly in the editor panel


  • Button or Alt + 2 to copy 2nd suggestion,
  • Keyboard shortcut works for suggestion 1, 2 and 3

#2 General Checks - view Demo

image

Checks run:

  • for all translated strings when page loads
  • before a translation is submitted

Checks can be set as:

  • Warning & prevent save
  • Just notification
  • Don't check


  • To bypass a Warning & prevent save check, click Save / approve with warnings
  • Show only strings with failed checks using filters

image

#3 Locale specific Checks

If your locale uses a different symbol other than . for period, you can set it here. Additional specific locale checks can be added if requested. These work the same way as general checks. Please open an issue with the checks you'd like implemented for your locale and I'll try to make it happen.

image

#4 Custom Keyboard Shortcuts

Action Shortcut Alternative Shortcut
Fuzzy Ctrl + * (numeric keyboard) Ctrl + Shift + F
Google Translate Alt + G
Consistency Alt + C
Copy consistency #3 Alt + 3 works for 1-3
Focus on Search in Projects Alt + S Alt + P

Other features

  • Keeps the editor in the middle of the screen when Page Up/Page Down shortcuts are used
  • Prompts for unsaved strings

Installation

Only choose one of these two:

Google Chrome & Edge
  1. Get the latest release from here and extract to a folder.
  2. Open Chrome extensions chrome://extensions/ or edge://extensions/ and enable Developer mode.
  3. Then use Load Unpacked button and point to the wpgp-tools\src\ folder
  4. That's it! Go to a translate project to see it in action.
Firefox and other browsers via Tampermonkey
  1. Install the Tampermonkey browser extensions.
  2. Visit this page. TamperMonkey should take over from there and prompt to install the userscript. If this somehow fails, you can: manually copy the URL and install it in the Utilities > Install from URL or manually copy the script, click the + button and install it.

  • The first time you use Search in multiple projects feature, the browser will prevent opening multiple tabs.
  • Click on Options > Allow pop-ups for translate.wordpress.org and this will work properly in the future.

Known issues

  • Tooltips overlap for the Quick Links section (should be fixed upstream)
  • After Save/Aprove/Reject/Fuzzy the scripts don't reload for that row
  • It's an unpacked extension and the repo doesn't use workflows to build the release additional zip

Future version features

  • Personal translation notes & project status snippets
  • Personal glossary (this is included in WPTranslationFiller extension and GlotDict and I don't plan to overlap features!)
  • Gradually, some WPGPT features will be implemented in GlotDict, as part of a cross-project initiative. That said, WPGPT will continue to exist for those interested

Contributing

Contributions are welcome, bugreports, suggestions and even pull requests! No limitations, shoot for the stars!

About

Translation Tools

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 90.2%
  • CSS 8.6%
  • HTML 1.2%