Add spell checking with typos (#4138)

* Add spell checking with typos
Implement https://github.com/FreshRSS/FreshRSS/pull/4134#issuecomment-1008027558

* GitHub Actions attempt

* Quiet wget

* Makefile
This commit is contained in:
Alexandre Alapetite
2022-01-09 18:21:40 +01:00
committed by GitHub
parent 9dbbe924c5
commit 4e2dff4591
24 changed files with 119 additions and 71 deletions

View File

@@ -5,7 +5,7 @@
*/
/**
* La classe ActionController représente le contrôleur de l'application
* The Minz_ActionController class is a controller in the MVC paradigm
*/
class Minz_ActionController {
protected $view;
@@ -16,9 +16,6 @@ class Minz_ActionController {
// Gives the possibility to override the default View type.
public static $viewType = 'Minz_View';
/**
* Constructeur
*/
public function __construct () {
if (class_exists(self::$viewType)) {
$this->view = new self::$viewType();

View File

@@ -5,7 +5,7 @@
*/
/**
* La classe Error permet de lancer des erreurs HTTP
* The Minz_Error class logs and raises framework errors
*/
class Minz_Error {
public function __construct () { }
@@ -48,10 +48,9 @@ class Minz_Error {
}
/**
* Permet de retourner les logs de façon à n'avoir que
* ceux que l'on veut réellement
* @param array<string,string>|string $logs les logs rangés par catégories (error, warning, notice)
* @return array<string> liste des logs, sans catégorie, en fonction de l'environment
* Returns filtered logs
* @param array<string,string>|string $logs logs sorted by category (error, warning, notice)
* @return array<string> list of matching logs, without the category, according to environment preferences (production / development)
*/
private static function processLogs ($logs) {
$conf = Minz_Configuration::get('system');

View File

@@ -19,8 +19,9 @@
# ***** END LICENSE BLOCK *****
/**
* La classe FrontController est le Dispatcher du framework, elle lance l'application
* Elle est appelée en général dans le fichier index.php à la racine du serveur
* The Minz_FrontController class is the framework Dispatcher.
* It runs the application.
* It is generally invoqued by an index.php file at the root.
*/
class Minz_FrontController {
protected $dispatcher;
@@ -50,8 +51,8 @@ class Minz_FrontController {
}
/**
* Retourne un tableau représentant l'url passée par la barre d'adresses
* @return array représentant l'url
* Returns an array representing the URL as passed in the address bar
* @return array URL representation
*/
private function buildUrl() {
$url = array();

View File

@@ -5,7 +5,7 @@
*/
/**
* La classe Helper représente une aide pour des tâches récurrentes
* The Minz_Helper class contains some misc. help functions
*/
class Minz_Helper {

View File

@@ -5,7 +5,7 @@
*/
/**
* La classe Log permet de logger des erreurs
* The Minz_Log class is used to log errors and warnings
*/
class Minz_Log {
/**
@@ -107,20 +107,6 @@ class Minz_Log {
}
}
/**
* Automatise le log des variables globales $_GET et $_POST
* Fait appel à la fonction record(...)
* Ne fonctionne qu'en environnement "development"
* @param string $file_name fichier de log
*/
public static function recordRequest($file_name = null) {
$msg_get = str_replace("\n", '', '$_GET content : ' . print_r($_GET, true));
$msg_post = str_replace("\n", '', '$_POST content : ' . print_r($_POST, true));
self::record($msg_get, LOG_DEBUG, $file_name);
self::record($msg_post, LOG_DEBUG, $file_name);
}
/**
* Some helpers to Minz_Log::record() method
* Parameters are the same of those of the record() method.

View File

@@ -5,7 +5,7 @@
*/
/**
* La classe Model représente un modèle de l'application (représentation MVC)
* The Minz_Model class represents a model in the MVC paradigm.
*/
class Minz_Model {

View File

@@ -5,7 +5,7 @@
*/
/**
* La classe Model_array représente le modèle interragissant avec les fichiers de type texte gérant des tableaux php
* The Minz_ModelArray class is the model to interact with text files containing a PHP array
*/
class Minz_ModelArray {
/**

View File

@@ -5,7 +5,7 @@
*/
/**
* La classe Paginator permet de gérer la pagination de l'application facilement
* The Minz_Paginator is used to handle paging
*/
class Minz_Paginator {
/**

View File

@@ -1,7 +1,7 @@
<?php
/**
* La classe Session gère la session utilisateur
* The Minz_Session class handles users session
*/
class Minz_Session {
private static $volatile = false;

View File

@@ -1,21 +1,21 @@
<?php
/**
* La classe Url permet de gérer les URL à travers MINZ
* The Minz_Url class handles URLs across the MINZ framework
*/
class Minz_Url {
/**
* Affiche une Url formatée
* @param string|array<string,string|array<string,mixed>> $url l'url à formater définie comme un tableau :
* Display a formatted URL
* @param string|array<string,string|array<string,mixed>> $url The URL to format, defined as an array:
* $url['c'] = controller
* $url['a'] = action
* $url['params'] = tableau des paramètres supplémentaires
* ou comme une chaîne de caractère
* @param string $encodage pour indiquer comment encoder les & (& ou &amp; pour html)
* $url['params'] = array of additional parameters
* or as a string
* @param string $encoding how to encode & (& ou &amp; pour html)
* @param bool|string $absolute
* @return string url formatée
* @return string Formatted URL
*/
public static function display ($url = array (), $encodage = 'html', $absolute = false) {
public static function display ($url = array (), $encoding = 'html', $absolute = false) {
$isArray = is_array($url);
if ($isArray) {
@@ -44,8 +44,8 @@ class Minz_Url {
}
if ($isArray) {
$url_string .= '/' . self::printUri($url, $encodage);
} elseif ($encodage === 'html') {
$url_string .= '/' . self::printUri($url, $encoding);
} elseif ($encoding === 'html') {
$url_string = Minz_Helper::htmlspecialchars_utf8($url_string . $url);
} else {
$url_string .= $url;

View File

@@ -5,7 +5,7 @@
*/
/**
* La classe View représente la vue de l'application
* The Minz_View represents a view in the MVC paradigm
*/
class Minz_View {
const VIEWS_PATH_NAME = '/views';

View File

@@ -131,17 +131,17 @@ function preprocessing_categories($doc) {
foreach ($outlines as $outline) {
$category = trim($outline->getAttribute('category'));
if ($category != '') {
$outline_categorie = null;
$outline_category = null;
if (!isset($outline_categories[$category])) {
$outline_categorie = $doc->createElement('outline');
$outline_categorie->setAttribute('text', $category);
$body->insertBefore($outline_categorie, $body->firstChild);
$outline_categories[$category] = $outline_categorie;
$outline_category = $doc->createElement('outline');
$outline_category->setAttribute('text', $category);
$body->insertBefore($outline_category, $body->firstChild);
$outline_categories[$category] = $outline_category;
} else {
$outline_categorie = $outline_categories[$category];
$outline_category = $outline_categories[$category];
}
$outline->parentNode->removeChild($outline);
$outline_categorie->appendChild($outline);
$outline_category->appendChild($outline);
}
}
}

View File

@@ -160,7 +160,7 @@ function escapeToUnicodeAlternative($text, $extended = true) {
function format_number($n, $precision = 0) {
// number_format does not seem to be Unicode-compatible
return str_replace(' ', '', //Espace fine insécable
return str_replace(' ', '', // Thin non-breaking space
number_format($n, $precision, '.', ' ')
);
}