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

build: generate only heavy vishraams in vishraam_first_letters column and strip line endings from first_letters #1776

Merged
merged 3 commits into from
Jun 4, 2020
Merged

Conversation

Harjot1Singh
Copy link
Member

Summary of PR

Retains only the heavy vishraams in the vishraam_first_letters column, to allow for #1775. Removes any line endings from first letters.

Tests for unexpected behavior

  • Build SQLite DB
  • Queried for any remaining light/medium vishraams
  • Queried for any unexpected line endings

Time spent on PR

20 mins

Linked issues

Fix #1775
I cannot find the issue for removing pauses from first letters, if there is one.

Reviewers

@bhajneet

@Harjot1Singh Harjot1Singh changed the title build: generate only heavy vishraams in vishraam_first_letters column and strip line endings from first_letters build: generate only heavy vishraams in vishraam_first_letters column and strip line endings from first_letters Jun 3, 2020
@bhajneet
Copy link
Member

bhajneet commented Jun 3, 2020

I cannot find the issue for removing pauses from first letters, if there is one.

It's the same issue. Originally desktop, then GU, and finally DB. I assume once this is done and desktop is coupled it will Just Work™️, if not then please FAI for what is still required

@lgtm-com
Copy link

lgtm-com bot commented Jun 3, 2020

This pull request introduces 1 alert when merging 90cb86d into 7097e36 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

lib/build-database.js Outdated Show resolved Hide resolved
vishraam_first_letters: [
stripEndings,
// Retain heavy vishraams only
text => stripVishraams( text, { light: true, medium: true } ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's odd that you have to choose what to strip (I'd expected all weights by default and code having to toggle heavy: false)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All weights are stripped by default, but if you supply options, then you choose which are (because I thought it'd more be confusing to specify which you'd exclude in a strip function)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes more sense to change parameters to affect the default. So if the default is light, medium, heavy true. You'd put in a parameter to make one of these false. But if you think this makes more sense to people, that's fine -- I am not up to date on these conventions lol

@bhajneet
Copy link
Member

bhajneet commented Jun 3, 2020

Do you think it's maybe worth doing the english translit or hindi translit first letters in this PR?

@Harjot1Singh
Copy link
Member Author

Do you think it's maybe worth doing the english translit or hindi translit first letters in this PR?

No, but I can do a follow up PR very quickly since i'm in the zone lol

@Harjot1Singh Harjot1Singh merged commit 9d20c0e into shabados:dev Jun 4, 2020
@Harjot1Singh Harjot1Singh deleted the 1775-heavy-vishraam-only branch June 4, 2020 18:54
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.

Heavy first letters not being searched properly
2 participants