From 023b3a4a76d6f3456bca91f37218d23187734f0c Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 3 Oct 2020 22:00:44 -0400 Subject: [PATCH 1/3] [langfilter] Replace remove Text_Language_Detect dependency by matriphe/iso-639 - Address https://github.com/friendica/friendica/issues/9250#issuecomment-703153334 --- langfilter/composer.json | 23 + langfilter/composer.lock | 63 +++ langfilter/langfilter.php | 8 +- langfilter/vendor/autoload.php | 7 + langfilter/vendor/composer/ClassLoader.php | 445 +++++++++++++++++ langfilter/vendor/composer/LICENSE | 21 + .../vendor/composer/autoload_classmap.php | 9 + .../vendor/composer/autoload_namespaces.php | 9 + langfilter/vendor/composer/autoload_psr4.php | 10 + langfilter/vendor/composer/autoload_real.php | 55 +++ .../vendor/composer/autoload_static.php | 31 ++ langfilter/vendor/composer/installed.json | 48 ++ langfilter/vendor/matriphe/iso-639/.gitignore | 2 + langfilter/vendor/matriphe/iso-639/.php_cs | 122 +++++ .../vendor/matriphe/iso-639/.travis.yml | 13 + langfilter/vendor/matriphe/iso-639/README.md | 65 +++ .../vendor/matriphe/iso-639/composer.json | 22 + .../vendor/matriphe/iso-639/phpunit.xml | 9 + .../matriphe/iso-639/resources/iso-639.csv.gz | Bin 0 -> 5715 bytes .../matriphe/iso-639/resources/iso-639.sql.gz | Bin 0 -> 6459 bytes .../matriphe/iso-639/resources/wikipedia.csv | 185 +++++++ .../vendor/matriphe/iso-639/src/ISO639.php | 460 ++++++++++++++++++ .../matriphe/iso-639/tests/ISO639Test.php | 239 +++++++++ 23 files changed, 1844 insertions(+), 2 deletions(-) create mode 100644 langfilter/composer.json create mode 100644 langfilter/composer.lock create mode 100644 langfilter/vendor/autoload.php create mode 100644 langfilter/vendor/composer/ClassLoader.php create mode 100644 langfilter/vendor/composer/LICENSE create mode 100644 langfilter/vendor/composer/autoload_classmap.php create mode 100644 langfilter/vendor/composer/autoload_namespaces.php create mode 100644 langfilter/vendor/composer/autoload_psr4.php create mode 100644 langfilter/vendor/composer/autoload_real.php create mode 100644 langfilter/vendor/composer/autoload_static.php create mode 100644 langfilter/vendor/composer/installed.json create mode 100644 langfilter/vendor/matriphe/iso-639/.gitignore create mode 100644 langfilter/vendor/matriphe/iso-639/.php_cs create mode 100644 langfilter/vendor/matriphe/iso-639/.travis.yml create mode 100644 langfilter/vendor/matriphe/iso-639/README.md create mode 100644 langfilter/vendor/matriphe/iso-639/composer.json create mode 100644 langfilter/vendor/matriphe/iso-639/phpunit.xml create mode 100644 langfilter/vendor/matriphe/iso-639/resources/iso-639.csv.gz create mode 100644 langfilter/vendor/matriphe/iso-639/resources/iso-639.sql.gz create mode 100644 langfilter/vendor/matriphe/iso-639/resources/wikipedia.csv create mode 100644 langfilter/vendor/matriphe/iso-639/src/ISO639.php create mode 100644 langfilter/vendor/matriphe/iso-639/tests/ISO639Test.php diff --git a/langfilter/composer.json b/langfilter/composer.json new file mode 100644 index 00000000..2f4f460f --- /dev/null +++ b/langfilter/composer.json @@ -0,0 +1,23 @@ +{ + "name": "friendica-addons/langfilter", + "description": "A language filter to collapse posts matching user-selected languages", + "type": "friendica-addon", + "require": { + "matriphe/iso-639": "^1.2" + }, + "license": "AGPL-3", + "authors": [ + { + "name": "Tobias Diekershoff", + "homepage": "https://f.diekershoff.de/u/tobias", + "role": "Developer" + }, + { + "name": "Hypolite Petovan", + "email": "hypolite@mrpetovan.com", + "homepage": "https://friendica.mrpetovan.com/profile/hypolite", + "role": "Maintainer" + } + ], + "minimum-stability": "stable" +} diff --git a/langfilter/composer.lock b/langfilter/composer.lock new file mode 100644 index 00000000..0c6baf66 --- /dev/null +++ b/langfilter/composer.lock @@ -0,0 +1,63 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "7524bbd9381490bdfd604a84385da630", + "packages": [ + { + "name": "matriphe/iso-639", + "version": "1.2", + "source": { + "type": "git", + "url": "https://github.com/matriphe/php-iso-639.git", + "reference": "0245d844daeefdd22a54b47103ffdb0e03c323e1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matriphe/php-iso-639/zipball/0245d844daeefdd22a54b47103ffdb0e03c323e1", + "reference": "0245d844daeefdd22a54b47103ffdb0e03c323e1", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^4.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matriphe\\ISO639\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Muhammad Zamroni", + "email": "halo@matriphe.com" + } + ], + "description": "PHP library to convert ISO-639-1 code to language name.", + "keywords": [ + "639", + "iso", + "iso-639", + "lang", + "language", + "laravel" + ], + "time": "2017-07-19T15:11:19+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "1.1.0" +} diff --git a/langfilter/langfilter.php b/langfilter/langfilter.php index 95488421..5c5f797a 100644 --- a/langfilter/langfilter.php +++ b/langfilter/langfilter.php @@ -13,6 +13,8 @@ use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\DI; +require __DIR__ . '/vendor/autoload.php'; + /* Define the hooks we want to use * that is, we have settings, we need to save the settings and we want * to modify the content of a posting when friendica prepares it. @@ -138,6 +140,8 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data) } $read_languages_array = explode(',', $read_languages_string); + $iso639 = new Matriphe\ISO639\ISO639; + // Extract the language of the post if (!empty($hook_data['item']['language'])) { $languages = json_decode($hook_data['item']['language'], true); @@ -153,7 +157,7 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data) return; } - $lang = Text_LanguageDetect_ISO639::code2ToName($iso2); + $lang = $iso639->languageByCode1($iso2); } else { $opts = $hook_data['item']['postopts']; if (!$opts) { @@ -169,7 +173,7 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data) $lang = $matches[1]; $confidence = $matches[2]; - $iso2 = Text_LanguageDetect_ISO639::nameToCode2($lang); + $iso2 = $iso639->code1ByLanguage($lang); } // Do not filter if language detection confidence is too low diff --git a/langfilter/vendor/autoload.php b/langfilter/vendor/autoload.php new file mode 100644 index 00000000..23e5df1e --- /dev/null +++ b/langfilter/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/langfilter/vendor/composer/LICENSE b/langfilter/vendor/composer/LICENSE new file mode 100644 index 00000000..f27399a0 --- /dev/null +++ b/langfilter/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/langfilter/vendor/composer/autoload_classmap.php b/langfilter/vendor/composer/autoload_classmap.php new file mode 100644 index 00000000..7a91153b --- /dev/null +++ b/langfilter/vendor/composer/autoload_classmap.php @@ -0,0 +1,9 @@ + array($vendorDir . '/matriphe/iso-639/src'), +); diff --git a/langfilter/vendor/composer/autoload_real.php b/langfilter/vendor/composer/autoload_real.php new file mode 100644 index 00000000..fed9c349 --- /dev/null +++ b/langfilter/vendor/composer/autoload_real.php @@ -0,0 +1,55 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit6449f021327d95a4e323188b673aed62::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + return $loader; + } +} diff --git a/langfilter/vendor/composer/autoload_static.php b/langfilter/vendor/composer/autoload_static.php new file mode 100644 index 00000000..51ac8bdf --- /dev/null +++ b/langfilter/vendor/composer/autoload_static.php @@ -0,0 +1,31 @@ + + array ( + 'Matriphe\\ISO639\\' => 16, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Matriphe\\ISO639\\' => + array ( + 0 => __DIR__ . '/..' . '/matriphe/iso-639/src', + ), + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit6449f021327d95a4e323188b673aed62::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit6449f021327d95a4e323188b673aed62::$prefixDirsPsr4; + + }, null, ClassLoader::class); + } +} diff --git a/langfilter/vendor/composer/installed.json b/langfilter/vendor/composer/installed.json new file mode 100644 index 00000000..796c98f3 --- /dev/null +++ b/langfilter/vendor/composer/installed.json @@ -0,0 +1,48 @@ +[ + { + "name": "matriphe/iso-639", + "version": "1.2", + "version_normalized": "1.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/matriphe/php-iso-639.git", + "reference": "0245d844daeefdd22a54b47103ffdb0e03c323e1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matriphe/php-iso-639/zipball/0245d844daeefdd22a54b47103ffdb0e03c323e1", + "reference": "0245d844daeefdd22a54b47103ffdb0e03c323e1", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^4.7" + }, + "time": "2017-07-19T15:11:19+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Matriphe\\ISO639\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Muhammad Zamroni", + "email": "halo@matriphe.com" + } + ], + "description": "PHP library to convert ISO-639-1 code to language name.", + "keywords": [ + "639", + "iso", + "iso-639", + "lang", + "language", + "laravel" + ] + } +] diff --git a/langfilter/vendor/matriphe/iso-639/.gitignore b/langfilter/vendor/matriphe/iso-639/.gitignore new file mode 100644 index 00000000..8b7ef350 --- /dev/null +++ b/langfilter/vendor/matriphe/iso-639/.gitignore @@ -0,0 +1,2 @@ +/vendor +composer.lock diff --git a/langfilter/vendor/matriphe/iso-639/.php_cs b/langfilter/vendor/matriphe/iso-639/.php_cs new file mode 100644 index 00000000..e862e68d --- /dev/null +++ b/langfilter/vendor/matriphe/iso-639/.php_cs @@ -0,0 +1,122 @@ +setRiskyAllowed(true) + ->setRules([ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'long'], + 'no_extra_consecutive_blank_lines' => [ + 'break', 'continue', 'extra', 'return', 'throw', 'use', + 'parenthesis_brace_block', 'square_brace_block', + 'curly_brace_block' + ], + 'binary_operator_spaces' => true, + 'blank_line_after_namespace' => true, + 'blank_line_after_opening_tag' => true, + 'braces' => true, + 'blank_line_before_return' => true, + 'cast_spaces' => true, + 'class_definition' => true, + 'class_keyword_remove' => false, + 'concat_space' => true, + 'combine_consecutive_unsets' => true, + 'declare_equal_normalize' => false, + 'elseif' => true, + 'encoding' => true, + 'ereg_to_preg' => true, + 'full_opening_tag' => true, + 'function_declaration' => true, + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'indentation_type' => true, + 'line_ending' => true, + 'linebreak_after_opening_tag' => true, + 'lowercase_cast' => true, + 'lowercase_constants' => true, + 'lowercase_keywords' => true, + //'mb_str_functions' => false, + 'method_argument_space' => true, + 'method_separation' => true, + 'modernize_types_casting' => true, + 'native_function_casing' => true, + 'new_with_braces' => true, + //'no_alias_functions' => false, + 'no_blank_lines_after_class_opening' => true, + 'no_blank_lines_after_phpdoc' => false, + 'no_blank_lines_before_namespace' => false, + 'no_closing_tag' => true, + 'no_empty_comment' => false, + 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, + 'no_extra_consecutive_blank_lines' => true, + 'no_leading_import_slash' => true, + 'no_leading_namespace_whitespace' => true, + 'no_mixed_echo_print' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_php4_constructor' => true, + 'no_short_bool_cast' => true, + 'no_short_echo_tag' => true, + 'no_singleline_whitespace_before_semicolons' => true, + 'no_spaces_after_function_name' => true, + 'no_spaces_around_offset' => true, + 'no_spaces_inside_parenthesis' => true, + 'no_trailing_comma_in_list_call' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_trailing_whitespace' => true, + 'no_trailing_whitespace_in_comment' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unreachable_default_argument_value' => true, + 'no_unused_imports' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'normalize_index_brace' => true, + 'not_operator_with_successor_space' => true, + 'object_operator_without_whitespace' => true, + 'ordered_class_elements' => true, + 'ordered_imports' => true, + 'php_unit_strict' => false, + /* + 'phpdoc_add_missing_param_annotation' => true, + 'phpdoc_align' => true, + 'phpdoc_annotation_without_dot' => true, + 'phpdoc_indent' => true, + 'phpdoc_inline_tag' => true, + 'phpdoc_no_empty_return' => true, + 'phpdoc_scalar' => true, + */ + 'protected_to_private' => true, + 'psr4' => true, + 'random_api_migration' => true, + 'return_type_declaration' => false, + 'self_accessor' => true, + //'semicolon_after_instruction' => true, + 'short_scalar_cast' => true, + //'simplified_null_return' => false, + 'single_blank_line_at_eof' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'single_import_per_statement' => true, + 'single_line_after_imports' => true, + 'single_quote' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'switch_case_semicolon_to_colon' => true, + 'switch_case_space' => true, + 'strict_comparison' => false, + 'strict_param' => false, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'visibility_required' => true, + 'whitespace_after_comma_in_array' => true, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('storage') + ->in(__DIR__) + ) +; \ No newline at end of file diff --git a/langfilter/vendor/matriphe/iso-639/.travis.yml b/langfilter/vendor/matriphe/iso-639/.travis.yml new file mode 100644 index 00000000..4e807d90 --- /dev/null +++ b/langfilter/vendor/matriphe/iso-639/.travis.yml @@ -0,0 +1,13 @@ +language: php + +install: composer install + +script: vendor/bin/phpunit + +php: + - "7.1" + - "7.0" + - "5.6" + - "5.5" + - "5.4" + - "5.3" diff --git a/langfilter/vendor/matriphe/iso-639/README.md b/langfilter/vendor/matriphe/iso-639/README.md new file mode 100644 index 00000000..7a0b0eb1 --- /dev/null +++ b/langfilter/vendor/matriphe/iso-639/README.md @@ -0,0 +1,65 @@ +# PHP ISO-639 + +[![Build Status](https://travis-ci.org/matriphe/php-iso-639.svg)](https://travis-ci.org/matriphe/php-iso-639) + +PHP library to convert ISO-639-1 code to language name, based on Wikipedia's [List of ISO 639-1 codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). + +## Installation + +Using composer: `composer require matriphe/iso-639` + +## Usage Example + +```php +languageByCode1('en'); // English +echo $iso->languageByCode1('id'); // Indonesian +echo $iso->languageByCode1('jv'); // Javanese + +// Get native language name from ISO-639-1 code +echo $iso->nativeByCode1('en'); // English +echo $iso->nativeByCode1('id'); // Bahasa Indonesia +echo $iso->nativeByCode1('jv'); // basa Jawa + +// Get language name from ISO-639-2t code +echo $iso->languageByCode2t('eng'); // English +echo $iso->languageByCode2t('ind'); // Indonesian +echo $iso->languageByCode2t('jav'); // Javanese + +// Get native language name from ISO-639-2t code +echo $iso->nativeByCode2t('eng'); // English +echo $iso->nativeByCode2t('ind'); // Bahasa Indonesia +echo $iso->nativeByCode2t('jav'); // basa Jawa + +// Get language name from ISO-639-2b code +echo $iso->languageByCode2b('eng'); // English +echo $iso->languageByCode2b('ind'); // Indonesian +echo $iso->languageByCode2b('jav'); // Javanese + +// Get native language name from ISO-639-2b code +echo $iso->nativeByCode2b('eng'); // English +echo $iso->nativeByCode2b('ind'); // Bahasa Indonesia +echo $iso->nativeByCode2b('jav'); // basa Jawa + +// Get language name from ISO-639-3 code +echo $iso->languageByCode3('eng'); // English +echo $iso->languageByCode3('ind'); // Indonesian +echo $iso->languageByCode3('jav'); // Javanese + +// Get native language name from ISO-639-3 code +echo $iso->nativeByCode3('eng'); // English +echo $iso->nativeByCode3('ind'); // Bahasa Indonesia +echo $iso->nativeByCode3('jav'); // basa Jawa + +``` + +## To Do + +* Convert language name to ISO-639 code \ No newline at end of file diff --git a/langfilter/vendor/matriphe/iso-639/composer.json b/langfilter/vendor/matriphe/iso-639/composer.json new file mode 100644 index 00000000..ec74c13c --- /dev/null +++ b/langfilter/vendor/matriphe/iso-639/composer.json @@ -0,0 +1,22 @@ +{ + "name": "matriphe/iso-639", + "description": "PHP library to convert ISO-639-1 code to language name.", + "keywords": ["iso", "iso-639", "639", "lang", "language", "laravel"], + "type": "library", + "require-dev": { + "phpunit/phpunit": "^4.7" + }, + "license": "MIT", + "authors": [ + { + "name": "Muhammad Zamroni", + "email": "halo@matriphe.com" + } + ], + "require": {}, + "autoload": { + "psr-4": { + "Matriphe\\ISO639\\": "src/" + } + } +} diff --git a/langfilter/vendor/matriphe/iso-639/phpunit.xml b/langfilter/vendor/matriphe/iso-639/phpunit.xml new file mode 100644 index 00000000..9ef10b1e --- /dev/null +++ b/langfilter/vendor/matriphe/iso-639/phpunit.xml @@ -0,0 +1,9 @@ + + + + + tests/ISO639Test.php + + + + diff --git a/langfilter/vendor/matriphe/iso-639/resources/iso-639.csv.gz b/langfilter/vendor/matriphe/iso-639/resources/iso-639.csv.gz new file mode 100644 index 0000000000000000000000000000000000000000..e19eb77760d0b69edfc3a809942a24bf0a6b4eaa GIT binary patch literal 5715 zcmV-Z7Od$XiwFP!000001EpK*ZyZIo|Gs}kX}%Dofn0W_ecW$(LU3Le8(3f?Zp}>1 zbh%$nKV}$z@*}U!0}=v+fEAKpJC5_RorE|}?0lHyO1rv3GaxoLNT_?cLMz1mAMQD) zdOG8p9*A@m=hvsIyG~V|I(6!ts+yd|ol3|n;_WiGrB%=6b7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ScHHPCXImn5`4DN9}cCkqy{Vw>?h33MtkJuv0Z!_lou2Zqn&B|%BUr_i-GTu+?{0@1izXy6@|I)y{DPtl3FjCKD_+`g#Lz9FaW z^M3xf8>|?LN5}r_AUOHFh6$%aKgGamh7BE`qLFWgbY2N!OQ>N5mWI^A{{ujkD!~Cf F000LaH;DiM literal 0 HcmV?d00001 diff --git a/langfilter/vendor/matriphe/iso-639/resources/iso-639.sql.gz b/langfilter/vendor/matriphe/iso-639/resources/iso-639.sql.gz new file mode 100644 index 0000000000000000000000000000000000000000..bb5d15ebbc380e5d98d0ce0af47671812c2a4403 GIT binary patch literal 6459 zcmV-B8N}uviwFP!000001Fc-^ZyU$8|9t&d%xyo&?xk(nNu4G|fyxqXtCA(xl%3{b zI74#C9dWtK>_ZIoNwWN^ABhtuag!LXoygDlApF@J-d8HTDt}U0#Yh21va_lu3ySTRXEMsTIn!Ii2O+imeYt@^p z;nlUoWQ*;3FR*p%pIg%n|F2^!w^p#sU#{7(X8kj(pIg6X-70vik9$1LUGV}da?g<^ zL+qBWz2TYX;n`+k35R=FwGml_SJrp0`{nBH4XfAxlC69Gh3*Y6tXt3is~i4vK>khHsZus=C8@|)lOcBy3ci?zRg zDu?aK)Q-WCR2z#hJ&wol;9$>4|L_n{Lqo}4B$34u$?Y75dbTE0%=dD?YCY>-_iT&% zrs3_${>?+X2a+#AZIitNSiSbd1Y6?8?wA_GAn)Ef+?NDS4Kl%+iCsg(yL)zw4Da6A zGq@wU8yfI(a{F*sgx5Na*U<1tG8Hl-T5(g!suC+ukU*B1ons(QreG$w@;=WC7oM#C zH~w3(qHp`~Ha60;aWKjHH?ia&`cp7guQmC<2Br6IPxg!?!TjlF}SmGU3d2?2F+kYI|c_?Uvg6q$N}r>N-WA{@uG;yLoZsOAY&b0(^-Rl?FI$g zz3w$eFRy?4tLwe+-Dj5ZZhHCeKC}E+H-xV~8~>_hd)Vtw>x31nSaN7{|4{Nb{g!3- zZEQY5y#&$w4Jr%_>)>$jfEv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bfc!0}z zw0@Dcvs6sFNkN{V@SPdJ23DLB% z^Iwz&5O)?PBv}3ATlJIg)K5;;PwuOqd>8Kb*H7-PpM0}^@;DLiB6pI8ypCNsi+kb) zwh8pC1ii&pZVRbZD#38XL zD>`2}Uf^sbTt}j4Kz$_;#h5Wr`buL^Jx`iJGUDqPZ;VFVu;4#PuR+otlt(5zic8gj zd$a}$$~8m(CYs;QfR5oq=BXtQ&m*yHzpHSAj6Jh)S+Nf~#!U>2+2K8|}4ZWWyA3XWs?>CwD=Omi0UlzFJ8tqnLI6;a@t%-@xNYU8DBg;{Fi+Y zfbcTjSb6&D2a6gvbX;a-U-oH77`ic}#ubxFq^26d^ zjfnhU#G>DiX#cH>*3VQ#f3%|gcQTgxiHxOxI-|XerGG*s?#D%*mcRJ}BC)?MvIK`E Ve?BDcheas={{fT2{3vBc003A2r*HrO literal 0 HcmV?d00001 diff --git a/langfilter/vendor/matriphe/iso-639/resources/wikipedia.csv b/langfilter/vendor/matriphe/iso-639/resources/wikipedia.csv new file mode 100644 index 00000000..67dc7f57 --- /dev/null +++ b/langfilter/vendor/matriphe/iso-639/resources/wikipedia.csv @@ -0,0 +1,185 @@ +Northwest Caucasian|Abkhaz|аҧсуа бызшәа, аҧсшәа|ab|abk|abk|abk|abks| +Afro-Asiatic|Afar|Afaraf|aa|aar|aar|aar|aars| +Indo-European|Afrikaans|Afrikaans|af|afr|afr|afr|afrs| +Niger–Congo|Akan|Akan|ak|aka|aka|aka + 2||macrolanguage, Twi is [tw/twi], Fanti is [fat] +Indo-European|Albanian|Shqip|sq|sqi|alb|sqi + 4||macrolanguage, "Albanian Phylozone" in 639-6 +Afro-Asiatic|Amharic|አማርኛ|am|amh|amh|amh|| +Afro-Asiatic|Arabic|العربية|ar|ara|ara|ara + 30||macrolanguage, Standard Arabic is [arb] +Indo-European|Aragonese|aragonés|an|arg|arg|arg|| +Indo-European|Armenian|Հայերեն|hy|hye|arm|hye|| +Indo-European|Assamese|অসমীয়া|as|asm|asm|asm|| +Northeast Caucasian|Avaric|авар мацӀ, магӀарул мацӀ|av|ava|ava|ava|| +Indo-European|Avestan|avesta|ae|ave|ave|ave||ancient +Aymaran|Aymara|aymar aru|ay|aym|aym|aym + 2||macrolanguage +Turkic|Azerbaijani|azərbaycan dili|az|aze|aze|aze + 2||macrolanguage +Niger–Congo|Bambara|bamanankan|bm|bam|bam|bam|| +Turkic|Bashkir|башҡорт теле|ba|bak|bak|bak|| +Language isolate|Basque|euskara, euskera|eu|eus|baq|eus|| +Indo-European|Belarusian|беларуская мова|be|bel|bel|bel|| +Indo-European|Bengali, Bangla|বাংলা|bn|ben|ben|ben|| +Indo-European|Bihari|भोजपुरी|bh|bih|bih|||Collective language code for Bhojpuri, Magahi, and Maithili +Creole|Bislama|Bislama|bi|bis|bis|bis|| +Indo-European|Bosnian|bosanski jezik|bs|bos|bos|bos|boss| +Indo-European|Breton|brezhoneg|br|bre|bre|bre|| +Indo-European|Bulgarian|български език|bg|bul|bul|bul|buls| +Sino-Tibetan|Burmese|ဗမာစာ|my|mya|bur|mya|| +Indo-European|Catalan|català|ca|cat|cat|cat|| +Austronesian|Chamorro|Chamoru|ch|cha|cha|cha|| +Northeast Caucasian|Chechen|нохчийн мотт|ce|che|che|che|| +Niger–Congo|Chichewa, Chewa, Nyanja|chiCheŵa, chinyanja|ny|nya|nya|nya|| +Sino-Tibetan|Chinese|中文 (Zhōngwén), 汉语, 漢語|zh|zho|chi|zho + 13||macrolanguage +Turkic|Chuvash|чӑваш чӗлхи|cv|chv|chv|chv|| +Indo-European|Cornish|Kernewek|kw|cor|cor|cor|| +Indo-European|Corsican|corsu, lingua corsa|co|cos|cos|cos|| +Algonquian|Cree|ᓀᐦᐃᔭᐍᐏᐣ|cr|cre|cre|cre + 6||macrolanguage +Indo-European|Croatian|hrvatski jezik|hr|hrv|hrv|hrv|| +Indo-European|Czech|čeština, český jazyk|cs|ces|cze|ces|| +Indo-European|Danish|dansk|da|dan|dan|dan|| +Indo-European|Divehi, Dhivehi, Maldivian|ދިވެހި|dv|div|div|div|| +Indo-European|Dutch|Nederlands, Vlaams|nl|nld|dut|nld|| +Sino-Tibetan|Dzongkha|རྫོང་ཁ|dz|dzo|dzo|dzo|| +Indo-European|English|English|en|eng|eng|eng|engs| +Constructed|Esperanto|Esperanto|eo|epo|epo|epo||constructed, initiated from L.L. Zamenhof, 1887 +Uralic|Estonian|eesti, eesti keel|et|est|est|est + 2||macrolanguage +Niger–Congo|Ewe|Eʋegbe|ee|ewe|ewe|ewe|| +Indo-European|Faroese|føroyskt|fo|fao|fao|fao|| +Austronesian|Fijian|vosa Vakaviti|fj|fij|fij|fij|| +Uralic|Finnish|suomi, suomen kieli|fi|fin|fin|fin|| +Indo-European|French|français, langue française|fr|fra|fre|fra|fras| +Niger–Congo|Fula, Fulah, Pulaar, Pular|Fulfulde, Pulaar, Pular|ff|ful|ful|ful + 9||macrolanguage +Indo-European|Galician|galego|gl|glg|glg|glg|| +South Caucasian|Georgian|ქართული|ka|kat|geo|kat|| +Indo-European|German|Deutsch|de|deu|ger|deu|deus| +Indo-European|Greek (modern)|ελληνικά|el|ell|gre|ell|ells| +Tupian|Guaraní|Avañe'ẽ|gn|grn|grn|grn + 5||macrolanguage +Indo-European|Gujarati|ગુજરાતી|gu|guj|guj|guj|| +Creole|Haitian, Haitian Creole|Kreyòl ayisyen|ht|hat|hat|hat|| +Afro-Asiatic|Hausa|(Hausa) هَوُسَ|ha|hau|hau|hau|| +Afro-Asiatic|Hebrew (modern)|עברית|he|heb|heb|heb|| +Niger–Congo|Herero|Otjiherero|hz|her|her|her|| +Indo-European|Hindi|हिन्दी, हिंदी|hi|hin|hin|hin|hins| +Austronesian|Hiri Motu|Hiri Motu|ho|hmo|hmo|hmo|| +Uralic|Hungarian|magyar|hu|hun|hun|hun|| +Constructed|Interlingua|Interlingua|ia|ina|ina|ina||constructed by International Auxiliary Language Association +Austronesian|Indonesian|Bahasa Indonesia|id|ind|ind|ind||Covered by macrolanguage [ms/msa] +Constructed|Interlingue|Originally called Occidental; then Interlingue after WWII|ie|ile|ile|ile||constructed by Edgar de Wahl, first published in 1922 +Indo-European|Irish|Gaeilge|ga|gle|gle|gle|| +Niger–Congo|Igbo|Asụsụ Igbo|ig|ibo|ibo|ibo|| +Eskimo–Aleut|Inupiaq|Iñupiaq, Iñupiatun|ik|ipk|ipk|ipk + 2||macrolanguage +Constructed|Ido|Ido|io|ido|ido|ido|idos|constructed by De Beaufront, 1907, as variation of Esperanto +Indo-European|Icelandic|Íslenska|is|isl|ice|isl|| +Indo-European|Italian|italiano|it|ita|ita|ita|itas| +Eskimo–Aleut|Inuktitut|ᐃᓄᒃᑎᑐᑦ|iu|iku|iku|iku + 2||macrolanguage +Japonic|Japanese|日本語 (にほんご)|ja|jpn|jpn|jpn|| +Austronesian|Javanese|basa Jawa|jv|jav|jav|jav|| +Eskimo–Aleut|Kalaallisut, Greenlandic|kalaallisut, kalaallit oqaasii|kl|kal|kal|kal|| +Dravidian|Kannada|ಕನ್ನಡ|kn|kan|kan|kan|| +Nilo-Saharan|Kanuri|Kanuri|kr|kau|kau|kau + 3||macrolanguage +Indo-European|Kashmiri|कश्मीरी, كشميري‎|ks|kas|kas|kas|| +Turkic|Kazakh|қазақ тілі|kk|kaz|kaz|kaz|| +Austroasiatic|Khmer|ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ|km|khm|khm|khm||a.k.a. Cambodian +Niger–Congo|Kikuyu, Gikuyu|Gĩkũyũ|ki|kik|kik|kik|| +Niger–Congo|Kinyarwanda|Ikinyarwanda|rw|kin|kin|kin|| +Turkic|Kyrgyz|Кыргызча, Кыргыз тили|ky|kir|kir|kir|| +Uralic|Komi|коми кыв|kv|kom|kom|kom + 2||macrolanguage +Niger–Congo|Kongo|Kikongo|kg|kon|kon|kon + 3||macrolanguage +Koreanic|Korean|한국어, 조선어|ko|kor|kor|kor|| +Indo-European|Kurdish|Kurdî, كوردی‎|ku|kur|kur|kur + 3||macrolanguage +Niger–Congo|Kwanyama, Kuanyama|Kuanyama|kj|kua|kua|kua|| +Indo-European|Latin|latine, lingua latina|la|lat|lat|lat|lats|ancient +Indo-European|Ladin|ladin, lingua ladina||||lld|| +Indo-European|Luxembourgish, Letzeburgesch|Lëtzebuergesch|lb|ltz|ltz|ltz|| +Niger–Congo|Ganda|Luganda|lg|lug|lug|lug|| +Indo-European|Limburgish, Limburgan, Limburger|Limburgs|li|lim|lim|lim|| +Niger–Congo|Lingala|Lingála|ln|lin|lin|lin|| +Tai–Kadai|Lao|ພາສາລາວ|lo|lao|lao|lao|| +Indo-European|Lithuanian|lietuvių kalba|lt|lit|lit|lit|| +Niger–Congo|Luba-Katanga|Tshiluba|lu|lub|lub|lub|| +Indo-European|Latvian|latviešu valoda|lv|lav|lav|lav + 2||macrolanguage +Indo-European|Manx|Gaelg, Gailck|gv|glv|glv|glv|| +Indo-European|Macedonian|македонски јазик|mk|mkd|mac|mkd|| +Austronesian|Malagasy|fiteny malagasy|mg|mlg|mlg|mlg + 10||macrolanguage +Austronesian|Malay|bahasa Melayu, بهاس ملايو‎|ms|msa|may|msa + 13||macrolanguage, Standard Malay is [zsm], Indonesian is [id/ind] +Dravidian|Malayalam|മലയാളം|ml|mal|mal|mal|| +Afro-Asiatic|Maltese|Malti|mt|mlt|mlt|mlt|| +Austronesian|Māori|te reo Māori|mi|mri|mao|mri|| +Indo-European|Marathi (Marāṭhī)|मराठी|mr|mar|mar|mar|| +Austronesian|Marshallese|Kajin M̧ajeļ|mh|mah|mah|mah|| +Mongolic|Mongolian|монгол|mn|mon|mon|mon + 2||macrolanguage +Austronesian|Nauru|Ekakairũ Naoero|na|nau|nau|nau|| +Dené–Yeniseian|Navajo, Navaho|Diné bizaad|nv|nav|nav|nav|| +Niger–Congo|Northern Ndebele|isiNdebele|nd|nde|nde|nde|| +Indo-European|Nepali|नेपाली|ne|nep|nep|nep|| +Niger–Congo|Ndonga|Owambo|ng|ndo|ndo|ndo|| +Indo-European|Norwegian Bokmål|Norsk bokmål|nb|nob|nob|nob||Covered by macrolanguage [no/nor] +Indo-European|Norwegian Nynorsk|Norsk nynorsk|nn|nno|nno|nno||Covered by macrolanguage [no/nor] +Indo-European|Norwegian|Norsk|no|nor|nor|nor + 2||macrolanguage, Bokmål is [nb/nob], Nynorsk is [nn/nno] +Sino-Tibetan|Nuosu|ꆈꌠ꒿ Nuosuhxop|ii|iii|iii|iii||Standard form of Yi languages +Niger–Congo|Southern Ndebele|isiNdebele|nr|nbl|nbl|nbl|| +Indo-European|Occitan|occitan, lenga d'òc|oc|oci|oci|oci|| +Algonquian|Ojibwe, Ojibwa|ᐊᓂᔑᓈᐯᒧᐎᓐ|oj|oji|oji|oji + 7||macrolanguage +Indo-European|Old Church Slavonic, Church Slavonic, Old Bulgarian|ѩзыкъ словѣньскъ|cu|chu|chu|chu||ancient, in use by Orthodox Church +Afro-Asiatic|Oromo|Afaan Oromoo|om|orm|orm|orm + 4||macrolanguage +Indo-European|Oriya|ଓଡ଼ିଆ|or|ori|ori|ori|| +Indo-European|Ossetian, Ossetic|ирон æвзаг|os|oss|oss|oss|| +Indo-European|Panjabi, Punjabi|ਪੰਜਾਬੀ, پنجابی‎|pa|pan|pan|pan|| +Indo-European|Pāli|पाऴि|pi|pli|pli|pli||ancient +Indo-European|Persian (Farsi)|فارسی|fa|fas|per|fas + 2||macrolanguage +Indo-European|Polish|język polski, polszczyzna|pl|pol|pol|pol|pols| +Indo-European|Pashto, Pushto|پښتو|ps|pus|pus|pus + 3||macrolanguage +Indo-European|Portuguese|português|pt|por|por|por|| +Quechuan|Quechua|Runa Simi, Kichwa|qu|que|que|que + 44||macrolanguage +Indo-European|Romansh|rumantsch grischun|rm|roh|roh|roh|| +Niger–Congo|Kirundi|Ikirundi|rn|run|run|run|| +Indo-European|Romanian|limba română|ro|ron|rum|ron||[mo] for Moldavian has been withdrawn, recommending [ro] also for Moldavian +Indo-European|Russian|Русский|ru|rus|rus|rus|| +Indo-European|Sanskrit (Saṁskṛta)|संस्कृतम्|sa|san|san|san||ancient, still spoken +Indo-European|Sardinian|sardu|sc|srd|srd|srd + 4||macrolanguage +Indo-European|Sindhi|सिन्धी, سنڌي، سندھی‎|sd|snd|snd|snd|| +Uralic|Northern Sami|Davvisámegiella|se|sme|sme|sme|| +Austronesian|Samoan|gagana fa'a Samoa|sm|smo|smo|smo|| +Creole|Sango|yângâ tî sängö|sg|sag|sag|sag|| +Indo-European|Serbian|српски језик|sr|srp|srp|srp||The ISO 639-2/T code srp deprecated the ISO 639-2/B code scc[1] +Indo-European|Scottish Gaelic, Gaelic|Gàidhlig|gd|gla|gla|gla|| +Niger–Congo|Shona|chiShona|sn|sna|sna|sna|| +Indo-European|Sinhala, Sinhalese|සිංහල|si|sin|sin|sin|| +Indo-European|Slovak|slovenčina, slovenský jazyk|sk|slk|slo|slk|| +Indo-European|Slovene|slovenski jezik, slovenščina|sl|slv|slv|slv|| +Afro-Asiatic|Somali|Soomaaliga, af Soomaali|so|som|som|som|| +Niger–Congo|Southern Sotho|Sesotho|st|sot|sot|sot|| +Indo-European|Spanish|español|es|spa|spa|spa|| +Austronesian|Sundanese|Basa Sunda|su|sun|sun|sun|| +Niger–Congo|Swahili|Kiswahili|sw|swa|swa|swa + 2||macrolanguage +Niger–Congo|Swati|SiSwati|ss|ssw|ssw|ssw|| +Indo-European|Swedish|svenska|sv|swe|swe|swe|| +Dravidian|Tamil|தமிழ்|ta|tam|tam|tam|| +Dravidian|Telugu|తెలుగు|te|tel|tel|tel|| +Indo-European|Tajik|тоҷикӣ, toçikī, تاجیکی‎|tg|tgk|tgk|tgk|| +Tai–Kadai|Thai|ไทย|th|tha|tha|tha|| +Afro-Asiatic|Tigrinya|ትግርኛ|ti|tir|tir|tir|| +Sino-Tibetan|Tibetan Standard, Tibetan, Central|བོད་ཡིག|bo|bod|tib|bod|| +Turkic|Turkmen|Türkmen, Түркмен|tk|tuk|tuk|tuk|| +Austronesian|Tagalog|Wikang Tagalog, ᜏᜒᜃᜅ᜔ ᜆᜄᜎᜓᜄ᜔|tl|tgl|tgl|tgl||Note: Filipino (Pilipino) has the code [fil] +Niger–Congo|Tswana|Setswana|tn|tsn|tsn|tsn|| +Austronesian|Tonga (Tonga Islands)|faka Tonga|to|ton|ton|ton|| +Turkic|Turkish|Türkçe|tr|tur|tur|tur|| +Niger–Congo|Tsonga|Xitsonga|ts|tso|tso|tso|| +Turkic|Tatar|татар теле, tatar tele|tt|tat|tat|tat|| +Niger–Congo|Twi|Twi|tw|twi|twi|twi||Covered by macrolanguage [ak/aka] +Austronesian|Tahitian|Reo Tahiti|ty|tah|tah|tah||One of the Reo Mā`ohi (languages of French Polynesia) +Turkic|Uyghur|ئۇيغۇرچە‎, Uyghurche|ug|uig|uig|uig|| +Indo-European|Ukrainian|українська мова|uk|ukr|ukr|ukr|| +Indo-European|Urdu|اردو|ur|urd|urd|urd|| +Turkic|Uzbek|Oʻzbek, Ўзбек, أۇزبېك‎|uz|uzb|uzb|uzb + 2||macrolanguage +Niger–Congo|Venda|Tshivenḓa|ve|ven|ven|ven|| +Austroasiatic|Vietnamese|Việt Nam|vi|vie|vie|vie|| +Constructed|Volapük|Volapük|vo|vol|vol|vol||constructed +Indo-European|Walloon|walon|wa|wln|wln|wln|| +Indo-European|Welsh|Cymraeg|cy|cym|wel|cym|| +Niger–Congo|Wolof|Wollof|wo|wol|wol|wol|| +Indo-European|Western Frisian|Frysk|fy|fry|fry|fry|| +Niger–Congo|Xhosa|isiXhosa|xh|xho|xho|xho|| +Indo-European|Yiddish|ייִדיש|yi|yid|yid|yid + 2||macrolanguage +Niger–Congo|Yoruba|Yorùbá|yo|yor|yor|yor|| +Tai–Kadai|Zhuang, Chuang|Saɯ cueŋƅ, Saw cuengh|za|zha|zha|zha + 16||macrolanguage +Niger–Congo|Zulu|isiZulu|zu|zul|zul|zul|| \ No newline at end of file diff --git a/langfilter/vendor/matriphe/iso-639/src/ISO639.php b/langfilter/vendor/matriphe/iso-639/src/ISO639.php new file mode 100644 index 00000000..13f9942a --- /dev/null +++ b/langfilter/vendor/matriphe/iso-639/src/ISO639.php @@ -0,0 +1,460 @@ +languages; + } + + /* + * Get language name from ISO-639-1 (two-letters code) + * + * @return (string) + */ + public function languageByCode1($code) + { + $code = strtolower($code); + + $result = ''; + + foreach ($this->languages as $lang) { + if ($lang[0] == $code) { + $result = $lang[4]; + break; + } + } + + return $result; + } + + /* + * Get native language name from ISO-639-1 (two-letters code) + * + * @return (string) + */ + public function nativeByCode1($code) + { + $code = strtolower($code); + + $result = ''; + + foreach ($this->languages as $lang) { + if ($lang[0] == $code) { + $result = $lang[5]; + break; + } + } + + return $result; + } + + /* + * Get language name from ISO-639-2/t (three-letter codes) terminologic + * + * @return (string) + */ + public function languageByCode2t($code) + { + $code = strtolower($code); + + $result = ''; + + foreach ($this->languages as $lang) { + if ($lang[1] == $code) { + $result = $lang[4]; + break; + } + } + + return $result; + } + + /* + * Get native language name from ISO-639-2/t (three-letter codes) terminologic + * + * @return (string) + */ + public function nativeByCode2t($code) + { + $code = strtolower($code); + + $result = ''; + + foreach ($this->languages as $lang) { + if ($lang[1] == $code) { + $result = $lang[5]; + break; + } + } + + return $result; + } + + /* + * Get language name from ISO-639-2/b (three-letter codes) bibliographic + * + * @return (string) + */ + public function languageByCode2b($code) + { + $code = strtolower($code); + + $result = ''; + + foreach ($this->languages as $lang) { + if ($lang[2] == $code) { + $result = $lang[4]; + break; + } + } + + return $result; + } + + /* + * Get native language name from ISO-639-2/b (three-letter codes) bibliographic + * + * @return (string) + */ + public function nativeByCode2b($code) + { + $code = strtolower($code); + + $result = ''; + + foreach ($this->languages as $lang) { + if ($lang[2] == $code) { + $result = $lang[5]; + break; + } + } + + return $result; + } + + /* + * Get language name from ISO-639-3 (three-letter codes) + * + * @return (string) + */ + public function languageByCode3($code) + { + $code = strtolower($code); + + $result = ''; + + foreach ($this->languages as $lang) { + if ($lang[3] == $code) { + $result = $lang[4]; + break; + } + } + + return $result; + } + + /* + * Get native language name from ISO-639-3 (three-letter codes) + * + * @return (string) + */ + public function nativeByCode3($code) + { + $code = strtolower($code); + + $result = ''; + + foreach ($this->languages as $lang) { + if ($lang[3] == $code) { + $result = $lang[5]; + break; + } + } + + return $result; + } + + /* + * Get ISO-639-1 (two-letters code) from language name + * + * @return (string) + */ + public function code1ByLanguage($language) + { + $language_key = ucwords(strtolower($language)); + + $result = ''; + + foreach ($this->languages as $lang) { + if (in_array($language_key, explode(', ', $lang[4]))) { + $result = $lang[0]; + break; + } + } + + return $result; + } + + /* + * Get ISO-639-2/t (three-letter codes) terminologic from language name + * + * @return (string) + */ + public function code2tByLanguage($language) + { + $language_key = ucwords(strtolower($language)); + + $result = ''; + + foreach ($this->languages as $lang) { + if (in_array($language_key, explode(', ', $lang[4]))) { + $result = $lang[1]; + break; + } + } + + return $result; + } + + /* + * Get ISO-639-2/b (three-letter codes) bibliographic from language name + * + * @return (string) + */ + public function code2bByLanguage($language) + { + $language_key = ucwords(strtolower($language)); + + $result = ''; + + foreach ($this->languages as $lang) { + if (in_array($language_key, explode(', ', $lang[4]))) { + $result = $lang[2]; + break; + } + } + + return $result; + } + + /* + * Get ISO-639-3 (three-letter codes) from language name + * + * @return (string) + */ + public function code3ByLanguage($language) + { + $language_key = ucwords(strtolower($language)); + + $result = ''; + + foreach ($this->languages as $lang) { + if (in_array($language_key, explode(', ', $lang[4]))) { + $result = $lang[3]; + break; + } + } + + return $result; + } +} diff --git a/langfilter/vendor/matriphe/iso-639/tests/ISO639Test.php b/langfilter/vendor/matriphe/iso-639/tests/ISO639Test.php new file mode 100644 index 00000000..b4f22ed7 --- /dev/null +++ b/langfilter/vendor/matriphe/iso-639/tests/ISO639Test.php @@ -0,0 +1,239 @@ +iso = new ISO639(); + } + + public function testLanguageISO6391() + { + $this->assertSame('English', $this->iso->languageByCode1('en')); + $this->assertSame('French', $this->iso->languageByCode1('fr')); + $this->assertSame('Spanish', $this->iso->languageByCode1('es')); + $this->assertSame('Indonesian', $this->iso->languageByCode1('id')); + $this->assertSame('Javanese', $this->iso->languageByCode1('jv')); + $this->assertSame('Hindi', $this->iso->languageByCode1('hi')); + $this->assertSame('Thai', $this->iso->languageByCode1('th')); + $this->assertSame('Korean', $this->iso->languageByCode1('ko')); + $this->assertSame('Japanese', $this->iso->languageByCode1('ja')); + $this->assertSame('Chinese', $this->iso->languageByCode1('zh')); + $this->assertSame('Russian', $this->iso->languageByCode1('ru')); + $this->assertSame('Arabic', $this->iso->languageByCode1('ar')); + $this->assertSame('Vietnamese', $this->iso->languageByCode1('vi')); + $this->assertSame('Malay', $this->iso->languageByCode1('ms')); + $this->assertSame('Sundanese', $this->iso->languageByCode1('su')); + } + + public function testNativeISO6391() + { + $this->assertSame('English', $this->iso->nativeByCode1('en')); + $this->assertSame('français, langue française', $this->iso->nativeByCode1('fr')); + $this->assertSame('español', $this->iso->nativeByCode1('es')); + $this->assertSame('Bahasa Indonesia', $this->iso->nativeByCode1('id')); + $this->assertSame('basa Jawa', $this->iso->nativeByCode1('jv')); + $this->assertSame('हिन्दी, हिंदी', $this->iso->nativeByCode1('hi')); + $this->assertSame('ไทย', $this->iso->nativeByCode1('th')); + $this->assertSame('한국어, 조선어', $this->iso->nativeByCode1('ko')); + $this->assertSame('日本語 (にほんご)', $this->iso->nativeByCode1('ja')); + $this->assertSame('中文 (Zhōngwén), 汉语, 漢語', $this->iso->nativeByCode1('zh')); + $this->assertSame('Русский', $this->iso->nativeByCode1('ru')); + $this->assertSame('العربية', $this->iso->nativeByCode1('ar')); + $this->assertSame('Việt Nam', $this->iso->nativeByCode1('vi')); + $this->assertSame('bahasa Melayu, بهاس ملايو‎', $this->iso->nativeByCode1('ms')); + $this->assertSame('Basa Sunda', $this->iso->nativeByCode1('su')); + } + + public function testLanguageISO6392t() + { + $this->assertSame('English', $this->iso->languageByCode2t('eng')); + $this->assertSame('French', $this->iso->languageByCode2t('fra')); + $this->assertSame('Spanish', $this->iso->languageByCode2t('spa')); + $this->assertSame('Indonesian', $this->iso->languageByCode2t('ind')); + $this->assertSame('Javanese', $this->iso->languageByCode2t('jav')); + $this->assertSame('Hindi', $this->iso->languageByCode2t('hin')); + $this->assertSame('Thai', $this->iso->languageByCode2t('tha')); + $this->assertSame('Korean', $this->iso->languageByCode2t('kor')); + $this->assertSame('Japanese', $this->iso->languageByCode2t('jpn')); + $this->assertSame('Chinese', $this->iso->languageByCode2t('zho')); + $this->assertSame('Russian', $this->iso->languageByCode2t('rus')); + $this->assertSame('Arabic', $this->iso->languageByCode2t('ara')); + $this->assertSame('Vietnamese', $this->iso->languageByCode2t('vie')); + $this->assertSame('Malay', $this->iso->languageByCode2t('msa')); + $this->assertSame('Sundanese', $this->iso->languageByCode2t('sun')); + } + + public function testNativeISO6392t() + { + $this->assertSame('English', $this->iso->nativeByCode2t('eng')); + $this->assertSame('français, langue française', $this->iso->nativeByCode2t('fra')); + $this->assertSame('español', $this->iso->nativeByCode2t('spa')); + $this->assertSame('Bahasa Indonesia', $this->iso->nativeByCode2t('ind')); + $this->assertSame('basa Jawa', $this->iso->nativeByCode2t('jav')); + $this->assertSame('हिन्दी, हिंदी', $this->iso->nativeByCode2t('hin')); + $this->assertSame('ไทย', $this->iso->nativeByCode2t('tha')); + $this->assertSame('한국어, 조선어', $this->iso->nativeByCode2t('kor')); + $this->assertSame('日本語 (にほんご)', $this->iso->nativeByCode2t('jpn')); + $this->assertSame('中文 (Zhōngwén), 汉语, 漢語', $this->iso->nativeByCode2t('zho')); + $this->assertSame('Русский', $this->iso->nativeByCode2t('rus')); + $this->assertSame('العربية', $this->iso->nativeByCode2t('ara')); + $this->assertSame('Việt Nam', $this->iso->nativeByCode2t('vie')); + $this->assertSame('bahasa Melayu, بهاس ملايو‎', $this->iso->nativeByCode2t('msa')); + $this->assertSame('Basa Sunda', $this->iso->nativeByCode2t('sun')); + } + + public function testLanguageISO6392b() + { + $this->assertSame('English', $this->iso->languageByCode2b('eng')); + $this->assertSame('French', $this->iso->languageByCode2b('fre')); + $this->assertSame('Spanish', $this->iso->languageByCode2b('spa')); + $this->assertSame('Indonesian', $this->iso->languageByCode2b('ind')); + $this->assertSame('Javanese', $this->iso->languageByCode2b('jav')); + $this->assertSame('Hindi', $this->iso->languageByCode2b('hin')); + $this->assertSame('Thai', $this->iso->languageByCode2b('tha')); + $this->assertSame('Korean', $this->iso->languageByCode2b('kor')); + $this->assertSame('Japanese', $this->iso->languageByCode2b('jpn')); + $this->assertSame('Chinese', $this->iso->languageByCode2b('chi')); + $this->assertSame('Russian', $this->iso->languageByCode2b('rus')); + $this->assertSame('Arabic', $this->iso->languageByCode2b('ara')); + $this->assertSame('Vietnamese', $this->iso->languageByCode2b('vie')); + $this->assertSame('Malay', $this->iso->languageByCode2b('may')); + $this->assertSame('Sundanese', $this->iso->languageByCode2b('sun')); + } + + public function testNativeISO6392b() + { + $this->assertSame('English', $this->iso->nativeByCode2b('eng')); + $this->assertSame('français, langue française', $this->iso->nativeByCode2b('fre')); + $this->assertSame('español', $this->iso->nativeByCode2b('spa')); + $this->assertSame('Bahasa Indonesia', $this->iso->nativeByCode2b('ind')); + $this->assertSame('basa Jawa', $this->iso->nativeByCode2b('jav')); + $this->assertSame('हिन्दी, हिंदी', $this->iso->nativeByCode2b('hin')); + $this->assertSame('ไทย', $this->iso->nativeByCode2b('tha')); + $this->assertSame('한국어, 조선어', $this->iso->nativeByCode2b('kor')); + $this->assertSame('日本語 (にほんご)', $this->iso->nativeByCode2b('jpn')); + $this->assertSame('中文 (Zhōngwén), 汉语, 漢語', $this->iso->nativeByCode2b('chi')); + $this->assertSame('Русский', $this->iso->nativeByCode2b('rus')); + $this->assertSame('العربية', $this->iso->nativeByCode2b('ara')); + $this->assertSame('Việt Nam', $this->iso->nativeByCode2b('vie')); + $this->assertSame('bahasa Melayu, بهاس ملايو‎', $this->iso->nativeByCode2b('may')); + $this->assertSame('Basa Sunda', $this->iso->nativeByCode2b('sun')); + } + + public function testLanguageISO6393() + { + $this->assertSame('English', $this->iso->languageByCode3('eng')); + $this->assertSame('French', $this->iso->languageByCode3('fra')); + $this->assertSame('Spanish', $this->iso->languageByCode3('spa')); + $this->assertSame('Indonesian', $this->iso->languageByCode3('ind')); + $this->assertSame('Javanese', $this->iso->languageByCode3('jav')); + $this->assertSame('Hindi', $this->iso->languageByCode3('hin')); + $this->assertSame('Thai', $this->iso->languageByCode3('tha')); + $this->assertSame('Korean', $this->iso->languageByCode3('kor')); + $this->assertSame('Japanese', $this->iso->languageByCode3('jpn')); + $this->assertSame('Chinese', $this->iso->languageByCode3('zho')); + $this->assertSame('Russian', $this->iso->languageByCode3('rus')); + $this->assertSame('Arabic', $this->iso->languageByCode3('ara')); + $this->assertSame('Vietnamese', $this->iso->languageByCode3('vie')); + $this->assertSame('Malay', $this->iso->languageByCode3('msa')); + $this->assertSame('Sundanese', $this->iso->languageByCode3('sun')); + } + + public function testNativeISO6393() + { + $this->assertSame('English', $this->iso->nativeByCode3('eng')); + $this->assertSame('français, langue française', $this->iso->nativeByCode3('fra')); + $this->assertSame('español', $this->iso->nativeByCode3('spa')); + $this->assertSame('Bahasa Indonesia', $this->iso->nativeByCode3('ind')); + $this->assertSame('basa Jawa', $this->iso->nativeByCode3('jav')); + $this->assertSame('हिन्दी, हिंदी', $this->iso->nativeByCode3('hin')); + $this->assertSame('ไทย', $this->iso->nativeByCode3('tha')); + $this->assertSame('한국어, 조선어', $this->iso->nativeByCode3('kor')); + $this->assertSame('日本語 (にほんご)', $this->iso->nativeByCode3('jpn')); + $this->assertSame('中文 (Zhōngwén), 汉语, 漢語', $this->iso->nativeByCode3('zho')); + $this->assertSame('Русский', $this->iso->nativeByCode3('rus')); + $this->assertSame('العربية', $this->iso->nativeByCode3('ara')); + $this->assertSame('Việt Nam', $this->iso->nativeByCode3('vie')); + $this->assertSame('bahasa Melayu, بهاس ملايو‎', $this->iso->nativeByCode3('msa')); + $this->assertSame('Basa Sunda', $this->iso->nativeByCode3('sun')); + } + + public function testISO6391Language() + { + $this->assertSame('en', $this->iso->code1ByLanguage('English')); + $this->assertSame('fr', $this->iso->code1ByLanguage('French')); + $this->assertSame('es', $this->iso->code1ByLanguage('Spanish')); + $this->assertSame('id', $this->iso->code1ByLanguage('Indonesian')); + $this->assertSame('jv', $this->iso->code1ByLanguage('Javanese')); + $this->assertSame('hi', $this->iso->code1ByLanguage('Hindi')); + $this->assertSame('th', $this->iso->code1ByLanguage('Thai')); + $this->assertSame('ko', $this->iso->code1ByLanguage('Korean')); + $this->assertSame('ja', $this->iso->code1ByLanguage('Japanese')); + $this->assertSame('zh', $this->iso->code1ByLanguage('Chinese')); + $this->assertSame('ru', $this->iso->code1ByLanguage('Russian')); + $this->assertSame('ar', $this->iso->code1ByLanguage('Arabic')); + $this->assertSame('vi', $this->iso->code1ByLanguage('Vietnamese')); + $this->assertSame('ms', $this->iso->code1ByLanguage('Malay')); + $this->assertSame('su', $this->iso->code1ByLanguage('Sundanese')); + } + + public function testISO6392tLanguage() + { + $this->assertSame('eng', $this->iso->code2tByLanguage('English')); + $this->assertSame('fra', $this->iso->code2tByLanguage('French')); + $this->assertSame('spa', $this->iso->code2tByLanguage('Spanish')); + $this->assertSame('ind', $this->iso->code2tByLanguage('Indonesian')); + $this->assertSame('jav', $this->iso->code2tByLanguage('Javanese')); + $this->assertSame('hin', $this->iso->code2tByLanguage('Hindi')); + $this->assertSame('tha', $this->iso->code2tByLanguage('Thai')); + $this->assertSame('kor', $this->iso->code2tByLanguage('Korean')); + $this->assertSame('jpn', $this->iso->code2tByLanguage('Japanese')); + $this->assertSame('zho', $this->iso->code2tByLanguage('Chinese')); + $this->assertSame('rus', $this->iso->code2tByLanguage('Russian')); + $this->assertSame('ara', $this->iso->code2tByLanguage('Arabic')); + $this->assertSame('vie', $this->iso->code2tByLanguage('Vietnamese')); + $this->assertSame('msa', $this->iso->code2tByLanguage('Malay')); + $this->assertSame('sun', $this->iso->code2tByLanguage('Sundanese')); + } + + public function testISO6392bLanguage() + { + $this->assertSame('eng', $this->iso->code2bByLanguage('English')); + $this->assertSame('fre', $this->iso->code2bByLanguage('French')); + $this->assertSame('spa', $this->iso->code2bByLanguage('Spanish')); + $this->assertSame('ind', $this->iso->code2bByLanguage('Indonesian')); + $this->assertSame('jav', $this->iso->code2bByLanguage('Javanese')); + $this->assertSame('hin', $this->iso->code2bByLanguage('Hindi')); + $this->assertSame('tha', $this->iso->code2bByLanguage('Thai')); + $this->assertSame('kor', $this->iso->code2bByLanguage('Korean')); + $this->assertSame('jpn', $this->iso->code2bByLanguage('Japanese')); + $this->assertSame('chi', $this->iso->code2bByLanguage('Chinese')); + $this->assertSame('rus', $this->iso->code2bByLanguage('Russian')); + $this->assertSame('ara', $this->iso->code2bByLanguage('Arabic')); + $this->assertSame('vie', $this->iso->code2bByLanguage('Vietnamese')); + $this->assertSame('may', $this->iso->code2bByLanguage('Malay')); + $this->assertSame('sun', $this->iso->code2bByLanguage('Sundanese')); + } + + public function testISO6393Language() + { + $this->assertSame('eng', $this->iso->code3ByLanguage('English')); + $this->assertSame('fra', $this->iso->code3ByLanguage('French')); + $this->assertSame('spa', $this->iso->code3ByLanguage('Spanish')); + $this->assertSame('ind', $this->iso->code3ByLanguage('Indonesian')); + $this->assertSame('jav', $this->iso->code3ByLanguage('Javanese')); + $this->assertSame('hin', $this->iso->code3ByLanguage('Hindi')); + $this->assertSame('tha', $this->iso->code3ByLanguage('Thai')); + $this->assertSame('kor', $this->iso->code3ByLanguage('Korean')); + $this->assertSame('jpn', $this->iso->code3ByLanguage('Japanese')); + $this->assertSame('zho', $this->iso->code3ByLanguage('Chinese')); + $this->assertSame('rus', $this->iso->code3ByLanguage('Russian')); + $this->assertSame('ara', $this->iso->code3ByLanguage('Arabic')); + $this->assertSame('vie', $this->iso->code3ByLanguage('Vietnamese')); + $this->assertSame('msa', $this->iso->code3ByLanguage('Malay')); + $this->assertSame('sun', $this->iso->code3ByLanguage('Sundanese')); + } +} From 72ce0e814dce90ab6a36686688875f2ef7e0cf99 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 3 Oct 2020 22:02:05 -0400 Subject: [PATCH 2/3] [langfilter] Add slider to addon settings - Update description for accuracy --- langfilter/langfilter.php | 2 +- langfilter/templates/settings.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/langfilter/langfilter.php b/langfilter/langfilter.php index 5c5f797a..abd3c704 100644 --- a/langfilter/langfilter.php +++ b/langfilter/langfilter.php @@ -52,7 +52,7 @@ function langfilter_addon_settings(App $a, &$s) '$title' => DI::l10n()->t("Language Filter"), '$intro' => DI::l10n()->t('This addon tries to identify the language posts are writen in. If it does not match any language specifed below, posts will be hidden by collapsing them.'), '$enabled' => ['langfilter_enable', DI::l10n()->t('Use the language filter'), $enable_checked, ''], - '$languages' => ['langfilter_languages', DI::l10n()->t('Able to read'), $languages, DI::l10n()->t('List of abbreviations (iso2 codes) for languages you speak, comma separated. For example "de,it".')], + '$languages' => ['langfilter_languages', DI::l10n()->t('Able to read'), $languages, DI::l10n()->t('List of abbreviations (ISO 639-1 codes) for languages you speak, comma separated. For example "de,it".')], '$minconfidence' => ['langfilter_minconfidence', DI::l10n()->t('Minimum confidence in language detection'), $minconfidence, DI::l10n()->t('Minimum confidence in language detection being correct, from 0 to 100. Posts will not be filtered when the confidence of language detection is below this percent value.')], '$minlength' => ['langfilter_minlength', DI::l10n()->t('Minimum length of message body'), $minlength, DI::l10n()->t('Minimum number of characters in message body for filter to be used. Posts shorter than this will not be filtered. Note: Language detection is unreliable for short content (<200 characters).')], '$submit' => DI::l10n()->t('Save Settings'), diff --git a/langfilter/templates/settings.tpl b/langfilter/templates/settings.tpl index 8e62ef49..d2de7fce 100644 --- a/langfilter/templates/settings.tpl +++ b/langfilter/templates/settings.tpl @@ -10,7 +10,7 @@

{{$intro}}

{{include file="field_checkbox.tpl" field=$enabled}} {{include file="field_input.tpl" field=$languages}} - {{include file="field_input.tpl" field=$minconfidence}} + {{include file="field/range_percent.tpl" field=$minconfidence}} {{include file="field_input.tpl" field=$minlength}}
From 4488a16af0d47579ecf5493a4c07b4929a6dee85 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 3 Oct 2020 22:03:29 -0400 Subject: [PATCH 3/3] [langfilter] Update master PO file after translation strings update --- langfilter/lang/C/messages.po | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/langfilter/lang/C/messages.po b/langfilter/lang/C/messages.po index 717a9374..0fed0fae 100644 --- a/langfilter/lang/C/messages.po +++ b/langfilter/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-01 11:11-0400\n" +"POT-Creation-Date: 2020-10-03 22:02-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,62 +17,58 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: langfilter.php:58 +#: langfilter.php:52 msgid "Language Filter" msgstr "" -#: langfilter.php:59 +#: langfilter.php:53 msgid "" "This addon tries to identify the language posts are writen in. If it does " "not match any language specifed below, posts will be hidden by collapsing " "them." msgstr "" -#: langfilter.php:60 +#: langfilter.php:54 msgid "Use the language filter" msgstr "" -#: langfilter.php:61 +#: langfilter.php:55 msgid "Able to read" msgstr "" -#: langfilter.php:61 +#: langfilter.php:55 msgid "" -"List of abbreviations (iso2 codes) for languages you speak, comma separated. " -"For example \"de,it\"." +"List of abbreviations (ISO 639-1 codes) for languages you speak, comma " +"separated. For example \"de,it\"." msgstr "" -#: langfilter.php:62 +#: langfilter.php:56 msgid "Minimum confidence in language detection" msgstr "" -#: langfilter.php:62 +#: langfilter.php:56 msgid "" "Minimum confidence in language detection being correct, from 0 to 100. Posts " "will not be filtered when the confidence of language detection is below this " "percent value." msgstr "" -#: langfilter.php:63 +#: langfilter.php:57 msgid "Minimum length of message body" msgstr "" -#: langfilter.php:63 +#: langfilter.php:57 msgid "" "Minimum number of characters in message body for filter to be used. Posts " "shorter than this will not be filtered. Note: Language detection is " "unreliable for short content (<200 characters)." msgstr "" -#: langfilter.php:64 +#: langfilter.php:58 msgid "Save Settings" msgstr "" -#: langfilter.php:105 -msgid "Language Filter Settings saved." -msgstr "" - -#: langfilter.php:182 +#: langfilter.php:189 #, php-format msgid "Filtered language: %s" msgstr ""