Skip to content

Commit

Permalink
Merge pull request JabRef#10530 from JabRef/adjustIssueBugText
Browse files Browse the repository at this point in the history
Adjust issue bug text
  • Loading branch information
Siedlerchr authored Oct 20, 2023
2 parents d13b570 + f79f308 commit 1fb17d3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<fx:root spacing="10.0" type="VBox" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.jabref.gui.preferences.network.NetworkTab">
<Label styleClass="titleHeader" text="%Network" />
<CheckBox fx:id="versionCheck" text="%Check for latest version online"/>
<Label text="%Please use the latest version of JabRef if you run into a bug. If you encounter an issue or a bug, check the latest version, if the issue is still present." wrapText="true"/>
<Label text="%If you encounter an issue or a bug, please check the latest version, whether the issue is still present." wrapText="true"/>
<Label styleClass="sectionHeader" text="%Remote operation" />
<Label fx:id="remoteLabel" text="%This feature lets new files be opened or imported into an already running instance of JabRef instead of opening a new instance. For instance, this is useful when you open a file in JabRef from your web browser. Note that this will prevent you from running more than one instance of JabRef at a time." textOverrun="CLIP" wrapText="true" />
<HBox alignment="CENTER_LEFT" spacing="10.0">
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ Incorrect\ ISSN\ format=Incorrect ISSN format
Error\ accessing\ catalog=Error accessing catalog

Check\ for\ latest\ version\ online=Check for latest version online
Please\ use\ the\ latest\ version\ of\ JabRef\ if\ you\ run\ into\ a\ bug.\ If\ you\ encounter\ an\ issue\ or\ a\ bug,\ check\ the\ latest\ version,\ if\ the\ issue\ is\ still\ present.=Please use the latest version of JabRef if you run into a bug. If you encounter an issue or a bug, check the latest version, if the issue is still present.
If\ you\ encounter\ an\ issue\ or\ a\ bug,\ please\ check\ the\ latest\ version,\ whether\ the\ issue\ is\ still\ present.=If you encounter an issue or a bug, please check the latest version, whether the issue is still present.

Keep\ both=Keep both

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Serial;
import java.nio.charset.StandardCharsets;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
Expand Down Expand Up @@ -99,7 +100,7 @@ void languageKeysShouldNotContainUnderscoresForSpaces() throws IOException {
quotedEntries
.stream()
.map(key -> String.format("\n%s (%s)\n", key.getKey(), key.getPath()))
.collect(Collectors.toList()));
.toList());
}

@Test
Expand All @@ -115,23 +116,25 @@ void languageKeysShouldNotContainHtmlBrAndHtmlP() throws IOException {
entriesWithHtml
.stream()
.map(key -> String.format("\n%s (%s)\n", key.getKey(), key.getPath()))
.collect(Collectors.toList()));
.toList());
}

@Test
void findMissingLocalizationKeys() throws IOException {
List<LocalizationEntry> missingKeys = LocalizationParser.findMissingKeys(LocalizationBundleForTest.LANG)
.stream()
.collect(Collectors.toList());
List<LocalizationEntry> missingKeys = new ArrayList<>(LocalizationParser.findMissingKeys(LocalizationBundleForTest.LANG));
assertEquals(Collections.emptyList(), missingKeys,
missingKeys.stream()
.map(key -> LocalizationKey.fromKey(key.getKey()))
.map(key -> String.format("%s=%s",
key.getEscapedPropertiesKey(),
key.getValueForEnglishPropertiesFile()))
.collect(Collectors.joining("\n",
"\n\nDETECTED LANGUAGE KEYS WHICH ARE NOT IN THE ENGLISH LANGUAGE FILE\n" +
"PASTE THESE INTO THE ENGLISH LANGUAGE FILE\n\n",
"""
DETECTED LANGUAGE KEYS WHICH ARE NOT IN THE ENGLISH LANGUAGE FILE
PASTE THESE INTO THE ENGLISH LANGUAGE FILE
""",
"\n\n")));
}

Expand All @@ -141,8 +144,12 @@ void findObsoleteLocalizationKeys() throws IOException {
assertEquals(Collections.emptySet(), obsoleteKeys,
obsoleteKeys.stream().collect(Collectors.joining("\n",
"Obsolete keys found in language properties file: \n\n",
"\n\n1. CHECK IF THE KEY IS REALLY NOT USED ANYMORE\n" +
"2. REMOVE THESE FROM THE ENGLISH LANGUAGE FILE\n"))
"""
1. CHECK IF THE KEY IS REALLY NOT USED ANYMORE
2. REMOVE THESE FROM THE ENGLISH LANGUAGE FILE
"""))
);
}

Expand Down Expand Up @@ -190,7 +197,7 @@ void languageCanBeLoaded(Language language) {

private static class DuplicationDetectionProperties extends Properties {

private static final long serialVersionUID = 1L;
@Serial private static final long serialVersionUID = 1L;

private final List<String> duplicates = new ArrayList<>();

Expand Down

0 comments on commit 1fb17d3

Please sign in to comment.