Skip to content

Fix Translation not found when contains non-standard character #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

N1ebieski
Copy link
Contributor

Partially fixes laravel/vs-code-extension#400

This PR is related to my previous PR #19

Stillat\BladeParser\Document\Document::fromText treats multibyte characters as indentations and spaces resulting in a miscalculated Node position. so my previous PR replaces all multibyte characters with a singlebyte placeholder.

But if a user has any multibyte characters (symbols etc.) inside translations for example: (arrow → is a symbol)

{{ __('Where to find the ID: Log in to the dashboard, go to Products → Settings → Categories, then click Edit next to the selected category. The category ID can be found on the left side at the bottom of the form.') }}

then linkProvider cannot find such an element in the translation repository.

This PR improves my previous PR. Only Node's position is being corrected. The Node's innerContent remains unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Translation not found when contains non-standard character
1 participant