Reject message set in the module's settings is not translatable for each site language or is it somehow?

Also I allowed Hiragana and Katakana language scripts but still a contact form submission with Japanese characters is blocked. Is it because Japanese writing also has many Chinese characters? But I couldn't find Chinese Kanji in the list of language scripts. How is this handled?

Comments

kaipipek created an issue. See original summary.

altagrade’s picture

Dear kaipipek,

Thanks for reporting the issue.

When introducing the language scripts into the module we used Unicode Character Ranges. You can view all the ranges starting from line136 of the protected_submissions.module file.

Unfortunately, nobody in our team speaks Japanese, so if the existing Unicode Character Ranges are not sufficient to cover all Japanese characters, then you have to either (1) submit a patch, or (2) run several tests to find and let us know which exact UTF range the blocked character belongs to and then we'll try to include it to the module. You can see similar issue on https://www.drupal.org/project/protected_submissions/issues/3130266

altagrade’s picture

Status: Active » Postponed (maintainer needs more info)

Also I noticed there is the following UTF range:

'Kangxi' => [
      '2F00 - 2FDF',
    ],

in the module. I am not sure if Kangxi is the same as Kanji you reported missing, but could you please enable that range and give another try?

kaipipek’s picture

I enabled Kangxi, but it didn't help. I tested with just a random Japanese text from previous emails e.g. 菅原あゆみ or 規格 ジャバラタイプ and they were rejected.

How about the other issue I mentioned, translating the "Reject message" text?

altagrade’s picture

I've just pushed number of changes to dev. Could you please remove the modules' directory, run git clone https://git.drupalcode.org/project/protected_submissions.git and give another try? In particular, you can now translate the module's configuration texts and also post Japanese texts like 菅原あゆみ or 規格 ジャバラタイプ by choosing CJK, Hiragana, Kana, Katakana and Latin.

kaipipek’s picture

I can confirm that we can now send the Japanese messages we have tested and also the configuration texts are being translated. Great work and thank you for the quick resolution!

altagrade’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks for confirming. I will then mark this as fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.