php-gettext / Gettext

PHP library to collect and manipulate gettext (.po, .mo, .php, .json, etc)
MIT License
687 stars 134 forks source link

fixed diacritics for vuejs extractor from <template> element #241

Closed MarekGogol closed 4 years ago

MarekGogol commented 4 years ago

Hello,

At the beginning, thanks for this awesome package.

Version: v4.8.1 PHP: 7.2 Env: Mac OS - Cataline, Ubuntu server...

If you want import text with diacritics from vuejs <template> element with PHP extractor, output will be with buggy diacritics...

VueJS

<template>
    {{ __('text with diacritics čťľďáé') }}
</template>

PHP

Translations::fromVueJsFile(...)

Response will be x04text with diacritics čťľďáé , but should be text with diacritics čťľďáé.

Fixed, and added tests... Hope everything is okay. Please could you publish new tag in v4?

Thanks.

briedis commented 4 years ago

Just a note: Duplicate, but a slightly different solution: https://github.com/php-gettext/Gettext/pull/242

oscarotero commented 4 years ago

Merged #242 that fixes this.