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

Adjust issue bug text #10530

Merged
merged 6 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
"""
Siedlerchr marked this conversation as resolved.
Show resolved Hide resolved

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"))
"""
Siedlerchr marked this conversation as resolved.
Show resolved Hide resolved

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
Loading