Skip to content

Commit

Permalink
Fix split multiline localization (JabRef#9814)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor authored May 2, 2023
1 parent 57048c1 commit 5bc359f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ src/main/gen/
src/main/generated/
src-gen/

structure101-settings.java.hsw

# private data
/buildres/jabref-cert-2016.p12

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private void downloadFullTexts(Map<BibEntry, Optional<URL>> downloads, BibDataba
Optional<Path> dir = databaseContext.getFirstExistingFileDir(preferences.getFilePreferences());
if (dir.isEmpty()) {
dialogService.showErrorDialogAndWait(Localization.lang("Directory not found"),
Localization.lang("Main file directory not set. Check the preferences (linked files) or the library properties."));
Localization.lang("Main file directory not set. Check the preferences (\"Linked files\") or modify the library properties (\"Override default file directories\")."));
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,9 @@ public LinkedFilesTabViewModel(DialogService dialogService, PreferencesService p
mainFileDirValidator = new FunctionBasedValidator<>(
mainFileDirectoryProperty,
mainDirectoryPath -> {
ValidationMessage error = ValidationMessage.error(String.format(
"%s%n%s%n%n%s%n%n%s > %s > %s",
Localization.lang("Main directory not found"),
mainDirectoryPath,
Localization.lang("Please select a valid main directory under"),
Localization.lang("Linked files"),
Localization.lang("File directory"),
Localization.lang("Main file directory")
));

ValidationMessage error = ValidationMessage.error(
Localization.lang("Main file directory '%0' not found.\nCheck the tab \"Linked files\".", mainDirectoryPath)
);
try {
Path path = Path.of(mainDirectoryPath);
if (!(Files.exists(path) && Files.isDirectory(path))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
* Internally it defines symbols used to pick a value from the {@code java.util.prefs} interface and keeps a hashmap
* with all the default values.
* <p>
* There are still some similar preferences classes (OpenOfficePreferences and SharedDatabasePreferences) which also use
* There are still some similar preferences classes ({@link org.jabref.logic.openoffice.OpenOfficePreferences} and {@link org.jabref.logic.shared.prefs.SharedDatabasePreferences}) which also use
* the {@code java.util.prefs} API.
*/
public class JabRefPreferences implements PreferencesService {
Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,6 @@ Load\ and\ Save\ preferences\ from/to\ jabref.xml\ on\ start-up\ (memory\ stick\

Show\ advanced\ hints\ (i.e.\ helpful\ tooltips,\ suggestions\ and\ explanation)=Show advanced hints (i.e. helpful tooltips, suggestions and explanation)

Main\ file\ directory=Main file directory

Manage\ custom\ exports=Manage custom exports

Manage\ custom\ imports=Manage custom imports
Expand Down Expand Up @@ -1506,7 +1504,11 @@ Does\ nothing.=Does nothing.
Identity=Identity
Clears\ the\ field\ completely.=Clears the field completely.
Directory\ not\ found=Directory not found
Main\ file\ directory\ not\ set.\ Check\ the\ preferences\ (linked\ files)\ or\ the\ library\ properties.=Main file directory not set. Check the preferences (linked files) or the library properties.

Main\ file\ directory=Main file directory
Main\ file\ directory\ not\ set.\ Check\ the\ preferences\ ("Linked\ files")\ or\ modify\ the\ library\ properties\ ("Override\ default\ file\ directories").=Main file directory not set. Check the preferences ("Linked files") or modify the library properties ("Override default file directories").
Main\ file\ directory\ '%0'\ not\ found.\nCheck\ the\ tab\ "Linked\ files".=Main file directory '%0' not found.\nCheck the tab "Linked files".

This\ operation\ requires\ exactly\ one\ item\ to\ be\ selected.=This operation requires exactly one item to be selected.
Opening\ large\ number\ of\ files=Opening large number of files
You\ are\ about\ to\ open\ %0\ files.\ Continue?=You are about to open %0 files. Continue?
Expand Down Expand Up @@ -2530,12 +2532,10 @@ Multiline=Multiline
Unable\ to\ open\ linked\ eprint.\ Please\ set\ the\ eprinttype\ field=Unable to open linked eprint. Please set the eprinttype field
Unable\ to\ open\ linked\ eprint.\ Please\ verify\ that\ the\ eprint\ field\ has\ a\ valid\ '%0'\ id=Unable to open linked eprint. Please verify that the eprint field has a valid '%0' id
Main\ directory\ not\ found=Main directory not found
Please\ select\ a\ valid\ main\ directory\ under=Please select a valid main directory under
Search\ from\ history...=Search from history...
your\ search\ history\ is\ empty=your search history is empty
Clear\ history =Clear history
Clear\ history=Clear history
Delete\ %0\ files=Delete %0 files
Delete\ %0\ files\ permanently\ from\ disk,\ or\ just\ remove\ the\ files\ from\ the\ entry?\ Pressing\ Delete\ will\ delete\ the\ files\ permanently\ from\ disk.=Delete %0 files permanently from disk, or just remove the files from the entry? Pressing Delete will delete the files permanently from disk.
Expand Down

0 comments on commit 5bc359f

Please sign in to comment.