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

fix: rectify conditional logic for toEnglish #190

Merged
merged 1 commit into from
Jun 12, 2021

Conversation

bhajneet
Copy link
Member

Summary of PR

the logic was:

let mappedLetter = transliterationMap[ letter ] || letter

so if the mapped letter were '' (empty string) it would result in false, therefore passing through all the suppressed characters.

new method is now:

let mappedLetter = transliterationMap[ letter ] || ''

and we have explicitly added a bunch of pass through characters in the ignore array/set. now all the tests pass, if there is something not found in the transliterationMap it will be suppressed / hidden from end result, which is not ideal, but better than what we had before I suppose.

Tests for unexpected behavior

  • tests pass

Time spent on PR

30 mins

Linked issues

Fix #185

@coveralls
Copy link

coveralls commented Jun 12, 2021

Pull Request Test Coverage Report for Build 932035401

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 931614211: 0.0%
Covered Lines: 155
Relevant Lines: 155

💛 - Coveralls

@saihaj saihaj merged commit 5367f17 into shabados:dev Jun 12, 2021
@saihaj saihaj mentioned this pull request Jun 12, 2021
bhajneet added a commit that referenced this pull request Jun 12, 2021
* build: bump semver

* fix: rectify conditional logic for toEnglish (#190)

* ci: use shabados release actions (#192)

* ci: use shabados actions release
* ci: use ci flag for release-it

cherry-pick from a7f791f#diff-8bc94a3006768345d17c827c0bb5840e6e4daee6de1c2b1ea672f53f162d171dR14

* ci: use latest verisons of shabados actions (#193)

* ci: use shabados actions next (#194)

* ci: use release script (#195)

* ci: use release script

* style: new line

* Release 3.2.0

* fix bump

* fix bump

* merge stuffs

Co-authored-by: Saihajpreet Singh <saihajpreet.singh@gmail.com>
Co-authored-by: ShabadOS Bot <team@shabados.com>
@bhajneet bhajneet deleted the fix-logic branch January 11, 2022 21:50
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.

Transliteration error
3 participants