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: bibkey generated does not handle diacritics #4713

Merged
merged 8 commits into from Mar 10, 2019

Conversation

chel-seyy
Copy link
Contributor

@chel-seyy chel-seyy commented Mar 3, 2019

Fixes #4709.
Clean up the author value in BracketedPattern after it is retrieved from the BibEntry.


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Screenshots added in PR description (for bigger UI changes)
  • Ensured that the git commit message is a good one
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

@Siedlerchr
Copy link
Member

Thanks for your contribution. Unfortunately your changes resulted in a lot of failed tests (look at Details of the travis build and then select the failing job)
Seems like there are some more cases you need to take care of. (I'm not that deep into the bibtexkeygenerator stuff)

@chel-seyy
Copy link
Contributor Author

Noted. Is there another approach to handle this?

Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

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

It should suffice to add the cleankey statement here: https://github.com/JabRef/jabref/pull/4713/files#diff-fee188bf55aacff33f887a63d6b72605R234
(and also remove other symbols such as - and whitespace).

Please also create a few tests in https://github.com/JabRef/jabref/pull/4713/files#diff-fee188bf55aacff33f887a63d6b72605R234. Thanks!

@chel-seyy chel-seyy changed the title Fix: bibkey generated does not handle diacritics [WIP] Fix: bibkey generated does not handle diacritics Mar 5, 2019
@chel-seyy
Copy link
Contributor Author

chel-seyy commented Mar 8, 2019

Currently facing some issues while writing tests: mockito and jfoenix.controls.JFXSnackbarLayout cannot be imported, whereas jfoenix.controls.JFXSnackbar.SnackbarEvent works fine.
I updated to jdk8_202 and it doesn't help.

Just reimported the project, it works now.
After syncing fork, the same error occurs. How to fix this?
image

@Siedlerchr
Copy link
Member

@chelseyong Try merging the current master in e.g. (if upstream is the jabref/jabref repo)

git fetch upstream 
git merge upstream/master

I'm not an intellij user, but executing gradle should be sufficient.
maybe @halirutan can tell you more.

@chel-seyy chel-seyy changed the title [WIP] Fix: bibkey generated does not handle diacritics Fix: bibkey generated does not handle diacritics Mar 10, 2019
@chel-seyy
Copy link
Contributor Author

Sorry for the delay, I had some software issues.

Symbol - is now removed from key generation.

Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for your contribution!

@@ -72,15 +72,15 @@ private static String getAppendix(int number) {
}
}

public static String cleanKey(String key, boolean enforceLegalKey) {
public static String filterUnwantedCharacters(String key, boolean enforceLegalKey) {
Copy link
Member

Choose a reason for hiding this comment

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

maybe a slightly better name removeUnwantedCharacters (filter would imply that the unwanted characters are returned).

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.

Thank you very much for your contribution!
lgtm

@@ -26,8 +26,8 @@
*/
public static final String APPENDIX_CHARACTERS = "abcdefghijklmnopqrstuvwxyz";
private static final Logger LOGGER = LoggerFactory.getLogger(BibtexKeyGenerator.class);
private static final String KEY_ILLEGAL_CHARACTERS = "{}(),\\\"#~^':`";
private static final String KEY_UNWANTED_CHARACTERS = "{}(),\\\"";
private static final String KEY_ILLEGAL_CHARACTERS = "{}(),\\\"-#~^':`";
Copy link
Member

Choose a reason for hiding this comment

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

@chelseyong Do you, by chance, remember why you introduced - here? We have issues with that. See #6295 for details.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it is due to a suggestion made in the issue.

Al-Ketan, 2019 -> Al-19 (dash in bibtex key is awkward, should probably be ignored in favor of the next letter and become AlK19)

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for your reply. I Think, there was some misunderstanding at #4709 (comment)

Well, dash is a perfectly legal char

We will fix it at #6300

github-actions bot pushed a commit that referenced this pull request Apr 23, 2020
143464e Fix comma before et al. for the-oncologist.csl (#4724)
3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (#4719)
b2c0c1e APA: in-text title in title-case (#4725)
88c68d2 Fix et-al and indetation settings for mammalia.csl (#4717)
05940a2 Update the-febs-journal.csl (#4720)
1d77ba8 Request for review and assessment of the repa.csl (#4698)
76b4be5 Update isnad.csl (#4716)
f709c84 Update isnad-dipnotlu.csl (#4715)
45d7655 Create mammalia.csl (#4714)
eb333ca Update society-for-american-archaeology.csl (#4710)
d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (#4712)
5e34eb1 Update animal-welfare.csl (#4713)
06785fa Update le-tapuscrit-author-date.csl (#4708)
ada5282 Update norois.csl (#4707)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 143464e
github-actions bot pushed a commit to Gena928/jabref that referenced this pull request Apr 25, 2020
143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724)
3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719)
b2c0c1e APA: in-text title in title-case (JabRef#4725)
88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717)
05940a2 Update the-febs-journal.csl (JabRef#4720)
1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698)
76b4be5 Update isnad.csl (JabRef#4716)
f709c84 Update isnad-dipnotlu.csl (JabRef#4715)
45d7655 Create mammalia.csl (JabRef#4714)
eb333ca Update society-for-american-archaeology.csl (JabRef#4710)
d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712)
5e34eb1 Update animal-welfare.csl (JabRef#4713)
06785fa Update le-tapuscrit-author-date.csl (JabRef#4708)
ada5282 Update norois.csl (JabRef#4707)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 143464e
github-actions bot pushed a commit to CaptainDaVinci/jabref that referenced this pull request May 1, 2020
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730)
607a056 Create ifao-publications.csl (JabRef#4731)
5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735)
4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734)
d70c2a4 Add chapter section in bibliography (JabRef#4732)
366dbc1 Create economic-history-review.csl (JabRef#4643)
7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711)
a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729)
143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724)
3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719)
b2c0c1e APA: in-text title in title-case (JabRef#4725)
88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717)
05940a2 Update the-febs-journal.csl (JabRef#4720)
1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698)
76b4be5 Update isnad.csl (JabRef#4716)
f709c84 Update isnad-dipnotlu.csl (JabRef#4715)
45d7655 Create mammalia.csl (JabRef#4714)
eb333ca Update society-for-american-archaeology.csl (JabRef#4710)
d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712)
5e34eb1 Update animal-welfare.csl (JabRef#4713)
06785fa Update le-tapuscrit-author-date.csl (JabRef#4708)
ada5282 Update norois.csl (JabRef#4707)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 906cd6d
github-actions bot pushed a commit to calixtus/jabref that referenced this pull request May 1, 2020
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730)
607a056 Create ifao-publications.csl (JabRef#4731)
5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735)
4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734)
d70c2a4 Add chapter section in bibliography (JabRef#4732)
366dbc1 Create economic-history-review.csl (JabRef#4643)
7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711)
a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729)
143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724)
3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719)
b2c0c1e APA: in-text title in title-case (JabRef#4725)
88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717)
05940a2 Update the-febs-journal.csl (JabRef#4720)
1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698)
76b4be5 Update isnad.csl (JabRef#4716)
f709c84 Update isnad-dipnotlu.csl (JabRef#4715)
45d7655 Create mammalia.csl (JabRef#4714)
eb333ca Update society-for-american-archaeology.csl (JabRef#4710)
d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712)
5e34eb1 Update animal-welfare.csl (JabRef#4713)
06785fa Update le-tapuscrit-author-date.csl (JabRef#4708)
ada5282 Update norois.csl (JabRef#4707)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 906cd6d
github-actions bot pushed a commit to eetian/jabref that referenced this pull request May 1, 2020
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730)
607a056 Create ifao-publications.csl (JabRef#4731)
5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735)
4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734)
d70c2a4 Add chapter section in bibliography (JabRef#4732)
366dbc1 Create economic-history-review.csl (JabRef#4643)
7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711)
a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729)
143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724)
3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719)
b2c0c1e APA: in-text title in title-case (JabRef#4725)
88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717)
05940a2 Update the-febs-journal.csl (JabRef#4720)
1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698)
76b4be5 Update isnad.csl (JabRef#4716)
f709c84 Update isnad-dipnotlu.csl (JabRef#4715)
45d7655 Create mammalia.csl (JabRef#4714)
eb333ca Update society-for-american-archaeology.csl (JabRef#4710)
d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712)
5e34eb1 Update animal-welfare.csl (JabRef#4713)
06785fa Update le-tapuscrit-author-date.csl (JabRef#4708)
ada5282 Update norois.csl (JabRef#4707)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 906cd6d
github-actions bot pushed a commit to leitianjian/jabref that referenced this pull request May 1, 2020
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730)
607a056 Create ifao-publications.csl (JabRef#4731)
5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735)
4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734)
d70c2a4 Add chapter section in bibliography (JabRef#4732)
366dbc1 Create economic-history-review.csl (JabRef#4643)
7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711)
a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729)
143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724)
3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719)
b2c0c1e APA: in-text title in title-case (JabRef#4725)
88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717)
05940a2 Update the-febs-journal.csl (JabRef#4720)
1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698)
76b4be5 Update isnad.csl (JabRef#4716)
f709c84 Update isnad-dipnotlu.csl (JabRef#4715)
45d7655 Create mammalia.csl (JabRef#4714)
eb333ca Update society-for-american-archaeology.csl (JabRef#4710)
d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712)
5e34eb1 Update animal-welfare.csl (JabRef#4713)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 906cd6d
github-actions bot pushed a commit to abepolk/jabref that referenced this pull request May 1, 2020
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730)
607a056 Create ifao-publications.csl (JabRef#4731)
5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735)
4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734)
d70c2a4 Add chapter section in bibliography (JabRef#4732)
366dbc1 Create economic-history-review.csl (JabRef#4643)
7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711)
a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729)
143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724)
3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719)
b2c0c1e APA: in-text title in title-case (JabRef#4725)
88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717)
05940a2 Update the-febs-journal.csl (JabRef#4720)
1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698)
76b4be5 Update isnad.csl (JabRef#4716)
f709c84 Update isnad-dipnotlu.csl (JabRef#4715)
45d7655 Create mammalia.csl (JabRef#4714)
eb333ca Update society-for-american-archaeology.csl (JabRef#4710)
d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712)
5e34eb1 Update animal-welfare.csl (JabRef#4713)
06785fa Update le-tapuscrit-author-date.csl (JabRef#4708)
ada5282 Update norois.csl (JabRef#4707)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 906cd6d
github-actions bot pushed a commit to NikodemKch/jabref-1 that referenced this pull request May 1, 2020
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730)
607a056 Create ifao-publications.csl (JabRef#4731)
5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735)
4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734)
d70c2a4 Add chapter section in bibliography (JabRef#4732)
366dbc1 Create economic-history-review.csl (JabRef#4643)
7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711)
a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729)
143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724)
3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719)
b2c0c1e APA: in-text title in title-case (JabRef#4725)
88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717)
05940a2 Update the-febs-journal.csl (JabRef#4720)
1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698)
76b4be5 Update isnad.csl (JabRef#4716)
f709c84 Update isnad-dipnotlu.csl (JabRef#4715)
45d7655 Create mammalia.csl (JabRef#4714)
eb333ca Update society-for-american-archaeology.csl (JabRef#4710)
d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712)
5e34eb1 Update animal-welfare.csl (JabRef#4713)
06785fa Update le-tapuscrit-author-date.csl (JabRef#4708)
ada5282 Update norois.csl (JabRef#4707)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 906cd6d
github-actions bot pushed a commit to ShikunXiong/jabref that referenced this pull request May 1, 2020
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730)
607a056 Create ifao-publications.csl (JabRef#4731)
5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735)
4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734)
d70c2a4 Add chapter section in bibliography (JabRef#4732)
366dbc1 Create economic-history-review.csl (JabRef#4643)
7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711)
a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729)
143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724)
3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719)
b2c0c1e APA: in-text title in title-case (JabRef#4725)
88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717)
05940a2 Update the-febs-journal.csl (JabRef#4720)
1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698)
76b4be5 Update isnad.csl (JabRef#4716)
f709c84 Update isnad-dipnotlu.csl (JabRef#4715)
45d7655 Create mammalia.csl (JabRef#4714)
eb333ca Update society-for-american-archaeology.csl (JabRef#4710)
d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712)
5e34eb1 Update animal-welfare.csl (JabRef#4713)
06785fa Update le-tapuscrit-author-date.csl (JabRef#4708)
ada5282 Update norois.csl (JabRef#4707)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 906cd6d
github-actions bot pushed a commit to systemoperator/jabref that referenced this pull request May 1, 2020
906cd6d Create technische-universitat-dresden-linguistik-author-date (JabRef#4730)
607a056 Create ifao-publications.csl (JabRef#4731)
5a65f50 remove et-al settings for bibliography for PVS (JabRef#4735)
4a145d4 Create current-opinion-in-endocrinology-diabetes-and-obesity.csl (JabRef#4734)
d70c2a4 Add chapter section in bibliography (JabRef#4732)
366dbc1 Create economic-history-review.csl (JabRef#4643)
7069ddc Create the-open-university-harvard-s390-modules.csl (JabRef#4711)
a789973 Chicago: Uppercase "Presentated at" if no `genre` (JabRef#4729)
143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724)
3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719)
b2c0c1e APA: in-text title in title-case (JabRef#4725)
88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717)
05940a2 Update the-febs-journal.csl (JabRef#4720)
1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698)
76b4be5 Update isnad.csl (JabRef#4716)
f709c84 Update isnad-dipnotlu.csl (JabRef#4715)
45d7655 Create mammalia.csl (JabRef#4714)
eb333ca Update society-for-american-archaeology.csl (JabRef#4710)
d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712)
5e34eb1 Update animal-welfare.csl (JabRef#4713)
06785fa Update le-tapuscrit-author-date.csl (JabRef#4708)
ada5282 Update norois.csl (JabRef#4707)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 906cd6d
Gena928 pushed a commit to Gena928/jabref that referenced this pull request Sep 29, 2020
143464e Fix comma before et al. for the-oncologist.csl (JabRef#4724)
3b331b6 fixed bug with "near-note" position univ.-bordeaux-ecole-doctorale-de… (JabRef#4719)
b2c0c1e APA: in-text title in title-case (JabRef#4725)
88c68d2 Fix et-al and indetation settings for mammalia.csl (JabRef#4717)
05940a2 Update the-febs-journal.csl (JabRef#4720)
1d77ba8 Request for review and assessment of the repa.csl (JabRef#4698)
76b4be5 Update isnad.csl (JabRef#4716)
f709c84 Update isnad-dipnotlu.csl (JabRef#4715)
45d7655 Create mammalia.csl (JabRef#4714)
eb333ca Update society-for-american-archaeology.csl (JabRef#4710)
d944e71 Update masarykova-univerzita-pravnicka-fakulta.csl (JabRef#4712)
5e34eb1 Update animal-welfare.csl (JabRef#4713)
06785fa Update le-tapuscrit-author-date.csl (JabRef#4708)
ada5282 Update norois.csl (JabRef#4707)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 143464e
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.

None yet

4 participants