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 title case capitalization after en-dash characters #9102

Merged
merged 4 commits into from
Aug 31, 2022

Conversation

MorettiGS
Copy link
Contributor

@MorettiGS MorettiGS commented Aug 29, 2022

Fixes #9068

Closes #9101
Closes #9100
Closes #9099

What: I implemented a change to the Word.java file so that it can capitalize any part of a title that follows one of the characters from the en-dash list, like "-", "~" or "〰" on the Title Case method. For example, the title "test-driven software" becomes "Test-Driven Software" instead of the previous result "Test-driven Software".

Why: Following the issue #9068 discussion, there was a need to solve such a problem.

Context: This change was incentivized by the University that I'm a part of at the moment. On its course, I ended up studying Test-Driven Development (TDD), where this project (JabRef) was one of the options to work on using the TDD method. Therefore, i chose this issue to work on.

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@MorettiGS MorettiGS changed the title Fix for issue - Title case en-dash capitalization Fix title case capitalization after en-dash characters Aug 29, 2022
Copy link
Member

@calixtus calixtus left a comment

Choose a reason for hiding this comment

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

Thanks @MorettiGS for your PR which already looks very good. Just some small issue with the changelog.

CHANGELOG.md Show resolved Hide resolved
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Aug 30, 2022
Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

Tested it with the original string from the issue as well and looks good!
Thanks for your contribution!

@calixtus
Copy link
Member

Closes #9101
Closes #9100
Closes #9099

@Siedlerchr Siedlerchr merged commit 88d9d83 into JabRef:main Aug 31, 2022
Siedlerchr added a commit that referenced this pull request Sep 2, 2022
* upstream/main: (387 commits)
  Show a warning in the merge dialog when authors are the same but formatted differently (#9088)
  Fix subdatabase from aux on cli (#9117)
  Visual improvements to LinkedFilesEditor (#9114)
  SLR Remove "last-search-date" (#9116)
  Hide diffs when one of the field values is blank a.k.a no conflict (#9110)
  Squashed 'buildres/csl/csl-locales/' changes from e637746677..b2afeb4d87
  Squashed 'buildres/csl/csl-styles/' changes from c750b6e..8d69f16
  Fix title case capitalization after en-dash characters (#9102)
  Update journal abbrev list (#9109)
  Fix CSL rendering in case of article (#8607)
  [WIP][GSOC22] - C - Improve the external changes resolver dialog (#9021)
  Bump jsoup from 1.15.1 to 1.15.3 (#9103)
  Bump checkstyle from 10.3.2 to 10.3.3 (#9104)
  Bump postgresql from 42.4.2 to 42.5.0 (#9105)
  Bump unirest-java from 3.13.10 to 3.13.11 (#9106)
  Include check for TimeStamp (#9089)
  Close OO connection on JabRef exit (#9076)
  Bump slf4j-tinylog from 2.4.1 to 2.5.0 (#9085)
  Bump bcprov-jdk18on from 1.71 to 1.71.1 (#9079)
  Bump tinylog-impl from 2.4.1 to 2.5.0 (#9086)
  ...

# Conflicts:
#	src/main/java/org/jabref/gui/shared/SharedDatabaseUIManager.java
#	src/main/java/org/jabref/gui/util/DefaultTaskExecutor.java
#	src/main/java/org/jabref/logic/shared/DBMSSynchronizer.java
Siedlerchr added a commit that referenced this pull request Sep 3, 2022
…nto linkedFilesfixesRelative

* 'linkedFilesfixesRelative' of github.com:JabRef/jabref: (52 commits)
  Enable files/files
  Don't show the info button when the authors field content is identical (#9128)
  "study.yml" is static now (#9125)
  fix l10n
  Compile fix
  Fix parsing of JabRef v5.7 study.yml files (#9124)
  Fix integrity check  for tilde accents in author names (#9097)
  Rework the Define study parameters dialog (#9123)
  Fix parsing of save actions (#9122)
  Fix exception that occurs when saving name formatters (#9121)
  Refine code for BibEntry#replaceDownloadedFile (#9118)
  Show a warning in the merge dialog when authors are the same but formatted differently (#9088)
  Fix subdatabase from aux on cli (#9117)
  Visual improvements to LinkedFilesEditor (#9114)
  SLR Remove "last-search-date" (#9116)
  Hide diffs when one of the field values is blank a.k.a no conflict (#9110)
  Squashed 'buildres/csl/csl-locales/' changes from e637746677..b2afeb4d87
  Squashed 'buildres/csl/csl-styles/' changes from c750b6e..8d69f16
  Fix title case capitalization after en-dash characters (#9102)
  Update journal abbrev list (#9109)
  ...
@sreenath-tm
Copy link
Contributor

The issue fix #9102 has inadvertently caused an issue to Sentence Casing also as the changes were made to the common method used by both Title and Sentence Case for capitalising the first word. I have seperated it as this fix is only valid to the Title Case.

@calixtus
Copy link
Member

calixtus commented Sep 6, 2022

@MorettiGS can you take another look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

title case may be no right when the en-dash exist in title
4 participants