diff --git a/CHANGELOG.md b/CHANGELOG.md index 2597876a6a9..74c64986ef6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - The MS-Office XML export now exports the field `volumes` and `pubstate`. ### Fixed + - We fixed an issue where authors with multiple surnames were not presented correctly in the main table [#2534](https://github.com/JabRef/jabref/issues/2534) - Repairs the handling of apostrophes in the LaTeX to unicode conversion. [#2500](https://github.com/JabRef/jabref/issues/2500) - Fix import of journal title in ris format. [#2506](https://github.com/JabRef/jabref/issues/2506) - We fixed the export of the `number` field in MS-Office XML export. [#2509](https://github.com/JabRef/jabref/issues/2509) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 47345a8770b..0a23e00315a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,5 @@ ## Understanding the basics -We welcome contributions to JabRef and encourage to create a fork, clone, **create a new branch** (such as `fix-for-issue-121`), **work on the new branch - not master**, and create a pull request. +We welcome contributions to JabRef and encourage to create a fork, clone, **create a new branch** (such as `fix-for-issue-121`), **work on the new branch — not master**, and create a pull request. Be sure to create a **separate branch** for each improvement you implement. Take a look at GitHub's excellent [help documentation] for a detailed explanation. @@ -19,7 +19,6 @@ Nevertheless we aim to keep the code consistently formatted, therefore we additi ### Ensure consistent formatting Ensure your code is formatted according the JabRef formatting guidelines. When you use Eclipse, the required configuration is generated automatically by `gradlew cleanEclipse eclipse`. -You can also run `gradlew format` to let the [Gradle Format plugin](https://github.com/youribonnaffe/gradle-format-plugin) do the formatting. ### Add your change to CHANGELOG.md @@ -92,14 +91,14 @@ because . ### When adding a new Localization.lang entry -Add new Localization.lang("KEY") to Java file. +Add new `Localization.lang("KEY")` to Java file. Tests fail. In the test output a snippet is generated which must be added to the English translation file. There is also a snippet generated for the non-English files, but this is irrelevant. Add snippet to English translation file located at `src/main/resources/l10n/JabRef_en.properties` With `gradlew localizationUpdate` the "KEY" is added to the other translation files as well. Tests are green again. You can also directly run the specific test in your IDE. The test "LocalizationConsistencyTest" is placed under `src/test/java/net.sf.jabref.logic.l10n/LocalizationConsistencyTest.java` -Find more information in the [JabRef Wiki](https://github.com/JabRef/jabref/wiki/Code-Howtos#using-localization-correctly) +Find more information in the [JabRef Wiki](https://github.com/JabRef/jabref/wiki/Code-Howtos#using-localization-correctly). ### Create a pull request diff --git a/src/main/java/net/sf/jabref/gui/maintable/MainTableColumn.java b/src/main/java/net/sf/jabref/gui/maintable/MainTableColumn.java index 10a0fbab1dd..37c7015d35d 100644 --- a/src/main/java/net/sf/jabref/gui/maintable/MainTableColumn.java +++ b/src/main/java/net/sf/jabref/gui/maintable/MainTableColumn.java @@ -104,7 +104,7 @@ public Object getColumnValue(BibEntry entry) { String result = content.orElse(null); if (isNameColumn) { - result = MainTableNameFormatter.formatName(toUnicode.format(result)); + result = toUnicode.format(MainTableNameFormatter.formatName(result)); } if (result != null) { diff --git a/src/test/java/net/sf/jabref/logic/layout/format/LatexToUnicodeFormatterTest.java b/src/test/java/net/sf/jabref/logic/layout/format/LatexToUnicodeFormatterTest.java index 7d540920a17..cb36aee6cd2 100644 --- a/src/test/java/net/sf/jabref/logic/layout/format/LatexToUnicodeFormatterTest.java +++ b/src/test/java/net/sf/jabref/logic/layout/format/LatexToUnicodeFormatterTest.java @@ -65,6 +65,39 @@ public void testSWithCaron() { assertEquals("Š", formatter.format("{\\v{S}}")); } + @Test + public void testIWithDiaresis() { + assertEquals("ï", formatter.format("\\\"{i}")); + } + + @Test + public void testIWithDiaresisAndEscapedI() { + // this might look strange in the test, but is actually a correct translation and renders identically to the above example in the UI + assertEquals("ı̈", formatter.format("\\\"{\\i}")); + } + + + @Test + public void testIWithDiaresisAndUnnecessaryBraces() { + assertEquals("ï", formatter.format("{\\\"{i}}")); + } + + @Test + public void testUpperCaseIWithDiaresis() { + assertEquals("Ï", formatter.format("\\\"{I}")); + } + + @Test + public void testPolishName() { + assertEquals("Łęski", formatter.format("\\L\\k{e}ski")); + } + + + @Test + public void testDoubleCombiningAccents() { + assertEquals("ώ", formatter.format("$\\acute{\\omega}$")); + } + @Test public void testCombiningAccentsCase1() { assertEquals("ḩ", formatter.format("{\\c{h}}"));