Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If a waiting string does not have a semi colon in the middle of the sentense, then no warning is shown #14

Closed
psmits1567 opened this issue Jul 6, 2021 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@psmits1567
Copy link

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
afbeelding
Original:
Search Results for: %s
Translation missing the ":"
Zoek resultaten voor %s

@vlad-timotei vlad-timotei added the enhancement New feature or request label Jul 6, 2021
@vlad-timotei vlad-timotei added this to the future release milestone Jul 6, 2021
@vlad-timotei
Copy link
Owner

Was thinking about including this in v.1.4, but also trying not to overpopulate the settings.
If we add a check to match the count of : in original and translated, then we would want to match the count of other symbols as well: !, ?, ., , and so on. This makes it impossible to create a clean UI with a setting for each of these.

I was thinking about a setting like this to catch them all:
image
This way, user can define the symbols they want to be counted and generate a warning if the counts don't match.

Also, to keep the settings to a minimum, I was thinking of dropping the setting "Notify about these words" as it can be redundant. There is already the setting "Warn / prevent saving these words". What do you think about this?

vlad-timotei added a commit that referenced this issue Jul 11, 2021
Adds an option to set a list of strings that will be counted in original and translation and then matched. A warning will be generated if counts don't match.

Replaces regex in checks with optimized function, where possible. Up to 10 times faster, according to author.

Removes the break in finding the warning words after the first word is found.

Removes the "Notify about these words" option.

Fixes:
#14,
#19,
#8
@vlad-timotei
Copy link
Owner

Quoting Peter:

I agree a list of characters to check makes it flexible. There is no need to warn for certain verbs, if you have the prevent save list

The above implementation is included in 1.4.

@vlad-timotei vlad-timotei modified the milestones: future release, 1.4 Jul 11, 2021
vlad-timotei added a commit that referenced this issue Jul 18, 2021
Adds an option to set a list of strings that will be counted in original and translation and then matched. A warning will be generated if counts don't match.

Replaces regex in checks with optimized function, where possible. Up to 10 times faster, according to author.

Removes the break in finding the warning words after the first word is found.

Removes the "Notify about these words" option.

Fixes:
#14,
#19,
#8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants