Localisation #4

Open
opened 1 year ago by adam-cleo · 1 comments

Hi there,

this captcha solution looks really great. The biggest isue preventing me from using is missing localisation for German. The biggest problem here is probably about the data. Can you add a localisation guide? I see if the SQL file that the answer is hashed to prevent bots from matching the answer right?

Would it make sense to add a script that generate from Question:Answer pairs the SQL structure for self hosted solutions?

Hi there, this captcha solution looks really great. The biggest isue preventing me from using is missing localisation for German. The biggest problem here is probably about the data. Can you add a localisation guide? I see if the SQL file that the answer is hashed to prevent bots from matching the answer right? Would it make sense to add a script that generate from Question:Answer pairs the SQL structure for self hosted solutions?
Owner

add a script that generate from Question:Answer pairs the SQL structure

You could do that. It might be easier to use the MySQL Workbench program, which can generate SQL code and supports importing data from a .csv file. The database.mwb file in this repository is a MySQL Workbench project file. The database.sql file was generated from it.

FYI, you don't need to hash the answers; you can put them in plaintext in the column access_answers.acatext in the database.

Here's a brief localization guide for self hosting:

  1. Translate the strings in captcheck.js
  2. Change the image names in the database, for example:
    INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (4, 'cloud', 'cloud');
    becomes
    INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (4, 'Wolke', 'cloud');
  3. Change the text questions in the database, for example:
    INSERT INTO `captcheck`.`access_questions` (`acqid`, `acqtext`) VALUES (10, 'The list pink, yellow, library and purple contains how many colours?');
    becomes
    INSERT INTO `captcheck`.`access_questions` (`acqid`, `acqtext`) VALUES (10, 'Die Liste rosa, gelb, Bibliothek und lila enthält wie viele Farben?');
  4. Change the text answers. Multiple correct answers can be provided for each question, to allow for things like "10" and "ten" being valid for the question "what is five times two?".
    INSERT INTO `captcheck`.`access_answers` (`acaid`, `acqid`, `acatext`, `acahash`) VALUES (1, [question ID/acqid], 'answer_text', 'NULL');
    INSERT INTO `captcheck`.`access_answers` (`acaid`, `acqid`, `acatext`, `acahash`) VALUES (2, [question ID/acqid] 'NULL', 'MD5_answer_hash');
    

Note that if you hash the answers, they should be all lowercase and hashed with MD5.

> add a script that generate from Question:Answer pairs the SQL structure You could do that. It might be easier to use the MySQL Workbench program, which can generate SQL code and supports importing data from a .csv file. The `database.mwb` file in this repository is a MySQL Workbench project file. The `database.sql` file was generated from it. FYI, you don't need to hash the answers; you can put them in plaintext in the column `access_answers.acatext` in the database. Here's a brief localization guide for self hosting: 1. Translate the strings in `captcheck.js` 2. Change the image names in the database, for example: ```INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (4, 'cloud', 'cloud');``` becomes ```INSERT INTO `captcheck`.`answers` (`aid`, `aname`, `aimg`) VALUES (4, 'Wolke', 'cloud');``` 3. Change the text questions in the database, for example: ```INSERT INTO `captcheck`.`access_questions` (`acqid`, `acqtext`) VALUES (10, 'The list pink, yellow, library and purple contains how many colours?');``` becomes ``` INSERT INTO `captcheck`.`access_questions` (`acqid`, `acqtext`) VALUES (10, 'Die Liste rosa, gelb, Bibliothek und lila enthält wie viele Farben?'); ``` 4. Change the text answers. Multiple correct answers can be provided for each question, to allow for things like "10" and "ten" being valid for the question "what is five times two?". ``` INSERT INTO `captcheck`.`access_answers` (`acaid`, `acqid`, `acatext`, `acahash`) VALUES (1, [question ID/acqid], 'answer_text', 'NULL'); INSERT INTO `captcheck`.`access_answers` (`acaid`, `acqid`, `acatext`, `acahash`) VALUES (2, [question ID/acqid] 'NULL', 'MD5_answer_hash'); ``` Note that if you hash the answers, they should be all lowercase and hashed with MD5.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Netsyms/Captcheck#4
Loading…
There is no content yet.