Loïc Antignac
Forum Replies Created
-
Thanks.
I’ll fix my code in a little over a week.Hello,
I just ran the test locally on a fresh WordPress 6.8.3 install:
I installed Consistency and created a very simple MU-plugin that uses the only hook I provide to disable rule localization:<?php
namespace ConsistencyOverride\Locales;
defined( 'ABSPATH' ) || exit;
/**
* Plugin Name: Consistency Localization Override
* Description: Allows every locale to access every rule during local tests.
*/
/**
* Always allow every locale to use all rules to ease local tests.
*
* @return bool False to disable localization filtering.
*/
function allow_all_locales(): bool
{
return false;
}
add_filter( 'Consistency\only_show_locale_correction_rules', __NAMESPACE__ . '\\allow_all_locales' );In WordPress settings, I selected the Swiss German locale (de-CH), then went to the post editor and enabled everything I could (some settings aren’t available when they conflict with others).
I started typing in English (since my German basically only extends to saying I’m hungry) using the characters you’re having trouble with, and the straight quotes were indeed automatically replaced by French quotation marks, and the en dashes and em dashes as well… It works.So I suspect an issue in the option stored in the database, and I think the simplest test is to cleanly uninstall Consistency, then reinstall it and test as I did. If the problem persists, and the WordPress and Consistency versions are the same, then I suggest testing with all other plugins deactivated, as well as any browser extensions—which can cause a lot of interference (I know this; I coded one back in the day).
Tested on Brave and Safari.
https://github.com/user-attachments/assets/b4dd64c3-db91-4c01-a8ac-6a659b09f32c
- This reply was modified 7 months, 1 week ago by Loïc Antignac.
Hello,
Sorry for the delay.I’ll run tests tomorrow, Tuesday, in debug mode and will keep you posted.
Have you tried uninstalling and then reinstalling the plugin?
You would lose the settings stored in the database since they’d be deleted, but this may resolve the issue, which could be caused by updating the settings between two different versions of the database schema.I will program a compatibility with Polylang but it will take me a little time 🙂
Hello,
Sorry I didn’t receive a notification for your message.
Concerning Polylang, I hadn’t thought about this case but I’ll look this weekend because it would be interesting to be compatible.In the meantime you can disable the locale control by just adding this line of code in your functions.php file:
add_filter( 'Consistency\only_show_locale_correction_rules', '__return_false' );The rules that are displayed depending on the locale are listed on the GitHub repository:
https://github.com/webaxones/consistency/?tab=readme-ov-file#description
Well, the normal method for non-paid plugins is to do it on Translate, respecting the glossary and typographical rules of the locale so that everyone can benefit from it. Then make a validation request to a PTE.
Only the stable version requires translation and in the the stable readme, only strings appearing on the plugin page in the official repo. But not those tagged “Priority: low”.
But first make sure that the plugin meets your needs 😀
And don’t hesitate to give me your feedback.New version: 1.5.3
Oops. I need to publish a new version because the new settings are not saving.
This afternoon.Hi @ghimmelein
Version 1.5.0 includes a first attempt at German language support (in fact:
de_DE,de_AT,de_CH, and evenro_RObecause you have some common points). I haven’t managed everything yet because the quotation marks in German are complex 😀Also pay attention to the fact that the 2 rules for German quotation marks are not compatible: you must choose one or the other.
And I couldn’t translate the extension into German because I don’t have the skills.
Ok, so apart from the opposite case for Swiss Germans, indeed the ß seems to be a bad idea.
For French words, I hadn’t thought about it and I discovered that the English are not the only ones to use them, the Germans too!
Then, it’s a bit risky all the same: there can be 2 different cases of use in French, and also which spelling to use, that of French, or that used in the country which uses the expression?
Examples in French:
I have already seen this movie : J’ai déjà vu ce film
A feeling of déjà vu : Une sensation de déjà-vu- This reply was modified 2 years, 1 month ago by Loïc Antignac.
Thank you very much for this detailed response! Since I haven’t practiced German since I was 14, I have a question: Would it be useful for German writers to automatically transform “ss” into “ß”, or is it unnecessary because keyboards have been adapted for a long time?
We have a few public holidays in France in May: I will take advantage of this to develop the plugin. I’ll keep you up-to-date 🙂
@ghimmelein I guess my response comes way too late but I apologize: I didn’t receive a notification for your message and only saw it today.
For the moment, the only locales covered are these ones (‘fr_FR’, ‘fr_BE’, ‘en_US’, ‘en_AU’, ‘en_CA’, ‘en_NZ’, ‘en_ZA’, ‘en_GB’), but I was planning to take an interest in German soon. If you have documents on the specificities of this language, I am interested. 🙂
Hi,
Have you cleared your browser’s cache? Clearing the cache for Gutenberg can be particularly tricky. Often, it’s necessary to add the line:
define( 'SCRIPT_DEBUG', true );to thewp-config.phpfile to force the use of uncompiled JS scripts. You can test this, but avoid using it in a production environment due to performance concerns.Alternatively, I have another idea: are you using the Safari browser? Safari (and all non-V8 browsers) have not yet implemented Lookahead and Lookbehind in regex. Since this feature should be implemented within the year for Safari, I decided to wait rather than redesign the entire regex logic.
If you’re not using Safari, are you using an outdated browser? Can you try testing on other browsers? Lastly, have you attempted to disable browser extensions?
Thank you for your patience.
Forum: Plugins
In reply to: [Consistency – Typography Corrector for Gutenberg] Break linksFor information, I have just released version 1.4.5 which fixes the problem.
Hi,
You are not on the site editor (Full Site Editing) but on a page or a post? Because Consistency is deliberately not active on the site editor. Otherwise you can just look in the browser’s inspector console and make me a copy (text or screenshot) of the errors (in red) if there are any.