vlad-timotei / wpgp-tools Goto Github PK
View Code? Open in Web Editor NEWA browser extension to help you translate faster and better on translate.w.org
License: GNU General Public License v3.0
A browser extension to help you translate faster and better on translate.w.org
License: GNU General Public License v3.0
Various times, I find plugins that have more translated strings then current. Hunting these down is made easier with this extension and the history feature.
Now, I would find it quite handy if this tool gave some sort of warning (those triangle warnings maybe?) when there are 2 currents for a string.
That way you can find these
Even easier.
I left this one alone for testing this feature:
Edit: it could also give some sort of warning at the top where the numbers are to draw the attention that those numbers don't match...? I would only put a check there if the translated > all. Because if you display a warning when all > translated, you'd trigger a warning every not 100% translated plugin :P
I have several settings on warn & prevent like spaces, double spaces and the tools WARNS after the fact but doesn't prevent saving.
In 1.4 History Tools compare a Fuzzy state string with only the latest Waiting state string, where as it is possible to have multiple Waiting state strings. (one-to-one comparation implementation)
To be included as a scenario in the one-to-many comparation implementation algorithm.
According to this article we have a year by now to migrate to manifest V3 if we want to be able to push updates after this date.
January 2023: The Chrome browser will no longer run Manifest V2 extensions. Developers may no longer push updates to existing Manifest V2 extensions.
Seems like Mozilla has the same plans: https://blog.mozilla.org/addons/2021/05/27/manifest-v3-update/
Opening this ticket to track progress on this matter.
Would it be possible to show a build number eg in the settings that increases/changes with each commit?
The goal is for testers to know if they are on the latest build of the development.
I have everything on "Warn & prevent save" in the options menu... Yet, if I save a string that doesn't have a . , ? , ! at the end and I save it with one... The tool doesn't stop me anymore. It does give a warning after saving, but it doesn't prevent.
This option is mostly redundant, as user already has "Prevent saving these words" that generates a warning.
There is no need to generate a notification and not a warning if a certain word is "bad".
If it's a false positive result, then user can always check "Save / approve with warnings" or even remove the word from the list, if the percent of false positive results is too high
This gives the chance to keep a minimum number of options while implementing #14 (comment)
I would like to have a small discussion. I was helping a new translator who installed WPGP and she said: "Why is it plural? Since, you are adjusting the settings of the WPGP Tools? And not adjusting the settings of multiple tools right?"
So, the menu item... Plural or singular?
Is it possible to specify several plugins here in "another plugin" selection?
Props: @fierevere & ru_RU PTEs 🙌🏻
Additional context: While it's not possible to add a wildcard/mask since there is no API for that, it's possible to make so that the field accepts multiple slugs.
I was working on: https://translate.wordpress.org/projects/wp-plugins/broken-link-checker/stable/nl-be/default/?filters%5Btranslated%5D=yes&filters%5Bstatus%5D=waiting&page=12
And I wanted to check if I translated "broken link"' to "gebroken link"... But when I searched in the current project, I only got the current strings that I already tweaked and not in the waiting strings I imported and set to waiting.
A warning is given about a missing end period, but that is not correct the end period is present
The message is incorrect, as the endpoint is present. It is caused by the fact that a blank is behind the endpoint
I think that the flow should be:
if additional blank present (warning)
if missing endpoint (warning)
Reporting the extra blank is also noted as issue for GlotPress
Describe the bug
not_translated_from_elipsis check works only when period symbol is .
Expected behavior
The below string should not generate a warning.
Additional context
More insights from Nao needed.
So, this extension adds a feature to go an see what Google Translate gives you. But something I like of the filler tool is that you can also use others like DeepL or Microsofts. Can a future version have an option to choose which translator you want to use?
as requested by @psmits1567
The original asks a ":" but I get a warning that I added an additional ":"
For the same reason I provided on WP Meta Trac, the "missing period" error should be customized for some locales.
These are different variations of the period symbol that I know of.
Bonus point if these can also be automatically sorted, but I'm happy simply if the check between "." and "。" is implemented 😝
But in Japanese, we use the English period when the string is not translated (e.g. "All Rights Reserved.". I can't confirm but I think this is the same for others. Happy to do more research once we decide on the direction!
Also, the ellipsis (
...
) at the end of a sentence tends to stay as-is for many locales (Japanese uses a native character for it, which is a single letter:…
). There may be other exceptions like this.
In the current version, missing double spaces is seen as a warning... Yet, this tool also warns you when you have double spaces in your translation.
So, I would have an "warn on double spaces" as an option. Since I think most locales want to avoid double spaces in their translations no?
If it's possible to build in a warning for these kind of suggestions, would be nice.
I'm currently also working on decreasing the nl_NL-formal strings and the script didn't give me a warning when I edited this fuzzy:
The URL was changed and I tried to save it without changing it and the tool didn't stop nor warn me.
The "warnings" feature can give us an easy way to quickly find mistakes and improve them... But what if this feature could also pick up mistakes in url translations?
I noticed that the fuzzy bot doesn't always fuzzy http:// to https:// changes (which is security wise an important change) and it would be neat if that could also appear in warnings...
(The http:// to https:// is just an example!)
I think it could improve our workflow if we had:
When you are setting up the bulk replacement for GTE's in the consistency tool, once you click "Don't translate..." you can't "unclick" it apart from refreshing the page.
I think it would be more user friendly if it's possible somehow. For example, by adding a sort of "undo" button?
I am under the impression you don't always get a warning when you try to save a string with a double space.
If WPGPT is active and a translation contains a lot of suggestions from TM or suggestions from consistency, the content box is moved up to far. After this you cannot read the original anymore, you need to scroll the content box down to see the original again.
If WPGPT is not active, then this is not happening.
Scrolling is fine, but the original should always be visible.
Below an example what I see happening
In the options, the "broken placeholders" has no "enable/disable". I would either add that option or remove it from the settings menu, since it gives an incomplete impression.
A lot in this plugin, strings that end on a ":" have an end space. But, not this string. The warning I got is that the translation is missing either a ".","!" or "?" ... But it was missing nothing, it was an additional end space.
Reported by @naokomc
One thing I noticed, specific to Japanese and any others with nplurals = 1; (there are others according to
locales.php )When we translate something like this,
https://translate.wordpress.org/projects/wp-plugins/mfs-slider/dev/ja/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=8910428&filters%5Btranslation_id%5D=87904071
We just need to translate it once using %s as the placeholder for any number, because nothing around the number changes no matter what the value is.So in that case,
Additional placeholder: %s
error is not necessary for us here.I hope that makes sense!
In another word, we can say something like “1 group” or “100 group” – the noun doesn’t change based on the number.
Additional context:
Currently, the comparison for all checks is being made between original (singular) and first translation form and original ( plural ) and next translation forms. This can be generally improved and in this case: if nplurals === 1
compare plural string with translation instead.
When you are working on a discontinued project and look at the consistency results... For some reason, WPGP can look in other discontinued projects while if you then look in the actual consistency tool, those projects are filtered out.
EG: https://translate.wordpress.org/locale/nl/default/wp-themes/black-rider/
When bulk replacing from the consistency tool... WPGP doesn't replaces strings likes this. As soon as "plugin name" is in the comment... It's blocked.
This is a double edged sword. It's a good idea to block it, since not every dev comments the same. BUT, then you have moments like this. Where the dev comments that a placeholder is the plugin name so nothing to worry about but WPGP stops you...
Maybe food for thought?
Currently, we have in waiting when another string is waiting OR when it has rejected ones. But it seems to fail when it has a current one.
Don't know if this is a bug OR a feature that isn't here yet.
And as you can see, it has a history.
Trying to debug and find examples for #44, I wondered:
What if you agreed in your locale that you aren't going to have double spaces because, e.g., "it looks weird" then you have a strange situation when there is one in the original.
-> When you remove the double space, the tool gives a notification that there is one missing.
-> When you place a double space somewhere by accident, no warning is given nor a notification.
So, I think it would be cool if you have a setting where you can say: "Warn on double spaces, regardless of the original" or something of that nature. Where the WPGP-Tools gives off a warning if you have a double space in your translation even when there are double spaces (one or more) in the original.
Some languages do not use a single-byte space as a word divider. There is no word divider in Japanese, Chinese, Thai, Lao, and Khmer.
https://en.wikipedia.org/wiki/Word_divider?oldformat=true#None
It would be great if the space warning around HTML tags can be modified to accommodate these languages.
Add a space only if tag is next to a single-byte character.
日本語に接している<a href="#">タグ</a>です。
英単語に接している <a href="#">tag</a> です。
英単語に接している "<a href="#">tag</a>" です。
英単語に接している <a href="#">"tag"</a> です。
These are missing spaces around HTML tags.
英単語に接している<a href="#">tag</a>です。
英単語に接している<a href="#">"tag"</a>です。
英単語に接している"<a href="#">tag</a>"です。
不正な<code>function_name</code>。
(for this one, only 1 space is missing – before the opening tag. No space is needed after the closing tag since the character after it is a Japanese period)No spaces before or after tags.
-要发表评论,您必须先<a href="%s">登录</a>。
(See translation history)
-<strong>WordPress升级成功!</strong>请重新登录以查看更新详情。
Found this bug out with this string: https://translate.wordpress.org/projects/wp-plugins/wordpress-seo/dev/nl-be/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=12313995&filters%5Btranslation_id%5D=92548134
As you can see, in the plural version of this string... %7$s is used where in the singular %6$s is used. WPGP shows in the "non translateable" that %6$s is missing in the plural...
Currently if you save a name of a Theme/plugin or link but have translated it, then no warning is shown when saving.
I would be nice if the tool gave a warning about this problem, but it should be put under a parameter.
Not every locale wants names not to be translated.
The following should be checked.
The second request regarding to this is, that it would also be great if this is checked as well when discovering issues on a page
Is your feature request related to a problem? Please describe.
The original string "number_format_thousands_sep" indicates the seperator and doesn't need a translation. In many cases, it will be "translated" as a simple period. But this gives a warning "Additional end perdiod (.)"
Describe the solution you'd like
Don't show warnings for "number_format_thousands_sep" and "number_format_decimal_point" or don't show warnings if the translated string is only 1 character
String URL to exemplify
https://translate.wordpress.org/projects/wp/dev/de/default/?filters%5Bterm%5D=number_format
After https://meta.trac.wordpress.org/changeset/11042 there is an issue with false warnings for strings with plural forms, because it compares
To be fixed...
From a discussion of #46 in DM's in Slack...
Currently, WPGP only checks if you add an additional "." at the string, but it doesn't check for other punctuation marks. I think this could be a nice extension of the toolset.
Hi, I am the creator of GlotDict (https://github.com/Mte90/GlotDict) a browser extension for chrome and firefox with more then 500 users http://mte90.tech/ExtStoreStats//data/glotdict.html.
It is mentioned on polyglots handbook and there are various maintainers with me helping the project moving further.
We were thinking that we can join the forces and integrate everything in GlotDict and add you as mantainers.
I don't know if you are also on the wordpress int slack because we have a chat group there.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Close tabs should disappear.
Additional context
Probably the issue is within a toggle logic.
Regression introduced in 1.5
This is because .wpgpt-search-close-tabs
button acts like a submit button.
Adding a type="button"
fixes the issue.
So, when you open a translated (current) string, the handy buttons for a consistency check, perma link... are gone.
I think it would be handy to still have them since if you quickly need the link to the translation to submit a ticket of a typo... it could be handy to have that button if you already translated it.
So, to save some time, I downloaded the complete translation from nl_NL to tweak for nl_BE for the broken link checker plugin.
Then I noticed this:
It seems kinda strange to me that the script can tell you when you are missing a punction mark at the end but when an unneeded one is added, you don't get a warning.
Describe the bug
If user has Number of items per page setting at https://translate.wordpress.org/settings/ lower than the number of translations in history, History Tools will fail to work properly.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
HistoryTools should work regardless of user settings.
The history labels are shown within a page, when old records exists.
If you go into the editor of such a record, and select GlotPress history, the labels that show the count of history items are still shown. This is a bit of overkill, as you do see all the history within the list.
When within the GlotPress history, those labels can be left out as they have no purpose
The add-on checks for missing semi colon at the end of the sentence. It would be good to check the presence of a semi colon everywhere within the sentence, and throw an error if one is missing.
Example:
https://translate.wordpress.org/projects/wp-themes/gridbox/nl/formal/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=3344973&filters%5Btranslation_id%5D=45467476
Original:
Search Results for: %s
Translation missing the ":"
Zoek resultaten voor %s
So, it turns out that #25 works just fine... But because I cleaned my cookies & browser cache, it """stopped""" working because, to quote @vlad-timotei himself: "It's very resource consuming this feature, so I only want people that need it to enable it."
So, to help new users or users who aren't too use to this tool... Maybe a warning message about the options being saved in a cookie (and maybe have an import/export feature in the long term) would be extremely handy and make the tool more user friendly imho.
Describe the bug
Consistency and GT suggestions don't remember state on single row pages
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Remember toggle state
Additional context
This works fine on pages with multiple rows. This is something that has to do most probably with a GP implementation of the script. To be investigated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.