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

Improve Glossary Term insertion to replace instead of append when text available #159

Open
garretthyder opened this issue Jul 6, 2018 · 4 comments
Assignees
Milestone

Comments

@garretthyder
Copy link
Collaborator

@garretthyder garretthyder commented Jul 6, 2018

I would like to improve the term insertion originally implemented in #45 with some replacement logic rather than the current appending.

Proposed Functionality Change;

  • If textarea is empty or doesn't contain the term simply append as is done now
  • If term exists determine if upper/lower/capital case then replace with glossary translation in same case.
  • If multiple terms exist can either replace all instances or try to determine location in string and only replace single term.
@garretthyder garretthyder added this to the 1.5 milestone Jul 6, 2018
@garretthyder garretthyder self-assigned this Jul 6, 2018
@Mte90
Copy link
Owner

@Mte90 Mte90 commented Jul 9, 2018

About:
2. every language address differently the way of write uppercase letters. As example of italian if there is a uppercase letter in a word in the middle of a sentence can be lowercase in italian. We have the rule of only names, country and other few cases where inside a sentence they are uppercased
3. How will reconize different languages?

@garretthyder
Copy link
Collaborator Author

@garretthyder garretthyder commented Jul 10, 2018

Thanks @Mte90
2. I can see the concern there. I would assume the per-language case rules wouldn't change and would be up to the translator. I was thinking preserving the original case would in most instances convert properly and leave the translator with the need to check it's the correct case for their language.
3. I'm not sure I follow this item. The source language should be en_US and then it would use the glossary terms of the current language

We'll discuss further before implementing here

@Mte90
Copy link
Owner

@Mte90 Mte90 commented Jul 10, 2018

Maybe we can add a setting for that to enable the uppercase support and we can fix easily all the usercases and the rest will don't require a setting.

@garretthyder
Copy link
Collaborator Author

@garretthyder garretthyder commented Jul 10, 2018

Sounds good, for the setting functionality;

  • A 'Don't preserve case on term replace' checkbox setting will be added to disable the case checking on strings. If checked the replace will be done in lowercase.
@garretthyder garretthyder modified the milestones: 1.5, 1.6 Nov 5, 2018
@Mte90 Mte90 added the hacktoberfest label Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants