Skip to content
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

feat(slatetodom): add alwaysEncodeBreakingEntities option #57

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

thompsonsj
Copy link
Owner

Add an alwaysEncodeBreakingEntities option to slateToDom.

Details

  • Breaking entities are defined as <, > and & only.
  • alwaysEncodeBreakingEntities only takes effect if encodeEntities is false. This is because encodeEntities encodes breaking entities anyway.

Background

In CrowdIn, encoded entities are supported. Translators can hover over encoded entities to see the character used.

Screenshot 2023-04-24 at 11 40 33

However, it would be much more convenient to send utf8 characters as they are. This makes translations easier to manage, and avoids situations where translations receive a warning because an encoded entity is not included in the translation.

@thompsonsj thompsonsj merged commit f5c85d7 into main Apr 24, 2023
steven-pribilinskiy pushed a commit to cloudbeds/slate-serializers that referenced this pull request May 3, 2023
github-actions bot pushed a commit to cloudbeds/slate-serializers that referenced this pull request May 3, 2023
# [1.1.0](v1.0.1...v1.1.0) (2023-05-03)

### Bug Fixes

* lint and format ([thompsonsj#58](https://github.com/cloudbeds/slate-serializers/issues/58)) ([9ab446d](9ab446d))

### Features

* **slatetodom:** add encodeBreakingEntities option ([thompsonsj#57](https://github.com/cloudbeds/slate-serializers/issues/57)) ([e9040fa](e9040fa))
hygorzorak pushed a commit to cloudbeds/slate-serializers that referenced this pull request Oct 16, 2023
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.

1 participant