Behat Transliterator library inherited from Doctrine1 and used in Behat for snippet generation

Related tags

Miscellaneous php
Overview
Comments
  • Support for PHP 7.4

    Support for PHP 7.4

    opened by binarious 15
  • Update bank files - Fixes #1

    Update bank files - Fixes #1

    This pull request updates the bank files to mirror the files in the original implementation (http://cpansearch.perl.org/src/SBURKE/Text-Unidecode-0.04/lib/Text/Unidecode/)

    opened by WouterSioen 11
  • Data in bankfiles

    Data in bankfiles

    Is there a reason the data in the bankfiles isn't the same as in the original code? http://cpansearch.perl.org/src/SBURKE/Text-Unidecode-0.04/lib/Text/Unidecode/

    Only the files x00 - x07 seem to be the same. Because of some empty files and some missing items, Chinese and Japanese characters can only be partially transliterated.

    opened by WouterSioen 7
  • New release with updated Perl Text-Unidecode commit

    New release with updated Perl Text-Unidecode commit

    Could you release a new version with the latest commits?

    We would like to use this package, but we need the following commit:

    • Updated to version 1.27 of Perl Unidecode (8732e225c7a450f9ed657bd158e6487463800867)

    Thank you in advance!

    opened by FaaPz 3
  • Russian letter 'e' translation

    Russian letter 'e' translation

    As addressed on #4 issue, there is a problem with Russian 'e' letter conversion to latin.

    Examples would be with - тест (word), Брест (city in Belarus).

    In order to fix this issue, I had to modify current test examples with Russian words.

    To prove that my assertions were correct I've used online transliterator tools such as http://translit-online.ru/ & http://translate.google.com.

    So phrase това е тестово заглавие with online transliterator would be tova e testovo zaglavie.

    transliterator

    g_transliterator

    I would presume that older russian test cases were written no by russian guy :)

    Thank you for reviewing my PR & if you have any questions or should do anything else - please write.

    opened by aur1mas 3
  • Transliteration based on source language

    Transliteration based on source language

    Currently the transliteration is not based on the source language of the text, but this makes a big difference in some cases. Following some examples:

    'Ä' (U+00C4) transliterates to 'A' but when the source text is in German should transliterate to 'Ae'

    There are many more examples: https://github.com/pimcore/pimcore/blob/master/pimcore/lib/Pimcore/Tool/Transliteration/Data/x00.php#L25

    Would be cool to have this integrated.

    opened by brusch 2
  • Package is not auto-updated on Packagist

    Package is not auto-updated on Packagist

    @everzet please perform the Packagist migration to the oauth apps, or add other github admins (me and @ciaranmcnulty) as maintainers of the various (non-abandoned) Behat packages on Packagist so that we can perform it.

    opened by stof 1
  • Remove class abstraction

    Remove class abstraction

    This class can be quite useful for standalone usage. For example:

    $stringWithAccent = 'accès';
    $stringWithoutAccent = \Behat\Transliterator\Transliterator::unaccent($stringWithAccent);
    

    It can be used as a string tool and solve many tricks like this: http://stackoverflow.com/q/27680624/1731473

    opened by soullivaneuh 1
  • Create new release

    Create new release

    The current dev version fixes (at least) Japanese hiragana & katakana romanisation, the current release version (1.0.1) has issues with them.

    It's been quite a while now any change hasn't been done. Would it be possible to create a new release out of master?

    Cheers for that!

    opened by ghost 1
  • The Unicode data should be updated based on the newer version of the Perl library

    The Unicode data should be updated based on the newer version of the Perl library

    The current data are based on on the 0.04 release (see #2 ensuring that everything matches), which is from 2001. We should update it to the 1.23 version from 2014: http://cpansearch.perl.org/src/SBURKE/Text-Unidecode-1.23/

    opened by stof 1
  • urlize Apostrophes for French

    urlize Apostrophes for French

    While updating an old project, I realized that urlize wasn't working the way it used to before.

    before (long time ago): "c'est qu'il m'énerve" -> "c-est-qu-il-m-enerve"

    now : "c'est qu'il m'énerve" -> "cest-quil-menerve"

    // Remove apostrophes which are not used as quotes around a string
    $text = preg_replace('/(\\w)\'(\w)/', '${1}${2}', $text);
    

    it's not really a problem. but as I don't want to change the old urls of the site I'm going to turn the "'" into " " before using urlize.

    But maybe there could be an option to decide if we want to make the apostrophes disappear or turn them into a dash. :wink:

    opened by CedCannes 0
  • Unneeded code in Transliterator::postProcessText

    Unneeded code in Transliterator::postProcessText

    If I understand the code correctly, there is unneccessary code in Transliterator::postProcessText (https://github.com/Behat/Transliterator/blob/master/src/Behat/Transliterator/Transliterator.php#L568)

    The first thing the function does is lowercase the input. After that, in line 580 there is a lot of preg_replacegoing on, checking uppercase chars and finally lowercasing the whole string again.

    I was wondering why that is there. I think, the code could be simplified

    before

    $text = strtolower(preg_replace('/[^A-Za-z0-9\/]+/', $separator,
                preg_replace('/([a-z\d])([A-Z])/', '\1_\2',
                    preg_replace('/([A-Z]+)([A-Z][a-z])/', '\1_\2',
                        preg_replace('/::/', '/', $text)))));
    

    after

    $text = preg_replace('/[^a-z0-9\/]+/', $separator, preg_replace('/::/', '/', $text));
    
    opened by knusperpixel 2
  • selective transliteration

    selective transliteration

    If it's not already supported it would be nice to restrict transliteration to nonlatin scripts, that is keep all accents from french or hungarian text, but transliterate russian text in cyrillyc or chineese. Essentially have ISO-8859-* as target, and not strictly ASCII.

    opened by andrisi 0
  • Please consider changing license for downstream

    Please consider changing license for downstream

    I would like to package the Behat stack for Fedora/EPEL but Artistic 1.0 licensed software is not allowed in Fedora/EPEL. Please consider changing this library's license to the newer Artistic 2.0 license or perhaps even the MIT license like most other Behat libraries.

    For reference, here are the Fedora software license lists:

    From http://www.gnu.org/licenses/license-list.html#ArtisticLicense :

    Artistic License 1.0

    We cannot say that this is a free software license because it is too vague; some passages are too clever for their own good, and their meaning is not clear. We urge you to avoid using it, except as part of the disjunctive license of Perl.

    opened by siwinski 15
Releases(v1.5.0)
Owner
Behat
Behat
Allows reflection of object attributes, including inherited and non-public ones

sebastian/object-reflector Allows reflection of object attributes, including inherited and non-public ones. Installation You can add this library as a

Sebastian Bergmann 6k Jan 4, 2023
Behat Messenger Context

Behat Messenger Context Version Build Status Code Coverage master develop Installation Step 1: Install Context Open a command console, enter your proj

MacPaw Inc. 13 Jan 29, 2022
Behat for Magento

BehatMage Behat extension for Magento, providing Behat context with specific Magento requirements allowing you to quickly define Magento scenarios and

MageTest 88 Jul 6, 2022
A lightweight SQL generation library.

Atlas A lightweight SQL builder library without any query execution or database connection requirements. The primary goals of this package are: To pro

RebelCode 1 May 11, 2022
It's a CodeIgniter Library for Captcha Generation. With additional Flexibility .

Original Source : Pavel Tzonkov <[email protected]> Source Link : http://gscripts.net/free-php-scripts/Anti_Spam_Scripts/Image_Validator/d

Chris # 4 Sep 2, 2022
A collection of command line scripts for Magento 2 code generation, and a PHP module system for organizing command line scripts.

What is Pestle? Pestle is A PHP Framework for creating and organizing command line programs An experiment in implementing python style module imports

Alan Storm 526 Dec 5, 2022
A next-generation package manager for the front-end

Duo is a next-generation package manager that blends the best ideas from Component, Browserify and Go to make organizing and writing front-end code qu

Duo 3.4k Dec 28, 2022
FUGIO: Automatic Exploit Generation for PHP Object Injection Vulnerabilities

FUGIO FUGIO is the first automatic exploit generation (AEG) tool for PHP object injection (POI) vulnerabilities. When exploiting a POI vulnerability,

KAIST Web Security and Privacy Lab 53 Dec 23, 2022
A PHP sitemap generation tool.

Cartographer A sitemap generation tool for PHP following the Sitemap Protocol v0.9. Cartographer can handle Sitemaps of any size. When generating site

Tackk Inc. 332 Dec 23, 2022
Next-generation front-end for Magento 2

The next-generation front-end for Magento 2. Fast. Reliable. Extensible. Getting started – create a new application and deploy it as Magento 2 theme o

ScandiPWA 509 Jan 2, 2023
Next generation airdrop tooling. try me!

Supporting Airdrop Task Solver Singkatnya, project ini terinspirasi oleh Viloid, tapi ini jauh lebih kompleks. Airdrop Task Solver adalah Aplikasi ber

Yuza 25 Jul 31, 2022
Blacksmith is a code generation tool which automates the creation of common files that you'd typically create for each entity in your application.

Blacksmith is a code generation tool which automates the creation of common files that you'd typically create for each entity in your application.

Indatus 197 Dec 30, 2022
Highly customizable alternative to var_export for PHP code generation

PHP Variable Exporter PHPEncoder is a PHP library for exporting variables and generating PHP code representations for said variables similar to the bu

Riikka Kalliomäki 71 Dec 30, 2022
Nextcloud app to do preview generation

Preview Generator Nextcloud app that allows admins to pre-generate previews. The app listens to edit events and stores this information. Once a cron j

Nextcloud 343 Dec 29, 2022
This library can be used, among other things, to retrieve the classes, interfaces, traits, enums, functions and constants declared in a file

marijnvanwezel/reflection-file Library that allows reflection of files. This library can be used, among other things, to retrieve the classes, interfa

Marijn van Wezel 5 Apr 17, 2022
KLua is a FFI-based Lua5 library that can be used in both PHP and KPHP

KLua KLua is a FFI-based Lua5 library that can be used in both PHP and KPHP. Installation Since this is a FFI library, it needs a dynamic library avai

Iskander (Alex) Sharipov 7 Nov 4, 2022
Open-source library used in Gigadrive projects with common PHP utilities

PHP Commons This library provides PHP utilities used in Gigadrive projects, provided for the open-source community. Functions are registered globally

Gigadrive UG 3 Nov 10, 2021
This library implements a fuzzer for PHP, which can be used to find bugs in libraries

PHP Fuzzer This library implements a fuzzer for PHP, which can be used to find bugs in libraries (particularly parsing libraries) by feeding them "ran

Nikita Popov 341 Dec 25, 2022
A tool that can be used to verify BC breaks between two versions of a PHP library.

Roave Backward Compatibility Check A tool that can be used to verify BC breaks between two versions of a PHP library. Pre-requisites/assumptions Your

Roave, LLC 530 Dec 27, 2022