wpgp-tools
wpgp-tools copied to clipboard
A browser extension to help you translate faster and better on translate.w.org
WPGPTools - Translate faster and better
![](https://user-images.githubusercontent.com/65488419/124776835-6defbf00-df48-11eb-9594-c538fe220dbd.png)
Adjust the Settings for this extension in the top blue navigation menu Tools Settings
#1 Consistency Tools
Watch a demo video for Consistency Tool features.
![](https://user-images.githubusercontent.com/65488419/117620318-11a33580-b179-11eb-9968-f1148d58686c.png)
Quick links: copy URL or open in new tab
- Permalink
- History
- Consistency
![](https://user-images.githubusercontent.com/65488419/136012481-2c578ceb-8eaa-461a-9240-1ae84f54ef35.png)
Search a string in:
- current project, current locale
- WordPress development project, current locale
- consistency tool, current locale
- multiple plugin slugs separated by
![](https://user-images.githubusercontent.com/65488419/136034004-c4cc7d52-36c3-4123-81f8-622eb5833540.png)
Suggestions directly from Consistency
- Auto loads on editor opening or
Alt + C
to load them all. - Translation Memory sometimes has bad translations (see #meta5340)
- This shows Consistency translations directly in the editor panel
- Button or Alt + the number of the suggestion to replace it in the textarea
- Also displays plural forms and highlights spaces
-
⟵
next to the current translation of the string if available
GoogleTranslate button - Link or Alt + G to open in a new tab current translated string in current locale, if locale exists on GT. (missing locales in GT)
Non-translatable strings
- Highlight non-translatable strings in original
- Click on any non-translatable item in original
- Display real time usage of non-translatable strings
- Insert individual or Copy all
#2 General Checks
Watch a demo video for Checks feature.
These checks run for all translated strings when page loads and when a translation is submitted.
Checks can be set as: Warning & prevent save, Just notification or Don't check.
Notices and labels for checks results
Highlights double spaces and user defined "bad words" (eg. below: link)
![](https://user-images.githubusercontent.com/65488419/117626608-f4be3080-b17f-11eb-91a7-fefd621df320.png)
To bypass warnings, click
Save / Approve with warnings
Personalize checks as you see fit:
Prevent saving these words is a user defined list of words that if found in a translation will generate a warning. Separated by comma, no space, case insensitive.
TIP: Include a double space string
in this field to always prevent the saving of double spaces.
Count and match these is a user defined list of terms or symbols that will be counted both in original and in translation. If counts don't match, a warning will be generated. Separated by comma, no space, case insensitive.
Tag spaces checks will ensure that:
- there are no missing spaces before or after the tag pair. Wrong example:
This is<strong>bold</strong>and nice.
- there are no additional spaces inside the tag pair. Wrong example:
This is <strong> bold </strong> and nice.
Filter strings based on warnings:
#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 in an issue.
#4 History Tools
Watch a demo video for History Tools feature.
These are opt-in tools, so go to Settings > History Tools and enable them if you want to use them.
I. History Compare compares the string with a corresponding string from History
String status | Compared with |
---|---|
Old | Current |
Rejected | Current |
Waiting | Current |
Fuzzy | Waiting |
It adds preview and editor label and a diff highlighter in editor.
![](https://user-images.githubusercontent.com/65488419/124783181-8c0bee00-df4d-11eb-88d7-9ad0598f4455.png)
II. History Count counts (regardless of string status) types of strings in History for the respective string; doesn't count itself. It also checks if there are multiple current translations for the same string and will show a visual status of this check: ❌ or ✔️.
III. History Tools in Translation History enables or disables these tools on History pages opened trough a link.
#5 Bulk Consistency Tools for GTEs
Watch a demo video for Bulk Consistency Tools feature.
This is an opt-in only for GTEs tool. Even if you activate it, it only fully works for GTEs.
- Replace strings in bulk
- Reject strings in bulk
- Limited to 25 strings per action
#6 Custom Keyboard Shortcuts
Action | Shortcut | Alternative Shortcut for Mac |
---|---|---|
Fuzzy | Ctrl + * (numeric keyboard) Control + Shift + F |
|
Save with warnings | Shift + Ctrl + Enter | |
Load all Consistency suggestions | Alt + C | control + C |
Copy consistency #3 | Alt + 3 | control + 3 |
Google Translate | Alt + G | control + G |
Focus on Search in Projects | Alt + S or Alt + P | control + S or control + P |
Insert all Non-translatables | Alt + N | control + N |
Note: Disable custom keyboard shortcuts if you use keyboard Alt + numbers
to insert special characters. WPGPT overrides that shortcut.
#7 Other features
- Keeps the editor in the middle of the screen when Page Up/Page Down shortcuts are used
- Added and Last modified in browser's local date format and time zone. This works correctly if the device language and time are set to your country language and timezone.
- Prompts for unsaved strings
- Adds an Anonymous author checkbox for user filter
- Consistency Bulk replacement for GTEs (disabled by default)
Installation
Chrome, Edge, Opera & Brave - Download from Chrome Web Store
Firefox - Download from Firefox Add-ons
(The Tampermonkey user script version no longer get updates notifications and will not be maintained, so please use the official extension.)
GlotDict compatibility
WPGPT asumes by default that you use GlotDict as well and so it disables features that have been imported in GlotDict. If you don't use GlotDict, change this behaviour in Tools Settings. But take a look first at what GlotDict has for you! :)
Backup & Restore Settings
![](https://user-images.githubusercontent.com/65488419/127963637-fde72b20-c931-43db-a187-3c3aa9a08044.gif)
Your settings are saved locally using LocalStorage so they will remain saved in that browser untill you clear your browser data. To backup and restore WPGPT settings:
- Go to Settings.
- Drag and drop Backup WPGPT Settings to your Bookmarks bar.
- Restore your settings by clicking that bookmark.
Known issues
- Tooltips overlap for the Quick Links section (should be fixed upstream)
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.
- When a feature will be included in GlotPress (the long term plan for as many features as possible) it will be excluded from this extension.
Changelog
Documentation
Contributions
Contributions are welcome, bugreports, suggestions and even pull requests! No limitations, shoot for the stars!