From f90d1d0c9d1a27ae4249db9e33b49ec42cb5bc94 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Mon, 25 Jul 2016 08:14:57 +0200 Subject: [PATCH 01/12] Converted a few getField to getFieldOptional (#1625) * Converted a few getField to getFieldOptional --- .../gui/actions/MassSetFieldAction.java | 21 +++++++------ .../maintable/MainTableSelectionListener.java | 7 +++-- .../gui/search/SearchResultsDialog.java | 4 +-- .../gui/util/comparator/IconComparator.java | 31 ++++++++++--------- .../comparator/RankingFieldComparator.java | 27 ++++++++-------- .../sf/jabref/importer/fetcher/CrossRef.java | 2 +- .../sf/jabref/logic/cleanup/DoiCleanup.java | 9 +++--- .../logic/cleanup/FieldFormatterCleanup.java | 2 +- .../cleanup/UpgradePdfPsToFileCleanup.java | 2 +- 9 files changed, 55 insertions(+), 50 deletions(-) diff --git a/src/main/java/net/sf/jabref/gui/actions/MassSetFieldAction.java b/src/main/java/net/sf/jabref/gui/actions/MassSetFieldAction.java index 81227b0b739a..5f2709103dcf 100644 --- a/src/main/java/net/sf/jabref/gui/actions/MassSetFieldAction.java +++ b/src/main/java/net/sf/jabref/gui/actions/MassSetFieldAction.java @@ -19,6 +19,7 @@ import java.awt.event.ActionEvent; import java.util.Collection; import java.util.List; +import java.util.Optional; import java.util.Set; import javax.swing.AbstractAction; @@ -266,11 +267,11 @@ private static UndoableEdit massSetField(Collection entries, String fi NamedCompound ce = new NamedCompound(Localization.lang("Set field")); for (BibEntry entry : entries) { - String oldVal = entry.getField(field); + Optional oldVal = entry.getFieldOptional(field); // If we are not allowed to overwrite values, check if there is a // nonempty // value already for this entry: - if (!overwriteValues && (oldVal != null) && !oldVal.isEmpty()) { + if (!overwriteValues && (oldVal.isPresent()) && !oldVal.get().isEmpty()) { continue; } if (text == null) { @@ -278,7 +279,7 @@ private static UndoableEdit massSetField(Collection entries, String fi } else { entry.setField(field, text); } - ce.addEdit(new UndoableFieldChange(entry, field, oldVal, text)); + ce.addEdit(new UndoableFieldChange(entry, field, oldVal.orElse(null), text)); } ce.end(); return ce; @@ -298,22 +299,22 @@ private static UndoableEdit massRenameField(Collection entries, String boolean overwriteValues) { NamedCompound ce = new NamedCompound(Localization.lang("Rename field")); for (BibEntry entry : entries) { - String valToMove = entry.getField(field); + Optional valToMove = entry.getFieldOptional(field); // If there is no value, do nothing: - if ((valToMove == null) || valToMove.isEmpty()) { + if ((!valToMove.isPresent()) || valToMove.get().isEmpty()) { continue; } // If we are not allowed to overwrite values, check if there is a // non-empty value already for this entry for the new field: - String valInNewField = entry.getField(newField); - if (!overwriteValues && (valInNewField != null) && !valInNewField.isEmpty()) { + Optional valInNewField = entry.getFieldOptional(newField); + if (!overwriteValues && (valInNewField.isPresent()) && !valInNewField.get().isEmpty()) { continue; } - entry.setField(newField, valToMove); - ce.addEdit(new UndoableFieldChange(entry, newField, valInNewField, valToMove)); + entry.setField(newField, valToMove.get()); + ce.addEdit(new UndoableFieldChange(entry, newField, valInNewField.orElse(null), valToMove.get())); entry.clearField(field); - ce.addEdit(new UndoableFieldChange(entry, field, valToMove, null)); + ce.addEdit(new UndoableFieldChange(entry, field, valToMove.get(), null)); } ce.end(); return ce; diff --git a/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java b/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java index 2f6243894902..04554ee7eff3 100644 --- a/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java +++ b/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java @@ -24,6 +24,7 @@ import java.io.IOException; import java.util.List; import java.util.Objects; +import java.util.Optional; import javax.swing.Icon; import javax.swing.JLabel; @@ -426,8 +427,8 @@ private void showIconRightClickMenu(MouseEvent e, int row, MainTableColumn colum // full pop should be shown as left click already shows short popup showDefaultPopup = true; } else { - if (entry.hasField(field)) { - String content = entry.getField(field); + Optional content = entry.getFieldOptional(field); + if (content.isPresent()) { Icon icon; JLabel iconLabel = GUIGlobals.getTableIcon(field); if (iconLabel == null) { @@ -435,7 +436,7 @@ private void showIconRightClickMenu(MouseEvent e, int row, MainTableColumn colum } else { icon = iconLabel.getIcon(); } - menu.add(new ExternalFileMenuItem(panel.frame(), entry, content, content, icon, + menu.add(new ExternalFileMenuItem(panel.frame(), entry, content.get(), content.get(), icon, panel.getBibDatabaseContext(), field)); showDefaultPopup = false; } diff --git a/src/main/java/net/sf/jabref/gui/search/SearchResultsDialog.java b/src/main/java/net/sf/jabref/gui/search/SearchResultsDialog.java index a93ff9259256..347493a9d3fe 100644 --- a/src/main/java/net/sf/jabref/gui/search/SearchResultsDialog.java +++ b/src/main/java/net/sf/jabref/gui/search/SearchResultsDialog.java @@ -489,10 +489,10 @@ public Object getColumnValue(BibEntry entry, int column) { // For name fields, tap into a MainTableFormat instance and use // the same name formatting as is used in the entry table: if (frame.getCurrentBasePanel() != null) { - return MainTableNameFormatter.formatName(entry.getField(field)); + return MainTableNameFormatter.formatName(entry.getFieldOptional(field).orElse(null)); } } - return entry.getField(field); + return entry.getFieldOptional(field).orElse(null); } } diff --git a/src/main/java/net/sf/jabref/gui/util/comparator/IconComparator.java b/src/main/java/net/sf/jabref/gui/util/comparator/IconComparator.java index 67dd0bb91c80..7d71ecb7e0a0 100644 --- a/src/main/java/net/sf/jabref/gui/util/comparator/IconComparator.java +++ b/src/main/java/net/sf/jabref/gui/util/comparator/IconComparator.java @@ -17,6 +17,7 @@ import java.util.Comparator; import java.util.List; +import java.util.Optional; import net.sf.jabref.model.entry.BibEntry; @@ -36,25 +37,25 @@ public IconComparator(List fields) { public int compare(BibEntry e1, BibEntry e2) { for (String field : fields) { - String val1 = e1.getField(field); - String val2 = e2.getField(field); - if (val1 == null) { - if (val2 != null) { - return 1; + Optional val1 = e1.getFieldOptional(field); + Optional val2 = e2.getFieldOptional(field); + if (val1.isPresent()) { + if (val2.isPresent()) { + // val1 is not null AND val2 is not null + int compareToRes = val1.get().compareTo(val2.get()); + if (compareToRes == 0) { + // continue loop as current two values are equal + } else { + return compareToRes; + } } else { - // continue loop and check for next field + return -1; } } else { - if (val2 == null) { - return -1; + if (val2.isPresent()) { + return 1; } else { - // val1 is not null AND val2 is not null - int compareToRes = val1.compareTo(val2); - if (compareToRes != 0) { - return compareToRes; - } else { - // continue loop as current two values are equal - } + // continue loop and check for next field } } } diff --git a/src/main/java/net/sf/jabref/gui/util/comparator/RankingFieldComparator.java b/src/main/java/net/sf/jabref/gui/util/comparator/RankingFieldComparator.java index 71e8cfd492eb..caaf55f63b61 100644 --- a/src/main/java/net/sf/jabref/gui/util/comparator/RankingFieldComparator.java +++ b/src/main/java/net/sf/jabref/gui/util/comparator/RankingFieldComparator.java @@ -16,6 +16,7 @@ package net.sf.jabref.gui.util.comparator; import java.util.Comparator; +import java.util.Optional; import net.sf.jabref.model.entry.BibEntry; import net.sf.jabref.specialfields.SpecialFieldsUtils; @@ -31,25 +32,25 @@ public class RankingFieldComparator implements Comparator { @Override public int compare(BibEntry e1, BibEntry e2) { - String val1 = e1.getField(SpecialFieldsUtils.FIELDNAME_RANKING); - String val2 = e2.getField(SpecialFieldsUtils.FIELDNAME_RANKING); - if (val1 == null) { - if (val2 == null) { - return 0; - } else { - return 1; - } - } else { - if (val2 == null) { - return -1; - } else { + Optional val1 = e1.getFieldOptional(SpecialFieldsUtils.FIELDNAME_RANKING); + Optional val2 = e2.getFieldOptional(SpecialFieldsUtils.FIELDNAME_RANKING); + if (val1.isPresent()) { + if (val2.isPresent()) { // val1 is not null AND val2 is not null - int compareToRes = val1.compareTo(val2); + int compareToRes = val1.get().compareTo(val2.get()); if (compareToRes == 0) { return 0; } else { return compareToRes * -1; } + } else { + return -1; + } + } else { + if (val2.isPresent()) { + return 1; + } else { + return 0; } } } diff --git a/src/main/java/net/sf/jabref/importer/fetcher/CrossRef.java b/src/main/java/net/sf/jabref/importer/fetcher/CrossRef.java index f0896597ad3b..4f8d7160d505 100644 --- a/src/main/java/net/sf/jabref/importer/fetcher/CrossRef.java +++ b/src/main/java/net/sf/jabref/importer/fetcher/CrossRef.java @@ -94,7 +94,7 @@ private static boolean checkValidity(BibEntry entry, JSONArray result) { try { // title JSONObject data = result.getJSONObject(0); - String dataTitle = data.getJSONArray(FieldName.TITLE).getString(0); + String dataTitle = data.getJSONArray("title").getString(0); if (editDistanceIgnoreCase(entryTitle, dataTitle) <= METRIC_THRESHOLD) { return true; diff --git a/src/main/java/net/sf/jabref/logic/cleanup/DoiCleanup.java b/src/main/java/net/sf/jabref/logic/cleanup/DoiCleanup.java index 048dc9bbc2b6..9fe2c78fac34 100644 --- a/src/main/java/net/sf/jabref/logic/cleanup/DoiCleanup.java +++ b/src/main/java/net/sf/jabref/logic/cleanup/DoiCleanup.java @@ -41,7 +41,7 @@ public List cleanup(BibEntry entry) { // First check if the Doi Field is empty if (entry.hasField(FieldName.DOI)) { - String doiFieldValue = entry.getField(FieldName.DOI); + String doiFieldValue = entry.getFieldOptional(FieldName.DOI).orElse(null); Optional doi = DOI.build(doiFieldValue); @@ -56,17 +56,18 @@ public List cleanup(BibEntry entry) { // Doi field seems to contain Doi -> cleanup note, url, ee field for (String field : FIELDS) { - DOI.build(entry.getField(field)).ifPresent(unused -> removeFieldValue(entry, field, changes)); + entry.getFieldOptional(field).flatMap(DOI::build) + .ifPresent(unused -> removeFieldValue(entry, field, changes)); } } } else { // As the Doi field is empty we now check if note, url, or ee field contains a Doi for (String field : FIELDS) { - Optional doi = DOI.build(entry.getField(field)); + Optional doi = entry.getFieldOptional(field).flatMap(DOI::build); if (doi.isPresent()) { // update Doi - String oldValue = entry.getField(FieldName.DOI); + String oldValue = entry.getFieldOptional(FieldName.DOI).orElse(null); String newValue = doi.get().getDOI(); entry.setField(FieldName.DOI, newValue); diff --git a/src/main/java/net/sf/jabref/logic/cleanup/FieldFormatterCleanup.java b/src/main/java/net/sf/jabref/logic/cleanup/FieldFormatterCleanup.java index 07ecaff8f78f..14c8a1c3304d 100644 --- a/src/main/java/net/sf/jabref/logic/cleanup/FieldFormatterCleanup.java +++ b/src/main/java/net/sf/jabref/logic/cleanup/FieldFormatterCleanup.java @@ -58,7 +58,7 @@ private List cleanupSingleField(String fieldKey, BibEntry entry) { // Not set -> nothing to do return new ArrayList<>(); } - String oldValue = entry.getField(fieldKey); + String oldValue = entry.getFieldOptional(fieldKey).orElse(null); // Run formatter String newValue = formatter.format(oldValue); diff --git a/src/main/java/net/sf/jabref/logic/cleanup/UpgradePdfPsToFileCleanup.java b/src/main/java/net/sf/jabref/logic/cleanup/UpgradePdfPsToFileCleanup.java index 9600af247cf2..3ea2ff8cb001 100644 --- a/src/main/java/net/sf/jabref/logic/cleanup/UpgradePdfPsToFileCleanup.java +++ b/src/main/java/net/sf/jabref/logic/cleanup/UpgradePdfPsToFileCleanup.java @@ -42,7 +42,7 @@ public List cleanup(BibEntry entry) { List changes = new ArrayList<>(); // If there are already links in the file field, keep those on top: - String oldFileContent = entry.getField(FieldName.FILE); + String oldFileContent = entry.getFieldOptional(FieldName.FILE).orElse(null); List fileList = new ArrayList<>(FileField.parse(oldFileContent)); int oldItemCount = fileList.size(); From fc603b42bdaccb504df8a41108bcb0911af4fed5 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Mon, 25 Jul 2016 08:15:29 +0200 Subject: [PATCH 02/12] Fixed #636 by using DOICheck and DOIStrip in export filters (#1624) --- CHANGELOG.md | 1 + src/main/resources/resource/layout/bibordf.article.layout | 4 ++-- src/main/resources/resource/layout/bibordf.layout | 4 ++-- src/main/resources/resource/layout/bibtexml.layout | 2 +- src/main/resources/resource/layout/html.inbook.layout | 2 +- src/main/resources/resource/layout/html.inproceedings.layout | 2 +- src/main/resources/resource/layout/html.layout | 2 +- src/main/resources/resource/layout/ris/ris.article.layout | 2 +- src/main/resources/resource/layout/ris/ris.book.layout | 2 +- src/main/resources/resource/layout/ris/ris.conference.layout | 2 +- .../resources/resource/layout/ris/ris.incollection.layout | 2 +- .../resources/resource/layout/ris/ris.inproceedings.layout | 2 +- src/main/resources/resource/layout/ris/ris.layout | 2 +- .../resources/resource/layout/ris/ris.mastersthesis.layout | 2 +- src/main/resources/resource/layout/ris/ris.patent.layout | 2 +- src/main/resources/resource/layout/ris/ris.phdthesis.layout | 2 +- src/main/resources/resource/layout/ris/ris.techreport.layout | 2 +- src/main/resources/resource/layout/ris/ris.unpublished.layout | 2 +- src/main/resources/resource/layout/ris/ris.www.layout | 2 +- 19 files changed, 21 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74d96acde10f..1886e6c36daa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# ### Fixed - Fixed [#1264](https://github.com/JabRef/jabref/issues/1264): S with caron does not render correctly - LaTeX to Unicode converter now handles combining accents +- Fixed [#636](https://github.com/JabRef/jabref/issues/636): DOI in export filters - Fixed [#1527](https://github.com/JabRef/jabref/issues/1527): 'Get BibTeX data from DOI' Removes Marking - Fixed [#1592](https://github.com/JabRef/jabref/issues/1592): LibreOffice: wrong numbers in citation labels diff --git a/src/main/resources/resource/layout/bibordf.article.layout b/src/main/resources/resource/layout/bibordf.article.layout index a6a6a845c5ad..4655bd080e5f 100644 --- a/src/main/resources/resource/layout/bibordf.article.layout +++ b/src/main/resources/resource/layout/bibordf.article.layout @@ -1,10 +1,10 @@ - + \begin{title} \format[XMLChars]{\title}\end{title} \begin{year} \year\end{year} \begin{journal} \format[XMLChars]{\journal}\end{journal} \begin{volume} \format[XMLChars]{\volume}\end{volume} -\begin{doi} \format[XMLChars]{\doi}\end{doi} +\begin{doi} \format[DOIStrip,XMLChars]{\doi}\end{doi} \begin{author} diff --git a/src/main/resources/resource/layout/bibordf.layout b/src/main/resources/resource/layout/bibordf.layout index 21004896e9d8..b65faad62e11 100644 --- a/src/main/resources/resource/layout/bibordf.layout +++ b/src/main/resources/resource/layout/bibordf.layout @@ -1,8 +1,8 @@ - + \begin{title} \format[XMLChars]{\title}\end{title} \begin{year} \year\end{year} -\begin{doi} \format[XMLChars]{\doi}\end{doi} +\begin{doi} \format[DOIStrip,XMLChars]{\doi}\end{doi} \begin{author} \format[XMLChars,CreateBibORDFAuthors]{\author} diff --git a/src/main/resources/resource/layout/bibtexml.layout b/src/main/resources/resource/layout/bibtexml.layout index da4dbae0e90a..36ab0b715c38 100644 --- a/src/main/resources/resource/layout/bibtexml.layout +++ b/src/main/resources/resource/layout/bibtexml.layout @@ -21,7 +21,7 @@ \begin{howpublished} \format[XMLChars]{\howpublished}\end{howpublished} \begin{abstract} \format[XMLChars]{\abstract}\end{abstract} \begin{url} \format[XMLChars]{\url}\end{url} -\begin{doi} \format[XMLChars]{\doi}\end{doi} +\begin{doi} \format[DOIStrip,XMLChars]{\doi}\end{doi} \begin{eid} \format[XMLChars]{\eid}\end{eid} \begin{type} \format[XMLChars]{\type}\end{type} \begin{crossref} \format[XMLChars]{\crossref}\end{crossref} diff --git a/src/main/resources/resource/layout/html.inbook.layout b/src/main/resources/resource/layout/html.inbook.layout index fcb3d3fe736b..b762dd9e92ff 100644 --- a/src/main/resources/resource/layout/html.inbook.layout +++ b/src/main/resources/resource/layout/html.inbook.layout @@ -7,7 +7,7 @@ \begin{doi}
- doi + doi
\end{doi} diff --git a/src/main/resources/resource/layout/html.inproceedings.layout b/src/main/resources/resource/layout/html.inproceedings.layout index 0beb1407ef46..89a610199f3f 100644 --- a/src/main/resources/resource/layout/html.inproceedings.layout +++ b/src/main/resources/resource/layout/html.inproceedings.layout @@ -7,7 +7,7 @@ \begin{doi}
- doi + doi
\end{doi} diff --git a/src/main/resources/resource/layout/html.layout b/src/main/resources/resource/layout/html.layout index f74dc6c4ed7f..5b56621c5516 100644 --- a/src/main/resources/resource/layout/html.layout +++ b/src/main/resources/resource/layout/html.layout @@ -7,7 +7,7 @@ \begin{doi}
- doi + doi
\end{doi} diff --git a/src/main/resources/resource/layout/ris/ris.article.layout b/src/main/resources/resource/layout/ris/ris.article.layout index cbb49b2c212c..19c5be2ec609 100644 --- a/src/main/resources/resource/layout/ris/ris.article.layout +++ b/src/main/resources/resource/layout/ris/ris.article.layout @@ -8,7 +8,7 @@ TY - JOUR \begin{pages}SP - \format[FormatChars,FirstPage]{\pages} EP - \format[FormatChars,LastPage]{\pages}\end{pages} \begin{url}UR - \url\end{url} -\begin{doi}M3 - http://dx.doi.org/\doi\end{doi} +\begin{doi}M3 - \format[DOICheck]{\doi}\end{doi} \begin{keywords}\format[FormatChars,RisKeywords]{\keywords}\end{keywords} \begin{file}L1 - \format[FileLink(pdf)]{\file}\end{file} \begin{issn}U1 - \format[FormatChars]{\issn}\end{issn} diff --git a/src/main/resources/resource/layout/ris/ris.book.layout b/src/main/resources/resource/layout/ris/ris.book.layout index b4829aa62126..1cb4fb98709c 100644 --- a/src/main/resources/resource/layout/ris/ris.book.layout +++ b/src/main/resources/resource/layout/ris/ris.book.layout @@ -10,7 +10,7 @@ TY - BOOK \begin{pages}SP - \format[FormatChars,FirstPage]{\pages} EP - \format[FormatChars,LastPage]{\pages}\end{pages} \begin{url}UR - \url\end{url} -\begin{doi}M3 - http://dx.doi.org/\doi\end{doi} +\begin{doi}M3 - \format[DOICheck]{\doi}\end{doi} \begin{keywords}\format[FormatChars,RisKeywords]{\keywords}\end{keywords} \begin{file}L1 - \format[FileLink(pdf)]{\file}\end{file} \begin{issn}U1 - \format[FormatChars]{\issn}\end{issn} diff --git a/src/main/resources/resource/layout/ris/ris.conference.layout b/src/main/resources/resource/layout/ris/ris.conference.layout index ee1d3e11ad10..bab3f2a7510e 100644 --- a/src/main/resources/resource/layout/ris/ris.conference.layout +++ b/src/main/resources/resource/layout/ris/ris.conference.layout @@ -11,7 +11,7 @@ TY - CONF \begin{pages}SP - \format[FormatChars,FirstPage]{\pages} EP - \format[FormatChars,LastPage]{\pages}\end{pages} \begin{url}UR - \url\end{url} -\begin{doi}M3 - http://dx.doi.org/\doi\end{doi} +\begin{doi}M3 - \format[DOICheck]{\doi}\end{doi} \begin{keywords}\format[FormatChars,RisKeywords]{\keywords}\end{keywords} \begin{file}L1 - \format[FileLink(pdf)]{\file}\end{file} \begin{issn}U1 - \format[FormatChars]{\issn}\end{issn} diff --git a/src/main/resources/resource/layout/ris/ris.incollection.layout b/src/main/resources/resource/layout/ris/ris.incollection.layout index 569664d1b5dc..2fc459604015 100644 --- a/src/main/resources/resource/layout/ris/ris.incollection.layout +++ b/src/main/resources/resource/layout/ris/ris.incollection.layout @@ -11,7 +11,7 @@ TY - CHAP \begin{pages}SP - \format[FormatChars,FirstPage]{\pages} EP - \format[FormatChars,LastPage]{\pages}\end{pages} \begin{url}UR - \url\end{url} -\begin{doi}M3 - http://dx.doi.org/\doi\end{doi} +\begin{doi}M3 - \format[DOICheck]{\doi}\end{doi} \begin{keywords}\format[FormatChars,RisKeywords]{\keywords}\end{keywords} \begin{file}L1 - \format[FileLink(pdf)]{\file}\end{file} \begin{issn}U1 - \format[FormatChars]{\issn}\end{issn} diff --git a/src/main/resources/resource/layout/ris/ris.inproceedings.layout b/src/main/resources/resource/layout/ris/ris.inproceedings.layout index ee1d3e11ad10..bab3f2a7510e 100644 --- a/src/main/resources/resource/layout/ris/ris.inproceedings.layout +++ b/src/main/resources/resource/layout/ris/ris.inproceedings.layout @@ -11,7 +11,7 @@ TY - CONF \begin{pages}SP - \format[FormatChars,FirstPage]{\pages} EP - \format[FormatChars,LastPage]{\pages}\end{pages} \begin{url}UR - \url\end{url} -\begin{doi}M3 - http://dx.doi.org/\doi\end{doi} +\begin{doi}M3 - \format[DOICheck]{\doi}\end{doi} \begin{keywords}\format[FormatChars,RisKeywords]{\keywords}\end{keywords} \begin{file}L1 - \format[FileLink(pdf)]{\file}\end{file} \begin{issn}U1 - \format[FormatChars]{\issn}\end{issn} diff --git a/src/main/resources/resource/layout/ris/ris.layout b/src/main/resources/resource/layout/ris/ris.layout index f3062fc5d4ab..ced4b5a6b482 100644 --- a/src/main/resources/resource/layout/ris/ris.layout +++ b/src/main/resources/resource/layout/ris/ris.layout @@ -11,7 +11,7 @@ TY - GEN \begin{pages}SP - \format[FormatChars,FirstPage]{\pages} EP - \format[FormatChars,LastPage]{\pages}\end{pages} \begin{url}UR - \url\end{url} -\begin{doi}M3 - http://dx.doi.org/\doi\end{doi} +\begin{doi}M3 - \format[DOICheck]{\doi}\end{doi} \begin{keywords}\format[FormatChars,RisKeywords]{\keywords}\end{keywords} \begin{file}L1 - \format[FileLink(pdf)]{\file}\end{file} \begin{comment}N1 - \format[FormatChars]{\comment}\end{comment} diff --git a/src/main/resources/resource/layout/ris/ris.mastersthesis.layout b/src/main/resources/resource/layout/ris/ris.mastersthesis.layout index f89ef7a00288..38dbec1ddbdd 100644 --- a/src/main/resources/resource/layout/ris/ris.mastersthesis.layout +++ b/src/main/resources/resource/layout/ris/ris.mastersthesis.layout @@ -6,7 +6,7 @@ TY - THES \begin{pages}SP - \format[FormatChars,FirstPage]{\pages} EP - \format[FormatChars,LastPage]{\pages}\end{pages} \begin{url}UR - \url\end{url} -\begin{doi}M3 - http://dx.doi.org/\doi\end{doi} +\begin{doi}M3 - \format[DOICheck]{\doi}\end{doi} \begin{keywords}\format[FormatChars,RisKeywords]{\keywords}\end{keywords} \begin{file}L1 - \format[FileLink(pdf)]{\file}\end{file} \begin{comment}N1 - \format[FormatChars]{\comment}\end{comment} diff --git a/src/main/resources/resource/layout/ris/ris.patent.layout b/src/main/resources/resource/layout/ris/ris.patent.layout index 8fd9fe61adb5..c981201ecb14 100644 --- a/src/main/resources/resource/layout/ris/ris.patent.layout +++ b/src/main/resources/resource/layout/ris/ris.patent.layout @@ -7,7 +7,7 @@ TY - PAT \begin{pages}SP - \format[FormatChars,FirstPage]{\pages} EP - \format[FormatChars,LastPage]{\pages}\end{pages} \begin{url}UR - \url\end{url} -\begin{doi}M3 - http://dx.doi.org/\doi\end{doi} +\begin{doi}M3 - \format[DOICheck]{\doi}\end{doi} \begin{keywords}\format[FormatChars,RisKeywords]{\keywords}\end{keywords} \begin{file}L1 - \format[FileLink(pdf)]{\file}\end{file} \begin{comment}N1 - \format[FormatChars]{\comment}\end{comment} diff --git a/src/main/resources/resource/layout/ris/ris.phdthesis.layout b/src/main/resources/resource/layout/ris/ris.phdthesis.layout index f89ef7a00288..38dbec1ddbdd 100644 --- a/src/main/resources/resource/layout/ris/ris.phdthesis.layout +++ b/src/main/resources/resource/layout/ris/ris.phdthesis.layout @@ -6,7 +6,7 @@ TY - THES \begin{pages}SP - \format[FormatChars,FirstPage]{\pages} EP - \format[FormatChars,LastPage]{\pages}\end{pages} \begin{url}UR - \url\end{url} -\begin{doi}M3 - http://dx.doi.org/\doi\end{doi} +\begin{doi}M3 - \format[DOICheck]{\doi}\end{doi} \begin{keywords}\format[FormatChars,RisKeywords]{\keywords}\end{keywords} \begin{file}L1 - \format[FileLink(pdf)]{\file}\end{file} \begin{comment}N1 - \format[FormatChars]{\comment}\end{comment} diff --git a/src/main/resources/resource/layout/ris/ris.techreport.layout b/src/main/resources/resource/layout/ris/ris.techreport.layout index 89356b88e6f7..ffae38fd60bd 100644 --- a/src/main/resources/resource/layout/ris/ris.techreport.layout +++ b/src/main/resources/resource/layout/ris/ris.techreport.layout @@ -9,7 +9,7 @@ TY - RPRT \begin{pages}SP - \format[FormatChars,FirstPage]{\pages} EP - \format[FormatChars,LastPage]{\pages}\end{pages} \begin{url}UR - \url\end{url} -\begin{doi}M3 - http://dx.doi.org/\doi\end{doi} +\begin{doi}M3 - \format[DOICheck]{\doi}\end{doi} \begin{keywords}\format[FormatChars,RisKeywords]{\keywords}\end{keywords} \begin{file}L1 - \format[FileLink(pdf)]{\file}\end{file} \begin{comment}N1 - \format[FormatChars]{\comment}\end{comment} diff --git a/src/main/resources/resource/layout/ris/ris.unpublished.layout b/src/main/resources/resource/layout/ris/ris.unpublished.layout index 977baa2e217c..73f1ab83d44c 100644 --- a/src/main/resources/resource/layout/ris/ris.unpublished.layout +++ b/src/main/resources/resource/layout/ris/ris.unpublished.layout @@ -6,7 +6,7 @@ TY - UNPB \begin{pages}SP - \format[FormatChars,FirstPage]{\pages} EP - \format[FormatChars,LastPage]{\pages}\end{pages} \begin{url}UR - \url\end{url} -\begin{doi}M3 - http://dx.doi.org/\doi\end{doi} +\begin{doi}M3 - \format[DOICheck]{\doi}\end{doi} \begin{keywords}\format[FormatChars,RisKeywords]{\keywords}\end{keywords} \begin{file}L1 - \format[FileLink(pdf)]{\file}\end{file} \begin{comment}N1 - \format[FormatChars]{\comment}\end{comment} diff --git a/src/main/resources/resource/layout/ris/ris.www.layout b/src/main/resources/resource/layout/ris/ris.www.layout index 7d84e9c5a65d..08308ba6b6d5 100644 --- a/src/main/resources/resource/layout/ris/ris.www.layout +++ b/src/main/resources/resource/layout/ris/ris.www.layout @@ -4,7 +4,7 @@ TY - ELEC \begin{title}T1 - \format[FormatChars]{\title}\end{title} \begin{year}Y1 - \format[FormatChars]{\year}\end{year}\begin{month}/\format[FormatChars,RisMonth]{\month}\end{month} \begin{url}UR - \url\end{url} -\begin{doi}M3 - http://dx.doi.org/\doi\end{doi} +\begin{doi}M3 - \format[DOICheck]{\doi}\end{doi} \begin{keywords}\format[FormatChars,RisKeywords]{\keywords}\end{keywords} \begin{file}L1 - \format[FileLink(pdf)]{\file}\end{file} \begin{comment}N1 - \format[FormatChars]{\comment}\end{comment} From f1e471fc3c557c28d32369c6a3fb995633202aa7 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Mon, 25 Jul 2016 08:18:33 +0200 Subject: [PATCH 03/12] Improved LaTeX to Unicode/HTML formatters to output more sensible values for unknown commands (#1622) --- CHANGELOG.md | 1 + .../jabref/logic/layout/format/HTMLChars.java | 31 ++++++++++------- .../format/LatexToUnicodeFormatter.java | 24 +++++++++----- .../logic/layout/format/HTMLCharsTest.java | 33 ++++++++++++++----- .../format/LatexToUnicodeFormatterTest.java | 15 +++++++++ 5 files changed, 77 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1886e6c36daa..c039bd619983 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - Fixed [#636](https://github.com/JabRef/jabref/issues/636): DOI in export filters - Fixed [#1527](https://github.com/JabRef/jabref/issues/1527): 'Get BibTeX data from DOI' Removes Marking - Fixed [#1592](https://github.com/JabRef/jabref/issues/1592): LibreOffice: wrong numbers in citation labels +- Fixed [#1321](https://github.com/JabRef/jabref/issues/1321): LaTeX commands in fields not displayed in the list of references ### Removed - It is not longer possible to choose to convert HTML sub- and superscripts to equations diff --git a/src/main/java/net/sf/jabref/logic/layout/format/HTMLChars.java b/src/main/java/net/sf/jabref/logic/layout/format/HTMLChars.java index 3403f4a1c48e..185098030ca4 100644 --- a/src/main/java/net/sf/jabref/logic/layout/format/HTMLChars.java +++ b/src/main/java/net/sf/jabref/logic/layout/format/HTMLChars.java @@ -85,18 +85,20 @@ public String format(String inField) { String command = currentCommand.toString(); i++; c = field.charAt(i); - String combody; + String commandBody; if (c == '{') { String part = StringUtil.getPart(field, i, false); i += part.length(); - combody = part; + commandBody = part; } else { - combody = field.substring(i, i + 1); + commandBody = field.substring(i, i + 1); } - Object result = HTML_CHARS.get(command + combody); + String result = HTML_CHARS.get(command + commandBody); - if (result != null) { - sb.append((String) result); + if (result == null) { + sb.append(commandBody); + } else { + sb.append(result); } incommand = false; @@ -105,7 +107,7 @@ public String format(String inField) { // Are we already at the end of the string? if ((i + 1) == field.length()) { String command = currentCommand.toString(); - Object result = HTML_CHARS.get(command); + String result = HTML_CHARS.get(command); /* If found, then use translated version. If not, * then keep * the text of the parameter intact. @@ -113,7 +115,7 @@ public String format(String inField) { if (result == null) { sb.append(command); } else { - sb.append((String) result); + sb.append(result); } } @@ -141,14 +143,21 @@ public String format(String inField) { argument = part; if (argument != null) { // handle common case of general latex command - Object result = HTML_CHARS.get(command + argument); + String result = HTML_CHARS.get(command + argument); // If found, then use translated version. If not, then keep // the // text of the parameter intact. + if (result == null) { - sb.append(argument); + if (argument.length() == 0) { + // Maybe a separator, such as in \LaTeX{}, so use command + sb.append(command); + } else { + // Otherwise, use argument + sb.append(argument); + } } else { - sb.append((String) result); + sb.append(result); } } } else if (c == '}') { diff --git a/src/main/java/net/sf/jabref/logic/layout/format/LatexToUnicodeFormatter.java b/src/main/java/net/sf/jabref/logic/layout/format/LatexToUnicodeFormatter.java index 821c70b882cc..35caa50b2234 100644 --- a/src/main/java/net/sf/jabref/logic/layout/format/LatexToUnicodeFormatter.java +++ b/src/main/java/net/sf/jabref/logic/layout/format/LatexToUnicodeFormatter.java @@ -107,18 +107,21 @@ public String format(String inField) { } else { commandBody = field.substring(i, i + 1); } - Object result = LatexToUnicodeFormatter.CHARS.get(command + commandBody); + String result = LatexToUnicodeFormatter.CHARS.get(command + commandBody); if (result == null) { // Use combining accents if argument is single character or empty if (commandBody.length() <= 1) { String accent = LatexToUnicodeFormatter.ACCENTS.get(command); - if (accent != null) { + if (accent == null) { + // Shouldn't happen + sb.append(commandBody); + } else { sb.append(commandBody).append(accent); } } } else { - sb.append((String) result); + sb.append(result); } incommand = false; @@ -127,7 +130,7 @@ public String format(String inField) { // Are we already at the end of the string? if ((i + 1) == field.length()) { String command = currentCommand.toString(); - Object result = LatexToUnicodeFormatter.CHARS.get(command); + String result = LatexToUnicodeFormatter.CHARS.get(command); /* If found, then use translated version. If not, * then keep * the text of the parameter intact. @@ -135,7 +138,7 @@ public String format(String inField) { if (result == null) { sb.append(command); } else { - sb.append((String) result); + sb.append(result); } } @@ -168,10 +171,15 @@ public String format(String inField) { // Use combining accents if argument is single character or empty if (argument.length() <= 1) { String accent = LatexToUnicodeFormatter.ACCENTS.get(command); - if (accent != null) { - sb.append(argument).append(accent); + if (accent == null) { + if (argument.length() == 0) { + // Empty argument, may be used as separator as in \LaTeX{}, so keep the command + sb.append(command); + } else { + sb.append(argument); + } } else { - sb.append(argument); + sb.append(argument).append(accent); } } else { sb.append(argument); diff --git a/src/test/java/net/sf/jabref/logic/layout/format/HTMLCharsTest.java b/src/test/java/net/sf/jabref/logic/layout/format/HTMLCharsTest.java index f623d6ef3bc3..887b1151e1ad 100644 --- a/src/test/java/net/sf/jabref/logic/layout/format/HTMLCharsTest.java +++ b/src/test/java/net/sf/jabref/logic/layout/format/HTMLCharsTest.java @@ -3,15 +3,23 @@ import net.sf.jabref.logic.layout.LayoutFormatter; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; +import static org.junit.Assert.assertEquals; + public class HTMLCharsTest { + private LayoutFormatter layout; + + @Before + public void setUp() { + layout = new HTMLChars(); + } + @Test public void testBasicFormat() { - LayoutFormatter layout = new HTMLChars(); - Assert.assertEquals("", layout.format("")); Assert.assertEquals("hallo", layout.format("hallo")); @@ -39,9 +47,6 @@ public void testBasicFormat() { @Test public void testLaTeXHighlighting() { - - LayoutFormatter layout = new HTMLChars(); - Assert.assertEquals("hallo", layout.format("\\emph{hallo}")); Assert.assertEquals("hallo", layout.format("{\\emph hallo}")); Assert.assertEquals("hallo", layout.format("{\\em hallo}")); @@ -65,8 +70,6 @@ public void testLaTeXHighlighting() { @Test public void testEquations() { - LayoutFormatter layout = new HTMLChars(); - Assert.assertEquals("$", layout.format("\\$")); Assert.assertEquals("σ", layout.format("$\\sigma$")); Assert.assertEquals("A 32 mA ΣΔ-modulator", @@ -75,11 +78,25 @@ public void testEquations() { @Test public void testNewLine() { - LayoutFormatter layout = new HTMLChars(); Assert.assertEquals("a
b", layout.format("a\nb")); Assert.assertEquals("a

b", layout.format("a\n\nb")); } /* * Is missing a lot of test cases for the individual chars... */ + + @Test + public void unknownCommandIsKept() { + assertEquals("aaaa", layout.format("\\aaaa")); + } + + @Test + public void unknownCommandKeepsArgument() { + assertEquals("bbbb", layout.format("\\aaaa{bbbb}")); + } + + @Test + public void unknownCommandWithEmptyArgumentIsKept() { + assertEquals("aaaa", layout.format("\\aaaa{}")); + } } \ No newline at end of file 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 2c6a98a92c8f..db1280026ff3 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 @@ -97,4 +97,19 @@ public void testCombiningAccentsCase1() { public void testCombiningAccentsCase2() { assertEquals("a͍", formatter.format("\\spreadlips{a}")); } + + @Test + public void unknownCommandIsKept() { + assertEquals("aaaa", formatter.format("\\aaaa")); + } + + @Test + public void unknownCommandKeepsArgument() { + assertEquals("bbbb", formatter.format("\\aaaa{bbbb}")); + } + + @Test + public void unknownCommandWithEmptyArgumentIsKept() { + assertEquals("aaaa", formatter.format("\\aaaa{}")); + } } From 67e1dcfa91617914eec2e50c4ebf967fdd712920 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Mon, 25 Jul 2016 08:25:16 +0200 Subject: [PATCH 04/12] Updated preview entries (#1606) * Updated preview entries, which return new entry --- .../gui/openoffice/StyleSelectDialog.java | 20 +------ .../jabref/gui/preftabs/PreviewPrefsTab.java | 55 ++----------------- .../net/sf/jabref/logic/util/TestEntry.java | 30 ++++++++++ 3 files changed, 37 insertions(+), 68 deletions(-) create mode 100644 src/main/java/net/sf/jabref/logic/util/TestEntry.java diff --git a/src/main/java/net/sf/jabref/gui/openoffice/StyleSelectDialog.java b/src/main/java/net/sf/jabref/gui/openoffice/StyleSelectDialog.java index 870013fa67b4..273796462601 100644 --- a/src/main/java/net/sf/jabref/gui/openoffice/StyleSelectDialog.java +++ b/src/main/java/net/sf/jabref/gui/openoffice/StyleSelectDialog.java @@ -63,9 +63,8 @@ import net.sf.jabref.logic.openoffice.OOBibStyle; import net.sf.jabref.logic.openoffice.OpenOfficePreferences; import net.sf.jabref.logic.openoffice.StyleLoader; +import net.sf.jabref.logic.util.TestEntry; import net.sf.jabref.model.entry.BibEntry; -import net.sf.jabref.model.entry.FieldName; -import net.sf.jabref.model.entry.IdGenerator; import net.sf.jabref.preferences.JabRefPreferences; import ca.odell.glazedlists.BasicEventList; @@ -109,7 +108,7 @@ class StyleSelectDialog { private final Rectangle toRect = new Rectangle(0, 0, 1, 1); private final JButton ok = new JButton(Localization.lang("OK")); private final JButton cancel = new JButton(Localization.lang("Cancel")); - private final BibEntry prevEntry = new BibEntry(IdGenerator.next()); + private final BibEntry prevEntry; private boolean okPressed; private final StyleLoader loader; @@ -121,7 +120,7 @@ public StyleSelectDialog(JabRefFrame frame, OpenOfficePreferences preferences, S this.frame = Objects.requireNonNull(frame); this.preferences = Objects.requireNonNull(preferences); this.loader = Objects.requireNonNull(loader); - setupPrevEntry(); + prevEntry = TestEntry.getTestEntry(); init(); } @@ -372,19 +371,6 @@ private Optional getSelectedStyle() { return Optional.empty(); } - private void setupPrevEntry() { - prevEntry.setField(FieldName.AUTHOR, "Smith, Bill and Jones, Bob and Williams, Jeff"); - prevEntry.setField(FieldName.EDITOR, "Taylor, Phil"); - prevEntry.setField(FieldName.TITLE, "Title of the test entry for reference styles"); - prevEntry.setField(FieldName.VOLUME, "34"); - prevEntry.setField(FieldName.YEAR, "2008"); - prevEntry.setField(FieldName.JOURNAL, "BibTeX journal"); - prevEntry.setField(FieldName.PUBLISHER, "JabRef publishing"); - prevEntry.setField(FieldName.ADDRESS, "Trondheim"); - prevEntry.setField("www", "https://github.com/JabRef"); - } - - static class StyleTableFormat implements TableFormat { @Override diff --git a/src/main/java/net/sf/jabref/gui/preftabs/PreviewPrefsTab.java b/src/main/java/net/sf/jabref/gui/preftabs/PreviewPrefsTab.java index 0cb3e3eeb834..8f9ca1df657d 100644 --- a/src/main/java/net/sf/jabref/gui/preftabs/PreviewPrefsTab.java +++ b/src/main/java/net/sf/jabref/gui/preftabs/PreviewPrefsTab.java @@ -31,9 +31,7 @@ import net.sf.jabref.gui.PreviewPanel; import net.sf.jabref.logic.l10n.Localization; -import net.sf.jabref.model.entry.BibEntry; -import net.sf.jabref.model.entry.FieldName; -import net.sf.jabref.model.entry.IdGenerator; +import net.sf.jabref.logic.util.TestEntry; import net.sf.jabref.preferences.JabRefPreferences; import org.apache.commons.logging.Log; @@ -59,8 +57,6 @@ class PreviewPrefsTab extends JPanel implements PrefsTab { private final JPanel secondPanel = new JPanel(); private final JScrollPane secondScrollPane = new JScrollPane(layout2); - private static BibEntry entry; - public PreviewPrefsTab(JabRefPreferences prefs) { this.prefs = prefs; @@ -154,9 +150,8 @@ public PreviewPrefsTab(JabRefPreferences prefs) { }); testButton.addActionListener(e -> { - PreviewPrefsTab.getTestEntry(); try { - PreviewPanel testPanel = new PreviewPanel(null, PreviewPrefsTab.entry, null, layout1.getText()); + PreviewPanel testPanel = new PreviewPanel(null, TestEntry.getTestEntry(), null, layout1.getText()); testPanel.setPreferredSize(new Dimension(800, 350)); JOptionPane.showMessageDialog(null, testPanel, Localization.lang("Preview"), JOptionPane.PLAIN_MESSAGE); } catch (StringIndexOutOfBoundsException ex) { @@ -169,9 +164,9 @@ public PreviewPrefsTab(JabRefPreferences prefs) { }); testButton2.addActionListener(e -> { - PreviewPrefsTab.getTestEntry(); try { - PreviewPanel testPanel = new PreviewPanel(null, PreviewPrefsTab.entry, null, layout2.getText()); + PreviewPanel testPanel = new PreviewPanel(null, TestEntry.getTestEntry(), null, + layout2.getText()); testPanel.setPreferredSize(new Dimension(800, 350)); JOptionPane.showMessageDialog(null, new JScrollPane(testPanel), Localization.lang("Preview"), JOptionPane.PLAIN_MESSAGE); @@ -185,48 +180,6 @@ public PreviewPrefsTab(JabRefPreferences prefs) { }); } - private static BibEntry getTestEntry() { - if (PreviewPrefsTab.entry != null) { - return PreviewPrefsTab.entry; - } - PreviewPrefsTab.entry = new BibEntry(IdGenerator.next(), "article"); - PreviewPrefsTab.entry.setCiteKey("conceicao1997"); - PreviewPrefsTab.entry.setField(FieldName.AUTHOR, - "Luis E. C. Conceic{\\~a}o and Terje van der Meeren and Johan A. J. Verreth and M S. Evjen and D. F. Houlihan and H. J. Fyhn"); - PreviewPrefsTab.entry.setField(FieldName.TITLE, - "Amino acid metabolism and protein turnover in larval turbot (Scophthalmus maximus) fed natural zooplankton or Artemia"); - PreviewPrefsTab.entry.setField(FieldName.YEAR, "1997"); - PreviewPrefsTab.entry.setField(FieldName.JOURNAL, "Marine Biology"); - PreviewPrefsTab.entry.setField(FieldName.MONTH, "January"); - PreviewPrefsTab.entry.setField(FieldName.NUMBER, "2"); - PreviewPrefsTab.entry.setField(FieldName.VOLUME, "123"); - PreviewPrefsTab.entry.setField("pdf", "conceicao1997.pdf"); - PreviewPrefsTab.entry.setField(FieldName.PAGES, "255--265"); - PreviewPrefsTab.entry.setField(FieldName.KEYWORDS, "energetics, artemia, metabolism, amino acid, turbot"); - PreviewPrefsTab.entry.setField(FieldName.URL, "http://ejournals.ebsco.com/direct.asp?ArticleID=TYY4NT82XA9H7R8PFPPV"); - PreviewPrefsTab.entry.setField(FieldName.ABSTRACT, - "Abstract The present paper studied the influence of different food regimes " - + "on the free amino acid (FAA) pool, the rate of protein turnover, the flux of amino acids, and " - + "their relation to growth of larval turbot (Scophthalmus maximus L.) from first feeding until " - + "metamorphosis. The amino acid profile of protein was stable during the larval period although " - + "some small, but significant, differences were found. Turbot larvae had proteins which were rich " - + "in leucine and aspartate, and poor in glutamate, suggesting a high leucine requirement. The " - + "profile of the FAA pool was highly variable and quite different from the amino acid profile in " - + "protein. The proportion of essential FAA decreased with development. High contents of free tyrosine " - + "and phenylalanine were found on Day 3, while free taurine was present at high levels throughout " - + "the experimental period. Larval growth rates were positively correlated with taurine levels, " - + "suggesting a dietary dependency for taurine and/or sulphur amino acids.\n\nReduced growth rates in " - + "Artemia-fed larvae were associated with lower levels of free methionine, indicating that this diet " - + "is deficient in methionine for turbot larvae. Leucine might also be limiting turbot growth as the " - + "different diet organisms had lower levels of this amino acid in the free pool than was found in the " - + "larval protein. A previously presented model was used to describe the flux of amino acids in growing " - + "turbot larvae. The FAA pool was found to be small and variable. It was estimated that the daily dietary " - + "amino acid intake might be up to ten times the larval FAA pool. In addition, protein synthesis and " - + "protein degradation might daily remove and return, respectively, the equivalent of up to 20 and 10 " - + "times the size of the FAA pool. In an early phase (Day 11) high growth rates were associated with a " - + "relatively low protein turnover, while at a later stage (Day 17), a much higher turnover was observed."); - return PreviewPrefsTab.entry; - } @Override public void setValues() { diff --git a/src/main/java/net/sf/jabref/logic/util/TestEntry.java b/src/main/java/net/sf/jabref/logic/util/TestEntry.java new file mode 100644 index 000000000000..3bf8e0cc679e --- /dev/null +++ b/src/main/java/net/sf/jabref/logic/util/TestEntry.java @@ -0,0 +1,30 @@ +package net.sf.jabref.logic.util; + +import net.sf.jabref.model.entry.BibEntry; +import net.sf.jabref.model.entry.FieldName; +import net.sf.jabref.model.entry.IdGenerator; + +public class TestEntry { + + public static BibEntry getTestEntry() { + + BibEntry entry = new BibEntry(IdGenerator.next(), "article"); + entry.setCiteKey("Smith2016"); + entry.setField(FieldName.AUTHOR, "Smith, Bill and Jones, Bob and Williams, Jeff"); + entry.setField(FieldName.EDITOR, "Taylor, Phil"); + entry.setField(FieldName.TITLE, "Title of the test entry"); + entry.setField(FieldName.NUMBER, "3"); + entry.setField(FieldName.VOLUME, "34"); + entry.setField(FieldName.YEAR, "2016"); + entry.setField(FieldName.PAGES, "45--67"); + entry.setField(FieldName.MONTH, "July"); + entry.setField(FieldName.FILE, ":testentry.pdf:PDF"); + entry.setField(FieldName.JOURNAL, "BibTeX Journal"); + entry.setField(FieldName.PUBLISHER, "JabRef Publishing"); + entry.setField(FieldName.ADDRESS, "Trondheim"); + entry.setField(FieldName.URL, "https://github.com/JabRef"); + entry.setField(FieldName.ABSTRACT, + "This entry describes a test scenario which may be useful in JabRef. By providing a test entry it is possible to see how certain things will look in this graphical bib-file mananger."); + return entry; + } +} From d424306412a6ab4ead8d8f54b87fc67654c9dfd3 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Mon, 25 Jul 2016 12:46:21 +0200 Subject: [PATCH 05/12] Moved, removed, and used String constants (#1618) * Moved, removed, and used String constants * Some more fixes * Moved NEWLINE, made FILE_SEPARATOR public and used it * Moved NEWLINE and FILE_SEPARATOR to OS * Moved ENCODING_PREFIX and SIGNATURE * Corrected Globals in a few comments... * Apparently the localization tests find commented out text... --- .../net/sf/jabref/BibDatabaseContext.java | 3 +- src/main/java/net/sf/jabref/Globals.java | 16 -- src/main/java/net/sf/jabref/JabRefMain.java | 3 +- src/main/java/net/sf/jabref/MetaData.java | 10 +- .../jabref/external/DownloadExternalFile.java | 6 +- .../jabref/external/DroppedFileHandler.java | 5 +- .../sf/jabref/gui/ImportInspectionDialog.java | 17 +- .../gui/journals/ManageJournalsPanel.java | 3 +- .../jabref/gui/maintable/MainTableColumn.java | 4 +- .../jabref/gui/maintable/MainTableFormat.java | 2 +- .../PersistenceTableColumnListener.java | 4 - .../gui/plaintextimport/TextInputDialog.java | 9 +- .../net/sf/jabref/gui/preftabs/FileTab.java | 8 +- .../jabref/importer/EntryFromPDFCreator.java | 4 +- .../sf/jabref/importer/fetcher/GVKParser.java | 6 +- .../fileformat/BiblioscapeImporter.java | 4 +- .../importer/fileformat/BibtexImporter.java | 13 +- .../importer/fileformat/BibtexParser.java | 5 +- .../importer/fileformat/EndnoteImporter.java | 4 +- .../importer/fileformat/FreeCiteImporter.java | 5 +- .../importer/fileformat/IsiImporter.java | 2 +- .../fileformat/MedlinePlainImporter.java | 6 +- .../importer/fileformat/OvidImporter.java | 2 +- .../importer/fileformat/RisImporter.java | 4 +- .../jabref/logic/bibtex/BibEntryWriter.java | 12 +- .../logic/bibtex/LatexFieldFormatter.java | 6 +- .../bibtex/comparator/FieldComparator.java | 3 +- .../logic/cleanup/RenamePdfCleanup.java | 7 +- .../logic/exporter/BibtexDatabaseWriter.java | 28 +-- .../exporter/FieldFormatterCleanups.java | 6 +- .../logic/exporter/SavePreferences.java | 3 + .../sf/jabref/logic/layout/LayoutEntry.java | 3 - .../layout/format/FileLinkPreferences.java | 4 +- .../jabref/logic/layout/format/HTMLChars.java | 5 +- .../format/LatexToUnicodeFormatter.java | 8 +- .../jabref/logic/layout/format/RTFChars.java | 6 +- .../layout/format/RemoveLatexCommands.java | 6 +- .../logic/layout/format/RisAuthors.java | 4 +- .../logic/layout/format/RisKeywords.java | 4 +- .../jabref/logic/openoffice/OOBibStyle.java | 2 +- .../logic/openoffice/OOPreFormatter.java | 5 +- .../java/net/sf/jabref/logic/util/OS.java | 7 + .../net/sf/jabref/logic/util/io/FileUtil.java | 9 +- .../jabref/logic/util/strings/StringUtil.java | 28 ++- .../java/net/sf/jabref/logic/xmp/XMPUtil.java | 6 +- .../migrations/FileLinksUpgradeWarning.java | 5 +- .../net/sf/jabref/model/entry/BibEntry.java | 7 +- .../net/sf/jabref/model/entry/EntryType.java | 2 +- .../net/sf/jabref/model/entry/FieldName.java | 6 + .../model/entry/InternalBibtexFields.java | 7 +- .../jabref/preferences/JabRefPreferences.java | 3 - src/test/java/net/sf/jabref/MetaDataTest.java | 3 +- .../importer/fileformat/BibtexParserTest.java | 78 +++---- .../logic/bibtex/BibEntryWriterTest.java | 211 +++++++++--------- .../logic/bibtex/FieldContentParserTest.java | 5 +- .../bibtex/LatexFieldFormatterTests.java | 17 +- .../exporter/BibtexDatabaseWriterTest.java | 167 +++++++------- .../logic/layout/format/RisKeywordsTest.java | 6 +- .../logic/util/strings/StringUtilTest.java | 25 ++- 59 files changed, 431 insertions(+), 418 deletions(-) diff --git a/src/main/java/net/sf/jabref/BibDatabaseContext.java b/src/main/java/net/sf/jabref/BibDatabaseContext.java index c3a381950642..4b0ea8294427 100644 --- a/src/main/java/net/sf/jabref/BibDatabaseContext.java +++ b/src/main/java/net/sf/jabref/BibDatabaseContext.java @@ -6,6 +6,7 @@ import java.util.Objects; import java.util.Optional; +import net.sf.jabref.logic.layout.format.FileLinkPreferences; import net.sf.jabref.model.database.BibDatabase; import net.sf.jabref.model.database.BibDatabaseMode; import net.sf.jabref.model.database.BibDatabaseModeDetection; @@ -137,7 +138,7 @@ public List getFileDirectory(String fieldName) { } // 3. preferences directory - String dir = Globals.prefs.get(fieldName + Globals.DIR_SUFFIX); // FILE_DIR + String dir = Globals.prefs.get(fieldName + FileLinkPreferences.DIR_SUFFIX); // FILE_DIR if (dir != null) { fileDirs.add(dir); } diff --git a/src/main/java/net/sf/jabref/Globals.java b/src/main/java/net/sf/jabref/Globals.java index c7918627a94d..45d6161ab1a1 100644 --- a/src/main/java/net/sf/jabref/Globals.java +++ b/src/main/java/net/sf/jabref/Globals.java @@ -31,30 +31,14 @@ public class Globals { - public static final String DIR_SUFFIX = "Directory"; - // JabRef version info public static final BuildInfo BUILD_INFO = new BuildInfo(); - // Signature written at the top of the .bib file. - public static final String SIGNATURE = "This file was created with JabRef"; - public static final String ENCODING_PREFIX = "Encoding: "; - // Character separating field names that are to be used in sequence as - // fallbacks for a single column (e.g. "author/editor" to use editor where - // author is not set): - public static final String COL_DEFINITION_FIELD_SEPARATOR = "/"; - // Newlines - // will be overridden in initialization due to feature #857 @ JabRef.java - public static String NEWLINE = System.lineSeparator(); - // Remote listener public static final RemoteListenerServerLifecycle REMOTE_LISTENER = new RemoteListenerServerLifecycle(); public static final ImportFormatReader IMPORT_FORMAT_READER = new ImportFormatReader(); - // Non-letters which are used to denote accents in LaTeX-commands, e.g., in {\"{a}} - public static final String SPECIAL_COMMAND_CHARS = "\"`^~'=.|"; - // In the main program, this field is initialized in JabRef.java // Each test case initializes this field if required public static JabRefPreferences prefs; diff --git a/src/main/java/net/sf/jabref/JabRefMain.java b/src/main/java/net/sf/jabref/JabRefMain.java index 4470fc7aed16..d55068c32453 100644 --- a/src/main/java/net/sf/jabref/JabRefMain.java +++ b/src/main/java/net/sf/jabref/JabRefMain.java @@ -30,6 +30,7 @@ import net.sf.jabref.logic.net.ProxyRegisterer; import net.sf.jabref.logic.remote.RemotePreferences; import net.sf.jabref.logic.remote.client.RemoteListenerClient; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.model.entry.InternalBibtexFields; import net.sf.jabref.preferences.JabRefPreferences; @@ -92,7 +93,7 @@ private static void start(String[] args) { // override used newline character with the one stored in the preferences // The preferences return the system newline character sequence as default - Globals.NEWLINE = Globals.prefs.get(JabRefPreferences.NEWLINE); + OS.NEWLINE = Globals.prefs.get(JabRefPreferences.NEWLINE); // Process arguments ArgumentProcessor argumentProcessor = new ArgumentProcessor(args, ArgumentProcessor.Mode.INITIAL_START); diff --git a/src/main/java/net/sf/jabref/MetaData.java b/src/main/java/net/sf/jabref/MetaData.java index 5321bc0c95b1..6ba45f4203a3 100644 --- a/src/main/java/net/sf/jabref/MetaData.java +++ b/src/main/java/net/sf/jabref/MetaData.java @@ -38,6 +38,8 @@ import net.sf.jabref.logic.l10n.Localization; import net.sf.jabref.logic.labelpattern.AbstractLabelPattern; import net.sf.jabref.logic.labelpattern.DatabaseLabelPattern; +import net.sf.jabref.logic.layout.format.FileLinkPreferences; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.logic.util.strings.StringUtil; import net.sf.jabref.model.database.BibDatabaseMode; import net.sf.jabref.model.entry.FieldName; @@ -58,7 +60,7 @@ public class MetaData implements Iterable { private static final String DATABASE_TYPE = "databaseType"; private static final String GROUPSTREE = "groupstree"; - private static final String FILE_DIRECTORY = FieldName.FILE + Globals.DIR_SUFFIX; + private static final String FILE_DIRECTORY = FieldName.FILE + FileLinkPreferences.DIR_SUFFIX; public static final String SELECTOR_META_PREFIX = "selector_"; private static final String PROTECTED_FLAG_META = "protectedFlag"; @@ -364,7 +366,7 @@ public Map getAsStringMap() { //in case of save actions, add an additional newline after the enabled flag if (metaItem.getKey().equals(SAVE_ACTIONS) && ("enabled".equals(dataItem) || "disabled".equals(dataItem))) { - stringBuilder.append(Globals.NEWLINE); + stringBuilder.append(OS.NEWLINE); } } @@ -379,12 +381,12 @@ public Map getAsStringMap() { // (which is always the AllEntriesGroup). if ((groupsRoot != null) && (groupsRoot.getNumberOfChildren() > 0)) { StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append(Globals.NEWLINE); + stringBuilder.append(OS.NEWLINE); for (String groupNode : groupsRoot.getTreeAsString()) { stringBuilder.append(StringUtil.quote(groupNode, ";", '\\')); stringBuilder.append(";"); - stringBuilder.append(Globals.NEWLINE); + stringBuilder.append(OS.NEWLINE); } serializedMetaData.put(GROUPSTREE, stringBuilder.toString()); } diff --git a/src/main/java/net/sf/jabref/external/DownloadExternalFile.java b/src/main/java/net/sf/jabref/external/DownloadExternalFile.java index 450fc458d372..6481255bf78c 100644 --- a/src/main/java/net/sf/jabref/external/DownloadExternalFile.java +++ b/src/main/java/net/sf/jabref/external/DownloadExternalFile.java @@ -200,10 +200,10 @@ public void download(URL url, final DownloadCallback callback) throws IOExceptio if (directory == null) { dirPrefix = null; } else { - if (directory.endsWith(System.getProperty("file.separator"))) { + if (directory.endsWith(OS.FILE_SEPARATOR)) { dirPrefix = directory; } else { - dirPrefix = directory + System.getProperty("file.separator"); + dirPrefix = directory + OS.FILE_SEPARATOR; } } @@ -249,7 +249,7 @@ public void download(URL url, final DownloadCallback callback) throws IOExceptio private File expandFilename(String directory, String link) { File toFile = new File(link); // If this is a relative link, we should perhaps append the directory: - String dirPrefix = directory + System.getProperty("file.separator"); + String dirPrefix = directory + OS.FILE_SEPARATOR; if (!toFile.isAbsolute()) { toFile = new File(dirPrefix + link); } diff --git a/src/main/java/net/sf/jabref/external/DroppedFileHandler.java b/src/main/java/net/sf/jabref/external/DroppedFileHandler.java index 0479631d917b..b125d4c173ca 100644 --- a/src/main/java/net/sf/jabref/external/DroppedFileHandler.java +++ b/src/main/java/net/sf/jabref/external/DroppedFileHandler.java @@ -40,6 +40,7 @@ import net.sf.jabref.gui.undo.UndoableFieldChange; import net.sf.jabref.gui.undo.UndoableInsertEntry; import net.sf.jabref.logic.l10n.Localization; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.logic.util.io.FileUtil; import net.sf.jabref.logic.xmp.XMPUtil; import net.sf.jabref.model.database.BibDatabase; @@ -478,7 +479,7 @@ private boolean doMove(String fileName, String destFilename, LOGGER.warn("Cannot determine destination directory or destination directory does not exist"); return false; } - File toFile = new File(dirs.get(found) + System.getProperty("file.separator") + destFilename); + File toFile = new File(dirs.get(found) + OS.FILE_SEPARATOR + destFilename); if (toFile.exists()) { int answer = JOptionPane.showConfirmDialog(frame, Localization.lang("'%0' exists. Overwrite file?", toFile.getAbsolutePath()), @@ -530,7 +531,7 @@ private boolean doCopy(String fileName, String toFile, NamedCompound edits) { } String destinationFileName = new File(toFile).getName(); - File destFile = new File(dirs.get(found) + System.getProperty("file.separator") + destinationFileName); + File destFile = new File(dirs.get(found) + OS.FILE_SEPARATOR + destinationFileName); if (destFile.equals(new File(fileName))) { // File is already in the correct position. Don't override! return true; diff --git a/src/main/java/net/sf/jabref/gui/ImportInspectionDialog.java b/src/main/java/net/sf/jabref/gui/ImportInspectionDialog.java index 642700e69f2f..33e1ed435286 100644 --- a/src/main/java/net/sf/jabref/gui/ImportInspectionDialog.java +++ b/src/main/java/net/sf/jabref/gui/ImportInspectionDialog.java @@ -184,7 +184,6 @@ public class ImportInspectionDialog extends JDialog implements ImportInspector, private static final int FILE_COL = 2; private static final int URL_COL = 3; private static final int PAD = 4; - private static final String URL_FIELD = FieldName.URL; /** @@ -917,7 +916,7 @@ public void mouseClicked(MouseEvent e) { fl.type)).actionPerformed(null); } } else { // Must be URL_COL - openExternalLink(URL_FIELD, e); + openExternalLink(FieldName.URL, e); } } } @@ -1130,14 +1129,14 @@ public void actionPerformed(ActionEvent event) { } BibEntry entry = selectionModel.getSelected().get(0); String result = JOptionPane.showInputDialog(ImportInspectionDialog.this, Localization.lang("Enter URL"), - entry.getFieldOptional(URL_FIELD).orElse("")); + entry.getFieldOptional(FieldName.URL).orElse("")); entries.getReadWriteLock().writeLock().lock(); try { if (result != null) { if (result.isEmpty()) { - entry.clearField(URL_FIELD); + entry.clearField(FieldName.URL); } else { - entry.setField(URL_FIELD, result); + entry.setField(FieldName.URL, result); } } } finally { @@ -1308,7 +1307,7 @@ private void setupComparatorChooser() { if (i == FILE_COL) { comparators.add(new IconComparator(Collections.singletonList(FieldName.FILE))); } else if (i == URL_COL) { - comparators.add(new IconComparator(Collections.singletonList(URL_FIELD))); + comparators.add(new IconComparator(Collections.singletonList(FieldName.URL))); } } @@ -1428,7 +1427,7 @@ public Object getColumnValue(BibEntry entry, int i) { FileListTableModel model = new FileListTableModel(); entry.getFieldOptional(FieldName.FILE).ifPresent(model::setContent); fileLabel.setToolTipText(model.getToolTipHTMLRepresentation()); - if (model.getRowCount() > 0 && model.getEntry(0).type.isPresent()) { + if ((model.getRowCount() > 0) && model.getEntry(0).type.isPresent()) { fileLabel.setIcon(model.getEntry(0).type.get().getIcon()); } return fileLabel; @@ -1436,8 +1435,8 @@ public Object getColumnValue(BibEntry entry, int i) { return null; } case URL_COL: - if (entry.hasField(URL_FIELD)) { - urlLabel.setToolTipText(entry.getFieldOptional(URL_FIELD).orElse("")); + if (entry.hasField(FieldName.URL)) { + urlLabel.setToolTipText(entry.getFieldOptional(FieldName.URL).orElse("")); return urlLabel; } else { return null; diff --git a/src/main/java/net/sf/jabref/gui/journals/ManageJournalsPanel.java b/src/main/java/net/sf/jabref/gui/journals/ManageJournalsPanel.java index 5bab110bf889..2ccf124c8c93 100644 --- a/src/main/java/net/sf/jabref/gui/journals/ManageJournalsPanel.java +++ b/src/main/java/net/sf/jabref/gui/journals/ManageJournalsPanel.java @@ -68,6 +68,7 @@ import net.sf.jabref.logic.journals.JournalAbbreviationLoader; import net.sf.jabref.logic.journals.JournalAbbreviationPreferences; import net.sf.jabref.logic.l10n.Localization; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.preferences.JabRefPreferences; import com.jgoodies.forms.builder.ButtonBarBuilder; @@ -373,7 +374,7 @@ private void storeSettings() { writer.write(entry.getName()); writer.write(" = "); writer.write(entry.getAbbreviation()); - writer.write(Globals.NEWLINE); + writer.write(OS.NEWLINE); } } catch (IOException e) { LOGGER.warn("Problem writing abbreviation file", e); 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 e8ca7aa169e4..1329a4d5adf8 100644 --- a/src/main/java/net/sf/jabref/gui/maintable/MainTableColumn.java +++ b/src/main/java/net/sf/jabref/gui/maintable/MainTableColumn.java @@ -7,12 +7,12 @@ import javax.swing.JLabel; -import net.sf.jabref.Globals; import net.sf.jabref.logic.layout.LayoutFormatter; import net.sf.jabref.logic.layout.format.LatexToUnicodeFormatter; import net.sf.jabref.model.database.BibDatabase; import net.sf.jabref.model.entry.BibEntry; import net.sf.jabref.model.entry.EntryUtil; +import net.sf.jabref.model.entry.FieldName; import net.sf.jabref.model.entry.FieldProperties; import net.sf.jabref.model.entry.InternalBibtexFields; @@ -64,7 +64,7 @@ public String getDisplayName() { return null; } - StringJoiner joiner = new StringJoiner(Globals.COL_DEFINITION_FIELD_SEPARATOR); + StringJoiner joiner = new StringJoiner(FieldName.FIELD_SEPARATOR); for (String field : bibtexFields) { joiner.add(field); } diff --git a/src/main/java/net/sf/jabref/gui/maintable/MainTableFormat.java b/src/main/java/net/sf/jabref/gui/maintable/MainTableFormat.java index eafcd39bc61d..031a509aed1c 100644 --- a/src/main/java/net/sf/jabref/gui/maintable/MainTableFormat.java +++ b/src/main/java/net/sf/jabref/gui/maintable/MainTableFormat.java @@ -137,7 +137,7 @@ public void updateTableFormat() { // stored column name will be used as columnName // There might be more than one field to display, e.g., "author/editor" or "date/year" - so split // at MainTableFormat.COL_DEFINITION_FIELD_SEPARATOR - String[] fields = columnName.split(Globals.COL_DEFINITION_FIELD_SEPARATOR); + String[] fields = columnName.split(FieldName.FIELD_SEPARATOR); tableColumns.add(new MainTableColumn(columnName, Arrays.asList(fields), database)); } diff --git a/src/main/java/net/sf/jabref/gui/maintable/PersistenceTableColumnListener.java b/src/main/java/net/sf/jabref/gui/maintable/PersistenceTableColumnListener.java index bcee332a5458..b7dbbb46e7c2 100644 --- a/src/main/java/net/sf/jabref/gui/maintable/PersistenceTableColumnListener.java +++ b/src/main/java/net/sf/jabref/gui/maintable/PersistenceTableColumnListener.java @@ -41,10 +41,6 @@ */ public class PersistenceTableColumnListener implements TableColumnModelListener { - public static final String ACTIVATE_PREF_KEY = "ActivatePersistenceTableColumnListener"; - - public static final boolean DEFAULT_ENABLED = true; - private static final String SIMPLE_CLASS_NAME = PersistenceTableColumnListener.class.getSimpleName(); // needed to get column names / indices mapped from view to model diff --git a/src/main/java/net/sf/jabref/gui/plaintextimport/TextInputDialog.java b/src/main/java/net/sf/jabref/gui/plaintextimport/TextInputDialog.java index 86771d7628d9..1626c5f72ffa 100644 --- a/src/main/java/net/sf/jabref/gui/plaintextimport/TextInputDialog.java +++ b/src/main/java/net/sf/jabref/gui/plaintextimport/TextInputDialog.java @@ -125,6 +125,7 @@ import net.sf.jabref.logic.bibtex.LatexFieldFormatter; import net.sf.jabref.logic.bibtex.LatexFieldFormatterPreferences; import net.sf.jabref.logic.l10n.Localization; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.logic.util.UpdateField; import net.sf.jabref.model.EntryTypes; import net.sf.jabref.model.entry.BibEntry; @@ -507,11 +508,11 @@ private boolean parseWithFreeCiteAndAddEntries() { // we have to remove line breaks (but keep empty lines) // otherwise, the result is broken - text = text.replace(Globals.NEWLINE.concat(Globals.NEWLINE), "##NEWLINE##"); + text = text.replace(OS.NEWLINE.concat(OS.NEWLINE), "##NEWLINE##"); // possible URL line breaks are removed completely. - text = text.replace("/".concat(Globals.NEWLINE), "/"); - text = text.replace(Globals.NEWLINE, " "); - text = text.replace("##NEWLINE##", Globals.NEWLINE); + text = text.replace("/".concat(OS.NEWLINE), "/"); + text = text.replace(OS.NEWLINE, " "); + text = text.replace("##NEWLINE##", OS.NEWLINE); ParserResult importerResult = fimp.importEntries(text); if(importerResult.hasWarnings()) { diff --git a/src/main/java/net/sf/jabref/gui/preftabs/FileTab.java b/src/main/java/net/sf/jabref/gui/preftabs/FileTab.java index d03529707e8b..a88f4bea5cda 100644 --- a/src/main/java/net/sf/jabref/gui/preftabs/FileTab.java +++ b/src/main/java/net/sf/jabref/gui/preftabs/FileTab.java @@ -37,6 +37,8 @@ import net.sf.jabref.gui.help.HelpAction; import net.sf.jabref.logic.help.HelpFile; import net.sf.jabref.logic.l10n.Localization; +import net.sf.jabref.logic.layout.format.FileLinkPreferences; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.model.entry.FieldName; import net.sf.jabref.preferences.JabRefPreferences; @@ -200,7 +202,7 @@ public FileTab(JabRefFrame frame, JabRefPreferences prefs) { @Override public void setValues() { - fileDir.setText(prefs.get(FieldName.FILE + Globals.DIR_SUFFIX)); + fileDir.setText(prefs.get(FieldName.FILE + FileLinkPreferences.DIR_SUFFIX)); bibLocAsPrimaryDir.setSelected(prefs.getBoolean(JabRefPreferences.BIB_LOC_AS_PRIMARY_DIR)); runAutoFileSearch.setSelected(prefs.getBoolean(JabRefPreferences.RUN_AUTOMATIC_FILE_SEARCH)); allowFileAutoOpenBrowse.setSelected(prefs.getBoolean(JabRefPreferences.ALLOW_FILE_AUTO_OPEN_BROWSE)); @@ -241,7 +243,7 @@ public void setValues() { @Override public void storeSettings() { - prefs.put(FieldName.FILE + Globals.DIR_SUFFIX, fileDir.getText()); + prefs.put(FieldName.FILE + FileLinkPreferences.DIR_SUFFIX, fileDir.getText()); prefs.putBoolean(JabRefPreferences.BIB_LOC_AS_PRIMARY_DIR, bibLocAsPrimaryDir.isSelected()); prefs.putBoolean(JabRefPreferences.RUN_AUTOMATIC_FILE_SEARCH, runAutoFileSearch.isSelected()); prefs.putBoolean(JabRefPreferences.ALLOW_FILE_AUTO_OPEN_BROWSE, allowFileAutoOpenBrowse.isSelected()); @@ -265,7 +267,7 @@ public void storeSettings() { } prefs.put(JabRefPreferences.NEWLINE, newline); // we also have to change Globals variable as globals is not a getter, but a constant - Globals.NEWLINE = newline; + OS.NEWLINE = newline; prefs.putBoolean(JabRefPreferences.REFORMAT_FILE_ON_SAVE_AND_EXPORT, reformatFileOnSaveAndExport.isSelected()); prefs.putBoolean(JabRefPreferences.BACKUP, backup.isSelected()); diff --git a/src/main/java/net/sf/jabref/importer/EntryFromPDFCreator.java b/src/main/java/net/sf/jabref/importer/EntryFromPDFCreator.java index bd2c4cec29db..83da99a92f8b 100644 --- a/src/main/java/net/sf/jabref/importer/EntryFromPDFCreator.java +++ b/src/main/java/net/sf/jabref/importer/EntryFromPDFCreator.java @@ -14,9 +14,9 @@ import net.sf.jabref.gui.IconTheme; import net.sf.jabref.logic.xmp.XMPUtil; import net.sf.jabref.model.entry.BibEntry; -import net.sf.jabref.model.entry.InternalBibtexFields; import net.sf.jabref.pdfimport.PdfImporter; import net.sf.jabref.pdfimport.PdfImporter.ImportPdfFilesResult; +import net.sf.jabref.preferences.JabRefPreferences; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDDocumentInformation; @@ -97,7 +97,7 @@ private void addEntryDataFromPDDocumentInformation(File pdfFile, BibEntry entry) // default time stamp follows ISO-8601. Reason: https://xkcd.com/1179/ String date = new SimpleDateFormat("yyyy-MM-dd") .format(creationDate.getTime()); - appendToField(entry, InternalBibtexFields.TIMESTAMP, date); + appendToField(entry, Globals.prefs.get(JabRefPreferences.TIME_STAMP_FIELD), date); } if (pdfDocInfo.getCustomMetadataValue("bibtex/bibtexkey") != null) { diff --git a/src/main/java/net/sf/jabref/importer/fetcher/GVKParser.java b/src/main/java/net/sf/jabref/importer/fetcher/GVKParser.java index 5da796ac4ed9..33fd1c18e470 100644 --- a/src/main/java/net/sf/jabref/importer/fetcher/GVKParser.java +++ b/src/main/java/net/sf/jabref/importer/fetcher/GVKParser.java @@ -337,7 +337,7 @@ private BibEntry parseEntry(Element e) { // Dokumenttyp bestimmen und Eintrag anlegen if (mak.startsWith("As")) { - entryType = "misc"; + entryType = BibEntry.DEFAULT_TYPE; if (quelle.contains("ISBN")) { entryType = "incollection"; @@ -346,9 +346,9 @@ private BibEntry parseEntry(Element e) { entryType = "article"; } } else if (mak.isEmpty()) { - entryType = "misc"; + entryType = BibEntry.DEFAULT_TYPE; } else if (mak.startsWith("O")) { - entryType = "misc"; + entryType = BibEntry.DEFAULT_TYPE; // FIXME: online only available in Biblatex //entryType = "online"; } diff --git a/src/main/java/net/sf/jabref/importer/fileformat/BiblioscapeImporter.java b/src/main/java/net/sf/jabref/importer/fileformat/BiblioscapeImporter.java index 35a9002abb7c..fae6ffac0a75 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/BiblioscapeImporter.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/BiblioscapeImporter.java @@ -199,9 +199,9 @@ public ParserResult importDatabase(BufferedReader reader) throws IOException { } } - String bibtexType = "misc"; + String bibtexType = BibEntry.DEFAULT_TYPE; // to find type, first check TW, then RT - for (int i = 1; (i >= 0) && "misc".equals(bibtexType); --i) { + for (int i = 1; (i >= 0) && BibEntry.DEFAULT_TYPE.equals(bibtexType); --i) { if (type[i] == null) { continue; } diff --git a/src/main/java/net/sf/jabref/importer/fileformat/BibtexImporter.java b/src/main/java/net/sf/jabref/importer/fileformat/BibtexImporter.java index c818142ed61d..590246cf4849 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/BibtexImporter.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/BibtexImporter.java @@ -24,8 +24,8 @@ import java.util.Objects; import java.util.Optional; -import net.sf.jabref.Globals; import net.sf.jabref.importer.ParserResult; +import net.sf.jabref.logic.exporter.SavePreferences; /** * This importer exists only to enable `--importToOpen someEntry.bib` @@ -35,6 +35,9 @@ */ public class BibtexImporter extends ImportFormat { + // Signature written at the top of the .bib file in earlier versions. + private static final String SIGNATURE = "This file was created with JabRef"; + /** * @return true as we have no effective way to decide whether a file is in bibtex format or not. See * https://github.com/JabRef/jabref/pull/379#issuecomment-158685726 for more details. @@ -109,17 +112,17 @@ private static Optional getSuppliedEncoding(BufferedReader reader) { // Only keep the part after % line = line.substring(1).trim(); - if (line.startsWith(Globals.SIGNATURE)) { + if (line.startsWith(BibtexImporter.SIGNATURE)) { // Signature line, so keep reading and skip to next line - } else if (line.startsWith(Globals.ENCODING_PREFIX)) { + } else if (line.startsWith(SavePreferences.ENCODING_PREFIX)) { // Line starts with "Encoding: ", so the rest of the line should contain the name of the encoding // Except if there is already a @ symbol signaling the starting of a BibEntry Integer atSymbolIndex = line.indexOf('@'); String encoding; if (atSymbolIndex > 0) { - encoding = line.substring(Globals.ENCODING_PREFIX.length(), atSymbolIndex); + encoding = line.substring(SavePreferences.ENCODING_PREFIX.length(), atSymbolIndex); } else { - encoding = line.substring(Globals.ENCODING_PREFIX.length()); + encoding = line.substring(SavePreferences.ENCODING_PREFIX.length()); } return Optional.of(Charset.forName(encoding)); diff --git a/src/main/java/net/sf/jabref/importer/fileformat/BibtexParser.java b/src/main/java/net/sf/jabref/importer/fileformat/BibtexParser.java index d9ec808c196f..1546dfcc7dea 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/BibtexParser.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/BibtexParser.java @@ -34,6 +34,7 @@ import net.sf.jabref.importer.ParserResult; import net.sf.jabref.logic.bibtex.FieldContentParser; import net.sf.jabref.logic.bibtex.FieldContentParserPreferences; +import net.sf.jabref.logic.exporter.SavePreferences; import net.sf.jabref.logic.l10n.Localization; import net.sf.jabref.model.database.BibDatabase; import net.sf.jabref.model.database.KeyCollisionException; @@ -328,9 +329,9 @@ private String dumpTextReadSoFarToString() { // if there is no entry found, simply return the content (necessary to parse text remaining after the last entry) if (indexOfAt == -1) { return purgeEOFCharacters(result); - } else if(result.contains(Globals.ENCODING_PREFIX)) { + } else if(result.contains(SavePreferences.ENCODING_PREFIX)) { // purge the encoding line if it exists - int runningIndex = result.indexOf(Globals.ENCODING_PREFIX); + int runningIndex = result.indexOf(SavePreferences.ENCODING_PREFIX); while(runningIndex < indexOfAt) { if(result.charAt(runningIndex) == '\n') { break; diff --git a/src/main/java/net/sf/jabref/importer/fileformat/EndnoteImporter.java b/src/main/java/net/sf/jabref/importer/fileformat/EndnoteImporter.java index 2ce04c2abb3d..f5b0d9654839 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/EndnoteImporter.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/EndnoteImporter.java @@ -107,7 +107,7 @@ public ParserResult importDatabase(BufferedReader reader) throws IOException { for (String entry : entries) { hm.clear(); author = ""; - type = "misc"; + type = BibEntry.DEFAULT_TYPE; editor = ""; artnum = ""; @@ -169,7 +169,7 @@ public ParserResult importDatabase(BufferedReader reader) throws IOException { } else if (val.indexOf("Thesis") == 0) { type = "phdthesis"; } else { - type = "misc"; // + type = BibEntry.DEFAULT_TYPE; // } } else if ("7".equals(prefix)) { hm.put(FieldName.EDITION, val); diff --git a/src/main/java/net/sf/jabref/importer/fileformat/FreeCiteImporter.java b/src/main/java/net/sf/jabref/importer/fileformat/FreeCiteImporter.java index 050ede299dd4..bdc6cac0805f 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/FreeCiteImporter.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/FreeCiteImporter.java @@ -40,6 +40,7 @@ import net.sf.jabref.importer.ParserResult; import net.sf.jabref.logic.l10n.Localization; import net.sf.jabref.logic.labelpattern.LabelPatternUtil; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.model.entry.BibEntry; import net.sf.jabref.model.entry.BibtexEntryTypes; import net.sf.jabref.model.entry.EntryType; @@ -192,7 +193,7 @@ public ParserResult importEntries(String text) { noteSB.append(ln); noteSB.append(':'); noteSB.append(parser.getElementText()); - noteSB.append(Globals.NEWLINE); + noteSB.append(OS.NEWLINE); } } parser.next(); @@ -202,7 +203,7 @@ public ParserResult importEntries(String text) { String note; if (e.hasField(FieldName.NOTE)) { // "note" could have been set during the parsing as FreeCite also returns "note" - note = e.getFieldOptional(FieldName.NOTE).get().concat(Globals.NEWLINE).concat(noteSB.toString()); + note = e.getFieldOptional(FieldName.NOTE).get().concat(OS.NEWLINE).concat(noteSB.toString()); } else { note = noteSB.toString(); } diff --git a/src/main/java/net/sf/jabref/importer/fileformat/IsiImporter.java b/src/main/java/net/sf/jabref/importer/fileformat/IsiImporter.java index 8658aef5afca..a33fec377dbc 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/IsiImporter.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/IsiImporter.java @@ -293,7 +293,7 @@ public ParserResult importDatabase(BufferedReader reader) throws IOException { } else if (Type.startsWith("Article") || Type.startsWith("Journal") || "article".equals(PT)) { Type = "article"; } else { - Type = "misc"; + Type = BibEntry.DEFAULT_TYPE; } } else if ("CR".equals(beg)) { hm.put("CitedReferences", value.replace("EOLEOL", " ; ").trim()); diff --git a/src/main/java/net/sf/jabref/importer/fileformat/MedlinePlainImporter.java b/src/main/java/net/sf/jabref/importer/fileformat/MedlinePlainImporter.java index 8ba449009ac4..81b34488bde5 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/MedlinePlainImporter.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/MedlinePlainImporter.java @@ -27,8 +27,8 @@ import java.util.Map; import java.util.regex.Pattern; -import net.sf.jabref.Globals; import net.sf.jabref.importer.ParserResult; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.model.entry.AuthorList; import net.sf.jabref.model.entry.BibEntry; import net.sf.jabref.model.entry.FieldName; @@ -98,7 +98,7 @@ public ParserResult importDatabase(BufferedReader reader) throws IOException { continue; } - String type = "misc"; + String type = BibEntry.DEFAULT_TYPE; String author = ""; String editor = ""; String comment = ""; @@ -375,7 +375,7 @@ private void addAbstract(Map hm, String lab, String value) { if (oldAb == null) { hm.put(FieldName.ABSTRACT, abstractValue); } else { - hm.put(FieldName.ABSTRACT, oldAb + Globals.NEWLINE + abstractValue); + hm.put(FieldName.ABSTRACT, oldAb + OS.NEWLINE + abstractValue); } } else if ("OAB".equals(lab) || "OABL".equals(lab)) { hm.put("other-abstract", value); diff --git a/src/main/java/net/sf/jabref/importer/fileformat/OvidImporter.java b/src/main/java/net/sf/jabref/importer/fileformat/OvidImporter.java index a924b30ddd5f..dfa4346170e8 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/OvidImporter.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/OvidImporter.java @@ -214,7 +214,7 @@ public ParserResult importDatabase(BufferedReader reader) throws IOException { } // Set the entrytype properly: - String entryType = h.containsKey("entrytype") ? h.get("entrytype") : "misc"; + String entryType = h.containsKey("entrytype") ? h.get("entrytype") : BibEntry.DEFAULT_TYPE; h.remove("entrytype"); if ("book".equals(entryType) && h.containsKey("chaptertitle")) { // This means we have an "incollection" entry. diff --git a/src/main/java/net/sf/jabref/importer/fileformat/RisImporter.java b/src/main/java/net/sf/jabref/importer/fileformat/RisImporter.java index 1406ef3ac659..bbf69b181255 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/RisImporter.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/RisImporter.java @@ -24,8 +24,8 @@ import java.util.Map; import java.util.regex.Pattern; -import net.sf.jabref.Globals; import net.sf.jabref.importer.ParserResult; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.model.entry.AuthorList; import net.sf.jabref.model.entry.BibEntry; import net.sf.jabref.model.entry.FieldName; @@ -194,7 +194,7 @@ public ParserResult importDatabase(BufferedReader reader) throws IOException { if (oldAb == null) { hm.put(FieldName.ABSTRACT, val); } else { - hm.put(FieldName.ABSTRACT, oldAb + Globals.NEWLINE + val); + hm.put(FieldName.ABSTRACT, oldAb + OS.NEWLINE + val); } } else if ("UR".equals(lab)) { hm.put(FieldName.URL, val); diff --git a/src/main/java/net/sf/jabref/logic/bibtex/BibEntryWriter.java b/src/main/java/net/sf/jabref/logic/bibtex/BibEntryWriter.java index a11493a987fc..e6db35d23fec 100644 --- a/src/main/java/net/sf/jabref/logic/bibtex/BibEntryWriter.java +++ b/src/main/java/net/sf/jabref/logic/bibtex/BibEntryWriter.java @@ -9,8 +9,8 @@ import java.util.TreeSet; import java.util.function.Predicate; -import net.sf.jabref.Globals; import net.sf.jabref.logic.TypedBibEntry; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.logic.util.strings.StringUtil; import net.sf.jabref.model.EntryTypes; import net.sf.jabref.model.database.BibDatabaseMode; @@ -50,16 +50,16 @@ public void write(BibEntry entry, Writer out, BibDatabaseMode bibDatabaseMode, B } writeUserComments(entry, out); - out.write(Globals.NEWLINE); + out.write(OS.NEWLINE); writeRequiredFieldsFirstRemainingFieldsSecond(entry, out, bibDatabaseMode); - out.write(Globals.NEWLINE); + out.write(OS.NEWLINE); } private void writeUserComments(BibEntry entry, Writer out) throws IOException { String userComments = entry.getUserComments(); if(!userComments.isEmpty()) { - out.write(userComments + Globals.NEWLINE); + out.write(userComments + OS.NEWLINE); } } @@ -131,7 +131,7 @@ private void writeRequiredFieldsFirstRemainingFieldsSecond(BibEntry entry, Write private void writeKeyField(BibEntry entry, Writer out) throws IOException { String keyField = StringUtil.shaveString(entry.getCiteKey()); - out.write(keyField + ',' + Globals.NEWLINE); + out.write(keyField + ',' + OS.NEWLINE); } /** @@ -151,7 +151,7 @@ private void writeField(BibEntry entry, Writer out, String name, int indentation try { out.write(fieldFormatter.format(field.get(), name)); - out.write(',' + Globals.NEWLINE); + out.write(',' + OS.NEWLINE); } catch (IOException ex) { throw new IOException("Error in field '" + name + "': " + ex.getMessage()); } diff --git a/src/main/java/net/sf/jabref/logic/bibtex/LatexFieldFormatter.java b/src/main/java/net/sf/jabref/logic/bibtex/LatexFieldFormatter.java index 95e4e49b89d1..f4048275b9a8 100644 --- a/src/main/java/net/sf/jabref/logic/bibtex/LatexFieldFormatter.java +++ b/src/main/java/net/sf/jabref/logic/bibtex/LatexFieldFormatter.java @@ -18,7 +18,7 @@ import java.util.ArrayList; import java.util.List; -import net.sf.jabref.Globals; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.logic.util.strings.StringUtil; import net.sf.jabref.model.entry.InternalBibtexFields; @@ -77,11 +77,11 @@ public String format(String content, String fieldName) String result = content; // normalize newlines - boolean shouldNormalizeNewlines = !result.contains(Globals.NEWLINE) && result.contains("\n"); + boolean shouldNormalizeNewlines = !result.contains(OS.NEWLINE) && result.contains("\n"); if (shouldNormalizeNewlines) { // if we don't have real new lines, but pseudo newlines, we replace them // On Win 8.1, this is always true for multiline fields - result = result.replace("\n", Globals.NEWLINE); + result = result.replace("\n", OS.NEWLINE); } // If the field is non-standard, we will just append braces, diff --git a/src/main/java/net/sf/jabref/logic/bibtex/comparator/FieldComparator.java b/src/main/java/net/sf/jabref/logic/bibtex/comparator/FieldComparator.java index 934e0ed62567..b6233877c23f 100644 --- a/src/main/java/net/sf/jabref/logic/bibtex/comparator/FieldComparator.java +++ b/src/main/java/net/sf/jabref/logic/bibtex/comparator/FieldComparator.java @@ -23,7 +23,6 @@ import java.util.Objects; import java.util.Optional; -import net.sf.jabref.Globals; import net.sf.jabref.logic.config.SaveOrderConfig; import net.sf.jabref.logic.util.strings.StringUtil; import net.sf.jabref.model.entry.AuthorList; @@ -65,7 +64,7 @@ public FieldComparator(String field) { public FieldComparator(String field, boolean reversed) { this.fieldName = Objects.requireNonNull(field); - this.field = fieldName.split(Globals.COL_DEFINITION_FIELD_SEPARATOR); + this.field = fieldName.split(FieldName.FIELD_SEPARATOR); fieldType = determineFieldType(); isNumeric = InternalBibtexFields.isNumeric(this.field[0]); diff --git a/src/main/java/net/sf/jabref/logic/cleanup/RenamePdfCleanup.java b/src/main/java/net/sf/jabref/logic/cleanup/RenamePdfCleanup.java index db2ebed40805..cee51cb792cf 100644 --- a/src/main/java/net/sf/jabref/logic/cleanup/RenamePdfCleanup.java +++ b/src/main/java/net/sf/jabref/logic/cleanup/RenamePdfCleanup.java @@ -23,6 +23,7 @@ import net.sf.jabref.BibDatabaseContext; import net.sf.jabref.logic.TypedBibEntry; import net.sf.jabref.logic.journals.JournalAbbreviationLoader; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.logic.util.io.FileUtil; import net.sf.jabref.model.FieldChange; import net.sf.jabref.model.entry.BibEntry; @@ -76,7 +77,7 @@ public List cleanup(BibEntry entry) { newFileList.add(flEntry); continue; } - String newPath = expandedOldFile.get().getParent().concat(System.getProperty("file.separator")) + String newPath = expandedOldFile.get().getParent().concat(OS.FILE_SEPARATOR) .concat(newFilename.toString()); String expandedOldFilePath = expandedOldFile.get().toString(); @@ -107,8 +108,8 @@ public List cleanup(BibEntry entry) { if ((parent == null) || databaseContext.getFileDirectory().contains(parent.getAbsolutePath())) { newFileEntryFileName = newFilename.toString(); } else { - newFileEntryFileName = parent.toString().concat(System.getProperty("file.separator")).concat( - newFilename.toString()); + newFileEntryFileName = parent.toString().concat(OS.FILE_SEPARATOR) + .concat(newFilename.toString()); } newFileList.add(new ParsedFileField(description, newFileEntryFileName, type)); } else { diff --git a/src/main/java/net/sf/jabref/logic/exporter/BibtexDatabaseWriter.java b/src/main/java/net/sf/jabref/logic/exporter/BibtexDatabaseWriter.java index 173a0c8ae9dc..87fda83d0306 100644 --- a/src/main/java/net/sf/jabref/logic/exporter/BibtexDatabaseWriter.java +++ b/src/main/java/net/sf/jabref/logic/exporter/BibtexDatabaseWriter.java @@ -21,11 +21,11 @@ import java.util.Map; import net.sf.jabref.BibDatabaseContext; -import net.sf.jabref.Globals; import net.sf.jabref.MetaData; import net.sf.jabref.logic.bibtex.BibEntryWriter; import net.sf.jabref.logic.bibtex.LatexFieldFormatter; import net.sf.jabref.logic.bibtex.LatexFieldFormatterPreferences; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.logic.util.strings.StringUtil; import net.sf.jabref.model.database.BibDatabaseMode; import net.sf.jabref.model.entry.BibEntry; @@ -47,9 +47,9 @@ public BibtexDatabaseWriter(SaveSessionFactory saveSessionFactory) { protected void writeEpilogue(String epilogue) throws SaveException { if (!StringUtil.isNullOrEmpty(epilogue)) { try { - getWriter().write(Globals.NEWLINE); + getWriter().write(OS.NEWLINE); getWriter().write(epilogue); - getWriter().write(Globals.NEWLINE); + getWriter().write(OS.NEWLINE); } catch (IOException e) { throw new SaveException(e); } @@ -59,11 +59,11 @@ protected void writeEpilogue(String epilogue) throws SaveException { @Override protected void writeMetaDataItem(Map.Entry metaItem) throws SaveException { StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append(Globals.NEWLINE); + stringBuilder.append(OS.NEWLINE); stringBuilder.append(COMMENT_PREFIX + "{").append(MetaData.META_FLAG).append(metaItem.getKey()).append(":"); stringBuilder.append(metaItem.getValue()); stringBuilder.append("}"); - stringBuilder.append(Globals.NEWLINE); + stringBuilder.append(OS.NEWLINE); try { getWriter().write(stringBuilder.toString()); @@ -76,10 +76,10 @@ protected void writeMetaDataItem(Map.Entry metaItem) throws Save protected void writePreamble(String preamble) throws SaveException { if (!StringUtil.isNullOrEmpty(preamble)) { try { - getWriter().write(Globals.NEWLINE); + getWriter().write(OS.NEWLINE); getWriter().write(PREAMBLE_PREFIX + "{"); getWriter().write(preamble); - getWriter().write('}' + Globals.NEWLINE); + getWriter().write('}' + OS.NEWLINE); } catch (IOException e) { throw new SaveException(e); } @@ -99,11 +99,11 @@ protected void writeString(BibtexString bibtexString, boolean isFirstString, int // Write user comments String userComments = bibtexString.getUserComments(); if(!userComments.isEmpty()) { - getWriter().write(userComments + Globals.NEWLINE); + getWriter().write(userComments + OS.NEWLINE); } if (isFirstString) { - getWriter().write(Globals.NEWLINE); + getWriter().write(OS.NEWLINE); } getWriter().write(STRING_PREFIX + "{" + bibtexString.getName() + StringUtil @@ -122,7 +122,7 @@ protected void writeString(BibtexString bibtexString, boolean isFirstString, int } } - getWriter().write("}" + Globals.NEWLINE); + getWriter().write("}" + OS.NEWLINE); } catch (IOException e) { throw new SaveException(e); } @@ -131,11 +131,11 @@ protected void writeString(BibtexString bibtexString, boolean isFirstString, int @Override protected void writeEntryTypeDefinition(CustomEntryType customType) throws SaveException { try { - getWriter().write(Globals.NEWLINE); + getWriter().write(OS.NEWLINE); getWriter().write(COMMENT_PREFIX + "{"); getWriter().write(customType.getAsString()); getWriter().write("}"); - getWriter().write(Globals.NEWLINE); + getWriter().write(OS.NEWLINE); } catch (IOException e) { throw new SaveException(e); } @@ -150,8 +150,8 @@ protected void writePrelogue(BibDatabaseContext bibDatabaseContext, Charset enco // Writes the file encoding information. try { getWriter().write("% "); - getWriter().write(Globals.ENCODING_PREFIX + encoding); - getWriter().write(Globals.NEWLINE); + getWriter().write(SavePreferences.ENCODING_PREFIX + encoding); + getWriter().write(OS.NEWLINE); } catch (IOException e) { throw new SaveException(e); } diff --git a/src/main/java/net/sf/jabref/logic/exporter/FieldFormatterCleanups.java b/src/main/java/net/sf/jabref/logic/exporter/FieldFormatterCleanups.java index 135893aaa6e3..eeec893f512c 100644 --- a/src/main/java/net/sf/jabref/logic/exporter/FieldFormatterCleanups.java +++ b/src/main/java/net/sf/jabref/logic/exporter/FieldFormatterCleanups.java @@ -8,7 +8,6 @@ import java.util.Objects; import java.util.StringJoiner; -import net.sf.jabref.Globals; import net.sf.jabref.logic.cleanup.FieldFormatterCleanup; import net.sf.jabref.logic.formatter.Formatter; import net.sf.jabref.logic.formatter.Formatters; @@ -16,6 +15,7 @@ import net.sf.jabref.logic.formatter.bibtexfields.NormalizeMonthFormatter; import net.sf.jabref.logic.formatter.bibtexfields.NormalizePagesFormatter; import net.sf.jabref.logic.formatter.bibtexfields.OrdinalsToSuperscriptFormatter; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.logic.util.strings.StringUtil; import net.sf.jabref.model.FieldChange; import net.sf.jabref.model.entry.BibEntry; @@ -101,7 +101,7 @@ private static List parse(String formatterString) { // first remove all newlines for easier parsing String remainingString = formatterString; - remainingString = StringUtil.unifyLineBreaksToConfiguredLineBreaks(remainingString).replaceAll(Globals.NEWLINE, ""); + remainingString = StringUtil.unifyLineBreaksToConfiguredLineBreaks(remainingString).replaceAll(OS.NEWLINE, ""); try { while (startIndex < formatterString.length()) { // read the field name @@ -191,7 +191,7 @@ private static String getMetaDataString(List actionList) for (Map.Entry> entry : groupedByField.entrySet()) { result.append(entry.getKey()); - StringJoiner joiner = new StringJoiner(",", "[", "]" + Globals.NEWLINE); + StringJoiner joiner = new StringJoiner(",", "[", "]" + OS.NEWLINE); entry.getValue().forEach(joiner::add); result.append(joiner.toString()); } diff --git a/src/main/java/net/sf/jabref/logic/exporter/SavePreferences.java b/src/main/java/net/sf/jabref/logic/exporter/SavePreferences.java index 06fb60914292..7cb238c61dff 100644 --- a/src/main/java/net/sf/jabref/logic/exporter/SavePreferences.java +++ b/src/main/java/net/sf/jabref/logic/exporter/SavePreferences.java @@ -8,6 +8,9 @@ public class SavePreferences { + // Encoding written at the top of the .bib file. + public static final String ENCODING_PREFIX = "Encoding: "; + private final boolean reformatFile; private final boolean saveInOriginalOrder; private final SaveOrderConfig saveOrder; diff --git a/src/main/java/net/sf/jabref/logic/layout/LayoutEntry.java b/src/main/java/net/sf/jabref/logic/layout/LayoutEntry.java index 09572f3215bf..1a88163807d9 100644 --- a/src/main/java/net/sf/jabref/logic/layout/LayoutEntry.java +++ b/src/main/java/net/sf/jabref/logic/layout/LayoutEntry.java @@ -619,10 +619,7 @@ private List getOptionalLayout(String formatterName) { continue; } - // If not found throw exception... - //return new LayoutFormatter[] {new NotFoundFormatter(className)}; results.add(new NotFoundFormatter(className)); - //throw new Exception(Globals.lang("Formatter not found") + ": "+ className); } return results; diff --git a/src/main/java/net/sf/jabref/logic/layout/format/FileLinkPreferences.java b/src/main/java/net/sf/jabref/logic/layout/format/FileLinkPreferences.java index 6f6822253452..3f87e1f56f67 100644 --- a/src/main/java/net/sf/jabref/logic/layout/format/FileLinkPreferences.java +++ b/src/main/java/net/sf/jabref/logic/layout/format/FileLinkPreferences.java @@ -3,7 +3,6 @@ import java.util.Collections; import java.util.List; -import net.sf.jabref.Globals; import net.sf.jabref.model.entry.FieldName; import net.sf.jabref.preferences.JabRefPreferences; @@ -11,6 +10,7 @@ public class FileLinkPreferences { private final List generatedDirForDatabase; private final List fileDirForDatabase; + public static final String DIR_SUFFIX = "Directory"; public FileLinkPreferences(List generatedDirForDatabase, List fileDirForDatabase) { @@ -19,7 +19,7 @@ public FileLinkPreferences(List generatedDirForDatabase, List fi } public static FileLinkPreferences fromPreferences(JabRefPreferences prefs) { - return new FileLinkPreferences(Collections.singletonList(prefs.get(FieldName.FILE + Globals.DIR_SUFFIX)), + return new FileLinkPreferences(Collections.singletonList(prefs.get(FieldName.FILE + FileLinkPreferences.DIR_SUFFIX)), prefs.fileDirForDatabase); } diff --git a/src/main/java/net/sf/jabref/logic/layout/format/HTMLChars.java b/src/main/java/net/sf/jabref/logic/layout/format/HTMLChars.java index 185098030ca4..460579b9167f 100644 --- a/src/main/java/net/sf/jabref/logic/layout/format/HTMLChars.java +++ b/src/main/java/net/sf/jabref/logic/layout/format/HTMLChars.java @@ -17,7 +17,6 @@ import java.util.Map; -import net.sf.jabref.Globals; import net.sf.jabref.logic.layout.LayoutFormatter; import net.sf.jabref.logic.util.strings.HTMLUnicodeConversionMaps; import net.sf.jabref.logic.util.strings.StringUtil; @@ -67,7 +66,7 @@ public String format(String inField) { } else if (!incommand && ((c == '{') || (c == '}'))) { // Swallow the brace. } else if (Character.isLetter(c) || (c == '%') - || Globals.SPECIAL_COMMAND_CHARS.contains(String.valueOf(c))) { + || StringUtil.SPECIAL_COMMAND_CHARS.contains(String.valueOf(c))) { escaped = false; if (!incommand) { @@ -75,7 +74,7 @@ public String format(String inField) { } else { currentCommand.append(c); testCharCom: if ((currentCommand.length() == 1) - && Globals.SPECIAL_COMMAND_CHARS.contains(currentCommand.toString())) { + && StringUtil.SPECIAL_COMMAND_CHARS.contains(currentCommand.toString())) { // This indicates that we are in a command of the type // \^o or \~{n} if (i >= (field.length() - 1)) { diff --git a/src/main/java/net/sf/jabref/logic/layout/format/LatexToUnicodeFormatter.java b/src/main/java/net/sf/jabref/logic/layout/format/LatexToUnicodeFormatter.java index 35caa50b2234..7a3b03ebcb5b 100644 --- a/src/main/java/net/sf/jabref/logic/layout/format/LatexToUnicodeFormatter.java +++ b/src/main/java/net/sf/jabref/logic/layout/format/LatexToUnicodeFormatter.java @@ -17,10 +17,10 @@ import java.util.Map; -import net.sf.jabref.Globals; import net.sf.jabref.logic.formatter.Formatter; import net.sf.jabref.logic.l10n.Localization; import net.sf.jabref.logic.layout.LayoutFormatter; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.logic.util.strings.HTMLUnicodeConversionMaps; import net.sf.jabref.logic.util.strings.StringUtil; @@ -83,7 +83,7 @@ public String format(String inField) { } else if (!incommand && ((c == '{') || (c == '}'))) { // Swallow the brace. } else if (Character.isLetter(c) || (c == '%') - || Globals.SPECIAL_COMMAND_CHARS.contains(String.valueOf(c))) { + || StringUtil.SPECIAL_COMMAND_CHARS.contains(String.valueOf(c))) { escaped = false; if (!incommand) { @@ -91,7 +91,7 @@ public String format(String inField) { } else { currentCommand.append(c); if ((currentCommand.length() == 1) - && Globals.SPECIAL_COMMAND_CHARS.contains(currentCommand.toString()) + && StringUtil.SPECIAL_COMMAND_CHARS.contains(currentCommand.toString()) && !(i >= (field.length() - 1))) { // This indicates that we are in a command of the type // \^o or \~{n} @@ -233,7 +233,7 @@ public String format(String inField) { } } - return sb.toString().replace("&", "&").replace("

", Globals.NEWLINE).replace("$", "$").replace("~", + return sb.toString().replace("&", "&").replace("

", OS.NEWLINE).replace("$", "$").replace("~", "\u00A0"); } diff --git a/src/main/java/net/sf/jabref/logic/layout/format/RTFChars.java b/src/main/java/net/sf/jabref/logic/layout/format/RTFChars.java index c7c5f5c87253..e269b9c6820e 100644 --- a/src/main/java/net/sf/jabref/logic/layout/format/RTFChars.java +++ b/src/main/java/net/sf/jabref/logic/layout/format/RTFChars.java @@ -15,10 +15,10 @@ */ package net.sf.jabref.logic.layout.format; -import net.sf.jabref.Globals; import net.sf.jabref.logic.layout.LayoutFormatter; import net.sf.jabref.logic.layout.StringInt; import net.sf.jabref.logic.util.strings.RtfCharMap; +import net.sf.jabref.logic.util.strings.StringUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -65,13 +65,13 @@ else if (c == '\\') { } else if (!incommand && ((c == '{') || (c == '}'))) { // Swallow the brace. } else if (Character.isLetter(c) - || Globals.SPECIAL_COMMAND_CHARS.contains(String.valueOf(c))) { + || StringUtil.SPECIAL_COMMAND_CHARS.contains(String.valueOf(c))) { escaped = false; if (incommand) { // Else we are in a command, and should not keep the letter. currentCommand.append(c); testCharCom: if ((currentCommand.length() == 1) - && Globals.SPECIAL_COMMAND_CHARS.contains(currentCommand.toString())) { + && StringUtil.SPECIAL_COMMAND_CHARS.contains(currentCommand.toString())) { // This indicates that we are in a command of the type // \^o or \~{n} if (i >= (field.length() - 1)) { diff --git a/src/main/java/net/sf/jabref/logic/layout/format/RemoveLatexCommands.java b/src/main/java/net/sf/jabref/logic/layout/format/RemoveLatexCommands.java index 4181bf70f95e..a2fc7a795225 100644 --- a/src/main/java/net/sf/jabref/logic/layout/format/RemoveLatexCommands.java +++ b/src/main/java/net/sf/jabref/logic/layout/format/RemoveLatexCommands.java @@ -15,8 +15,8 @@ */ package net.sf.jabref.logic.layout.format; -import net.sf.jabref.Globals; import net.sf.jabref.logic.layout.LayoutFormatter; +import net.sf.jabref.logic.util.strings.StringUtil; public class RemoveLatexCommands implements LayoutFormatter { @@ -42,12 +42,12 @@ public String format(String field) { } else if (!incommand && ((c == '{') || (c == '}'))) { // Swallow the brace. } else if (Character.isLetter(c) || - Globals.SPECIAL_COMMAND_CHARS.contains(String.valueOf(c))) { + StringUtil.SPECIAL_COMMAND_CHARS.contains(String.valueOf(c))) { escaped = false; if (incommand) { currentCommand.append(c); if ((currentCommand.length() == 1) - && Globals.SPECIAL_COMMAND_CHARS.contains(currentCommand.toString())) { + && StringUtil.SPECIAL_COMMAND_CHARS.contains(currentCommand.toString())) { // This indicates that we are in a command of the type \^o or \~{n} incommand = false; escaped = false; diff --git a/src/main/java/net/sf/jabref/logic/layout/format/RisAuthors.java b/src/main/java/net/sf/jabref/logic/layout/format/RisAuthors.java index 927dd200521f..e6bce78b85d2 100644 --- a/src/main/java/net/sf/jabref/logic/layout/format/RisAuthors.java +++ b/src/main/java/net/sf/jabref/logic/layout/format/RisAuthors.java @@ -15,8 +15,8 @@ */ package net.sf.jabref.logic.layout.format; -import net.sf.jabref.Globals; import net.sf.jabref.logic.layout.ParamLayoutFormatter; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.model.entry.AuthorList; public class RisAuthors implements ParamLayoutFormatter { @@ -36,7 +36,7 @@ public String format(String s) { sb.append(" - "); sb.append(authors[i]); if (i < authors.length - 1) { - sb.append(Globals.NEWLINE); + sb.append(OS.NEWLINE); } } return sb.toString(); diff --git a/src/main/java/net/sf/jabref/logic/layout/format/RisKeywords.java b/src/main/java/net/sf/jabref/logic/layout/format/RisKeywords.java index 68c43f576efe..6bd337c300e3 100644 --- a/src/main/java/net/sf/jabref/logic/layout/format/RisKeywords.java +++ b/src/main/java/net/sf/jabref/logic/layout/format/RisKeywords.java @@ -17,8 +17,8 @@ import java.util.Set; -import net.sf.jabref.Globals; import net.sf.jabref.logic.layout.LayoutFormatter; +import net.sf.jabref.logic.util.OS; public class RisKeywords implements LayoutFormatter { @@ -34,7 +34,7 @@ public String format(String s) { sb.append("KW - "); sb.append(keyword); if (i < (keywords.size() - 1)) { - sb.append(Globals.NEWLINE); + sb.append(OS.NEWLINE); } i++; } diff --git a/src/main/java/net/sf/jabref/logic/openoffice/OOBibStyle.java b/src/main/java/net/sf/jabref/logic/openoffice/OOBibStyle.java index 8b9d0b5a62ab..15065de67644 100644 --- a/src/main/java/net/sf/jabref/logic/openoffice/OOBibStyle.java +++ b/src/main/java/net/sf/jabref/logic/openoffice/OOBibStyle.java @@ -729,7 +729,7 @@ private String getAuthorYearInTextMarker(List entries, Map= (finalResult.length() - 1)) { diff --git a/src/main/java/net/sf/jabref/logic/util/OS.java b/src/main/java/net/sf/jabref/logic/util/OS.java index 0825cb9a558c..5818e447d15d 100644 --- a/src/main/java/net/sf/jabref/logic/util/OS.java +++ b/src/main/java/net/sf/jabref/logic/util/OS.java @@ -25,4 +25,11 @@ public class OS { public static final boolean LINUX = OS_NAME.startsWith("linux"); public static final boolean WINDOWS = OS_NAME.startsWith("win"); public static final boolean OS_X = OS_NAME.startsWith("mac"); + + // File separator obtained from system + public static final String FILE_SEPARATOR = System.getProperty("file.separator"); + + // Newlines + // will be overridden in initialization due to feature #857 @ JabRef.java + public static String NEWLINE = System.lineSeparator(); } diff --git a/src/main/java/net/sf/jabref/logic/util/io/FileUtil.java b/src/main/java/net/sf/jabref/logic/util/io/FileUtil.java index b8d8a4b05277..73884ea2c929 100644 --- a/src/main/java/net/sf/jabref/logic/util/io/FileUtil.java +++ b/src/main/java/net/sf/jabref/logic/util/io/FileUtil.java @@ -56,7 +56,6 @@ public class FileUtil { private static final Log LOGGER = LogFactory.getLog(FileUtil.class); - private static final String FILE_SEPARATOR = System.getProperty("file.separator"); private static final Pattern SLASH = Pattern.compile("/"); private static final Pattern BACKSLASH = Pattern.compile("\\\\"); @@ -243,10 +242,10 @@ private static Optional expandFilename(String filename, String dir) { return Optional.of(file); } - if (dir.endsWith(FILE_SEPARATOR)) { + if (dir.endsWith(OS.FILE_SEPARATOR)) { name = dir + name; } else { - name = dir + FILE_SEPARATOR + name; + name = dir + OS.FILE_SEPARATOR + name; } // fix / and \ problems: @@ -305,8 +304,8 @@ private static File shortenFileName(File fileName, String directory) { longName = fileName.toString(); } - if (!dir.endsWith(FILE_SEPARATOR)) { - dir = dir.concat(FILE_SEPARATOR); + if (!dir.endsWith(OS.FILE_SEPARATOR)) { + dir = dir.concat(OS.FILE_SEPARATOR); } if (longName.startsWith(dir)) { diff --git a/src/main/java/net/sf/jabref/logic/util/strings/StringUtil.java b/src/main/java/net/sf/jabref/logic/util/strings/StringUtil.java index 2d01d852170b..5ab6a91159b7 100644 --- a/src/main/java/net/sf/jabref/logic/util/strings/StringUtil.java +++ b/src/main/java/net/sf/jabref/logic/util/strings/StringUtil.java @@ -23,13 +23,16 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import net.sf.jabref.Globals; +import net.sf.jabref.logic.util.OS; import com.google.common.base.CharMatcher; import org.apache.commons.lang3.StringUtils; public class StringUtil { + // Non-letters which are used to denote accents in LaTeX-commands, e.g., in {\"{a}} + public static final String SPECIAL_COMMAND_CHARS = "\"`^~'=.|"; + // contains all possible line breaks, not omitting any break such as "\\n" private static final Pattern LINE_BREAKS = Pattern.compile("\\r\\n|\\r|\\n"); @@ -176,12 +179,12 @@ public static String wrap(String in, int wrapAmount) { for (int i = 1; i < lines.length; i++) { if (lines[i].trim().isEmpty()) { - result.append(Globals.NEWLINE); + result.append(OS.NEWLINE); result.append('\t'); } else { - result.append(Globals.NEWLINE); + result.append(OS.NEWLINE); result.append('\t'); - result.append(Globals.NEWLINE); + result.append(OS.NEWLINE); result.append('\t'); // remove all whitespace at the end of the string, this especially includes \r created when the field content has \r\n as line separator String line = CharMatcher.WHITESPACE.trimTrailingFrom(lines[i]); @@ -204,8 +207,8 @@ private static void addWrappedLine(StringBuilder result, String line, int wrapAm } result.deleteCharAt(current); - result.insert(current, Globals.NEWLINE + "\t"); - length = current + Globals.NEWLINE.length(); + result.insert(current, OS.NEWLINE + "\t"); + length = current + OS.NEWLINE.length(); } } @@ -399,19 +402,19 @@ private static String removeSingleBracesAroundCapitals(String s) { } /** - * Replaces all platform-dependent line breaks by Globals.NEWLINE line breaks. + * Replaces all platform-dependent line breaks by OS.NEWLINE line breaks. * * We do NOT use UNIX line breaks as the user explicitly configures its linebreaks and this method is used in bibtex field writing * * - * Legacy Macintosh \r -> Globals.NEWLINE - * Windows \r\n -> Globals.NEWLINE + * Legacy Macintosh \r -> OS.NEWLINE + * Windows \r\n -> OS.NEWLINE * * - * @return a String with only Globals.NEWLINE as line breaks + * @return a String with only OS.NEWLINE as line breaks */ public static String unifyLineBreaksToConfiguredLineBreaks(String s) { - return LINE_BREAKS.matcher(s).replaceAll(Globals.NEWLINE); + return LINE_BREAKS.matcher(s).replaceAll(OS.NEWLINE); } /** @@ -656,7 +659,7 @@ public static String repeat(int n, char c) { } public static boolean isNullOrEmpty(String toTest) { - return (toTest == null || toTest.isEmpty()); + return ((toTest == null) || toTest.isEmpty()); } public static boolean isNotBlank(Optional string) { @@ -666,4 +669,5 @@ public static boolean isNotBlank(Optional string) { public static boolean isNotBlank(String string) { return StringUtils.isNotBlank(string); } + } diff --git a/src/main/java/net/sf/jabref/logic/xmp/XMPUtil.java b/src/main/java/net/sf/jabref/logic/xmp/XMPUtil.java index 8abfc49147ea..565491fcc530 100644 --- a/src/main/java/net/sf/jabref/logic/xmp/XMPUtil.java +++ b/src/main/java/net/sf/jabref/logic/xmp/XMPUtil.java @@ -197,7 +197,7 @@ public static List readXMP(InputStream inputStream, JabRefPreferences BibEntry entry = bib.getBibtexEntry(); if (entry.getType() == null) { - entry.setType("misc"); + entry.setType(BibEntry.DEFAULT_TYPE); } result.add(entry); } @@ -212,7 +212,7 @@ public static List readXMP(InputStream inputStream, JabRefPreferences if (entry.isPresent()) { if (entry.get().getType() == null) { - entry.get().setType("misc"); + entry.get().setType(BibEntry.DEFAULT_TYPE); } result.add(entry.get()); } @@ -259,7 +259,7 @@ public static Optional getBibtexEntryFromDocumentInformation( PDDocumentInformation di) { BibEntry entry = new BibEntry(); - entry.setType("misc"); + entry.setType(BibEntry.DEFAULT_TYPE); String s = di.getAuthor(); if (s != null) { diff --git a/src/main/java/net/sf/jabref/migrations/FileLinksUpgradeWarning.java b/src/main/java/net/sf/jabref/migrations/FileLinksUpgradeWarning.java index c52f99cec8c8..8307753d6976 100644 --- a/src/main/java/net/sf/jabref/migrations/FileLinksUpgradeWarning.java +++ b/src/main/java/net/sf/jabref/migrations/FileLinksUpgradeWarning.java @@ -35,6 +35,7 @@ import net.sf.jabref.importer.PostOpenAction; import net.sf.jabref.logic.cleanup.UpgradePdfPsToFileCleanup; import net.sf.jabref.logic.l10n.Localization; +import net.sf.jabref.logic.layout.format.FileLinkPreferences; import net.sf.jabref.model.FieldChange; import net.sf.jabref.model.database.BibDatabase; import net.sf.jabref.model.entry.BibEntry; @@ -78,7 +79,7 @@ public boolean isActionNecessary(ParserResult pr) { // Only offer to upgrade links if the pdf/ps fields are used: offerChangeDatabase = linksFound(pr.getDatabase(), FileLinksUpgradeWarning.FIELDS_TO_LOOK_FOR); // If the "file" directory is not set, offer to migrate pdf/ps dir: - offerSetFileDir = !Globals.prefs.hasKey(FieldName.FILE + Globals.DIR_SUFFIX) + offerSetFileDir = !Globals.prefs.hasKey(FieldName.FILE + FileLinkPreferences.DIR_SUFFIX) && (Globals.prefs.hasKey("pdfDirectory") || Globals.prefs.hasKey("psDirectory")); // First check if this warning is disabled: @@ -200,7 +201,7 @@ private void makeChanges(BasePanel panel, ParserResult pr, boolean upgradePrefs, } if (fileDir != null) { - Globals.prefs.put(FieldName.FILE + Globals.DIR_SUFFIX, fileDir); + Globals.prefs.put(FieldName.FILE + FileLinkPreferences.DIR_SUFFIX, fileDir); } if (upgradePrefs) { diff --git a/src/main/java/net/sf/jabref/model/entry/BibEntry.java b/src/main/java/net/sf/jabref/model/entry/BibEntry.java index 511373cb0cd3..b98ca9958259 100644 --- a/src/main/java/net/sf/jabref/model/entry/BibEntry.java +++ b/src/main/java/net/sf/jabref/model/entry/BibEntry.java @@ -49,7 +49,7 @@ public class BibEntry implements Cloneable { public static final String TYPE_HEADER = "entrytype"; public static final String KEY_FIELD = "bibtexkey"; protected static final String ID_FIELD = "id"; - private static final String DEFAULT_TYPE = "misc"; + public static final String DEFAULT_TYPE = "misc"; private String id; private String type; @@ -410,13 +410,12 @@ public Optional clearField(String name) { * @return true if all fields are set or could be resolved, false otherwise. */ public boolean allFieldsPresent(List allFields, BibDatabase database) { - final String orSeparator = "/"; for (String field : allFields) { String fieldName = toLowerCase(field); // OR fields - if (fieldName.contains(orSeparator)) { - String[] altFields = field.split(orSeparator); + if (fieldName.contains(FieldName.FIELD_SEPARATOR)) { + String[] altFields = field.split(FieldName.FIELD_SEPARATOR); if (!atLeastOnePresent(altFields, database)) { return false; diff --git a/src/main/java/net/sf/jabref/model/entry/EntryType.java b/src/main/java/net/sf/jabref/model/entry/EntryType.java index eefdb60fd857..3ae87b7ea0e5 100644 --- a/src/main/java/net/sf/jabref/model/entry/EntryType.java +++ b/src/main/java/net/sf/jabref/model/entry/EntryType.java @@ -41,7 +41,7 @@ public interface EntryType extends Comparable { */ default List getRequiredFieldsFlat() { List requiredFlat = getRequiredFields().stream() - .map(field -> field.split("/")) + .map(field -> field.split(FieldName.FIELD_SEPARATOR)) .flatMap(Arrays::stream) .collect(Collectors.toList()); diff --git a/src/main/java/net/sf/jabref/model/entry/FieldName.java b/src/main/java/net/sf/jabref/model/entry/FieldName.java index bbbd328b6f8b..5e9503c5ccbb 100644 --- a/src/main/java/net/sf/jabref/model/entry/FieldName.java +++ b/src/main/java/net/sf/jabref/model/entry/FieldName.java @@ -3,6 +3,12 @@ public class FieldName { + // Character separating field names that are to be used in sequence as + // fallbacks for a single column (e.g. "author/editor" to use editor where + // author is not set): + public static final String FIELD_SEPARATOR = "/"; + + // Field name constants public static final String ABSTRACT = "abstract"; public static final String ADDRESS = "address"; public static final String ANNOTE = "annote"; diff --git a/src/main/java/net/sf/jabref/model/entry/InternalBibtexFields.java b/src/main/java/net/sf/jabref/model/entry/InternalBibtexFields.java index a4a006331e90..c817c44edb02 100644 --- a/src/main/java/net/sf/jabref/model/entry/InternalBibtexFields.java +++ b/src/main/java/net/sf/jabref/model/entry/InternalBibtexFields.java @@ -43,6 +43,7 @@ import java.util.Set; import net.sf.jabref.Globals; +import net.sf.jabref.preferences.JabRefPreferences; import net.sf.jabref.specialfields.SpecialFieldsUtils; public class InternalBibtexFields { @@ -53,7 +54,6 @@ public class InternalBibtexFields { public static final String MARKED = "__markedentry"; public static final String OWNER = "owner"; public static final String TIMESTAMP = "timestamp"; - private static final String ENTRYTYPE = "entrytype"; public static final String NUMBER_COL = "#"; @@ -224,12 +224,13 @@ private InternalBibtexFields(boolean serializeSpecialFields) { dummy.setPrivate(); add(dummy); - dummy = new BibtexSingleField(InternalBibtexFields.TIMESTAMP, false, BibtexSingleField.SMALL_W); + dummy = new BibtexSingleField(Globals.prefs.get(JabRefPreferences.TIME_STAMP_FIELD), false, + BibtexSingleField.SMALL_W); dummy.setExtras(EnumSet.of(FieldProperties.DATE)); dummy.setPrivate(); add(dummy); - dummy = new BibtexSingleField(InternalBibtexFields.ENTRYTYPE, false, 75); + dummy = new BibtexSingleField(BibEntry.TYPE_HEADER, false, 75); dummy.setPrivate(); add(dummy); diff --git a/src/main/java/net/sf/jabref/preferences/JabRefPreferences.java b/src/main/java/net/sf/jabref/preferences/JabRefPreferences.java index 6fb8e20fe477..5781598f909c 100644 --- a/src/main/java/net/sf/jabref/preferences/JabRefPreferences.java +++ b/src/main/java/net/sf/jabref/preferences/JabRefPreferences.java @@ -51,7 +51,6 @@ import net.sf.jabref.external.DroppedFileHandler; import net.sf.jabref.gui.desktop.JabRefDesktop; import net.sf.jabref.gui.entryeditor.EntryEditorTabList; -import net.sf.jabref.gui.maintable.PersistenceTableColumnListener; import net.sf.jabref.gui.preftabs.ImportSettingsTab; import net.sf.jabref.importer.CustomImportList; import net.sf.jabref.logic.autocompleter.AutoCompletePreferences; @@ -566,8 +565,6 @@ private JabRefPreferences() { defaults.put(COLUMN_NAMES, "entrytype;author/editor;title;year;journal/booktitle;bibtexkey"); defaults.put(COLUMN_WIDTHS, "75;300;470;60;130;100"); - defaults.put(PersistenceTableColumnListener.ACTIVATE_PREF_KEY, - PersistenceTableColumnListener.DEFAULT_ENABLED); defaults.put(XMP_PRIVACY_FILTERS, "pdf;timestamp;keywords;owner;note;review"); defaults.put(USE_XMP_PRIVACY_FILTER, Boolean.FALSE); defaults.put(NUMBER_COL_WIDTH, 32); diff --git a/src/test/java/net/sf/jabref/MetaDataTest.java b/src/test/java/net/sf/jabref/MetaDataTest.java index 2009840ccc41..667eed435afa 100644 --- a/src/test/java/net/sf/jabref/MetaDataTest.java +++ b/src/test/java/net/sf/jabref/MetaDataTest.java @@ -7,6 +7,7 @@ import net.sf.jabref.logic.cleanup.FieldFormatterCleanup; import net.sf.jabref.logic.exporter.FieldFormatterCleanups; import net.sf.jabref.logic.formatter.casechanger.LowerCaseFormatter; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.preferences.JabRefPreferences; import org.junit.Before; @@ -37,7 +38,7 @@ public void serializeSingleSaveAction() { Map expectedSerialization = new TreeMap<>(); expectedSerialization.put("saveActions", - "enabled;" + Globals.NEWLINE + "title[lower_case]" + Globals.NEWLINE + ";"); + "enabled;" + OS.NEWLINE + "title[lower_case]" + OS.NEWLINE + ";"); assertEquals(expectedSerialization, metaData.getAsStringMap()); } } diff --git a/src/test/java/net/sf/jabref/importer/fileformat/BibtexParserTest.java b/src/test/java/net/sf/jabref/importer/fileformat/BibtexParserTest.java index b6beedd24fb2..da4eebee43ce 100644 --- a/src/test/java/net/sf/jabref/importer/fileformat/BibtexParserTest.java +++ b/src/test/java/net/sf/jabref/importer/fileformat/BibtexParserTest.java @@ -17,6 +17,7 @@ import net.sf.jabref.logic.cleanup.FieldFormatterCleanup; import net.sf.jabref.logic.config.SaveOrderConfig; import net.sf.jabref.logic.exporter.FieldFormatterCleanups; +import net.sf.jabref.logic.exporter.SavePreferences; import net.sf.jabref.logic.formatter.casechanger.LowerCaseFormatter; import net.sf.jabref.logic.groups.AllEntriesGroup; import net.sf.jabref.logic.groups.ExplicitGroup; @@ -25,6 +26,7 @@ import net.sf.jabref.logic.groups.KeywordGroup; import net.sf.jabref.logic.labelpattern.AbstractLabelPattern; import net.sf.jabref.logic.labelpattern.DatabaseLabelPattern; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.model.database.BibDatabaseMode; import net.sf.jabref.model.entry.BibEntry; import net.sf.jabref.model.entry.BibtexString; @@ -340,9 +342,9 @@ public void parseRecognizesMultipleEntries() throws IOException { public void parseSetsParsedSerialization() throws IOException { String firstEntry = "@article{canh05," + " author = {Crowston, K. and Annabi, H.}," - + Globals.NEWLINE + + OS.NEWLINE + " title = {Title A}}" - + Globals.NEWLINE; + + OS.NEWLINE; String secondEntry = "@inProceedings{foo," + " author={Norton Bar}}"; ParserResult result = BibtexParser.parse(new StringReader(firstEntry + secondEntry)); @@ -895,8 +897,8 @@ public void parseRecognizesString() throws IOException { @Test public void parseSavesOneNewlineAfterStringInParsedSerialization() throws IOException { - String string = "@string{bourdieu = {Bourdieu, Pierre}}" + Globals.NEWLINE; - ParserResult result = BibtexParser.parse(new StringReader(string + Globals.NEWLINE + Globals.NEWLINE)); + String string = "@string{bourdieu = {Bourdieu, Pierre}}" + OS.NEWLINE; + ParserResult result = BibtexParser.parse(new StringReader(string + OS.NEWLINE + OS.NEWLINE)); assertEquals(1, result.getDatabase().getStringCount()); BibtexString s = result.getDatabase().getStringValues().iterator().next(); @@ -1233,36 +1235,36 @@ public void parseSavesEntryInParsedSerialization() throws IOException { @Test public void parseSavesOneNewlineAfterEntryInParsedSerialization() throws IOException { String testEntry = "@article{test,author={Ed von Test}}"; - ParserResult result = BibtexParser.parse(new StringReader(testEntry + Globals.NEWLINE + Globals.NEWLINE)); + ParserResult result = BibtexParser.parse(new StringReader(testEntry + OS.NEWLINE + OS.NEWLINE)); Collection c = result.getDatabase().getEntries(); assertEquals(1, c.size()); BibEntry e = c.iterator().next(); - assertEquals(testEntry + Globals.NEWLINE, e.getParsedSerialization()); + assertEquals(testEntry + OS.NEWLINE, e.getParsedSerialization()); } @Test public void parseSavesNewlinesBeforeEntryInParsedSerialization() throws IOException { String testEntry = "@article{test,author={Ed von Test}}"; ParserResult result = BibtexParser - .parse(new StringReader(Globals.NEWLINE + Globals.NEWLINE + Globals.NEWLINE + testEntry)); + .parse(new StringReader(OS.NEWLINE + OS.NEWLINE + OS.NEWLINE + testEntry)); Collection c = result.getDatabase().getEntries(); assertEquals(1, c.size()); BibEntry e = c.iterator().next(); - assertEquals(Globals.NEWLINE + Globals.NEWLINE + Globals.NEWLINE + testEntry, e.getParsedSerialization()); + assertEquals(OS.NEWLINE + OS.NEWLINE + OS.NEWLINE + testEntry, e.getParsedSerialization()); } @Test public void parseRemovesEncodingLineInParsedSerialization() throws IOException { String testEntry = "@article{test,author={Ed von Test}}"; ParserResult result = BibtexParser.parse( - new StringReader(Globals.ENCODING_PREFIX + Globals.NEWLINE + Globals.NEWLINE + Globals.NEWLINE + testEntry)); + new StringReader(SavePreferences.ENCODING_PREFIX + OS.NEWLINE + OS.NEWLINE + OS.NEWLINE + testEntry)); Collection c = result.getDatabase().getEntries(); assertEquals(1, c.size()); BibEntry e = c.iterator().next(); - assertEquals(Globals.NEWLINE + Globals.NEWLINE + testEntry, e.getParsedSerialization()); + assertEquals(OS.NEWLINE + OS.NEWLINE + testEntry, e.getParsedSerialization()); } @Test @@ -1270,7 +1272,7 @@ public void parseSavesNewlinesBetweenEntriesInParsedSerialization() throws IOExc String testEntryOne = "@article{test1,author={Ed von Test}}"; String testEntryTwo = "@article{test2,author={Ed von Test}}"; ParserResult result = BibtexParser.parse( - new StringReader(testEntryOne + Globals.NEWLINE + Globals.NEWLINE + Globals.NEWLINE + testEntryTwo)); + new StringReader(testEntryOne + OS.NEWLINE + OS.NEWLINE + OS.NEWLINE + testEntryTwo)); Collection c = result.getDatabase().getEntries(); assertEquals(2, c.size()); @@ -1285,13 +1287,13 @@ public void parseSavesNewlinesBetweenEntriesInParsedSerialization() throws IOExc b = tmp; } - assertEquals(testEntryOne + Globals.NEWLINE, a.getParsedSerialization()); - assertEquals(Globals.NEWLINE + Globals.NEWLINE + testEntryTwo, b.getParsedSerialization()); + assertEquals(testEntryOne + OS.NEWLINE, a.getParsedSerialization()); + assertEquals(OS.NEWLINE + OS.NEWLINE + testEntryTwo, b.getParsedSerialization()); } @Test public void parseIgnoresWhitespaceInEpilogue() throws IOException { - ParserResult result = BibtexParser.parse(new StringReader(" " + Globals.NEWLINE)); + ParserResult result = BibtexParser.parse(new StringReader(" " + OS.NEWLINE)); assertEquals("", result.getDatabase().getEpilog()); } @@ -1300,12 +1302,12 @@ public void parseIgnoresWhitespaceInEpilogue() throws IOException { public void parseIgnoresWhitespaceInEpilogueAfterEntry() throws IOException { String testEntry = "@article{test,author={Ed von Test}}"; ParserResult result = BibtexParser.parse(new StringReader( - testEntry + Globals.NEWLINE + Globals.NEWLINE + Globals.NEWLINE + " " + Globals.NEWLINE)); + testEntry + OS.NEWLINE + OS.NEWLINE + OS.NEWLINE + " " + OS.NEWLINE)); Collection c = result.getDatabase().getEntries(); assertEquals(1, c.size()); BibEntry e = c.iterator().next(); - assertEquals(testEntry + Globals.NEWLINE, e.getParsedSerialization()); + assertEquals(testEntry + OS.NEWLINE, e.getParsedSerialization()); assertEquals("", result.getDatabase().getEpilog()); } @@ -1313,12 +1315,12 @@ public void parseIgnoresWhitespaceInEpilogueAfterEntry() throws IOException { public void parseTrimsWhitespaceInEpilogueAfterEntry() throws IOException { String testEntry = "@article{test,author={Ed von Test}}"; ParserResult result = BibtexParser.parse(new StringReader( - testEntry + Globals.NEWLINE + Globals.NEWLINE + Globals.NEWLINE + " epilogue " + Globals.NEWLINE)); + testEntry + OS.NEWLINE + OS.NEWLINE + OS.NEWLINE + " epilogue " + OS.NEWLINE)); Collection c = result.getDatabase().getEntries(); assertEquals(1, c.size()); BibEntry e = c.iterator().next(); - assertEquals(testEntry + Globals.NEWLINE, e.getParsedSerialization()); + assertEquals(testEntry + OS.NEWLINE, e.getParsedSerialization()); assertEquals("epilogue", result.getDatabase().getEpilog()); } @@ -1388,7 +1390,7 @@ public void integrationTestCustomKeyPattern() throws IOException { ParserResult result = BibtexParser .parse(new StringReader( "@comment{jabref-meta: keypattern_article:articleTest;}" - + Globals.NEWLINE + + OS.NEWLINE + "@comment{jabref-meta: keypatterndefault:test;}")); AbstractLabelPattern labelPattern = result.getMetaData().getLabelPattern(); @@ -1413,15 +1415,15 @@ public void integrationTestBiblatexMode() throws IOException { public void integrationTestGroupTree() throws IOException, ParseException { ParserResult result = BibtexParser.parse(new StringReader( "@comment{jabref-meta: groupsversion:3;}" - + Globals.NEWLINE + + + OS.NEWLINE + "@comment{jabref-meta: groupstree:" - + Globals.NEWLINE + + OS.NEWLINE + "0 AllEntriesGroup:;" - + Globals.NEWLINE + + OS.NEWLINE + "1 KeywordGroup:Fréchet\\;0\\;keywords\\;FrechetSpace\\;0\\;1\\;;" - + Globals.NEWLINE + + OS.NEWLINE + "1 KeywordGroup:Invariant theory\\;0\\;keywords\\;GIT\\;0\\;0\\;;" - + Globals.NEWLINE + + OS.NEWLINE + "1 ExplicitGroup:TestGroup\\;0\\;Key1\\;Key2\\;;" + "}")); @@ -1469,7 +1471,7 @@ public void integrationTestFileDirectories() throws IOException { @Test public void parseReturnsEntriesInSameOrder() throws IOException { ParserResult result = BibtexParser.parse(new StringReader( - "@article{a}" + Globals.NEWLINE + "@article{b}" + Globals.NEWLINE + "@inProceedings{c}")); + "@article{a}" + OS.NEWLINE + "@article{b}" + OS.NEWLINE + "@inProceedings{c}")); List expected = new ArrayList<>(); BibEntry a = new BibEntry(); @@ -1493,12 +1495,12 @@ public void parseReturnsEntriesInSameOrder() throws IOException { @Test public void parsePrecedingComment() throws IOException { // @formatter:off - String bibtexEntry = "% Some random comment that should stay here" + Globals.NEWLINE + - "@Article{test," + Globals.NEWLINE + - " Author = {Foo Bar}," + Globals.NEWLINE + - " Journal = {International Journal of Something}," + Globals.NEWLINE + - " Note = {some note}," + Globals.NEWLINE + - " Number = {1}" + Globals.NEWLINE + + String bibtexEntry = "% Some random comment that should stay here" + OS.NEWLINE + + "@Article{test," + OS.NEWLINE + + " Author = {Foo Bar}," + OS.NEWLINE + + " Journal = {International Journal of Something}," + OS.NEWLINE + + " Note = {some note}," + OS.NEWLINE + + " Number = {1}" + OS.NEWLINE + "}"; // @formatter:on @@ -1520,11 +1522,11 @@ public void parsePrecedingComment() throws IOException { @Test public void parseCommentAndEntryInOneLine() throws IOException { // @formatter:off - String bibtexEntry = "Some random comment that should stay here @Article{test," + Globals.NEWLINE + - " Author = {Foo Bar}," + Globals.NEWLINE + - " Journal = {International Journal of Something}," + Globals.NEWLINE + - " Note = {some note}," + Globals.NEWLINE + - " Number = {1}" + Globals.NEWLINE + + String bibtexEntry = "Some random comment that should stay here @Article{test," + OS.NEWLINE + + " Author = {Foo Bar}," + OS.NEWLINE + + " Journal = {International Journal of Something}," + OS.NEWLINE + + " Note = {some note}," + OS.NEWLINE + + " Number = {1}" + OS.NEWLINE + "}"; // @formatter:on @@ -1545,12 +1547,12 @@ public void parseCommentAndEntryInOneLine() throws IOException { @Test public void preserveEncodingPrefixInsideEntry() { - List parsed = BibtexParser.fromString("@article{test,author={" + Globals.ENCODING_PREFIX + "}}"); + List parsed = BibtexParser.fromString("@article{test,author={" + SavePreferences.ENCODING_PREFIX + "}}"); BibEntry expected = new BibEntry(); expected.setType("article"); expected.setCiteKey("test"); - expected.setField("author", Globals.ENCODING_PREFIX); + expected.setField("author", SavePreferences.ENCODING_PREFIX); assertEquals(Collections.singletonList(expected), parsed); } diff --git a/src/test/java/net/sf/jabref/logic/bibtex/BibEntryWriterTest.java b/src/test/java/net/sf/jabref/logic/bibtex/BibEntryWriterTest.java index 764d22695394..9fe9639419d9 100644 --- a/src/test/java/net/sf/jabref/logic/bibtex/BibEntryWriterTest.java +++ b/src/test/java/net/sf/jabref/logic/bibtex/BibEntryWriterTest.java @@ -9,6 +9,7 @@ import net.sf.jabref.Globals; import net.sf.jabref.importer.ParserResult; import net.sf.jabref.importer.fileformat.BibtexParser; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.model.database.BibDatabaseMode; import net.sf.jabref.model.entry.BibEntry; import net.sf.jabref.preferences.JabRefPreferences; @@ -60,12 +61,12 @@ public void testSerialization() throws IOException { String actual = stringWriter.toString(); // @formatter:off - String expected = Globals.NEWLINE + "@Article{," + Globals.NEWLINE + - " author = {Foo Bar}," + Globals.NEWLINE + - " journal = {International Journal of Something}," + Globals.NEWLINE + - " number = {1}," + Globals.NEWLINE + - " note = {some note}," + Globals.NEWLINE + - "}" + Globals.NEWLINE; + String expected = OS.NEWLINE + "@Article{," + OS.NEWLINE + + " author = {Foo Bar}," + OS.NEWLINE + + " journal = {International Journal of Something}," + OS.NEWLINE + + " number = {1}," + OS.NEWLINE + + " note = {some note}," + OS.NEWLINE + + "}" + OS.NEWLINE; // @formatter:on assertEquals(expected, actual); @@ -74,11 +75,11 @@ public void testSerialization() throws IOException { @Test public void roundTripTest() throws IOException { // @formatter:off - String bibtexEntry = "@Article{test," + Globals.NEWLINE + - " Author = {Foo Bar}," + Globals.NEWLINE + - " Journal = {International Journal of Something}," + Globals.NEWLINE + - " Note = {some note}," + Globals.NEWLINE + - " Number = {1}" + Globals.NEWLINE + + String bibtexEntry = "@Article{test," + OS.NEWLINE + + " Author = {Foo Bar}," + OS.NEWLINE + + " Journal = {International Journal of Something}," + OS.NEWLINE + + " Note = {some note}," + OS.NEWLINE + + " Number = {1}" + OS.NEWLINE + "}"; // @formatter:on @@ -98,11 +99,11 @@ public void roundTripTest() throws IOException { @Test public void roundTripWithPrependingNewlines() throws IOException { // @formatter:off - String bibtexEntry = "\r\n@Article{test," + Globals.NEWLINE + - " Author = {Foo Bar}," + Globals.NEWLINE + - " Journal = {International Journal of Something}," + Globals.NEWLINE + - " Note = {some note}," + Globals.NEWLINE + - " Number = {1}" + Globals.NEWLINE + + String bibtexEntry = "\r\n@Article{test," + OS.NEWLINE + + " Author = {Foo Bar}," + OS.NEWLINE + + " Journal = {International Journal of Something}," + OS.NEWLINE + + " Note = {some note}," + OS.NEWLINE + + " Number = {1}" + OS.NEWLINE + "}"; // @formatter:on @@ -122,11 +123,11 @@ public void roundTripWithPrependingNewlines() throws IOException { @Test public void roundTripWithModification() throws IOException { // @formatter:off - String bibtexEntry = Globals.NEWLINE + "@Article{test," + Globals.NEWLINE + - " Author = {Foo Bar}," + Globals.NEWLINE + - " Journal = {International Journal of Something}," + Globals.NEWLINE + - " Note = {some note}," + Globals.NEWLINE + - " Number = {1}," + Globals.NEWLINE + + String bibtexEntry = OS.NEWLINE + "@Article{test," + OS.NEWLINE + + " Author = {Foo Bar}," + OS.NEWLINE + + " Journal = {International Journal of Something}," + OS.NEWLINE + + " Note = {some note}," + OS.NEWLINE + + " Number = {1}," + OS.NEWLINE + "}"; // @formatter:on @@ -144,12 +145,12 @@ public void roundTripWithModification() throws IOException { String actual = stringWriter.toString(); // @formatter:off - String expected = Globals.NEWLINE + "@Article{test," + Globals.NEWLINE + - " author = {BlaBla}," + Globals.NEWLINE + - " journal = {International Journal of Something}," + Globals.NEWLINE + - " number = {1}," + Globals.NEWLINE + - " note = {some note}," + Globals.NEWLINE + - "}" + Globals.NEWLINE; + String expected = OS.NEWLINE + "@Article{test," + OS.NEWLINE + + " author = {BlaBla}," + OS.NEWLINE + + " journal = {International Journal of Something}," + OS.NEWLINE + + " number = {1}," + OS.NEWLINE + + " note = {some note}," + OS.NEWLINE + + "}" + OS.NEWLINE; // @formatter:on assertEquals(expected, actual); } @@ -157,12 +158,12 @@ public void roundTripWithModification() throws IOException { @Test public void roundTripWithCamelCasingInTheOriginalEntryAndResultInLowerCase() throws IOException { // @formatter:off - String bibtexEntry = Globals.NEWLINE + "@Article{test," + Globals.NEWLINE + - " Author = {Foo Bar}," + Globals.NEWLINE + - " Journal = {International Journal of Something}," + Globals.NEWLINE + - " Note = {some note}," + Globals.NEWLINE + - " Number = {1}," + Globals.NEWLINE + - " HowPublished = {asdf}," + Globals.NEWLINE + + String bibtexEntry = OS.NEWLINE + "@Article{test," + OS.NEWLINE + + " Author = {Foo Bar}," + OS.NEWLINE + + " Journal = {International Journal of Something}," + OS.NEWLINE + + " Note = {some note}," + OS.NEWLINE + + " Number = {1}," + OS.NEWLINE + + " HowPublished = {asdf}," + OS.NEWLINE + "}"; // @formatter:on @@ -180,13 +181,13 @@ public void roundTripWithCamelCasingInTheOriginalEntryAndResultInLowerCase() thr String actual = stringWriter.toString(); // @formatter:off - String expected = Globals.NEWLINE + "@Article{test," + Globals.NEWLINE + - " author = {BlaBla}," + Globals.NEWLINE + - " journal = {International Journal of Something}," + Globals.NEWLINE + - " number = {1}," + Globals.NEWLINE + - " note = {some note}," + Globals.NEWLINE + - " howpublished = {asdf}," + Globals.NEWLINE + - "}" + Globals.NEWLINE; + String expected = OS.NEWLINE + "@Article{test," + OS.NEWLINE + + " author = {BlaBla}," + OS.NEWLINE + + " journal = {International Journal of Something}," + OS.NEWLINE + + " number = {1}," + OS.NEWLINE + + " note = {some note}," + OS.NEWLINE + + " howpublished = {asdf}," + OS.NEWLINE + + "}" + OS.NEWLINE; // @formatter:on assertEquals(expected, actual); } @@ -194,13 +195,13 @@ public void roundTripWithCamelCasingInTheOriginalEntryAndResultInLowerCase() thr @Test public void testEntryTypeChange() throws IOException { // @formatter:off - String expected = Globals.NEWLINE + "@Article{test," + Globals.NEWLINE + - " author = {BlaBla}," + Globals.NEWLINE + - " journal = {International Journal of Something}," + Globals.NEWLINE + - " number = {1}," + Globals.NEWLINE + - " note = {some note}," + Globals.NEWLINE + - " howpublished = {asdf}," + Globals.NEWLINE + - "}" + Globals.NEWLINE; + String expected = OS.NEWLINE + "@Article{test," + OS.NEWLINE + + " author = {BlaBla}," + OS.NEWLINE + + " journal = {International Journal of Something}," + OS.NEWLINE + + " number = {1}," + OS.NEWLINE + + " note = {some note}," + OS.NEWLINE + + " howpublished = {asdf}," + OS.NEWLINE + + "}" + OS.NEWLINE; // @formatter:on // read in bibtex string @@ -217,13 +218,13 @@ public void testEntryTypeChange() throws IOException { String actual = stringWriter.toString(); // @formatter:off - String expectedNewEntry = Globals.NEWLINE + "@InProceedings{test," + Globals.NEWLINE + - " author = {BlaBla}," + Globals.NEWLINE + - " number = {1}," + Globals.NEWLINE + - " note = {some note}," + Globals.NEWLINE + - " howpublished = {asdf}," + Globals.NEWLINE + - " journal = {International Journal of Something}," + Globals.NEWLINE + - "}" + Globals.NEWLINE; + String expectedNewEntry = OS.NEWLINE + "@InProceedings{test," + OS.NEWLINE + + " author = {BlaBla}," + OS.NEWLINE + + " number = {1}," + OS.NEWLINE + + " note = {some note}," + OS.NEWLINE + + " howpublished = {asdf}," + OS.NEWLINE + + " journal = {International Journal of Something}," + OS.NEWLINE + + "}" + OS.NEWLINE; // @formatter:on assertEquals(expectedNewEntry, actual); } @@ -232,11 +233,11 @@ public void testEntryTypeChange() throws IOException { @Test public void roundTripWithAppendedNewlines() throws IOException { // @formatter:off - String bibtexEntry = "@Article{test," + Globals.NEWLINE + - " Author = {Foo Bar}," + Globals.NEWLINE + - " Journal = {International Journal of Something}," + Globals.NEWLINE + - " Note = {some note}," + Globals.NEWLINE + - " Number = {1}" + Globals.NEWLINE + + String bibtexEntry = "@Article{test," + OS.NEWLINE + + " Author = {Foo Bar}," + OS.NEWLINE + + " Journal = {International Journal of Something}," + OS.NEWLINE + + " Note = {some note}," + OS.NEWLINE + + " Number = {1}" + OS.NEWLINE + "}\n\n"; // @formatter:on @@ -257,11 +258,11 @@ public void roundTripWithAppendedNewlines() throws IOException { @Test public void multipleWritesWithoutModification() throws IOException { // @formatter:off - String bibtexEntry = "@Article{test," + Globals.NEWLINE + - " Author = {Foo Bar}," + Globals.NEWLINE + - " Journal = {International Journal of Something}," + Globals.NEWLINE + - " Note = {some note}," + Globals.NEWLINE + - " Number = {1}" + Globals.NEWLINE + + String bibtexEntry = "@Article{test," + OS.NEWLINE + + " Author = {Foo Bar}," + OS.NEWLINE + + " Journal = {International Journal of Something}," + OS.NEWLINE + + " Note = {some note}," + OS.NEWLINE + + " Number = {1}" + OS.NEWLINE + "}"; // @formatter:on @@ -290,10 +291,10 @@ private String testSingleWrite(String bibtexEntry) throws IOException { @Test public void monthFieldSpecialSyntax() throws IOException { // @formatter:off - String bibtexEntry = "@Article{test," + Globals.NEWLINE + - " Author = {Foo Bar}," + Globals.NEWLINE + - " Month = mar," + Globals.NEWLINE + - " Number = {1}" + Globals.NEWLINE + + String bibtexEntry = "@Article{test," + OS.NEWLINE + + " Author = {Foo Bar}," + OS.NEWLINE + + " Month = mar," + OS.NEWLINE + + " Number = {1}" + OS.NEWLINE + "}"; // @formatter:on @@ -318,11 +319,11 @@ public void monthFieldSpecialSyntax() throws IOException { @Test public void addFieldWithLongerLength() throws IOException { // @formatter:off - String bibtexEntry = Globals.NEWLINE + Globals.NEWLINE + "@Article{test," + Globals.NEWLINE + - " author = {BlaBla}," + Globals.NEWLINE + - " journal = {International Journal of Something}," + Globals.NEWLINE + - " number = {1}," + Globals.NEWLINE + - " note = {some note}," + Globals.NEWLINE + + String bibtexEntry = OS.NEWLINE + OS.NEWLINE + "@Article{test," + OS.NEWLINE + + " author = {BlaBla}," + OS.NEWLINE + + " journal = {International Journal of Something}," + OS.NEWLINE + + " number = {1}," + OS.NEWLINE + + " note = {some note}," + OS.NEWLINE + "}"; // @formatter:on @@ -340,13 +341,13 @@ public void addFieldWithLongerLength() throws IOException { String actual = stringWriter.toString(); // @formatter:off - String expected = Globals.NEWLINE + "@Article{test," + Globals.NEWLINE + - " author = {BlaBla}," + Globals.NEWLINE + - " journal = {International Journal of Something}," + Globals.NEWLINE + - " number = {1}," + Globals.NEWLINE + - " note = {some note}," + Globals.NEWLINE + - " howpublished = {asdf}," + Globals.NEWLINE + - "}" + Globals.NEWLINE; + String expected = OS.NEWLINE + "@Article{test," + OS.NEWLINE + + " author = {BlaBla}," + OS.NEWLINE + + " journal = {International Journal of Something}," + OS.NEWLINE + + " number = {1}," + OS.NEWLINE + + " note = {some note}," + OS.NEWLINE + + " howpublished = {asdf}," + OS.NEWLINE + + "}" + OS.NEWLINE; // @formatter:on assertEquals(expected, actual); } @@ -363,9 +364,9 @@ public void doNotWriteEmptyFields() throws IOException { String actual = stringWriter.toString(); - String expected = Globals.NEWLINE + "@Article{," + Globals.NEWLINE + - " note = {some note}," + Globals.NEWLINE + - "}" + Globals.NEWLINE; + String expected = OS.NEWLINE + "@Article{," + OS.NEWLINE + + " note = {some note}," + OS.NEWLINE + + "}" + OS.NEWLINE; assertEquals(expected, actual); } @@ -381,9 +382,9 @@ public void trimFieldContents() throws IOException { String actual = stringWriter.toString(); - String expected = Globals.NEWLINE + "@Article{," + Globals.NEWLINE + - " note = {some note}," + Globals.NEWLINE + - "}" + Globals.NEWLINE; + String expected = OS.NEWLINE + "@Article{," + OS.NEWLINE + + " note = {some note}," + OS.NEWLINE + + "}" + OS.NEWLINE; assertEquals(expected, actual); } @@ -391,12 +392,12 @@ public void trimFieldContents() throws IOException { @Test public void roundTripWithPrecedingCommentTest() throws IOException { // @formatter:off - String bibtexEntry = "% Some random comment that should stay here" + Globals.NEWLINE + - "@Article{test," + Globals.NEWLINE + - " Author = {Foo Bar}," + Globals.NEWLINE + - " Journal = {International Journal of Something}," + Globals.NEWLINE + - " Note = {some note}," + Globals.NEWLINE + - " Number = {1}" + Globals.NEWLINE + + String bibtexEntry = "% Some random comment that should stay here" + OS.NEWLINE + + "@Article{test," + OS.NEWLINE + + " Author = {Foo Bar}," + OS.NEWLINE + + " Journal = {International Journal of Something}," + OS.NEWLINE + + " Note = {some note}," + OS.NEWLINE + + " Number = {1}" + OS.NEWLINE + "}"; // @formatter:on @@ -416,12 +417,12 @@ public void roundTripWithPrecedingCommentTest() throws IOException { @Test public void roundTripWithPrecedingCommentAndModificationTest() throws IOException { // @formatter:off - String bibtexEntry = "% Some random comment that should stay here" + Globals.NEWLINE + - "@Article{test," + Globals.NEWLINE + - " Author = {Foo Bar}," + Globals.NEWLINE + - " Journal = {International Journal of Something}," + Globals.NEWLINE + - " Note = {some note}," + Globals.NEWLINE + - " Number = {1}" + Globals.NEWLINE + + String bibtexEntry = "% Some random comment that should stay here" + OS.NEWLINE + + "@Article{test," + OS.NEWLINE + + " Author = {Foo Bar}," + OS.NEWLINE + + " Journal = {International Journal of Something}," + OS.NEWLINE + + " Note = {some note}," + OS.NEWLINE + + " Number = {1}" + OS.NEWLINE + "}"; // @formatter:on @@ -438,13 +439,13 @@ public void roundTripWithPrecedingCommentAndModificationTest() throws IOExceptio writer.write(entry, stringWriter, BibDatabaseMode.BIBTEX); String actual = stringWriter.toString(); // @formatter:off - String expected = "% Some random comment that should stay here" + Globals.NEWLINE + Globals.NEWLINE + - "@Article{test," + Globals.NEWLINE + - " author = {John Doe}," + Globals.NEWLINE + - " journal = {International Journal of Something}," + Globals.NEWLINE + - " number = {1}," + Globals.NEWLINE + - " note = {some note}," + Globals.NEWLINE + - "}" + Globals.NEWLINE; + String expected = "% Some random comment that should stay here" + OS.NEWLINE + OS.NEWLINE + + "@Article{test," + OS.NEWLINE + + " author = {John Doe}," + OS.NEWLINE + + " journal = {International Journal of Something}," + OS.NEWLINE + + " number = {1}," + OS.NEWLINE + + " note = {some note}," + OS.NEWLINE + + "}" + OS.NEWLINE; // @formatter:on assertEquals(expected, actual); diff --git a/src/test/java/net/sf/jabref/logic/bibtex/FieldContentParserTest.java b/src/test/java/net/sf/jabref/logic/bibtex/FieldContentParserTest.java index 2af06571390b..39e9e06645e7 100644 --- a/src/test/java/net/sf/jabref/logic/bibtex/FieldContentParserTest.java +++ b/src/test/java/net/sf/jabref/logic/bibtex/FieldContentParserTest.java @@ -1,6 +1,7 @@ package net.sf.jabref.logic.bibtex; import net.sf.jabref.Globals; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.preferences.JabRefPreferences; import org.junit.Before; @@ -26,7 +27,7 @@ public void setUp() throws Exception { @Test public void unifiesLineBreaks() { String original = "I\r\nunify\nline\rbreaks."; - String expected = "I\nunify\nline\nbreaks.".replace("\n", Globals.NEWLINE); + String expected = "I\nunify\nline\nbreaks.".replace("\n", OS.NEWLINE); String processed = parser.format(new StringBuilder(original), "abstract").toString(); assertEquals(expected, processed); @@ -35,7 +36,7 @@ public void unifiesLineBreaks() { @Test public void retainsWhitespaceForMultiLineFields() { String original = "I\nkeep\nline\nbreaks\nand\n\ttabs."; - String formatted = original.replace("\n", Globals.NEWLINE); + String formatted = original.replace("\n", OS.NEWLINE); String abstrakt = parser.format(new StringBuilder(original), "abstract").toString(); String review = parser.format(new StringBuilder(original), "review").toString(); diff --git a/src/test/java/net/sf/jabref/logic/bibtex/LatexFieldFormatterTests.java b/src/test/java/net/sf/jabref/logic/bibtex/LatexFieldFormatterTests.java index ba17d60329d9..d4d2b8eadb0c 100644 --- a/src/test/java/net/sf/jabref/logic/bibtex/LatexFieldFormatterTests.java +++ b/src/test/java/net/sf/jabref/logic/bibtex/LatexFieldFormatterTests.java @@ -1,6 +1,7 @@ package net.sf.jabref.logic.bibtex; import net.sf.jabref.Globals; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.preferences.JabRefPreferences; import org.junit.Before; @@ -26,13 +27,13 @@ public void setUp() { @Test public void normalizeNewlineInAbstractField() { String fieldName = "abstract"; - String text = "lorem" + Globals.NEWLINE + " ipsum lorem ipsum\nlorem ipsum \rlorem ipsum\r\ntest"; + String text = "lorem" + OS.NEWLINE + " ipsum lorem ipsum\nlorem ipsum \rlorem ipsum\r\ntest"; // The newlines are normalized according to the globally configured newline setting in the formatter - String expected = "{" + "lorem" + Globals.NEWLINE + " ipsum lorem ipsum" + Globals.NEWLINE + String expected = "{" + "lorem" + OS.NEWLINE + " ipsum lorem ipsum" + OS.NEWLINE + "lorem ipsum " - + Globals.NEWLINE + "lorem ipsum" - + Globals.NEWLINE + "test" + "}"; + + OS.NEWLINE + "lorem ipsum" + + OS.NEWLINE + "test" + "}"; String result = formatter.format(text, fieldName); @@ -43,7 +44,7 @@ public void normalizeNewlineInAbstractField() { public void preserveNewlineInAbstractField() { String fieldName = "abstract"; // The newlines are normalized according to the globally configured newline setting in the formatter - String text = "lorem ipsum lorem ipsum" + Globals.NEWLINE + "lorem ipsum lorem ipsum" + Globals.NEWLINE; + String text = "lorem ipsum lorem ipsum" + OS.NEWLINE + "lorem ipsum lorem ipsum" + OS.NEWLINE; String result = formatter.format(text, fieldName); String expected = "{" + text + "}"; @@ -55,8 +56,8 @@ public void preserveNewlineInAbstractField() { public void preserveMultipleNewlinesInAbstractField() { String fieldName = "abstract"; // The newlines are normalized according to the globally configured newline setting in the formatter - String text = "lorem ipsum lorem ipsum" + Globals.NEWLINE + Globals.NEWLINE + "lorem ipsum lorem ipsum" - + Globals.NEWLINE; + String text = "lorem ipsum lorem ipsum" + OS.NEWLINE + OS.NEWLINE + "lorem ipsum lorem ipsum" + + OS.NEWLINE; String result = formatter.format(text, fieldName); String expected = "{" + text + "}"; @@ -68,7 +69,7 @@ public void preserveMultipleNewlinesInAbstractField() { public void preserveNewlineInReviewField() { String fieldName = "review"; // The newlines are normalized according to the globally configured newline setting in the formatter - String text = "lorem ipsum lorem ipsum" + Globals.NEWLINE + "lorem ipsum lorem ipsum" + Globals.NEWLINE; + String text = "lorem ipsum lorem ipsum" + OS.NEWLINE + "lorem ipsum lorem ipsum" + OS.NEWLINE; String result = formatter.format(text, fieldName); String expected = "{"+text+"}"; diff --git a/src/test/java/net/sf/jabref/logic/exporter/BibtexDatabaseWriterTest.java b/src/test/java/net/sf/jabref/logic/exporter/BibtexDatabaseWriterTest.java index 807b51c71b90..667427d983a0 100644 --- a/src/test/java/net/sf/jabref/logic/exporter/BibtexDatabaseWriterTest.java +++ b/src/test/java/net/sf/jabref/logic/exporter/BibtexDatabaseWriterTest.java @@ -24,6 +24,7 @@ import net.sf.jabref.logic.groups.GroupTreeNode; import net.sf.jabref.logic.labelpattern.AbstractLabelPattern; import net.sf.jabref.logic.labelpattern.DatabaseLabelPattern; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.model.EntryTypes; import net.sf.jabref.model.database.BibDatabase; import net.sf.jabref.model.database.BibDatabaseMode; @@ -80,7 +81,7 @@ public void writeEncoding() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), preferences); - assertEquals("% Encoding: US-ASCII" + Globals.NEWLINE, session.getStringValue()); + assertEquals("% Encoding: US-ASCII" + OS.NEWLINE, session.getStringValue()); } @Test @@ -89,7 +90,7 @@ public void writePreamble() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences()); - assertEquals(Globals.NEWLINE + "@Preamble{Test preamble}" + Globals.NEWLINE, session.getStringValue()); + assertEquals(OS.NEWLINE + "@Preamble{Test preamble}" + OS.NEWLINE, session.getStringValue()); } @Test @@ -99,8 +100,8 @@ public void writePreambleAndEncoding() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), preferences); - assertEquals("% Encoding: US-ASCII" + Globals.NEWLINE + Globals.NEWLINE + - "@Preamble{Test preamble}" + Globals.NEWLINE, session.getStringValue()); + assertEquals("% Encoding: US-ASCII" + OS.NEWLINE + OS.NEWLINE + + "@Preamble{Test preamble}" + OS.NEWLINE, session.getStringValue()); } @Test @@ -111,10 +112,10 @@ public void writeEntry() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.singletonList(entry), new SavePreferences()); - assertEquals(Globals.NEWLINE + - "@Article{," + Globals.NEWLINE + "}" + Globals.NEWLINE + Globals.NEWLINE + assertEquals(OS.NEWLINE + + "@Article{," + OS.NEWLINE + "}" + OS.NEWLINE + OS.NEWLINE + "@Comment{jabref-meta: databaseType:bibtex;}" - + Globals.NEWLINE, session.getStringValue()); + + OS.NEWLINE, session.getStringValue()); } @Test @@ -126,11 +127,11 @@ public void writeEncodingAndEntry() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.singletonList(entry), preferences); - assertEquals("% Encoding: US-ASCII" + Globals.NEWLINE + Globals.NEWLINE + - "@Article{," + Globals.NEWLINE + "}" - + Globals.NEWLINE + Globals.NEWLINE + assertEquals("% Encoding: US-ASCII" + OS.NEWLINE + OS.NEWLINE + + "@Article{," + OS.NEWLINE + "}" + + OS.NEWLINE + OS.NEWLINE + "@Comment{jabref-meta: databaseType:bibtex;}" - + Globals.NEWLINE, session.getStringValue()); + + OS.NEWLINE, session.getStringValue()); } @Test @@ -139,7 +140,7 @@ public void writeEpilogue() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences()); - assertEquals(Globals.NEWLINE + "Test epilog" + Globals.NEWLINE, session.getStringValue()); + assertEquals(OS.NEWLINE + "Test epilog" + OS.NEWLINE, session.getStringValue()); } @Test @@ -149,8 +150,8 @@ public void writeEpilogueAndEncoding() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), preferences); - assertEquals("% Encoding: US-ASCII" + Globals.NEWLINE + Globals.NEWLINE + - "Test epilog" + Globals.NEWLINE, session.getStringValue()); + assertEquals("% Encoding: US-ASCII" + OS.NEWLINE + OS.NEWLINE + + "Test epilog" + OS.NEWLINE, session.getStringValue()); } @Test @@ -161,7 +162,7 @@ public void writeMetadata() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences()); - assertEquals(Globals.NEWLINE + "@Comment{jabref-meta: keypatterndefault:test;}" + Globals.NEWLINE, + assertEquals(OS.NEWLINE + "@Comment{jabref-meta: keypatterndefault:test;}" + OS.NEWLINE, session.getStringValue()); } @@ -174,9 +175,9 @@ public void writeMetadataAndEncoding() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), preferences); - assertEquals("% Encoding: US-ASCII" + Globals.NEWLINE + Globals.NEWLINE + assertEquals("% Encoding: US-ASCII" + OS.NEWLINE + OS.NEWLINE + - "@Comment{jabref-meta: keypatterndefault:test;}" + Globals.NEWLINE, session.getStringValue()); + "@Comment{jabref-meta: keypatterndefault:test;}" + OS.NEWLINE, session.getStringValue()); } @Test @@ -188,11 +189,11 @@ public void writeGroups() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences()); // @formatter:off - assertEquals(Globals.NEWLINE - + "@Comment{jabref-meta: groupstree:" + Globals.NEWLINE - + "0 AllEntriesGroup:;" + Globals.NEWLINE - + "1 ExplicitGroup:test\\;2\\;;" + Globals.NEWLINE - + "}" + Globals.NEWLINE, session.getStringValue()); + assertEquals(OS.NEWLINE + + "@Comment{jabref-meta: groupstree:" + OS.NEWLINE + + "0 AllEntriesGroup:;" + OS.NEWLINE + + "1 ExplicitGroup:test\\;2\\;;" + OS.NEWLINE + + "}" + OS.NEWLINE, session.getStringValue()); // @formatter:on } @@ -209,12 +210,12 @@ public void writeGroupsAndEncoding() throws Exception { // @formatter:off assertEquals( - "% Encoding: US-ASCII" + Globals.NEWLINE + - Globals.NEWLINE - + "@Comment{jabref-meta: groupstree:" + Globals.NEWLINE - + "0 AllEntriesGroup:;" + Globals.NEWLINE - + "1 ExplicitGroup:test\\;2\\;;" + Globals.NEWLINE - + "}" + Globals.NEWLINE, session.getStringValue()); + "% Encoding: US-ASCII" + OS.NEWLINE + + OS.NEWLINE + + "@Comment{jabref-meta: groupstree:" + OS.NEWLINE + + "0 AllEntriesGroup:;" + OS.NEWLINE + + "1 ExplicitGroup:test\\;2\\;;" + OS.NEWLINE + + "}" + OS.NEWLINE, session.getStringValue()); // @formatter:on } @@ -224,7 +225,7 @@ public void writeString() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences()); - assertEquals(Globals.NEWLINE + "@String{name = {content}}" + Globals.NEWLINE, session.getStringValue()); + assertEquals(OS.NEWLINE + "@String{name = {content}}" + OS.NEWLINE, session.getStringValue()); } @Test @@ -234,8 +235,8 @@ public void writeStringAndEncoding() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), preferences); - assertEquals("% Encoding: US-ASCII" + Globals.NEWLINE + Globals.NEWLINE + - "@String{name = {content}}" + Globals.NEWLINE, session.getStringValue()); + assertEquals("% Encoding: US-ASCII" + OS.NEWLINE + OS.NEWLINE + + "@String{name = {content}}" + OS.NEWLINE, session.getStringValue()); } @Test @@ -249,11 +250,11 @@ public void writeEntryWithCustomizedTypeAlsoWritesTypeDeclaration() throws Excep StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.singletonList(entry), new SavePreferences()); assertEquals( - Globals.NEWLINE + - "@Customizedtype{," + Globals.NEWLINE + "}" + Globals.NEWLINE + Globals.NEWLINE + OS.NEWLINE + + "@Customizedtype{," + OS.NEWLINE + "}" + OS.NEWLINE + OS.NEWLINE + "@Comment{jabref-meta: databaseType:bibtex;}" - + Globals.NEWLINE + Globals.NEWLINE - + "@Comment{jabref-entrytype: Customizedtype: req[required] opt[optional]}" + Globals.NEWLINE, + + OS.NEWLINE + OS.NEWLINE + + "@Comment{jabref-entrytype: Customizedtype: req[required] opt[optional]}" + OS.NEWLINE, session.getStringValue()); } finally { EntryTypes.removeAllCustomEntryTypes(); @@ -345,8 +346,8 @@ public void writeSavedSerializationOfEntryIfUnchanged() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.singletonList(entry), new SavePreferences()); - assertEquals("presaved serialization" + Globals.NEWLINE + "@Comment{jabref-meta: databaseType:bibtex;}" - + Globals.NEWLINE, session.getStringValue()); + assertEquals("presaved serialization" + OS.NEWLINE + "@Comment{jabref-meta: databaseType:bibtex;}" + + OS.NEWLINE, session.getStringValue()); } @Test @@ -361,11 +362,11 @@ public void reformatEntryIfAskedToDoSo() throws Exception { SavePreferences preferences = new SavePreferences().withReformatFile(true); StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.singletonList(entry), preferences); - assertEquals(Globals.NEWLINE + - "@Article{," + Globals.NEWLINE + " author = {Mr. author}," + Globals.NEWLINE + "}" - + Globals.NEWLINE + Globals.NEWLINE + assertEquals(OS.NEWLINE + + "@Article{," + OS.NEWLINE + " author = {Mr. author}," + OS.NEWLINE + "}" + + OS.NEWLINE + OS.NEWLINE + "@Comment{jabref-meta: databaseType:bibtex;}" - + Globals.NEWLINE, + + OS.NEWLINE, session.getStringValue()); } @@ -389,7 +390,7 @@ public void reformatStringIfAskedToDoSo() throws Exception { SavePreferences preferences = new SavePreferences().withReformatFile(true); StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), preferences); - assertEquals(Globals.NEWLINE + "@String{name = {content}}" + Globals.NEWLINE, session.getStringValue()); + assertEquals(OS.NEWLINE + "@String{name = {content}}" + OS.NEWLINE, session.getStringValue()); } @@ -401,8 +402,8 @@ public void writeSaveActions() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences()); - assertEquals(Globals.NEWLINE + "@Comment{jabref-meta: saveActions:enabled;" + Globals.NEWLINE - + "title[lower_case]" + Globals.NEWLINE + ";}" + Globals.NEWLINE, session.getStringValue()); + assertEquals(OS.NEWLINE + "@Comment{jabref-meta: saveActions:enabled;" + OS.NEWLINE + + "title[lower_case]" + OS.NEWLINE + ";}" + OS.NEWLINE, session.getStringValue()); } @Test @@ -414,9 +415,9 @@ public void writeSaveOrderConfig() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences()); - assertEquals(Globals.NEWLINE + assertEquals(OS.NEWLINE + "@Comment{jabref-meta: saveOrderConfig:specified;author;false;year;true;abstract;false;}" - + Globals.NEWLINE, session.getStringValue()); + + OS.NEWLINE, session.getStringValue()); } @Test @@ -428,8 +429,8 @@ public void writeCustomKeyPattern() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences()); - assertEquals(Globals.NEWLINE + "@Comment{jabref-meta: keypattern_article:articleTest;}" + Globals.NEWLINE - + Globals.NEWLINE + "@Comment{jabref-meta: keypatterndefault:test;}" + Globals.NEWLINE, + assertEquals(OS.NEWLINE + "@Comment{jabref-meta: keypattern_article:articleTest;}" + OS.NEWLINE + + OS.NEWLINE + "@Comment{jabref-meta: keypatterndefault:test;}" + OS.NEWLINE, session.getStringValue()); } @@ -439,7 +440,7 @@ public void writeBiblatexMode() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences()); - assertEquals(Globals.NEWLINE + "@Comment{jabref-meta: databaseType:biblatex;}" + Globals.NEWLINE, + assertEquals(OS.NEWLINE + "@Comment{jabref-meta: databaseType:biblatex;}" + OS.NEWLINE, session.getStringValue()); } @@ -449,7 +450,7 @@ public void writeProtectedFlag() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences()); - assertEquals(Globals.NEWLINE + "@Comment{jabref-meta: protectedFlag:true;}" + Globals.NEWLINE, + assertEquals(OS.NEWLINE + "@Comment{jabref-meta: protectedFlag:true;}" + OS.NEWLINE, session.getStringValue()); } @@ -459,7 +460,7 @@ public void writeContentSelectors() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences()); - assertEquals(Globals.NEWLINE + "@Comment{jabref-meta: selector_title:testWord;word2;}" + Globals.NEWLINE, + assertEquals(OS.NEWLINE + "@Comment{jabref-meta: selector_title:testWord;word2;}" + OS.NEWLINE, session.getStringValue()); } @@ -470,9 +471,9 @@ public void writeFileDirectories() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences()); - assertEquals(Globals.NEWLINE + "@Comment{jabref-meta: fileDirectory:\\\\Literature\\\\;}" + Globals.NEWLINE + - Globals.NEWLINE + "@Comment{jabref-meta: fileDirectory-defaultOwner-user:D:\\\\Documents;}" - + Globals.NEWLINE, session.getStringValue()); + assertEquals(OS.NEWLINE + "@Comment{jabref-meta: fileDirectory:\\\\Literature\\\\;}" + OS.NEWLINE + + OS.NEWLINE + "@Comment{jabref-meta: fileDirectory-defaultOwner-user:D:\\\\Documents;}" + + OS.NEWLINE, session.getStringValue()); } @Test @@ -522,23 +523,23 @@ public void writeEntriesSorted() throws Exception { StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, database.getEntries(), new SavePreferences()); assertEquals( - Globals.NEWLINE + - "@Article{," + Globals.NEWLINE + - " author = {A}," + Globals.NEWLINE + - " year = {2000}," + Globals.NEWLINE + - "}" + Globals.NEWLINE + Globals.NEWLINE + - "@Article{," + Globals.NEWLINE + - " author = {A}," + Globals.NEWLINE + - " year = {2010}," + Globals.NEWLINE + - "}" + Globals.NEWLINE + Globals.NEWLINE + - "@Article{," + Globals.NEWLINE + - " author = {B}," + Globals.NEWLINE + - " year = {2000}," + Globals.NEWLINE + - "}" + Globals.NEWLINE + Globals.NEWLINE + + OS.NEWLINE + + "@Article{," + OS.NEWLINE + + " author = {A}," + OS.NEWLINE + + " year = {2000}," + OS.NEWLINE + + "}" + OS.NEWLINE + OS.NEWLINE + + "@Article{," + OS.NEWLINE + + " author = {A}," + OS.NEWLINE + + " year = {2010}," + OS.NEWLINE + + "}" + OS.NEWLINE + OS.NEWLINE + + "@Article{," + OS.NEWLINE + + " author = {B}," + OS.NEWLINE + + " year = {2000}," + OS.NEWLINE + + "}" + OS.NEWLINE + OS.NEWLINE + "@Comment{jabref-meta: databaseType:bibtex;}" - + Globals.NEWLINE + Globals.NEWLINE + + + OS.NEWLINE + OS.NEWLINE + "@Comment{jabref-meta: saveOrderConfig:specified;author;false;year;true;abstract;false;}" + - Globals.NEWLINE + OS.NEWLINE , session.getStringValue()); } @@ -567,22 +568,22 @@ public void writeEntriesInOriginalOrderWhenNoSaveOrderConfigIsSetInMetadata() th StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, database.getEntries(), preferences); assertEquals( - Globals.NEWLINE + - "@Article{," + Globals.NEWLINE + - " author = {A}," + Globals.NEWLINE + - " year = {2010}," + Globals.NEWLINE + - "}" + Globals.NEWLINE + Globals.NEWLINE + - "@Article{," + Globals.NEWLINE + - " author = {B}," + Globals.NEWLINE + - " year = {2000}," + Globals.NEWLINE + - "}" + Globals.NEWLINE + Globals.NEWLINE + - "@Article{," + Globals.NEWLINE + - " author = {A}," + Globals.NEWLINE + - " year = {2000}," + Globals.NEWLINE + + OS.NEWLINE + + "@Article{," + OS.NEWLINE + + " author = {A}," + OS.NEWLINE + + " year = {2010}," + OS.NEWLINE + + "}" + OS.NEWLINE + OS.NEWLINE + + "@Article{," + OS.NEWLINE + + " author = {B}," + OS.NEWLINE + + " year = {2000}," + OS.NEWLINE + + "}" + OS.NEWLINE + OS.NEWLINE + + "@Article{," + OS.NEWLINE + + " author = {A}," + OS.NEWLINE + + " year = {2000}," + OS.NEWLINE + "}" - + Globals.NEWLINE + Globals.NEWLINE + + + OS.NEWLINE + OS.NEWLINE + "@Comment{jabref-meta: databaseType:bibtex;}" - + Globals.NEWLINE + + OS.NEWLINE , session.getStringValue()); } diff --git a/src/test/java/net/sf/jabref/logic/layout/format/RisKeywordsTest.java b/src/test/java/net/sf/jabref/logic/layout/format/RisKeywordsTest.java index 8f0d2b0cdbcf..1c131ee3c48e 100644 --- a/src/test/java/net/sf/jabref/logic/layout/format/RisKeywordsTest.java +++ b/src/test/java/net/sf/jabref/logic/layout/format/RisKeywordsTest.java @@ -1,6 +1,6 @@ package net.sf.jabref.logic.layout.format; -import net.sf.jabref.Globals; +import net.sf.jabref.logic.util.OS; import org.junit.Test; @@ -26,12 +26,12 @@ public void testSingleKeyword() { @Test public void testTwoKeywords() { - assertEquals("KW - abcd" + Globals.NEWLINE + "KW - efg", new RisKeywords().format("abcd, efg")); + assertEquals("KW - abcd" + OS.NEWLINE + "KW - efg", new RisKeywords().format("abcd, efg")); } @Test public void testMultipleKeywords() { - assertEquals("KW - abcd" + Globals.NEWLINE + "KW - efg" + Globals.NEWLINE + "KW - hij" + Globals.NEWLINE + assertEquals("KW - abcd" + OS.NEWLINE + "KW - efg" + OS.NEWLINE + "KW - hij" + OS.NEWLINE + "KW - klm", new RisKeywords().format("abcd, efg, hij, klm")); } } diff --git a/src/test/java/net/sf/jabref/logic/util/strings/StringUtilTest.java b/src/test/java/net/sf/jabref/logic/util/strings/StringUtilTest.java index f0e5a1ac0e3b..85dc3faa6271 100644 --- a/src/test/java/net/sf/jabref/logic/util/strings/StringUtilTest.java +++ b/src/test/java/net/sf/jabref/logic/util/strings/StringUtilTest.java @@ -1,6 +1,7 @@ package net.sf.jabref.logic.util.strings; import net.sf.jabref.Globals; +import net.sf.jabref.logic.util.OS; import net.sf.jabref.model.entry.FileField; import net.sf.jabref.preferences.JabRefPreferences; @@ -33,13 +34,13 @@ public static void loadPreferences() { public void testUnifyLineBreaks() { // Mac < v9 String result = StringUtil.unifyLineBreaksToConfiguredLineBreaks("\r"); - assertEquals(Globals.NEWLINE, result); + assertEquals(OS.NEWLINE, result); // Windows result = StringUtil.unifyLineBreaksToConfiguredLineBreaks("\r\n"); - assertEquals(Globals.NEWLINE, result); + assertEquals(OS.NEWLINE, result); // Unix result = StringUtil.unifyLineBreaksToConfiguredLineBreaks("\n"); - assertEquals(Globals.NEWLINE, result); + assertEquals(OS.NEWLINE, result); } @Test @@ -127,19 +128,19 @@ public void testFindEncodingsForString() { @Test public void testWrap() { - assertEquals("aaaaa" + Globals.NEWLINE + "\tbbbbb" + Globals.NEWLINE + "\tccccc", + assertEquals("aaaaa" + OS.NEWLINE + "\tbbbbb" + OS.NEWLINE + "\tccccc", StringUtil.wrap("aaaaa bbbbb ccccc", 5)); - assertEquals("aaaaa bbbbb" + Globals.NEWLINE + "\tccccc", StringUtil.wrap("aaaaa bbbbb ccccc", 8)); - assertEquals("aaaaa bbbbb" + Globals.NEWLINE + "\tccccc", StringUtil.wrap("aaaaa bbbbb ccccc", 11)); + assertEquals("aaaaa bbbbb" + OS.NEWLINE + "\tccccc", StringUtil.wrap("aaaaa bbbbb ccccc", 8)); + assertEquals("aaaaa bbbbb" + OS.NEWLINE + "\tccccc", StringUtil.wrap("aaaaa bbbbb ccccc", 11)); assertEquals("aaaaa bbbbb ccccc", StringUtil.wrap("aaaaa bbbbb ccccc", 12)); - assertEquals("aaaaa" + Globals.NEWLINE + "\t" + Globals.NEWLINE + "\tbbbbb" + Globals.NEWLINE + "\t" - + Globals.NEWLINE + "\tccccc", StringUtil.wrap("aaaaa\nbbbbb\nccccc", 12)); + assertEquals("aaaaa" + OS.NEWLINE + "\t" + OS.NEWLINE + "\tbbbbb" + OS.NEWLINE + "\t" + + OS.NEWLINE + "\tccccc", StringUtil.wrap("aaaaa\nbbbbb\nccccc", 12)); assertEquals( - "aaaaa" + Globals.NEWLINE + "\t" + Globals.NEWLINE + "\t" + Globals.NEWLINE + "\tbbbbb" - + Globals.NEWLINE + "\t" + Globals.NEWLINE + "\tccccc", + "aaaaa" + OS.NEWLINE + "\t" + OS.NEWLINE + "\t" + OS.NEWLINE + "\tbbbbb" + + OS.NEWLINE + "\t" + OS.NEWLINE + "\tccccc", StringUtil.wrap("aaaaa\n\nbbbbb\nccccc", 12)); - assertEquals("aaaaa" + Globals.NEWLINE + "\t" + Globals.NEWLINE + "\tbbbbb" + Globals.NEWLINE + "\t" - + Globals.NEWLINE + "\tccccc", StringUtil.wrap("aaaaa\r\nbbbbb\r\nccccc", 12)); + assertEquals("aaaaa" + OS.NEWLINE + "\t" + OS.NEWLINE + "\tbbbbb" + OS.NEWLINE + "\t" + + OS.NEWLINE + "\tccccc", StringUtil.wrap("aaaaa\r\nbbbbb\r\nccccc", 12)); } @Test From 7d042f5b7d33f3dfa649c86d370772b4de0edd2a Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Mon, 25 Jul 2016 17:49:00 +0200 Subject: [PATCH 06/12] More field names and a method (#1627) * Introduced FieldName in ArXiV * Some more field names * More field names --- .../java/net/sf/jabref/gui/EntryMarker.java | 42 ++--- .../gui/groups/WarnAssignmentSideEffects.java | 2 +- .../PersistenceTableColumnListener.java | 4 +- .../maintable/SpecialMainTableColumns.java | 3 +- .../sf/jabref/gui/menus/RightClickMenu.java | 3 +- .../jabref/gui/preftabs/TableColumnsTab.java | 4 +- .../net/sf/jabref/importer/OAI2Handler.java | 10 +- .../sf/jabref/importer/fetcher/GVKParser.java | 4 +- .../importer/fileformat/MedlineImporter.java | 2 +- .../fileformat/MedlinePlainImporter.java | 2 +- .../sf/jabref/logic/groups/ExplicitGroup.java | 3 +- .../jabref/logic/importer/fetcher/ArXiv.java | 22 +-- .../net/sf/jabref/logic/mods/MODSEntry.java | 2 +- .../jabref/logic/openoffice/OOBibStyle.java | 4 +- .../net/sf/jabref/logic/util/UpdateField.java | 8 +- .../model/entry/BibLatexEntryTypes.java | 174 +++++++++--------- .../jabref/model/entry/BibtexEntryTypes.java | 4 +- .../net/sf/jabref/model/entry/FieldName.java | 22 ++- .../model/entry/IEEETranEntryTypes.java | 4 +- .../model/entry/InternalBibtexFields.java | 21 +-- .../jabref/preferences/JabRefPreferences.java | 3 +- .../sf/jabref/model/entry/FieldNameTest.java | 20 ++ 22 files changed, 196 insertions(+), 167 deletions(-) create mode 100644 src/test/java/net/sf/jabref/model/entry/FieldNameTest.java diff --git a/src/main/java/net/sf/jabref/gui/EntryMarker.java b/src/main/java/net/sf/jabref/gui/EntryMarker.java index ede302316eb2..337b0c61ac95 100644 --- a/src/main/java/net/sf/jabref/gui/EntryMarker.java +++ b/src/main/java/net/sf/jabref/gui/EntryMarker.java @@ -25,7 +25,7 @@ import net.sf.jabref.gui.undo.UndoableFieldChange; import net.sf.jabref.model.database.BibDatabase; import net.sf.jabref.model.entry.BibEntry; -import net.sf.jabref.model.entry.InternalBibtexFields; +import net.sf.jabref.model.entry.FieldName; import net.sf.jabref.preferences.JabRefPreferences; public class EntryMarker { @@ -43,8 +43,8 @@ public class EntryMarker { public static void markEntry(BibEntry be, int markIncrement, boolean increment, NamedCompound ce) { int prevMarkLevel; String newValue = null; - if (be.hasField(InternalBibtexFields.MARKED)) { - String markerString = be.getFieldOptional(InternalBibtexFields.MARKED).get(); + if (be.hasField(FieldName.MARKED)) { + String markerString = be.getFieldOptional(FieldName.MARKED).get(); int index = markerString.indexOf(Globals.prefs.WRAPPED_USERNAME); if (index >= 0) { // Already marked 1 for this user. @@ -66,17 +66,17 @@ public static void markEntry(BibEntry be, int markIncrement, boolean increment, newValue = Globals.prefs.WRAPPED_USERNAME.substring(0, Globals.prefs.WRAPPED_USERNAME.length() - 1) + ":" + markIncrement + "]"; } - ce.addEdit(new UndoableFieldChange(be, InternalBibtexFields.MARKED, - be.getFieldOptional(InternalBibtexFields.MARKED).orElse(null), newValue)); - be.setField(InternalBibtexFields.MARKED, newValue); + ce.addEdit(new UndoableFieldChange(be, FieldName.MARKED, + be.getFieldOptional(FieldName.MARKED).orElse(null), newValue)); + be.setField(FieldName.MARKED, newValue); } /** * SIDE EFFECT: Unselects given entry */ public static void unmarkEntry(BibEntry be, boolean onlyMaxLevel, BibDatabase database, NamedCompound ce) { - if (be.hasField(InternalBibtexFields.MARKED)) { - String markerString = be.getFieldOptional(InternalBibtexFields.MARKED).get(); + if (be.hasField(FieldName.MARKED)) { + String markerString = be.getFieldOptional(FieldName.MARKED).get(); if ("0".equals(markerString)) { if (!onlyMaxLevel) { unmarkOldStyle(be, database, ce); @@ -128,12 +128,12 @@ public static void unmarkEntry(BibEntry be, boolean onlyMaxLevel, BibDatabase da sb.append(s.substring(piv)); } String newVal = sb.length() > 0 ? sb.toString() : null;*/ - ce.addEdit(new UndoableFieldChange(be, InternalBibtexFields.MARKED, - be.getFieldOptional(InternalBibtexFields.MARKED).get(), newValue)); + ce.addEdit(new UndoableFieldChange(be, FieldName.MARKED, + be.getFieldOptional(FieldName.MARKED).get(), newValue)); if (newValue == null) { - be.clearField(InternalBibtexFields.MARKED); + be.clearField(FieldName.MARKED); } else { - be.setField(InternalBibtexFields.MARKED, newValue); + be.setField(FieldName.MARKED, newValue); } } } @@ -152,7 +152,7 @@ public static void unmarkEntry(BibEntry be, boolean onlyMaxLevel, BibDatabase da private static void unmarkOldStyle(BibEntry be, BibDatabase database, NamedCompound ce) { Set owners = new TreeSet<>(); for (BibEntry entry : database.getEntries()) { - entry.getFieldOptional(InternalBibtexFields.OWNER).ifPresent(owners::add); + entry.getFieldOptional(FieldName.OWNER).ifPresent(owners::add); } owners.remove(Globals.prefs.get(JabRefPreferences.DEFAULT_OWNER)); StringBuilder sb = new StringBuilder(); @@ -163,21 +163,21 @@ private static void unmarkOldStyle(BibEntry be, BibDatabase database, NamedCompo } String newVal = sb.toString(); if (newVal.isEmpty()) { - ce.addEdit(new UndoableFieldChange(be, InternalBibtexFields.MARKED, - be.getFieldOptional(InternalBibtexFields.MARKED).orElse(null), null)); - be.clearField(InternalBibtexFields.MARKED); + ce.addEdit(new UndoableFieldChange(be, FieldName.MARKED, + be.getFieldOptional(FieldName.MARKED).orElse(null), null)); + be.clearField(FieldName.MARKED); } else { - ce.addEdit(new UndoableFieldChange(be, InternalBibtexFields.MARKED, - be.getFieldOptional(InternalBibtexFields.MARKED).orElse(null), newVal)); - be.setField(InternalBibtexFields.MARKED, newVal); + ce.addEdit(new UndoableFieldChange(be, FieldName.MARKED, + be.getFieldOptional(FieldName.MARKED).orElse(null), newVal)); + be.setField(FieldName.MARKED, newVal); } } public static int isMarked(BibEntry be) { - if (!be.hasField(InternalBibtexFields.MARKED)) { + if (!be.hasField(FieldName.MARKED)) { return 0; } - String s = be.getFieldOptional(InternalBibtexFields.MARKED).get(); + String s = be.getFieldOptional(FieldName.MARKED).get(); if ("0".equals(s)) { return 1; } diff --git a/src/main/java/net/sf/jabref/gui/groups/WarnAssignmentSideEffects.java b/src/main/java/net/sf/jabref/gui/groups/WarnAssignmentSideEffects.java index 81406583f3f2..abd6461aec8a 100644 --- a/src/main/java/net/sf/jabref/gui/groups/WarnAssignmentSideEffects.java +++ b/src/main/java/net/sf/jabref/gui/groups/WarnAssignmentSideEffects.java @@ -31,7 +31,7 @@ public static boolean warnAssignmentSideEffects(List groups, Comp if (group instanceof KeywordGroup) { KeywordGroup keywordGroup = (KeywordGroup) group; String field = keywordGroup.getSearchField().toLowerCase(); - if (FieldName.KEYWORDS.equals(field) || "groups".equals(field)) { + if (FieldName.KEYWORDS.equals(field) || FieldName.GROUPS.equals(field)) { continue; // this is not undesired } int len = InternalBibtexFields.numberOfPublicFields(); diff --git a/src/main/java/net/sf/jabref/gui/maintable/PersistenceTableColumnListener.java b/src/main/java/net/sf/jabref/gui/maintable/PersistenceTableColumnListener.java index b7dbbb46e7c2..8dac47f04234 100644 --- a/src/main/java/net/sf/jabref/gui/maintable/PersistenceTableColumnListener.java +++ b/src/main/java/net/sf/jabref/gui/maintable/PersistenceTableColumnListener.java @@ -24,7 +24,7 @@ import javax.swing.event.TableColumnModelListener; import net.sf.jabref.Globals; -import net.sf.jabref.model.entry.InternalBibtexFields; +import net.sf.jabref.model.entry.FieldName; import net.sf.jabref.preferences.JabRefPreferences; /** @@ -68,7 +68,7 @@ private void updateColumnPrefs() { for (int i = 0; i < columnCount; i++) { final String name = mainTable.getColumnName(i); if ((name != null) && !name.isEmpty()) { - if (InternalBibtexFields.NUMBER_COL.equals(name)) { + if (FieldName.NUMBER_COL.equals(name)) { ncWidth = mainTable.getColumnModel().getColumn(i).getWidth(); } else { storedColumns.add(name.toLowerCase()); diff --git a/src/main/java/net/sf/jabref/gui/maintable/SpecialMainTableColumns.java b/src/main/java/net/sf/jabref/gui/maintable/SpecialMainTableColumns.java index 74a0ed39aaac..4e34ea96c992 100644 --- a/src/main/java/net/sf/jabref/gui/maintable/SpecialMainTableColumns.java +++ b/src/main/java/net/sf/jabref/gui/maintable/SpecialMainTableColumns.java @@ -12,7 +12,6 @@ import net.sf.jabref.gui.IconTheme; import net.sf.jabref.model.entry.BibEntry; import net.sf.jabref.model.entry.FieldName; -import net.sf.jabref.model.entry.InternalBibtexFields; import net.sf.jabref.specialfields.Printed; import net.sf.jabref.specialfields.Priority; import net.sf.jabref.specialfields.Quality; @@ -24,7 +23,7 @@ public class SpecialMainTableColumns { - public static final MainTableColumn NUMBER_COL = new MainTableColumn(InternalBibtexFields.NUMBER_COL) { + public static final MainTableColumn NUMBER_COL = new MainTableColumn(FieldName.NUMBER_COL) { @Override public Object getColumnValue(BibEntry entry) { diff --git a/src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java b/src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java index 8103793f7b32..2ddb37ea505a 100644 --- a/src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java +++ b/src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java @@ -40,7 +40,6 @@ import net.sf.jabref.logic.l10n.Localization; import net.sf.jabref.model.entry.BibEntry; import net.sf.jabref.model.entry.FieldName; -import net.sf.jabref.model.entry.InternalBibtexFields; import net.sf.jabref.preferences.JabRefPreferences; import net.sf.jabref.specialfields.Printed; import net.sf.jabref.specialfields.Priority; @@ -108,7 +107,7 @@ public RightClickMenu(JabRefFrame frame, BasePanel panel) { add(markSpecific); add(new GeneralAction(Actions.UNMARK_ENTRIES, Localization.lang("Unmark entries"), IconTheme.JabRefIcon.UNMARK_ENTRIES.getSmallIcon())); } else if (be != null) { - Optional marked = be.getFieldOptional(InternalBibtexFields.MARKED); + Optional marked = be.getFieldOptional(FieldName.MARKED); // We have to check for "" too as the marked field may be empty if ((!marked.isPresent()) || marked.get().isEmpty()) { add(new GeneralAction(Actions.MARK_ENTRIES, Localization.lang("Mark entry"), IconTheme.JabRefIcon.MARK_ENTRIES.getSmallIcon())); diff --git a/src/main/java/net/sf/jabref/gui/preftabs/TableColumnsTab.java b/src/main/java/net/sf/jabref/gui/preftabs/TableColumnsTab.java index 1656291ea6c5..61db7cdde587 100644 --- a/src/main/java/net/sf/jabref/gui/preftabs/TableColumnsTab.java +++ b/src/main/java/net/sf/jabref/gui/preftabs/TableColumnsTab.java @@ -55,7 +55,7 @@ import net.sf.jabref.logic.help.HelpFile; import net.sf.jabref.logic.l10n.Localization; import net.sf.jabref.model.entry.BibtexSingleField; -import net.sf.jabref.model.entry.InternalBibtexFields; +import net.sf.jabref.model.entry.FieldName; import net.sf.jabref.preferences.JabRefPreferences; import net.sf.jabref.specialfields.SpecialFieldsUtils; @@ -175,7 +175,7 @@ public int getColumnCount() { public Object getValueAt(int row, int column) { int internalRow = row; if (internalRow == 0) { - return column == 0 ? InternalBibtexFields.NUMBER_COL : String.valueOf(ncWidth); + return column == 0 ? FieldName.NUMBER_COL : String.valueOf(ncWidth); } internalRow--; if (internalRow >= tableRows.size()) { diff --git a/src/main/java/net/sf/jabref/importer/OAI2Handler.java b/src/main/java/net/sf/jabref/importer/OAI2Handler.java index c292bc108821..c55fa2f67649 100644 --- a/src/main/java/net/sf/jabref/importer/OAI2Handler.java +++ b/src/main/java/net/sf/jabref/importer/OAI2Handler.java @@ -97,17 +97,17 @@ public void endElement(String uri, String localName, String qualifiedName) throw if (!year.isPresent() || year.get().isEmpty()) { entry.setField(FieldName.YEAR, content.replaceFirst("-.*", "")); } - } else if (FieldName.TITLE.equals(qualifiedName)) { + } else if ("title".equals(qualifiedName)) { entry.setField(FieldName.TITLE, content); } else if ("abstract".equals(qualifiedName)) { entry.setField(FieldName.ABSTRACT, content); } else if ("comments".equals(qualifiedName)) { - entry.setField("comments", content); + entry.setField(FieldName.COMMENTS, content); } else if ("report-no".equals(qualifiedName)) { - entry.setField("reportno", content); - } else if(FieldName.DOI.equals(qualifiedName)) { + entry.setField(FieldName.REPORTNO, content); + } else if ("doi".equals(qualifiedName)) { entry.setField(FieldName.DOI, content); - } else if (FieldName.AUTHOR.equals(qualifiedName)) { + } else if ("author".equals(qualifiedName)) { String author = forenames + " " + keyname; if (authors.length() > 0) { authors.append(" and "); diff --git a/src/main/java/net/sf/jabref/importer/fetcher/GVKParser.java b/src/main/java/net/sf/jabref/importer/fetcher/GVKParser.java index 33fd1c18e470..95750e846922 100644 --- a/src/main/java/net/sf/jabref/importer/fetcher/GVKParser.java +++ b/src/main/java/net/sf/jabref/importer/fetcher/GVKParser.java @@ -382,7 +382,7 @@ private BibEntry parseEntry(Element e) { if (subtitle.length() > 1) { newSubtitle.append(subtitle.substring(1)); } - result.setField("subtitle", newSubtitle.toString()); + result.setField(FieldName.SUBTITLE, newSubtitle.toString()); } if (publisher != null) { result.setField(FieldName.PUBLISHER, publisher); @@ -409,7 +409,7 @@ private BibEntry parseEntry(Element e) { result.setField(FieldName.NUMBER, number); } if (pagetotal != null) { - result.setField("pagetotal", pagetotal); + result.setField(FieldName.PAGETOTAL, pagetotal); } if (pages != null) { result.setField(FieldName.PAGES, pages); diff --git a/src/main/java/net/sf/jabref/importer/fileformat/MedlineImporter.java b/src/main/java/net/sf/jabref/importer/fileformat/MedlineImporter.java index 92ff94aa8597..fb85291ac263 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/MedlineImporter.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/MedlineImporter.java @@ -350,7 +350,7 @@ private void parseArticle(PubmedArticle article, List bibItems) { } fields.put("pmid", medlineCitation.getPMID().getContent()); - fields.put("owner", medlineCitation.getOwner()); + fields.put(FieldName.OWNER, medlineCitation.getOwner()); addArticleInformation(fields, medlineCitation.getArticle().getContent()); diff --git a/src/main/java/net/sf/jabref/importer/fileformat/MedlinePlainImporter.java b/src/main/java/net/sf/jabref/importer/fileformat/MedlinePlainImporter.java index 81b34488bde5..2d8881d2fb25 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/MedlinePlainImporter.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/MedlinePlainImporter.java @@ -178,7 +178,7 @@ public ParserResult importDatabase(BufferedReader reader) throws IOException { hashMap.put("STAT", "status"); hashMap.put("SB", "subset"); hashMap.put("OTO", "termowner"); - hashMap.put("OWN", "owner"); + hashMap.put("OWN", FieldName.OWNER); //add the fields to hm for (Map.Entry mapEntry : hashMap.entrySet()) { diff --git a/src/main/java/net/sf/jabref/logic/groups/ExplicitGroup.java b/src/main/java/net/sf/jabref/logic/groups/ExplicitGroup.java index fb0d9b67010e..36552f196f6b 100644 --- a/src/main/java/net/sf/jabref/logic/groups/ExplicitGroup.java +++ b/src/main/java/net/sf/jabref/logic/groups/ExplicitGroup.java @@ -25,6 +25,7 @@ import net.sf.jabref.logic.l10n.Localization; import net.sf.jabref.logic.util.strings.QuotedStringTokenizer; import net.sf.jabref.logic.util.strings.StringUtil; +import net.sf.jabref.model.entry.FieldName; import net.sf.jabref.preferences.JabRefPreferences; import org.apache.commons.logging.Log; @@ -45,7 +46,7 @@ public class ExplicitGroup extends KeywordGroup { public ExplicitGroup(String name, GroupHierarchyType context, JabRefPreferences jabRefPreferences) throws ParseException { - super(name, "groups", name, true, false, context, jabRefPreferences); + super(name, FieldName.GROUPS, name, true, false, context, jabRefPreferences); } public static ExplicitGroup fromString(String s, JabRefPreferences jabRefPreferences) throws ParseException { diff --git a/src/main/java/net/sf/jabref/logic/importer/fetcher/ArXiv.java b/src/main/java/net/sf/jabref/logic/importer/fetcher/ArXiv.java index 684c218a59d6..314cf040c2f2 100644 --- a/src/main/java/net/sf/jabref/logic/importer/fetcher/ArXiv.java +++ b/src/main/java/net/sf/jabref/logic/importer/fetcher/ArXiv.java @@ -79,7 +79,7 @@ public Optional findFullText(BibEntry entry) throws IOException { Objects.requireNonNull(entry); // 1. Eprint - Optional identifier = entry.getFieldOptional("eprint"); + Optional identifier = entry.getFieldOptional(FieldName.EPRINT); if (StringUtil.isNotBlank(identifier)) { try { // Get pdf of entry with the specified id @@ -345,16 +345,16 @@ public Optional getDate() { public BibEntry toBibEntry() { BibEntry bibEntry = new BibEntry(); bibEntry.setType(BibtexEntryTypes.ARTICLE); - bibEntry.setField("eprinttype", "arXiv"); - bibEntry.setField("author", StringUtils.join(authorNames, " and ")); - bibEntry.setField("keywords", StringUtils.join(categories, ", ")); - getId().ifPresent(id -> bibEntry.setField("eprint", id)); - title.ifPresent(title -> bibEntry.setField("title", title)); - doi.ifPresent(doi -> bibEntry.setField("doi", doi)); - abstractText.ifPresent(abstractText -> bibEntry.setField("abstract", abstractText)); - getDate().ifPresent(date -> bibEntry.setField("date", date)); - primaryCategory.ifPresent(category -> bibEntry.setField("eprintclass", category)); - journalReferenceText.ifPresent(journal -> bibEntry.setField("journaltitle", journal)); + bibEntry.setField(FieldName.EPRINTTYPE, "arXiv"); + bibEntry.setField(FieldName.AUTHOR, StringUtils.join(authorNames, " and ")); + bibEntry.addKeywords(categories, ", "); // TODO: Should use separator value from preferences + getId().ifPresent(id -> bibEntry.setField(FieldName.EPRINT, id)); + title.ifPresent(title -> bibEntry.setField(FieldName.TITLE, title)); + doi.ifPresent(doi -> bibEntry.setField(FieldName.DOI, doi)); + abstractText.ifPresent(abstractText -> bibEntry.setField(FieldName.ABSTRACT, abstractText)); + getDate().ifPresent(date -> bibEntry.setField(FieldName.DATE, date)); + primaryCategory.ifPresent(category -> bibEntry.setField(FieldName.EPRINTCLASS, category)); + journalReferenceText.ifPresent(journal -> bibEntry.setField(FieldName.JOURNALTITLE, journal)); getPdfUrl().ifPresent(url -> (new TypedBibEntry(bibEntry, BibDatabaseMode.BIBLATEX)) .setFiles(Collections.singletonList(new ParsedFileField("online", url, "PDF")))); diff --git a/src/main/java/net/sf/jabref/logic/mods/MODSEntry.java b/src/main/java/net/sf/jabref/logic/mods/MODSEntry.java index df6e3748da99..cb6e4fe91ce8 100644 --- a/src/main/java/net/sf/jabref/logic/mods/MODSEntry.java +++ b/src/main/java/net/sf/jabref/logic/mods/MODSEntry.java @@ -115,7 +115,7 @@ private void populateFromBibtex(BibEntry bibtex) { if (bibtex.hasField(BibEntry.KEY_FIELD)) { id = bibtex.getCiteKey(); } - if (bibtex.hasField("place")) { + if (bibtex.hasField("place")) { // TODO: "place" is the MODS version, in BibTeX: "address", BibLaTeX: "location"? if (CHARFORMAT) { place = chars.format(bibtex.getField("place")); } else { diff --git a/src/main/java/net/sf/jabref/logic/openoffice/OOBibStyle.java b/src/main/java/net/sf/jabref/logic/openoffice/OOBibStyle.java index 15065de67644..bbafc74bfad9 100644 --- a/src/main/java/net/sf/jabref/logic/openoffice/OOBibStyle.java +++ b/src/main/java/net/sf/jabref/logic/openoffice/OOBibStyle.java @@ -185,7 +185,7 @@ private void setDefaultProperties() { properties.put(REFERENCE_HEADER_PARAGRAPH_FORMAT, "Heading 1"); // Set default properties for the citation marker: - citProperties.put(AUTHOR_FIELD, "author/editor"); + citProperties.put(AUTHOR_FIELD, FieldName.orFields(FieldName.AUTHOR, FieldName.EDITOR)); citProperties.put(YEAR_FIELD, FieldName.YEAR); citProperties.put(MAX_AUTHORS, 3); citProperties.put(MAX_AUTHORS_FIRST, -1); @@ -724,7 +724,7 @@ private String getAuthorYearInTextMarker(List entries, Map bibs, boolean overwri // Iterate through all entries for (BibEntry curEntry : bibs) { - boolean setOwner = globalSetOwner && (overwriteOwner || (!curEntry.hasField(InternalBibtexFields.OWNER))); + boolean setOwner = globalSetOwner && (overwriteOwner || (!curEntry.hasField(FieldName.OWNER))); boolean setTimeStamp = globalSetTimeStamp && (overwriteTimestamp || (!curEntry.hasField(timeStampField))); setAutomaticFields(curEntry, setOwner, defaultOwner, setTimeStamp, timeStampField, timestamp); } diff --git a/src/main/java/net/sf/jabref/model/entry/BibLatexEntryTypes.java b/src/main/java/net/sf/jabref/model/entry/BibLatexEntryTypes.java index 3f855e0ddf59..1f80474ca80d 100644 --- a/src/main/java/net/sf/jabref/model/entry/BibLatexEntryTypes.java +++ b/src/main/java/net/sf/jabref/model/entry/BibLatexEntryTypes.java @@ -29,15 +29,15 @@ public class BibLatexEntryTypes { public static final BibLatexEntryType ARTICLE = new BibLatexEntryType() { private final List primaryOptionalFields = Collections.unmodifiableList( - Arrays.asList("subtitle", FieldName.EDITOR, FieldName.SERIES, FieldName.VOLUME, FieldName.NUMBER, "eid", FieldName.ISSUE, FieldName.PAGES, + Arrays.asList(FieldName.SUBTITLE, FieldName.EDITOR, FieldName.SERIES, FieldName.VOLUME, FieldName.NUMBER, FieldName.EID, FieldName.ISSUE, FieldName.PAGES, FieldName.NOTE, FieldName.ISSN, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.JOURNALTITLE, "year/date"); - addAllOptional("translator", "annotator", "commentator", "subtitle", "titleaddon", FieldName.EDITOR, "editora", + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.JOURNALTITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional("translator", "annotator", "commentator", FieldName.SUBTITLE, "titleaddon", FieldName.EDITOR, "editora", "editorb", "editorc", "journalsubtitle", "issuetitle", "issuesubtitle", FieldName.LANGUAGE, "origlanguage", - FieldName.SERIES, FieldName.VOLUME, FieldName.NUMBER, "eid", FieldName.ISSUE, FieldName.MONTH, FieldName.PAGES, "version", FieldName.NOTE, FieldName.ISSN, + FieldName.SERIES, FieldName.VOLUME, FieldName.NUMBER, FieldName.EID, FieldName.ISSUE, FieldName.MONTH, FieldName.PAGES, FieldName.VERSION, FieldName.NOTE, FieldName.ISSN, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -56,18 +56,18 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType BOOK = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList(FieldName.EDITOR, "subtitle", "titleaddon", "maintitle", + .unmodifiableList(Arrays.asList(FieldName.EDITOR, FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", FieldName.VOLUME, FieldName.EDITION, FieldName.PUBLISHER, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, - "pagetotal", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, + FieldName.PAGETOTAL, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, "year/date"); + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); addAllOptional(FieldName.EDITOR, "editora", "editorb", "editorc", "translator", "annotator", "commentator", - "introduction", "foreword", "afterword", "subtitle", "titleaddon", "maintitle", "mainsubtitle", + "introduction", "foreword", "afterword", FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", FieldName.LANGUAGE, "origlanguage", FieldName.VOLUME, "part", FieldName.EDITION, "volumes", FieldName.SERIES, - FieldName.NUMBER, FieldName.NOTE, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, "pagetotal", + FieldName.NUMBER, FieldName.NOTE, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -86,14 +86,14 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType MVBOOK = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList(FieldName.EDITOR, "subtitle", "titleaddon", FieldName.EDITION, FieldName.PUBLISHER, FieldName.ISBN, "pagetotal", + .unmodifiableList(Arrays.asList(FieldName.EDITOR, FieldName.SUBTITLE, "titleaddon", FieldName.EDITION, FieldName.PUBLISHER, FieldName.ISBN, FieldName.PAGETOTAL, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, "year/date"); + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); addAllOptional(FieldName.EDITOR, "editora", "editorb", "editorc", "translator", "annotator", "commentator", - "introduction", "foreword", "afterword", "subtitle", "titleaddon", FieldName.LANGUAGE, "origlanguage", - FieldName.EDITION, "volumes", FieldName.SERIES, FieldName.NUMBER, FieldName.NOTE, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.ISBN, "pagetotal", + "introduction", "foreword", "afterword", FieldName.SUBTITLE, "titleaddon", FieldName.LANGUAGE, "origlanguage", + FieldName.EDITION, "volumes", FieldName.SERIES, FieldName.NUMBER, FieldName.NOTE, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.ISBN, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -112,16 +112,16 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType INBOOK = new BibLatexEntryType() { private final List primaryOptionalFields = Collections.unmodifiableList(Arrays - .asList("bookauthor", FieldName.EDITOR, "subtitle", "titleaddon", "maintitle", "mainsubtitle", + .asList("bookauthor", FieldName.EDITOR, FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", "booksubtitle", "booktitleaddon", FieldName.VOLUME, FieldName.EDITION, FieldName.PUBLISHER, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.BOOKTITLE, "year/date"); + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.BOOKTITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); addAllOptional("bookauthor", FieldName.EDITOR, "editora", "editorb", "editorc", "translator", "annotator", - "commentator", "introduction", "foreword", "afterword", "subtitle", "titleaddon", "maintitle", + "commentator", "introduction", "foreword", "afterword", FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", "booksubtitle", "booktitleaddon", FieldName.LANGUAGE, "origlanguage", FieldName.VOLUME, "part", FieldName.EDITION, "volumes", FieldName.SERIES, FieldName.NUMBER, FieldName.NOTE, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, @@ -191,14 +191,14 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType BOOKLET = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("subtitle", "titleaddon", FieldName.HOWPUBLISHED, FieldName.CHAPTER, + .unmodifiableList(Arrays.asList(FieldName.SUBTITLE, "titleaddon", FieldName.HOWPUBLISHED, FieldName.CHAPTER, FieldName.PAGES, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired("author/editor", FieldName.TITLE, "year/date"); - addAllOptional("subtitle", "titleaddon", FieldName.LANGUAGE, FieldName.HOWPUBLISHED, FieldName.TYPE, FieldName.NOTE, FieldName.LOCATION, FieldName.CHAPTER, - FieldName.PAGES, "pagetotal", "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, + addAllRequired(FieldName.orFields(FieldName.AUTHOR, FieldName.EDITOR), FieldName.TITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional(FieldName.SUBTITLE, "titleaddon", FieldName.LANGUAGE, FieldName.HOWPUBLISHED, FieldName.TYPE, FieldName.NOTE, FieldName.LOCATION, FieldName.CHAPTER, + FieldName.PAGES, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -217,17 +217,17 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType COLLECTION = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("translator", "subtitle", "titleaddon", "maintitle", + .unmodifiableList(Arrays.asList("translator", FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", FieldName.VOLUME, FieldName.EDITION, FieldName.PUBLISHER, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.EDITOR, FieldName.TITLE, "year/date"); + addAllRequired(FieldName.EDITOR, FieldName.TITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); addAllOptional("editora", "editorb", "editorc", "translator", "annotator", "commentator", "introduction", - "foreword", "afterword", "subtitle", "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", + "foreword", "afterword", FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", FieldName.LANGUAGE, "origlanguage", FieldName.VOLUME, "part", FieldName.EDITION, "volumes", FieldName.SERIES, FieldName.NUMBER, FieldName.NOTE, - FieldName.PUBLISHER, FieldName.LOCATION, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, "pagetotal", "addendum", "pubstate", FieldName.DOI, + FieldName.PUBLISHER, FieldName.LOCATION, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -245,15 +245,15 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType MVCOLLECTION = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("translator", "subtitle", "titleaddon", FieldName.EDITION, FieldName.PUBLISHER, FieldName.ISBN, + .unmodifiableList(Arrays.asList("translator", FieldName.SUBTITLE, "titleaddon", FieldName.EDITION, FieldName.PUBLISHER, FieldName.ISBN, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.EDITOR, FieldName.TITLE, "year/date"); + addAllRequired(FieldName.EDITOR, FieldName.TITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); addAllOptional("editora", "editorb", "editorc", "translator", "annotator", "commentator", "introduction", - "foreword", "afterword", "subtitle", "titleaddon", FieldName.LANGUAGE, "origlanguage", FieldName.EDITION, "volumes", FieldName.SERIES, FieldName.NUMBER, FieldName.NOTE, - FieldName.PUBLISHER, FieldName.LOCATION, FieldName.ISBN, "pagetotal", "addendum", "pubstate", FieldName.DOI, + "foreword", "afterword", FieldName.SUBTITLE, "titleaddon", FieldName.LANGUAGE, "origlanguage", FieldName.EDITION, "volumes", FieldName.SERIES, FieldName.NUMBER, FieldName.NOTE, + FieldName.PUBLISHER, FieldName.LOCATION, FieldName.ISBN, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -271,16 +271,16 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType INCOLLECTION = new BibLatexEntryType() { private final List primaryOptionalFields = Collections.unmodifiableList( - Arrays.asList("translator", "subtitle", "titleaddon", "maintitle", "mainsubtitle", + Arrays.asList("translator", FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", "booksubtitle", "booktitleaddon", FieldName.VOLUME, FieldName.EDITION, FieldName.PUBLISHER, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.BOOKTITLE, "year/date"); + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.BOOKTITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); addAllOptional(FieldName.EDITOR, "editora", "editorb", "editorc", "translator", "annotator", "commentator", "introduction", - "foreword", "afterword", "subtitle", "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", + "foreword", "afterword", FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", "booksubtitle", "booktitleaddon", FieldName.LANGUAGE, "origlanguage", FieldName.VOLUME, "part", FieldName.EDITION, "volumes", FieldName.SERIES, FieldName.NUMBER, FieldName.NOTE, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, @@ -325,15 +325,15 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType MANUAL = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("subtitle", "titleaddon", FieldName.EDITION, FieldName.PUBLISHER, FieldName.ISBN, + .unmodifiableList(Arrays.asList(FieldName.SUBTITLE, "titleaddon", FieldName.EDITION, FieldName.PUBLISHER, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired("author/editor", FieldName.TITLE, "year/date"); - addAllOptional("subtitle", "titleaddon", FieldName.LANGUAGE, FieldName.EDITION, FieldName.TYPE, FieldName.SERIES, FieldName.NUMBER, "version", - FieldName.NOTE, FieldName.ORGANIZATION, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, "pagetotal", + addAllRequired(FieldName.orFields(FieldName.AUTHOR, FieldName.EDITOR), FieldName.TITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional(FieldName.SUBTITLE, "titleaddon", FieldName.LANGUAGE, FieldName.EDITION, FieldName.TYPE, FieldName.SERIES, FieldName.NUMBER, FieldName.VERSION, + FieldName.NOTE, FieldName.ORGANIZATION, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -352,13 +352,13 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType MISC = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("subtitle", "titleaddon", FieldName.HOWPUBLISHED, FieldName.LOCATION, + .unmodifiableList(Arrays.asList(FieldName.SUBTITLE, "titleaddon", FieldName.HOWPUBLISHED, FieldName.LOCATION, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired("author/editor", FieldName.TITLE, "year/date"); - addAllOptional("subtitle", "titleaddon", FieldName.LANGUAGE, FieldName.HOWPUBLISHED, FieldName.TYPE, "version", FieldName.NOTE, + addAllRequired(FieldName.orFields(FieldName.AUTHOR, FieldName.EDITOR), FieldName.TITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional(FieldName.SUBTITLE, "titleaddon", FieldName.LANGUAGE, FieldName.HOWPUBLISHED, FieldName.TYPE, FieldName.VERSION, FieldName.NOTE, FieldName.ORGANIZATION, FieldName.LOCATION, FieldName.MONTH, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); @@ -378,12 +378,12 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType ONLINE = new BibLatexEntryType() { private final List primaryOptionalFields = Collections.unmodifiableList( - Arrays.asList("subtitle", "titleaddon", FieldName.NOTE, FieldName.ORGANIZATION, FieldName.URLDATE)); + Arrays.asList(FieldName.SUBTITLE, "titleaddon", FieldName.NOTE, FieldName.ORGANIZATION, FieldName.URLDATE)); { - addAllRequired("author/editor", FieldName.TITLE, "year/date", FieldName.URL); - addAllOptional("subtitle", "titleaddon", FieldName.LANGUAGE, "version", FieldName.NOTE, FieldName.ORGANIZATION, FieldName.MONTH, "addendum", "pubstate", FieldName.URLDATE); + addAllRequired(FieldName.orFields(FieldName.AUTHOR, FieldName.EDITOR), FieldName.TITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE), FieldName.URL); + addAllOptional(FieldName.SUBTITLE, "titleaddon", FieldName.LANGUAGE, FieldName.VERSION, FieldName.NOTE, FieldName.ORGANIZATION, FieldName.MONTH, "addendum", "pubstate", FieldName.URLDATE); } @Override @@ -400,13 +400,13 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType PATENT = new BibLatexEntryType() { private final List primaryOptionalFields = Collections.unmodifiableList(Arrays.asList("holder", - "subtitle", "titleaddon", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, + FieldName.SUBTITLE, "titleaddon", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.NUMBER, "year/date"); - addAllOptional("holder", "subtitle", "titleaddon", FieldName.TYPE, "version", FieldName.LOCATION, FieldName.NOTE, FieldName.MONTH, + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.NUMBER, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional("holder", FieldName.SUBTITLE, "titleaddon", FieldName.TYPE, FieldName.VERSION, FieldName.LOCATION, FieldName.NOTE, FieldName.MONTH, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -425,13 +425,13 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType PERIODICAL = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("subtitle", "issuetitle", "issuesubtitle", FieldName.ISSN, FieldName.DOI, + .unmodifiableList(Arrays.asList(FieldName.SUBTITLE, "issuetitle", "issuesubtitle", FieldName.ISSN, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.EDITOR, FieldName.TITLE, "year/date"); - addAllOptional("editora", "editorb", "editorc", "subtitle", "issuetitle", "issuesubtitle", FieldName.LANGUAGE, + addAllRequired(FieldName.EDITOR, FieldName.TITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional("editora", "editorb", "editorc", FieldName.SUBTITLE, "issuetitle", "issuesubtitle", FieldName.LANGUAGE, FieldName.SERIES, FieldName.VOLUME, FieldName.NUMBER, FieldName.ISSUE, FieldName.MONTH, FieldName.NOTE, FieldName.ISSN, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -474,16 +474,16 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType PROCEEDINGS = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("subtitle", "titleaddon", "maintitle", "mainsubtitle", - "maintitleaddon", "eventtitle", FieldName.VOLUME, FieldName.PUBLISHER, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, "pagetotal", + .unmodifiableList(Arrays.asList(FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", + "maintitleaddon", "eventtitle", FieldName.VOLUME, FieldName.PUBLISHER, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, FieldName.PAGETOTAL, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.TITLE, "year/date"); - addAllOptional(FieldName.EDITOR, "subtitle", "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", "eventtitle", + addAllRequired(FieldName.TITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional(FieldName.EDITOR, FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", "eventtitle", "eventtitleaddon", "eventdate", "venue", FieldName.LANGUAGE, FieldName.VOLUME, "part", "volumes", FieldName.SERIES, FieldName.NUMBER, FieldName.NOTE, - FieldName.ORGANIZATION, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.MONTH, FieldName.YEAR, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, "pagetotal", + FieldName.ORGANIZATION, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.MONTH, FieldName.YEAR, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -502,16 +502,16 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType MVPROCEEDINGS = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("subtitle", "titleaddon", "maintitle", "mainsubtitle", - "maintitleaddon", "eventtitle", FieldName.VOLUME, FieldName.PUBLISHER, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, "pagetotal", + .unmodifiableList(Arrays.asList(FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", + "maintitleaddon", "eventtitle", FieldName.VOLUME, FieldName.PUBLISHER, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, FieldName.PAGETOTAL, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.TITLE, "year/date"); - addAllOptional(FieldName.EDITOR, "subtitle", "titleaddon", "eventtitle", + addAllRequired(FieldName.TITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional(FieldName.EDITOR, FieldName.SUBTITLE, "titleaddon", "eventtitle", "eventtitleaddon", "eventdate", "venue", FieldName.LANGUAGE, "volumes", FieldName.SERIES, FieldName.NUMBER, FieldName.NOTE, - FieldName.ORGANIZATION, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.MONTH, FieldName.ISBN, "pagetotal", + FieldName.ORGANIZATION, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.MONTH, FieldName.ISBN, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -530,15 +530,15 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType INPROCEEDINGS = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("subtitle", "titleaddon", "maintitle", "mainsubtitle", + .unmodifiableList(Arrays.asList(FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", "booksubtitle", "booktitleaddon", "eventtitle", FieldName.VOLUME, FieldName.PUBLISHER, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.BOOKTITLE, "year/date"); - addAllOptional(FieldName.EDITOR, "subtitle", "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", "booksubtitle", + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.BOOKTITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional(FieldName.EDITOR, FieldName.SUBTITLE, "titleaddon", "maintitle", "mainsubtitle", "maintitleaddon", "booksubtitle", "booktitleaddon", "eventtitle", "eventtitleaddon", "eventdate", "venue", FieldName.LANGUAGE, FieldName.VOLUME, "part", "volumes", FieldName.SERIES, FieldName.NUMBER, FieldName.NOTE, FieldName.ORGANIZATION, FieldName.PUBLISHER, FieldName.LOCATION, FieldName.MONTH, FieldName.ISBN, FieldName.CHAPTER, FieldName.PAGES, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, @@ -632,15 +632,15 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType REPORT = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("subtitle", "titleaddon", FieldName.NUMBER, "isrn", FieldName.CHAPTER, - FieldName.PAGES, "pagetotal", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, + .unmodifiableList(Arrays.asList(FieldName.SUBTITLE, "titleaddon", FieldName.NUMBER, "isrn", FieldName.CHAPTER, + FieldName.PAGES, FieldName.PAGETOTAL, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.TYPE, FieldName.INSTITUTION, "year/date"); - addAllOptional("subtitle", "titleaddon", FieldName.LANGUAGE, FieldName.NUMBER, "version", FieldName.NOTE, FieldName.LOCATION, FieldName.MONTH, - "isrn", FieldName.CHAPTER, FieldName.PAGES, "pagetotal", "addendum", "pubstate", FieldName.DOI, + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.TYPE, FieldName.INSTITUTION, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional(FieldName.SUBTITLE, "titleaddon", FieldName.LANGUAGE, FieldName.NUMBER, FieldName.VERSION, FieldName.NOTE, FieldName.LOCATION, FieldName.MONTH, + "isrn", FieldName.CHAPTER, FieldName.PAGES, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -670,14 +670,14 @@ public String getName() { public static final BibLatexEntryType THESIS = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("subtitle", "titleaddon", FieldName.CHAPTER, FieldName.PAGES, "pagetotal", + .unmodifiableList(Arrays.asList(FieldName.SUBTITLE, "titleaddon", FieldName.CHAPTER, FieldName.PAGES, FieldName.PAGETOTAL, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.TYPE, FieldName.INSTITUTION, "year/date"); - addAllOptional("subtitle", "titleaddon", FieldName.LANGUAGE, FieldName.NOTE, FieldName.LOCATION, FieldName.MONTH, FieldName.ISBN, FieldName.CHAPTER, - FieldName.PAGES, "pagetotal", "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.TYPE, FieldName.INSTITUTION, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional(FieldName.SUBTITLE, "titleaddon", FieldName.LANGUAGE, FieldName.NOTE, FieldName.LOCATION, FieldName.MONTH, FieldName.ISBN, FieldName.CHAPTER, + FieldName.PAGES, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -696,12 +696,12 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType UNPUBLISHED = new BibLatexEntryType() { private final List primaryOptionalFields = Collections.unmodifiableList( - Arrays.asList("subtitle", "titleaddon", FieldName.HOWPUBLISHED, "pubstate", FieldName.URL, FieldName.URLDATE)); + Arrays.asList(FieldName.SUBTITLE, "titleaddon", FieldName.HOWPUBLISHED, "pubstate", FieldName.URL, FieldName.URLDATE)); { - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, "year/date"); - addAllOptional("subtitle", "titleaddon", FieldName.LANGUAGE, FieldName.HOWPUBLISHED, FieldName.NOTE, FieldName.LOCATION, FieldName.MONTH, + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional(FieldName.SUBTITLE, "titleaddon", FieldName.LANGUAGE, FieldName.HOWPUBLISHED, FieldName.NOTE, FieldName.LOCATION, FieldName.MONTH, "addendum", "pubstate", FieldName.URL, FieldName.URLDATE); } @@ -769,16 +769,16 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType MASTERSTHESIS = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("subtitle", "titleaddon", FieldName.TYPE, FieldName.CHAPTER, FieldName.PAGES, - "pagetotal", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, + .unmodifiableList(Arrays.asList(FieldName.SUBTITLE, "titleaddon", FieldName.TYPE, FieldName.CHAPTER, FieldName.PAGES, + FieldName.PAGETOTAL, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { // Treated as alias of "THESIS", except FieldName.TYPE field is optional - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.INSTITUTION, "year/date"); - addAllOptional(FieldName.TYPE, "subtitle", "titleaddon", FieldName.LANGUAGE, FieldName.NOTE, FieldName.LOCATION, FieldName.MONTH, FieldName.ISBN, FieldName.CHAPTER, - FieldName.PAGES, "pagetotal", "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.INSTITUTION, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional(FieldName.TYPE, FieldName.SUBTITLE, "titleaddon", FieldName.LANGUAGE, FieldName.NOTE, FieldName.LOCATION, FieldName.MONTH, FieldName.ISBN, FieldName.CHAPTER, + FieldName.PAGES, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -797,16 +797,16 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType PHDTHESIS = new BibLatexEntryType() { private final List primaryOptionalFields = Collections - .unmodifiableList(Arrays.asList("subtitle", "titleaddon", FieldName.TYPE, FieldName.CHAPTER, FieldName.PAGES, - "pagetotal", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, + .unmodifiableList(Arrays.asList(FieldName.SUBTITLE, "titleaddon", FieldName.TYPE, FieldName.CHAPTER, FieldName.PAGES, + FieldName.PAGETOTAL, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { // Treated as alias of "THESIS", except FieldName.TYPE field is optional - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.INSTITUTION, "year/date"); - addAllOptional(FieldName.TYPE, "subtitle", "titleaddon", FieldName.LANGUAGE, FieldName.NOTE, FieldName.LOCATION, FieldName.MONTH, FieldName.ISBN, FieldName.CHAPTER, - FieldName.PAGES, "pagetotal", "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.INSTITUTION, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional(FieldName.TYPE, FieldName.SUBTITLE, "titleaddon", FieldName.LANGUAGE, FieldName.NOTE, FieldName.LOCATION, FieldName.MONTH, FieldName.ISBN, FieldName.CHAPTER, + FieldName.PAGES, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } @@ -825,16 +825,16 @@ public List getPrimaryOptionalFields() { public static final BibLatexEntryType TECHREPORT = new BibLatexEntryType() { private final List primaryOptionalFields = Collections.unmodifiableList( - Arrays.asList("subtitle", "titleaddon", FieldName.TYPE, FieldName.NUMBER, "isrn", FieldName.CHAPTER, FieldName.PAGES, - "pagetotal", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, + Arrays.asList(FieldName.SUBTITLE, "titleaddon", FieldName.TYPE, FieldName.NUMBER, "isrn", FieldName.CHAPTER, FieldName.PAGES, + FieldName.PAGETOTAL, FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE)); { // Treated as alias of "REPORT", except FieldName.TYPE field is optional - addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.INSTITUTION, "year/date"); - addAllOptional(FieldName.TYPE, "subtitle", "titleaddon", FieldName.LANGUAGE, FieldName.NUMBER, "version", FieldName.NOTE, FieldName.LOCATION, FieldName.MONTH, - "isrn", FieldName.CHAPTER, FieldName.PAGES, "pagetotal", "addendum", "pubstate", FieldName.DOI, + addAllRequired(FieldName.AUTHOR, FieldName.TITLE, FieldName.INSTITUTION, FieldName.orFields(FieldName.YEAR, FieldName.DATE)); + addAllOptional(FieldName.TYPE, FieldName.SUBTITLE, "titleaddon", FieldName.LANGUAGE, FieldName.NUMBER, FieldName.VERSION, FieldName.NOTE, FieldName.LOCATION, FieldName.MONTH, + "isrn", FieldName.CHAPTER, FieldName.PAGES, FieldName.PAGETOTAL, "addendum", "pubstate", FieldName.DOI, FieldName.EPRINT, FieldName.EPRINTCLASS, FieldName.EPRINTTYPE, FieldName.URL, FieldName.URLDATE); } diff --git a/src/main/java/net/sf/jabref/model/entry/BibtexEntryTypes.java b/src/main/java/net/sf/jabref/model/entry/BibtexEntryTypes.java index 2c490dd787bd..1c7576e8fac5 100644 --- a/src/main/java/net/sf/jabref/model/entry/BibtexEntryTypes.java +++ b/src/main/java/net/sf/jabref/model/entry/BibtexEntryTypes.java @@ -39,7 +39,7 @@ public String getName() { public static final EntryType BOOK = new BibtexEntryType() { { - addAllRequired(FieldName.TITLE, FieldName.PUBLISHER, FieldName.YEAR, "author/editor"); + addAllRequired(FieldName.TITLE, FieldName.PUBLISHER, FieldName.YEAR, FieldName.orFields(FieldName.AUTHOR, FieldName.EDITOR)); addAllOptional(FieldName.VOLUME, FieldName.NUMBER, FieldName.SERIES, FieldName.ADDRESS, FieldName.EDITION, FieldName.MONTH, FieldName.NOTE); } @@ -97,7 +97,7 @@ public String getName() { public static final EntryType INBOOK = new BibtexEntryType() { { - addAllRequired("chapter/pages", FieldName.TITLE, FieldName.PUBLISHER, FieldName.YEAR, "author/editor"); + addAllRequired(FieldName.orFields(FieldName.CHAPTER, FieldName.PAGES), FieldName.TITLE, FieldName.PUBLISHER, FieldName.YEAR, FieldName.orFields(FieldName.AUTHOR, FieldName.EDITOR)); addAllOptional(FieldName.VOLUME, FieldName.NUMBER, FieldName.SERIES, FieldName.TYPE, FieldName.ADDRESS, FieldName.EDITION, FieldName.MONTH, FieldName.NOTE); } diff --git a/src/main/java/net/sf/jabref/model/entry/FieldName.java b/src/main/java/net/sf/jabref/model/entry/FieldName.java index 5e9503c5ccbb..36c4b0522450 100644 --- a/src/main/java/net/sf/jabref/model/entry/FieldName.java +++ b/src/main/java/net/sf/jabref/model/entry/FieldName.java @@ -1,6 +1,5 @@ package net.sf.jabref.model.entry; - public class FieldName { // Character separating field names that are to be used in sequence as @@ -16,11 +15,13 @@ public class FieldName { public static final String AUTHOR = "author"; public static final String BOOKTITLE = "booktitle"; public static final String CHAPTER = "chapter"; + public static final String COMMENTS = "comments"; public static final String CROSSREF = "crossref"; public static final String DATE = "date"; public static final String DOI = "doi"; public static final String EDITION = "edition"; public static final String EDITOR = "editor"; + public static final String EID = "eid"; public static final String EPRINT = "eprint"; public static final String EPRINTCLASS = "eprintclass"; public static final String EPRINTTYPE = "eprinttype"; @@ -42,16 +43,35 @@ public class FieldName { public static final String NUMBER = "number"; public static final String ORGANIZATION = "organization"; public static final String PAGES = "pages"; + public static final String PAGETOTAL = "pagetotal"; public static final String PDF = "pdf"; public static final String PS = "ps"; public static final String PUBLISHER = "publisher"; + public static final String REPORTNO = "reportno"; public static final String REVIEW = "review"; public static final String SCHOOL = "school"; public static final String SERIES = "series"; + public static final String SUBTITLE = "subtitle"; public static final String TITLE = "title"; public static final String TYPE = "type"; public static final String URL = "url"; public static final String URLDATE = "urldate"; + public static final String VERSION = "version"; public static final String VOLUME = "volume"; public static final String YEAR = "year"; + public static final String YEARFILED = "yearfiled"; + + // JabRef internal field names + public static final String OWNER = "owner"; + public static final String TIMESTAMP = "timestamp"; // Not the actual field name, but the default value + public static final String NUMBER_COL = "#"; + public static final String GROUPS = "groups"; + public static final String SEARCH = "__search"; + public static final String GROUPSEARCH = "__groupsearch"; + public static final String MARKED = "__markedentry"; + + public static String orFields(String... fields) { + return String.join(FieldName.FIELD_SEPARATOR, fields); + } + } diff --git a/src/main/java/net/sf/jabref/model/entry/IEEETranEntryTypes.java b/src/main/java/net/sf/jabref/model/entry/IEEETranEntryTypes.java index ab8e809dabe8..e063546bab2b 100644 --- a/src/main/java/net/sf/jabref/model/entry/IEEETranEntryTypes.java +++ b/src/main/java/net/sf/jabref/model/entry/IEEETranEntryTypes.java @@ -77,7 +77,7 @@ public String getName() { public static final EntryType PATENT = new BibtexEntryType() { { - addAllRequired("nationality", FieldName.NUMBER, "year/yearfiled"); + addAllRequired("nationality", FieldName.NUMBER, FieldName.orFields(FieldName.YEAR, FieldName.YEARFILED)); addAllOptional(FieldName.AUTHOR, FieldName.TITLE, FieldName.LANGUAGE, "assignee", FieldName.ADDRESS, FieldName.TYPE, FieldName.NUMBER, "day", "dayfiled", FieldName.MONTH, "monthfiled", FieldName.NOTE, FieldName.URL); } @@ -97,7 +97,7 @@ public String getName() { public static final EntryType STANDARD = new BibtexEntryType() { { - addAllRequired(FieldName.TITLE, "organization/institution"); + addAllRequired(FieldName.TITLE, FieldName.orFields(FieldName.ORGANIZATION, FieldName.INSTITUTION)); addAllOptional(FieldName.AUTHOR, FieldName.LANGUAGE, FieldName.HOWPUBLISHED, FieldName.TYPE, FieldName.NUMBER, "revision", FieldName.ADDRESS, FieldName.MONTH, FieldName.YEAR, FieldName.NOTE, FieldName.URL); } diff --git a/src/main/java/net/sf/jabref/model/entry/InternalBibtexFields.java b/src/main/java/net/sf/jabref/model/entry/InternalBibtexFields.java index c817c44edb02..b5e1b076e516 100644 --- a/src/main/java/net/sf/jabref/model/entry/InternalBibtexFields.java +++ b/src/main/java/net/sf/jabref/model/entry/InternalBibtexFields.java @@ -48,15 +48,6 @@ public class InternalBibtexFields { - // some internal fields - public static final String SEARCH = "__search"; - public static final String GROUPSEARCH = "__groupsearch"; - public static final String MARKED = "__markedentry"; - public static final String OWNER = "owner"; - public static final String TIMESTAMP = "timestamp"; - public static final String NUMBER_COL = "#"; - - // contains all bibtex-field objects (BibtexSingleField) private final Map fieldSet; @@ -182,7 +173,7 @@ private InternalBibtexFields(boolean serializeSpecialFields) { dummy = new BibtexSingleField(FieldName.DOI, true, BibtexSingleField.SMALL_W); dummy.setExtras(EnumSet.of(FieldProperties.DOI)); add(dummy); - add(new BibtexSingleField("eid", true, BibtexSingleField.SMALL_W)); + add(new BibtexSingleField(FieldName.EID, true, BibtexSingleField.SMALL_W)); dummy = new BibtexSingleField(FieldName.DATE, true); dummy.setPrivate(); @@ -213,13 +204,13 @@ private InternalBibtexFields(boolean serializeSpecialFields) { add(dummy); // some internal fields ---------------------------------------------- - dummy = new BibtexSingleField(InternalBibtexFields.NUMBER_COL, false, 32); + dummy = new BibtexSingleField(FieldName.NUMBER_COL, false, 32); dummy.setPrivate(); dummy.setWriteable(false); dummy.setDisplayable(false); add(dummy); - dummy = new BibtexSingleField(InternalBibtexFields.OWNER, false, BibtexSingleField.SMALL_W); + dummy = new BibtexSingleField(FieldName.OWNER, false, BibtexSingleField.SMALL_W); dummy.setExtras(EnumSet.of(FieldProperties.OWNER)); dummy.setPrivate(); add(dummy); @@ -234,19 +225,19 @@ private InternalBibtexFields(boolean serializeSpecialFields) { dummy.setPrivate(); add(dummy); - dummy = new BibtexSingleField(InternalBibtexFields.SEARCH, false); + dummy = new BibtexSingleField(FieldName.SEARCH, false); dummy.setPrivate(); dummy.setWriteable(false); dummy.setDisplayable(false); add(dummy); - dummy = new BibtexSingleField(InternalBibtexFields.GROUPSEARCH, false); + dummy = new BibtexSingleField(FieldName.GROUPSEARCH, false); dummy.setPrivate(); dummy.setWriteable(false); dummy.setDisplayable(false); add(dummy); - dummy = new BibtexSingleField(InternalBibtexFields.MARKED, false); + dummy = new BibtexSingleField(FieldName.MARKED, false); dummy.setPrivate(); dummy.setWriteable(true); // This field must be written to file! dummy.setDisplayable(false); diff --git a/src/main/java/net/sf/jabref/preferences/JabRefPreferences.java b/src/main/java/net/sf/jabref/preferences/JabRefPreferences.java index 5781598f909c..b77717a24158 100644 --- a/src/main/java/net/sf/jabref/preferences/JabRefPreferences.java +++ b/src/main/java/net/sf/jabref/preferences/JabRefPreferences.java @@ -79,7 +79,6 @@ import net.sf.jabref.model.entry.CustomEntryType; import net.sf.jabref.model.entry.EntryUtil; import net.sf.jabref.model.entry.FieldName; -import net.sf.jabref.model.entry.InternalBibtexFields; import net.sf.jabref.specialfields.SpecialFieldsUtils; import org.apache.commons.logging.Log; @@ -782,7 +781,7 @@ private JabRefPreferences() { // default time stamp follows ISO-8601. Reason: https://xkcd.com/1179/ defaults.put(TIME_STAMP_FORMAT, "yyyy-MM-dd"); - defaults.put(TIME_STAMP_FIELD, InternalBibtexFields.TIMESTAMP); + defaults.put(TIME_STAMP_FIELD, FieldName.TIMESTAMP); defaults.put(UPDATE_TIMESTAMP, Boolean.FALSE); defaults.put(GENERATE_KEYS_BEFORE_SAVING, Boolean.FALSE); diff --git a/src/test/java/net/sf/jabref/model/entry/FieldNameTest.java b/src/test/java/net/sf/jabref/model/entry/FieldNameTest.java new file mode 100644 index 000000000000..b2bf965a304a --- /dev/null +++ b/src/test/java/net/sf/jabref/model/entry/FieldNameTest.java @@ -0,0 +1,20 @@ +package net.sf.jabref.model.entry; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + + +public class FieldNameTest { + + @Test + public void testOrFieldsTwoTerms() { + assertEquals("aaa/bbb", FieldName.orFields("aaa", "bbb")); + } + + @Test + public void testOrFieldsThreeTerms() { + assertEquals("aaa/bbb/ccc", FieldName.orFields("aaa", "bbb", "ccc")); + } + +} From 61e9425a59107d52fd719e1d57a47db0e0a74701 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 25 Jul 2016 20:46:08 +0200 Subject: [PATCH 07/12] Cleanup FindFile and asssociated tests (#1596) * Cleanup FindFile and rework it using Streams and nio methods- * Unignore test for trying on CI * Use explicit List and Set in findFiles and caller methods * Use Lazy Stream to find files --- .../net/sf/jabref/external/AutoSetLinks.java | 14 ++- .../sf/jabref/external/ExternalFileTypes.java | 3 +- .../sf/jabref/external/RegExpFileSearch.java | 12 +- .../jabref/external/SynchronizeFileField.java | 2 +- .../java/net/sf/jabref/gui/BasePanel.java | 8 +- .../gui/fieldeditors/FileListEditor.java | 4 +- .../sf/jabref/logic/util/io/FileFinder.java | 52 ++++---- .../net/sf/jabref/logic/util/io/FileUtil.java | 8 +- .../java/net/sf/jabref/FileBasedTestCase.java | 116 ------------------ .../net/sf/jabref/FileBasedTestHelper.java | 78 ------------ .../logic/cleanup/MoveFilesCleanupTest.java | 2 +- .../logic/util/io/FileBasedTestCase.java | 107 ++++++++++++++++ .../sf/jabref/logic/util/io/FileUtilTest.java | 23 ++-- .../logic/util/io/UtilFindFileTest.java | 45 ------- 14 files changed, 169 insertions(+), 305 deletions(-) delete mode 100644 src/test/java/net/sf/jabref/FileBasedTestCase.java delete mode 100644 src/test/java/net/sf/jabref/FileBasedTestHelper.java create mode 100644 src/test/java/net/sf/jabref/logic/util/io/FileBasedTestCase.java delete mode 100644 src/test/java/net/sf/jabref/logic/util/io/UtilFindFileTest.java diff --git a/src/main/java/net/sf/jabref/external/AutoSetLinks.java b/src/main/java/net/sf/jabref/external/AutoSetLinks.java index 64848c282fa8..57fd67e42382 100644 --- a/src/main/java/net/sf/jabref/external/AutoSetLinks.java +++ b/src/main/java/net/sf/jabref/external/AutoSetLinks.java @@ -40,7 +40,7 @@ public class AutoSetLinks { * @param entries the entries for which links should be set * @param databaseContext the database for which links are set */ - public static void autoSetLinks(Collection entries, BibDatabaseContext databaseContext) { + public static void autoSetLinks(List entries, BibDatabaseContext databaseContext) { autoSetLinks(entries, null, null, null, databaseContext, null, null); } @@ -69,7 +69,9 @@ public static void autoSetLinks(Collection entries, BibDatabaseContext * parameter can be null, which means that no progress update will be shown. * @return the thread performing the automatically setting */ - public static Runnable autoSetLinks(final Collection entries, final NamedCompound ce, final Set changedEntries, final FileListTableModel singleTableModel, final BibDatabaseContext databaseContext, final ActionListener callback, final JDialog diag) { + public static Runnable autoSetLinks(final List entries, final NamedCompound ce, + final Set changedEntries, final FileListTableModel singleTableModel, + final BibDatabaseContext databaseContext, final ActionListener callback, final JDialog diag) { final Collection types = ExternalFileTypes.getInstance().getExternalFileTypeSelection(); if (diag != null) { final JProgressBar prog = new JProgressBar(JProgressBar.HORIZONTAL, 0, types.size() - 1); @@ -94,7 +96,7 @@ public void run() { dirs.addAll(dirsS.stream().map(File::new).collect(Collectors.toList())); // determine extensions - Collection extensions = new ArrayList<>(); + List extensions = new ArrayList<>(); for (final ExternalFileType type : types) { extensions.add(type.getExtension()); } @@ -105,7 +107,8 @@ public void run() { String regExp = Globals.prefs.get(JabRefPreferences.REG_EXP_SEARCH_EXPRESSION_KEY); result = RegExpFileSearch.findFilesForSet(entries, extensions, dirs, regExp); } else { - result = FileUtil.findAssociatedFiles(entries, extensions, dirs, Globals.prefs); + boolean autoLinkExactKeyOnly = Globals.prefs.getBoolean(JabRefPreferences.AUTOLINK_EXACT_KEY_ONLY); + result = FileUtil.findAssociatedFiles(entries, extensions, dirs, autoLinkExactKeyOnly); } boolean foundAny = false; @@ -210,7 +213,8 @@ public void run() { * parameter can be null, which means that no progress update will be shown. * @return the runnable able to perform the automatically setting */ - public static Runnable autoSetLinks(final BibEntry entry, final FileListTableModel singleTableModel, final BibDatabaseContext databaseContext, final ActionListener callback, final JDialog diag) { + public static Runnable autoSetLinks(final BibEntry entry, final FileListTableModel singleTableModel, + final BibDatabaseContext databaseContext, final ActionListener callback, final JDialog diag) { return autoSetLinks(Collections.singletonList(entry), null, null, singleTableModel, databaseContext, callback, diag); } diff --git a/src/main/java/net/sf/jabref/external/ExternalFileTypes.java b/src/main/java/net/sf/jabref/external/ExternalFileTypes.java index 8c84ff180470..7b2cdb82c1cc 100644 --- a/src/main/java/net/sf/jabref/external/ExternalFileTypes.java +++ b/src/main/java/net/sf/jabref/external/ExternalFileTypes.java @@ -1,7 +1,6 @@ package net.sf.jabref.external; import java.util.ArrayList; -import java.util.Collection; import java.util.List; import java.util.Optional; import java.util.Set; @@ -104,7 +103,7 @@ public static List getDefaultExternalFileTypes() { return list; } - public Collection getExternalFileTypeSelection() { + public Set getExternalFileTypeSelection() { return externalFileTypes; } diff --git a/src/main/java/net/sf/jabref/external/RegExpFileSearch.java b/src/main/java/net/sf/jabref/external/RegExpFileSearch.java index 7374011a1e4d..37881a8bfe26 100644 --- a/src/main/java/net/sf/jabref/external/RegExpFileSearch.java +++ b/src/main/java/net/sf/jabref/external/RegExpFileSearch.java @@ -19,7 +19,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.LinkedList; @@ -63,8 +62,8 @@ public class RegExpFileSearch { * @param regExp The expression deciding which names are acceptable. * @return A map linking each given entry to a list of files matching the given criteria. */ - public static Map> findFilesForSet(Collection entries, - Collection extensions, List directories, String regExp) { + public static Map> findFilesForSet(List entries, List extensions, + List directories, String regExp) { Map> res = new HashMap<>(); for (BibEntry entry : entries) { @@ -82,8 +81,8 @@ public static Map> findFilesForSet(Collection ent * @param regularExpression The expression deciding which names are acceptable. * @return A list of files paths matching the given criteria. */ - private static List findFiles(BibEntry entry, Collection extensions, - Collection directories, String regularExpression) { + private static List findFiles(BibEntry entry, List extensions, List directories, + String regularExpression) { String extensionRegExp = '(' + String.join("|", extensions) + ')'; @@ -128,8 +127,7 @@ private static List findFiles(BibEntry entry, Collection extension * @return Will return the first file found to match the given criteria or * null if none was found. */ - private static List findFile(BibEntry entry, Collection dirs, String file, - String extensionRegExp) { + private static List findFile(BibEntry entry, List dirs, String file, String extensionRegExp) { List res = new ArrayList<>(); for (File directory : dirs) { res.addAll(findFile(entry, directory.getPath(), file, extensionRegExp)); diff --git a/src/main/java/net/sf/jabref/external/SynchronizeFileField.java b/src/main/java/net/sf/jabref/external/SynchronizeFileField.java index 0a798fb1ab29..10a2a108d07f 100644 --- a/src/main/java/net/sf/jabref/external/SynchronizeFileField.java +++ b/src/main/java/net/sf/jabref/external/SynchronizeFileField.java @@ -132,7 +132,7 @@ public void run() { // First we try to autoset fields if (autoSet) { - Collection entries = new ArrayList<>(sel); + List entries = new ArrayList<>(sel); // Start the automatically setting process: Runnable r = AutoSetLinks.autoSetLinks(entries, ce, changedEntries, null, panel.getBibDatabaseContext(), null, null); diff --git a/src/main/java/net/sf/jabref/gui/BasePanel.java b/src/main/java/net/sf/jabref/gui/BasePanel.java index b8368ce3d799..528860f289e2 100644 --- a/src/main/java/net/sf/jabref/gui/BasePanel.java +++ b/src/main/java/net/sf/jabref/gui/BasePanel.java @@ -38,6 +38,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import java.util.Set; import java.util.TimerTask; import javax.swing.AbstractAction; @@ -2402,9 +2403,9 @@ public Optional searchAndOpen() { of stuff below. It is now disabled by default. */ // see if we can fall back to a filename based on the bibtex key - final Collection entries = Collections.singleton(entry); + final List entries = Collections.singletonList(entry); - final Collection types = ExternalFileTypes.getInstance().getExternalFileTypeSelection(); + final Set types = ExternalFileTypes.getInstance().getExternalFileTypeSelection(); final List dirs = new ArrayList<>(); if (!basePanel.getBibDatabaseContext().getFileDirectory().isEmpty()) { final List mdDirs = basePanel.getBibDatabaseContext().getFileDirectory(); @@ -2423,7 +2424,8 @@ public Optional searchAndOpen() { String regExp = Globals.prefs.get(JabRefPreferences.REG_EXP_SEARCH_EXPRESSION_KEY); result = RegExpFileSearch.findFilesForSet(entries, extensions, dirs, regExp); } else { - result = FileUtil.findAssociatedFiles(entries, extensions, dirs, Globals.prefs); + boolean autoLinkExactKeyOnly = Globals.prefs.getBoolean(JabRefPreferences.AUTOLINK_EXACT_KEY_ONLY); + result = FileUtil.findAssociatedFiles(entries, extensions, dirs, autoLinkExactKeyOnly); } if (result.containsKey(entry)) { final List res = result.get(entry); diff --git a/src/main/java/net/sf/jabref/gui/fieldeditors/FileListEditor.java b/src/main/java/net/sf/jabref/gui/fieldeditors/FileListEditor.java index 5077520a1c72..187f85cba2fa 100644 --- a/src/main/java/net/sf/jabref/gui/fieldeditors/FileListEditor.java +++ b/src/main/java/net/sf/jabref/gui/fieldeditors/FileListEditor.java @@ -29,7 +29,6 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; -import java.util.Collection; import java.util.List; import java.util.Optional; @@ -434,8 +433,7 @@ private boolean editListEntry(FileListEntry entry, boolean openBrowse) { public void autoSetLinks() { auto.setEnabled(false); - Collection entries = new ArrayList<>(); - entries.addAll(frame.getCurrentBasePanel().getSelectedEntries()); + List entries = new ArrayList<>(frame.getCurrentBasePanel().getSelectedEntries()); // filesystem lookup JDialog dialog = new JDialog(frame, true); diff --git a/src/main/java/net/sf/jabref/logic/util/io/FileFinder.java b/src/main/java/net/sf/jabref/logic/util/io/FileFinder.java index 8d2f82d5fe06..b50e7e51aed8 100644 --- a/src/main/java/net/sf/jabref/logic/util/io/FileFinder.java +++ b/src/main/java/net/sf/jabref/logic/util/io/FileFinder.java @@ -1,43 +1,47 @@ package net.sf.jabref.logic.util.io; import java.io.File; -import java.util.Collection; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.attribute.BasicFileAttributes; import java.util.HashSet; +import java.util.List; +import java.util.Objects; import java.util.Set; +import java.util.function.BiPredicate; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; public class FileFinder { - public static Set findFiles(Collection extensions, Collection directories) { - Set result = new HashSet<>(); + private static final Log LOGGER = LogFactory.getLog(FileFinder.class); - for (File directory : directories) { - result.addAll(FileFinder.findFiles(extensions, directory)); - } - return result; - } + public static Set findFiles(List extensions, List directories) { + + Objects.requireNonNull(directories, "Directories must not be null!"); + Objects.requireNonNull(extensions, "Extensions must not be null!"); + + BiPredicate isDirectoryAndContainsExtension = (path, + attr) -> !Files.isDirectory(path) + && extensions.contains(FileUtil.getFileExtension(path.toFile()).orElse("")); - private static Collection findFiles(Collection extensions, File directory) { Set result = new HashSet<>(); + for (File directory : directories) { - File[] children = directory.listFiles(); - if (children == null) { - return result; // No permission? - } + try (Stream files = Files.find(directory.toPath(), Integer.MAX_VALUE, isDirectoryAndContainsExtension) + .map(x -> x.toFile())) { + result.addAll(files.collect(Collectors.toSet())); - for (File child : children) { - if (child.isDirectory()) { - result.addAll(FileFinder.findFiles(extensions, child)); - } else { - FileUtil.getFileExtension(child).ifPresent(extension -> { - if (extensions.contains(extension)) { - result.add(child); - } - }); + } catch (IOException e) { + LOGGER.error("Problem in finding files", e); } } - return result; - } + } } diff --git a/src/main/java/net/sf/jabref/logic/util/io/FileUtil.java b/src/main/java/net/sf/jabref/logic/util/io/FileUtil.java index 73884ea2c929..7640d087f72a 100644 --- a/src/main/java/net/sf/jabref/logic/util/io/FileUtil.java +++ b/src/main/java/net/sf/jabref/logic/util/io/FileUtil.java @@ -24,7 +24,6 @@ import java.io.StringReader; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -317,8 +316,8 @@ private static File shortenFileName(File fileName, String directory) { } } - public static Map> findAssociatedFiles(Collection entries, - Collection extensions, Collection directories, JabRefPreferences prefs) { + public static Map> findAssociatedFiles(List entries, + List extensions, List directories, boolean autolinkExactKeyOnly) { Map> result = new HashMap<>(); // First scan directories @@ -329,7 +328,6 @@ public static Map> findAssociatedFiles(Collection result.put(entry, new ArrayList<>()); } - boolean exactOnly = prefs.getBoolean(JabRefPreferences.AUTOLINK_EXACT_KEY_ONLY); // Now look for keys nextFile: for (File file : filesWithExtension) { @@ -345,7 +343,7 @@ public static Map> findAssociatedFiles(Collection } // If we get here, we didn't find any exact matches. If non-exact // matches are allowed, try to find one: - if (!exactOnly) { + if (!autolinkExactKeyOnly) { for (BibEntry entry : entries) { String citeKey = entry.getCiteKey(); if ((citeKey != null) && !citeKey.isEmpty() && name.startsWith(citeKey)) { diff --git a/src/test/java/net/sf/jabref/FileBasedTestCase.java b/src/test/java/net/sf/jabref/FileBasedTestCase.java deleted file mode 100644 index 90eeefb15afd..000000000000 --- a/src/test/java/net/sf/jabref/FileBasedTestCase.java +++ /dev/null @@ -1,116 +0,0 @@ -package net.sf.jabref; - -import java.io.File; -import java.io.IOException; - -import net.sf.jabref.model.database.BibDatabase; -import net.sf.jabref.model.entry.BibEntry; -import net.sf.jabref.preferences.JabRefPreferences; - -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; - -/** - * A base class for Testing in JabRef that comes along with some useful - * functions. - */ -public class FileBasedTestCase { - - protected BibDatabase database; - protected BibEntry entry; - protected File root; - - private String oldPdfDirectory; - private boolean oldUseRegExp; - private boolean oldAutoLinkExcatKeyOnly; - - - @Before - public void setUp() throws IOException { - Globals.prefs = JabRefPreferences.getInstance(); - oldUseRegExp = Globals.prefs.getBoolean(JabRefPreferences.AUTOLINK_USE_REG_EXP_SEARCH_KEY); - oldAutoLinkExcatKeyOnly = Globals.prefs.getBoolean(JabRefPreferences.AUTOLINK_EXACT_KEY_ONLY); - oldPdfDirectory = Globals.prefs.get("pdfDirectory"); - - Globals.prefs.putBoolean(JabRefPreferences.AUTOLINK_USE_REG_EXP_SEARCH_KEY, false); - Globals.prefs.putBoolean(JabRefPreferences.AUTOLINK_EXACT_KEY_ONLY, false); - - database = BibtexTestData.getBibtexDatabase(); - entry = database.getEntries().iterator().next(); - - root = FileBasedTestHelper.createTempDir("UtilFindFileTest"); - - Assert.assertNotNull(root); - - Globals.prefs.put("pdfDirectory", root.getPath()); - - File subDir1 = new File(root, "Organization Science"); - Assert.assertTrue(subDir1.mkdir()); - - File pdf1 = new File(subDir1, "HipKro03 - Hello.pdf"); - Assert.assertTrue(pdf1.createNewFile()); - - File pdf1a = new File(root, "HipKro03 - Hello.pdf"); - Assert.assertTrue(pdf1a.createNewFile()); - - File subDir2 = new File(root, "pdfs"); - Assert.assertTrue(subDir2.mkdir()); - - File subsubDir1 = new File(subDir2, "sub"); - Assert.assertTrue(subsubDir1.mkdir()); - - File pdf2 = new File(subsubDir1, "HipKro03-sub.pdf"); - Assert.assertTrue(pdf2.createNewFile()); - - File dir2002 = new File(root, "2002"); - Assert.assertTrue(dir2002.mkdir()); - - File dir2003 = new File(root, "2003"); - Assert.assertTrue(dir2003.mkdir()); - - File pdf3 = new File(dir2003, "Paper by HipKro03.pdf"); - Assert.assertTrue(pdf3.createNewFile()); - - File dirTest = new File(root, "test"); - Assert.assertTrue(dirTest.mkdir()); - - File pdf4 = new File(dirTest, "HipKro03.pdf"); - Assert.assertTrue(pdf4.createNewFile()); - - File pdf5 = new File(dirTest, ".TEST"); - Assert.assertTrue(pdf5.createNewFile()); - - File pdf6 = new File(dirTest, "TEST["); - Assert.assertTrue(pdf6.createNewFile()); - - File pdf7 = new File(dirTest, "TE.ST"); - Assert.assertTrue(pdf7.createNewFile()); - - File foo = new File(dirTest, "foo.dat"); - Assert.assertTrue(foo.createNewFile()); - - File graphicsDir = new File(root, "graphicsDir"); - Assert.assertTrue(graphicsDir.mkdir()); - - File graphicsSubDir = new File(graphicsDir, "subDir"); - Assert.assertTrue(graphicsSubDir.mkdir()); - - File jpg = new File(graphicsSubDir, "HipKro03test.jpg"); - Assert.assertTrue(jpg.createNewFile()); - - File png = new File(graphicsSubDir, "HipKro03test.png"); - Assert.assertTrue(png.createNewFile()); - - } - - @After - public void tearDown() { - FileBasedTestHelper.deleteRecursive(root); - Globals.prefs.putBoolean(JabRefPreferences.AUTOLINK_EXACT_KEY_ONLY, oldAutoLinkExcatKeyOnly); - Globals.prefs.putBoolean(JabRefPreferences.AUTOLINK_USE_REG_EXP_SEARCH_KEY, oldUseRegExp); - Globals.prefs.put("pdfDirectory", oldPdfDirectory); - // TODO: This is not a great way to do this, sure ;-) - } - -} diff --git a/src/test/java/net/sf/jabref/FileBasedTestHelper.java b/src/test/java/net/sf/jabref/FileBasedTestHelper.java deleted file mode 100644 index 50cfc4bd83d4..000000000000 --- a/src/test/java/net/sf/jabref/FileBasedTestHelper.java +++ /dev/null @@ -1,78 +0,0 @@ -package net.sf.jabref; - -import java.io.File; - -public class FileBasedTestHelper { - - /** - * Creates a temp directory in the System temp directory. - *

- * Taken from - * http://forum.java.sun.com/thread.jspa?threadID=470197&messageID=2169110 - *

- * Author: jfbriere - * - * @return returns null if directory could not created. - */ - public static File createTempDir(String prefix) { - return createTempDir(prefix, null); - } - - /** - * Creates a temp directory in a given directory. - *

- * Taken from - * http://forum.java.sun.com/thread.jspa?threadID=470197&messageID=2169110 - *

- * Author: jfbriere - * - * @param directory MayBeNull - null indicates that the system tmp directory - * should be used. - * @return returns null if directory could not created. - */ - public static File createTempDir(String prefix, File directory) { - try { - File tempFile = File.createTempFile(prefix, "", directory); - if(tempFile == null) { - return null; - } - - if (!tempFile.delete()) { - return null; - } - if (!tempFile.mkdir()) { - return null; - } - - return tempFile; - - } catch (Exception e) { - return null; - } - } - - /** - * Deletes a directory or file - *

- * Taken from - * http://forum.java.sun.com/thread.jspa?threadID=470197&messageID=2169110 - *

- * Author: jfbriere - * - * @param file - */ - public static void deleteRecursive(File file) { - if (file.isDirectory()) { - File[] fileArray = file.listFiles(); - - if (fileArray != null) { - for (File aFileArray : fileArray) { - deleteRecursive(aFileArray); - } - } - } - if (!file.delete()) { - System.err.println("Cannot delete file"); - } - } -} diff --git a/src/test/java/net/sf/jabref/logic/cleanup/MoveFilesCleanupTest.java b/src/test/java/net/sf/jabref/logic/cleanup/MoveFilesCleanupTest.java index 4962fc3d1731..071969e2ebd6 100644 --- a/src/test/java/net/sf/jabref/logic/cleanup/MoveFilesCleanupTest.java +++ b/src/test/java/net/sf/jabref/logic/cleanup/MoveFilesCleanupTest.java @@ -69,7 +69,7 @@ public void movesFileFromSubfolder() throws IOException { public void movesFileFromSubfolderMultiple() throws IOException { File subfolder = bibFolder.newFolder(); File fileBefore = new File(subfolder, "test.pdf"); - assertTrue(fileBefore.createNewFile());; + assertTrue(fileBefore.createNewFile()); assertTrue(fileBefore.exists()); BibEntry entry = new BibEntry(); diff --git a/src/test/java/net/sf/jabref/logic/util/io/FileBasedTestCase.java b/src/test/java/net/sf/jabref/logic/util/io/FileBasedTestCase.java new file mode 100644 index 000000000000..de2428871513 --- /dev/null +++ b/src/test/java/net/sf/jabref/logic/util/io/FileBasedTestCase.java @@ -0,0 +1,107 @@ +package net.sf.jabref.logic.util.io; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import net.sf.jabref.BibtexTestData; +import net.sf.jabref.Globals; +import net.sf.jabref.model.database.BibDatabase; +import net.sf.jabref.model.entry.BibEntry; +import net.sf.jabref.preferences.JabRefPreferences; + +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; + +public class FileBasedTestCase { + + private BibEntry entry; + private Path rootDir; + + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(); + + + @Before + public void setUp() throws IOException { + Globals.prefs = mock(JabRefPreferences.class); + + BibDatabase database = BibtexTestData.getBibtexDatabase(); + entry = database.getEntries().iterator().next(); + + rootDir = temporaryFolder.getRoot().toPath(); + + Path subDir = Files.createDirectory(rootDir.resolve("Organization Science")); + Path pdfSubDir = Files.createDirectory(rootDir.resolve("pdfs")); + + Files.createFile(subDir.resolve("HipKro03 - Hello.pdf")); + Files.createFile(rootDir.resolve("HipKro03 - Hello.pdf")); + + Path pdfSubSubDir = Files.createDirectory(pdfSubDir.resolve("sub")); + Files.createFile(pdfSubSubDir.resolve("HipKro03-sub.pdf")); + + Files.createDirectory(rootDir.resolve("2002")); + Path dir2003 = Files.createDirectory(rootDir.resolve("2003")); + Files.createFile(dir2003.resolve("Paper by HipKro03.pdf")); + + Path dirTest = Files.createDirectory(rootDir.resolve("test")); + Files.createFile(dirTest.resolve(".TEST")); + Files.createFile(dirTest.resolve("TEST[")); + Files.createFile(dirTest.resolve("TE.ST")); + Files.createFile(dirTest.resolve("foo.dat")); + + Path graphicsDir = Files.createDirectory(rootDir.resolve("graphicsDir")); + Path graphicsSubDir = Files.createDirectories(graphicsDir.resolve("subDir")); + + Files.createFile(graphicsSubDir.resolve("HipKro03test.jpg")); + Files.createFile(graphicsSubDir.resolve("HipKro03test.png")); + + } + + @Test + public void testFindAssociatedFiles() { + + List entries = Collections.singletonList(entry); + List extensions = Arrays.asList("jpg", "pdf"); + List dirs = Arrays.asList(rootDir.resolve("graphicsDir").toFile(), rootDir.resolve("pdfs").toFile()); + + Map> results = FileUtil.findAssociatedFiles(entries, extensions, dirs, false); + + assertEquals(2, results.get(entry).size()); + assertTrue(results.get(entry) + .contains(rootDir.resolve(Paths.get("graphicsDir", "subDir", "HipKro03test.jpg")).toFile())); + assertFalse(results.get(entry) + .contains(rootDir.resolve(Paths.get("graphicsDir", "subDir", "HipKro03test.png")).toFile())); + assertTrue(results.get(entry).contains(rootDir.resolve(Paths.get("pdfs", "sub", "HipKro03-sub.pdf")).toFile())); + } + + @Test + public void testFindFilesException() { + List extensions = Arrays.asList("jpg", "pdf"); + List dirs = Arrays.asList(rootDir.resolve("asdfasdf/asdfasdf").toFile()); + Set results = FileFinder.findFiles(extensions, dirs); + + assertEquals(Collections.emptySet(), results); + } + + @Test(expected = NullPointerException.class) + public void testFindFilesNullPointerException() { + + FileFinder.findFiles(null, null); + } + +} diff --git a/src/test/java/net/sf/jabref/logic/util/io/FileUtilTest.java b/src/test/java/net/sf/jabref/logic/util/io/FileUtilTest.java index c4af6d4784d9..996a12823f1a 100644 --- a/src/test/java/net/sf/jabref/logic/util/io/FileUtilTest.java +++ b/src/test/java/net/sf/jabref/logic/util/io/FileUtilTest.java @@ -20,6 +20,7 @@ import static org.mockito.Mockito.when; public class FileUtilTest { + @Before public void setUp() { Globals.prefs = mock(JabRefPreferences.class); @@ -34,7 +35,8 @@ public void tearDown() { @Test public void testGetLinkedFileNameDefault() { // bibkey - title - when(Globals.prefs.get(JabRefPreferences.PREF_IMPORT_FILENAMEPATTERN)).thenReturn("\\bibtexkey\\begin{title} - \\format[RemoveBrackets]{\\title}\\end{title}"); + when(Globals.prefs.get(JabRefPreferences.PREF_IMPORT_FILENAMEPATTERN)) + .thenReturn("\\bibtexkey\\begin{title} - \\format[RemoveBrackets]{\\title}\\end{title}"); BibEntry entry = new BibEntry(); entry.setCiteKey("1234"); @@ -109,20 +111,12 @@ public void testGetFileExtensionNoExtension2String() { @Test public void uniquePathSubstrings() { - String[] pathArr = { - Paths.get("C:/uniquefile.bib").toString(), - Paths.get("C:/downloads/filename.bib").toString(), - Paths.get("C:/mypaper/bib/filename.bib").toString(), - Paths.get("C:/external/mypaper/bib/filename.bib").toString(), - "" - }; - String[] uniqArr = { - Paths.get("uniquefile.bib").toString(), - Paths.get("downloads/filename.bib").toString(), + String[] pathArr = {Paths.get("C:/uniquefile.bib").toString(), + Paths.get("C:/downloads/filename.bib").toString(), Paths.get("C:/mypaper/bib/filename.bib").toString(), + Paths.get("C:/external/mypaper/bib/filename.bib").toString(), ""}; + String[] uniqArr = {Paths.get("uniquefile.bib").toString(), Paths.get("downloads/filename.bib").toString(), Paths.get("C:/mypaper/bib/filename.bib").toString(), - Paths.get("external/mypaper/bib/filename.bib").toString(), - "" - }; + Paths.get("external/mypaper/bib/filename.bib").toString(), ""}; List paths = Arrays.asList(pathArr); List uniqPath = Arrays.asList(uniqArr); @@ -130,5 +124,4 @@ public void uniquePathSubstrings() { assertEquals(uniqPath, result); } - } diff --git a/src/test/java/net/sf/jabref/logic/util/io/UtilFindFileTest.java b/src/test/java/net/sf/jabref/logic/util/io/UtilFindFileTest.java deleted file mode 100644 index b383ed53a5a4..000000000000 --- a/src/test/java/net/sf/jabref/logic/util/io/UtilFindFileTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.sf.jabref.logic.util.io; - -import java.io.File; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import net.sf.jabref.FileBasedTestCase; -import net.sf.jabref.Globals; -import net.sf.jabref.model.entry.BibEntry; - -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Testing Util.findFile for finding files based on regular expressions. - * - * @author Christopher Oezbek - */ -public class UtilFindFileTest extends FileBasedTestCase { - - - @Test - @Ignore(value = "works on windows but not on linux") - public void testFindAssociatedFiles() { - Collection entries = Collections.singletonList(entry); - Collection extensions = Arrays.asList("jpg", "pdf"); - Collection dirs = Arrays.asList(new File(root.getAbsoluteFile() + "/pdfs/"), - new File(root.getAbsoluteFile() + "/graphicsDir/")); - - Map> results = FileUtil.findAssociatedFiles(entries, extensions, dirs, Globals.prefs); - - Assert.assertEquals(2, results.get(entry).size()); - Assert.assertTrue( - results.get(entry).contains(new File(root.getAbsoluteFile() + "/graphicsDir/subDir/HipKro03test.jpg"))); - Assert.assertFalse( - results.get(entry).contains(new File(root.getAbsoluteFile() + "/graphicsDir/subDir/HipKro03test.png"))); - Assert.assertTrue(results.get(entry).contains(new File(root.getAbsoluteFile() + "/pdfs/sub/HipKro03-sub.pdf"))); - } - - -} From 294318b7183a04719df9af290dc838fddfc1ae19 Mon Sep 17 00:00:00 2001 From: Matthias Geiger Date: Tue, 26 Jul 2016 09:27:02 +0200 Subject: [PATCH 08/12] changes should be tested manually --- .github/PULL_REQUEST_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 91b9058ff7e4..a9e02da0b66e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,3 +3,4 @@ - [ ] Change in CHANGELOG.md described - [ ] Tests created for changes - [ ] Screenshots added (for bigger UI changes) +- [ ] Manually tested changed features in running JabRef From be338d9ba330db41d65d410378d9f97393a84db5 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Tue, 26 Jul 2016 10:01:23 +0200 Subject: [PATCH 09/12] Some enhancements and cleanups related to dates (#1575) * Some enhancements and cleanups related to dates * Fixed some time zone issues * Replaced SimpleDateFormat in ZipFileChooser and replaced arrays with Lists * Changed EasyDateFormat constructors * Fixed stupid mistake * Added CHANGELOG entry * Maybe tests are passing now? * Some server side print debugging... * As it should be * Tryng LocalDateTime * No time zone * Added test for Cookie * Fixed imports... * Added a third possible date format as it turns out that the server changed while developing this PR --- CHANGELOG.md | 1 + .../java/net/sf/jabref/gui/BasePanel.java | 8 ++-- .../sf/jabref/gui/ImportInspectionDialog.java | 2 +- .../sf/jabref/gui/date/DatePickerButton.java | 12 ++++- .../jabref/gui/entryeditor/EntryEditor.java | 10 ++--- .../gui/entryeditor/FieldExtraComponents.java | 7 +-- .../gui/plaintextimport/TextInputDialog.java | 2 +- .../sf/jabref/gui/preftabs/GeneralTab.java | 4 +- .../jabref/importer/AppendDatabaseAction.java | 2 +- .../jabref/importer/EntryFromPDFCreator.java | 7 +-- .../sf/jabref/importer/ImportMenuItem.java | 2 +- .../sf/jabref/importer/ZipFileChooser.java | 30 ++++++++----- .../logic/layout/format/CurrentDate.java | 10 ++--- .../java/net/sf/jabref/logic/net/Cookie.java | 45 +++++++++---------- .../net/sf/jabref/logic/util/UpdateField.java | 29 ++++++------ .../logic/util/date/EasyDateFormat.java | 42 +++++++++++++---- .../sf/jabref/logic/util/date/TimeStamp.java | 18 +++----- .../jabref/model/entry/FieldProperties.java | 3 +- .../model/entry/InternalBibtexFields.java | 4 +- .../net/sf/jabref/pdfimport/PdfImporter.java | 2 +- .../net/sf/jabref/logic/net/CookieTest.java | 40 +++++++++++++++++ 21 files changed, 178 insertions(+), 102 deletions(-) create mode 100644 src/test/java/net/sf/jabref/logic/net/CookieTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index c039bd619983..369d29a3f240 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - Fixed [#1527](https://github.com/JabRef/jabref/issues/1527): 'Get BibTeX data from DOI' Removes Marking - Fixed [#1592](https://github.com/JabRef/jabref/issues/1592): LibreOffice: wrong numbers in citation labels - Fixed [#1321](https://github.com/JabRef/jabref/issues/1321): LaTeX commands in fields not displayed in the list of references +- Date fields in the BibLatex standard are now always formatted in the correct way, independent of the preferences ### Removed - It is not longer possible to choose to convert HTML sub- and superscripts to equations diff --git a/src/main/java/net/sf/jabref/gui/BasePanel.java b/src/main/java/net/sf/jabref/gui/BasePanel.java index 528860f289e2..6befb7969093 100644 --- a/src/main/java/net/sf/jabref/gui/BasePanel.java +++ b/src/main/java/net/sf/jabref/gui/BasePanel.java @@ -701,7 +701,7 @@ public void update() { tidialog.setVisible(true); if (tidialog.okPressed()) { - UpdateField.setAutomaticFields(Collections.singletonList(bibEntry), false, false); + UpdateField.setAutomaticFields(Collections.singletonList(bibEntry), false, false, Globals.prefs); insertEntry(bibEntry); } }); @@ -899,7 +899,7 @@ private void paste() { firstBE = be; } UpdateField.setAutomaticFields(be, Globals.prefs.getBoolean(JabRefPreferences.OVERWRITE_OWNER), - Globals.prefs.getBoolean(JabRefPreferences.OVERWRITE_TIME_STAMP)); + Globals.prefs.getBoolean(JabRefPreferences.OVERWRITE_TIME_STAMP), Globals.prefs); // We have to clone the // entries, since the pasted @@ -1224,7 +1224,7 @@ public BibEntry newEntry(EntryType type) { // Set owner/timestamp if options are enabled: List list = new ArrayList<>(); list.add(be); - UpdateField.setAutomaticFields(list, true, true); + UpdateField.setAutomaticFields(list, true, true, Globals.prefs); // Create an UndoableInsertEntry object. getUndoManager().addEdit(new UndoableInsertEntry(database, be, BasePanel.this)); @@ -1373,7 +1373,7 @@ public void insertEntry(final BibEntry bibEntry) { database.insertEntry(bibEntry); if (Globals.prefs.getBoolean(JabRefPreferences.USE_OWNER)) { // Set owner field to default value - UpdateField.setAutomaticFields(bibEntry, true, true); + UpdateField.setAutomaticFields(bibEntry, true, true, Globals.prefs); } // Create an UndoableInsertEntry object. getUndoManager().addEdit(new UndoableInsertEntry(database, bibEntry, BasePanel.this)); diff --git a/src/main/java/net/sf/jabref/gui/ImportInspectionDialog.java b/src/main/java/net/sf/jabref/gui/ImportInspectionDialog.java index 33e1ed435286..a026e7363c37 100644 --- a/src/main/java/net/sf/jabref/gui/ImportInspectionDialog.java +++ b/src/main/java/net/sf/jabref/gui/ImportInspectionDialog.java @@ -707,7 +707,7 @@ private void addSelectedEntries(NamedCompound ce, final List selected) // Set owner/timestamp if options are enabled: UpdateField.setAutomaticFields(selected, Globals.prefs.getBoolean(JabRefPreferences.OVERWRITE_OWNER), - Globals.prefs.getBoolean(JabRefPreferences.OVERWRITE_TIME_STAMP)); + Globals.prefs.getBoolean(JabRefPreferences.OVERWRITE_TIME_STAMP), Globals.prefs); // Mark entries if we should if (EntryMarker.shouldMarkEntries()) { diff --git a/src/main/java/net/sf/jabref/gui/date/DatePickerButton.java b/src/main/java/net/sf/jabref/gui/date/DatePickerButton.java index 7752a1ac6bca..d83123de2333 100644 --- a/src/main/java/net/sf/jabref/gui/date/DatePickerButton.java +++ b/src/main/java/net/sf/jabref/gui/date/DatePickerButton.java @@ -1,4 +1,5 @@ /* Copyright (C) 2003-2011 Raik Nagel + * 2016 JabRef Contributors This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -26,6 +27,7 @@ import javax.swing.JComponent; import javax.swing.JPanel; +import net.sf.jabref.Globals; import net.sf.jabref.gui.fieldeditors.FieldEditor; import net.sf.jabref.gui.util.FocusRequester; import net.sf.jabref.logic.util.date.EasyDateFormat; @@ -37,9 +39,11 @@ public class DatePickerButton implements ActionListener { private final DatePicker datePicker = new DatePicker(); private final JPanel panel = new JPanel(); private final FieldEditor editor; + private final boolean isoFormat; - public DatePickerButton(FieldEditor pEditor) { + public DatePickerButton(FieldEditor pEditor, Boolean isoFormat) { + this.isoFormat = isoFormat; datePicker.showButtonOnly(true); datePicker.addActionListener(this); datePicker.setShowTodayButton(true); @@ -52,7 +56,11 @@ public DatePickerButton(FieldEditor pEditor) { public void actionPerformed(ActionEvent e) { Date date = datePicker.getDate(); if (date != null) { - editor.setText(new EasyDateFormat().getDateAt(date)); + if (isoFormat) { + editor.setText(EasyDateFormat.isoDateFormat().getDateAt(date)); + } else { + editor.setText(EasyDateFormat.fromPreferences(Globals.prefs).getDateAt(date)); + } // Set focus to editor component after changing its text: new FocusRequester(editor.getTextComponent()); } diff --git a/src/main/java/net/sf/jabref/gui/entryeditor/EntryEditor.java b/src/main/java/net/sf/jabref/gui/entryeditor/EntryEditor.java index a1baa112a4bc..bdf8892c747a 100644 --- a/src/main/java/net/sf/jabref/gui/entryeditor/EntryEditor.java +++ b/src/main/java/net/sf/jabref/gui/entryeditor/EntryEditor.java @@ -503,7 +503,7 @@ public Optional getExtra(final FieldEditor editor) { || fieldExtras.contains(FieldProperties.DATE)) { // double click AND datefield => insert the current date (today) return FieldExtraComponents.getDateTimeExtraComponent(editor, - fieldExtras.contains(FieldProperties.DATE)); + fieldExtras.contains(FieldProperties.DATE), fieldExtras.contains(FieldProperties.ISO_DATE)); } else if (fieldExtras.contains(FieldProperties.EXTERNAL)) { return FieldExtraComponents.getExternalExtraComponent(panel, editor); } else if (fieldExtras.contains(FieldProperties.JOURNAL_NAME)) { @@ -1126,10 +1126,10 @@ public void actionPerformed(ActionEvent event) { // Add an UndoableKeyChange to the baseframe's undoManager. UndoableKeyChange undoableKeyChange = new UndoableKeyChange(panel.getDatabase(), entry, oldValue, newValue); - if (TimeStamp.updateTimeStampIsSet()) { + if (TimeStamp.updateTimeStampIsSet(Globals.prefs)) { NamedCompound ce = new NamedCompound(undoableKeyChange.getPresentationName()); ce.addEdit(undoableKeyChange); - TimeStamp.doUpdateTimeStamp(entry) + TimeStamp.doUpdateTimeStamp(entry, Globals.prefs) .ifPresent(fieldChange -> ce.addEdit(new UndoableFieldChange(fieldChange))); ce.end(); panel.getUndoManager().addEdit(ce); @@ -1194,11 +1194,11 @@ public void actionPerformed(ActionEvent event) { // Add an UndoableFieldChange to the baseframe's undoManager. UndoableFieldChange undoableFieldChange = new UndoableFieldChange(entry, fieldEditor.getFieldName(), oldValue, toSet); - if (TimeStamp.updateTimeStampIsSet()) { + if (TimeStamp.updateTimeStampIsSet(Globals.prefs)) { NamedCompound ce = new NamedCompound(undoableFieldChange.getPresentationName()); ce.addEdit(undoableFieldChange); - TimeStamp.doUpdateTimeStamp(entry) + TimeStamp.doUpdateTimeStamp(entry, Globals.prefs) .ifPresent(fieldChange -> ce.addEdit(new UndoableFieldChange(fieldChange))); ce.end(); diff --git a/src/main/java/net/sf/jabref/gui/entryeditor/FieldExtraComponents.java b/src/main/java/net/sf/jabref/gui/entryeditor/FieldExtraComponents.java index f12a5804ea03..78cc26cfdea7 100644 --- a/src/main/java/net/sf/jabref/gui/entryeditor/FieldExtraComponents.java +++ b/src/main/java/net/sf/jabref/gui/entryeditor/FieldExtraComponents.java @@ -349,13 +349,14 @@ public static Optional getSelectorExtraComponent(JabRefFrame frame, * @param isDatePicker * @return */ - public static Optional getDateTimeExtraComponent(FieldEditor editor, Boolean isDatePicker) { + public static Optional getDateTimeExtraComponent(FieldEditor editor, Boolean isDatePicker, + Boolean isoFormat) { ((JTextArea) editor).addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) {// double click - String date = new EasyDateFormat().getCurrentDate(); + String date = EasyDateFormat.isoDateFormat().getCurrentDate(); editor.setText(date); } } @@ -363,7 +364,7 @@ public void mouseClicked(MouseEvent e) { // insert a datepicker, if the extras field contains this command if (isDatePicker) { - DatePickerButton datePicker = new DatePickerButton(editor); + DatePickerButton datePicker = new DatePickerButton(editor, isoFormat); return Optional.of(datePicker.getDatePicker()); } else { return Optional.empty(); diff --git a/src/main/java/net/sf/jabref/gui/plaintextimport/TextInputDialog.java b/src/main/java/net/sf/jabref/gui/plaintextimport/TextInputDialog.java index 1626c5f72ffa..c07c3606bdd2 100644 --- a/src/main/java/net/sf/jabref/gui/plaintextimport/TextInputDialog.java +++ b/src/main/java/net/sf/jabref/gui/plaintextimport/TextInputDialog.java @@ -522,7 +522,7 @@ private boolean parseWithFreeCiteAndAddEntries() { if (importedEntries.isEmpty()) { return false; } else { - UpdateField.setAutomaticFields(importedEntries, false, false); + UpdateField.setAutomaticFields(importedEntries, false, false, Globals.prefs); boolean markEntries = EntryMarker.shouldMarkEntries(); for (BibEntry e : importedEntries) { diff --git a/src/main/java/net/sf/jabref/gui/preftabs/GeneralTab.java b/src/main/java/net/sf/jabref/gui/preftabs/GeneralTab.java index 99284d2b1862..8418c326d047 100644 --- a/src/main/java/net/sf/jabref/gui/preftabs/GeneralTab.java +++ b/src/main/java/net/sf/jabref/gui/preftabs/GeneralTab.java @@ -18,7 +18,7 @@ import java.awt.BorderLayout; import java.awt.Component; import java.nio.charset.Charset; -import java.text.SimpleDateFormat; +import java.time.format.DateTimeFormatter; import javax.swing.BorderFactory; import javax.swing.DefaultComboBoxModel; @@ -278,7 +278,7 @@ public void storeSettings() { public boolean validateSettings() { try { // Test if date format is legal: - new SimpleDateFormat(timeStampFormat.getText()); + DateTimeFormatter.ofPattern(timeStampFormat.getText()); } catch (IllegalArgumentException ex2) { JOptionPane.showMessageDialog diff --git a/src/main/java/net/sf/jabref/importer/AppendDatabaseAction.java b/src/main/java/net/sf/jabref/importer/AppendDatabaseAction.java index 61b8c67cd425..4913fed9b490 100644 --- a/src/main/java/net/sf/jabref/importer/AppendDatabaseAction.java +++ b/src/main/java/net/sf/jabref/importer/AppendDatabaseAction.java @@ -142,7 +142,7 @@ private static void mergeFromBibtex(JabRefFrame frame, BasePanel panel, ParserRe for (BibEntry originalEntry : fromDatabase.getEntries()) { BibEntry be = (BibEntry) originalEntry.clone(); be.setId(IdGenerator.next()); - UpdateField.setAutomaticFields(be, overwriteOwner, overwriteTimeStamp); + UpdateField.setAutomaticFields(be, overwriteOwner, overwriteTimeStamp, Globals.prefs); database.insertEntry(be); appendedEntries.add(be); originalEntries.add(originalEntry); diff --git a/src/main/java/net/sf/jabref/importer/EntryFromPDFCreator.java b/src/main/java/net/sf/jabref/importer/EntryFromPDFCreator.java index 83da99a92f8b..d47c35e31b5b 100644 --- a/src/main/java/net/sf/jabref/importer/EntryFromPDFCreator.java +++ b/src/main/java/net/sf/jabref/importer/EntryFromPDFCreator.java @@ -2,7 +2,8 @@ import java.io.File; import java.io.IOException; -import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; import java.util.Calendar; import java.util.List; import java.util.Optional; @@ -95,8 +96,8 @@ private void addEntryDataFromPDDocumentInformation(File pdfFile, BibEntry entry) Calendar creationDate = pdfDocInfo.getCreationDate(); if (creationDate != null) { // default time stamp follows ISO-8601. Reason: https://xkcd.com/1179/ - String date = new SimpleDateFormat("yyyy-MM-dd") - .format(creationDate.getTime()); + String date = LocalDate.of(creationDate.YEAR, creationDate.MONTH + 1, creationDate.DAY_OF_MONTH) + .format(DateTimeFormatter.ISO_LOCAL_DATE); appendToField(entry, Globals.prefs.get(JabRefPreferences.TIME_STAMP_FIELD), date); } diff --git a/src/main/java/net/sf/jabref/importer/ImportMenuItem.java b/src/main/java/net/sf/jabref/importer/ImportMenuItem.java index 612253332657..8c08eb3eda3e 100644 --- a/src/main/java/net/sf/jabref/importer/ImportMenuItem.java +++ b/src/main/java/net/sf/jabref/importer/ImportMenuItem.java @@ -258,7 +258,7 @@ private ParserResult mergeImportResults(List getSelectableZipEntries(ZipFile zipFile) { List entries = new ArrayList<>(); Enumeration e = zipFile.entries(); for (ZipEntry entry : Collections.list(e)) { @@ -158,7 +162,7 @@ private static ZipEntry[] getSelectableZipEntries(ZipFile zipFile) { entries.add(entry); } } - return entries.toArray(new ZipEntry[entries.size()]); + return entries; } /* @@ -188,13 +192,13 @@ public Dimension getSize() { */ private static class ZipFileChooserTableModel extends AbstractTableModel { - private final String[] columnNames = new String[] {Localization.lang("Name"), - Localization.lang("Last modified"), Localization.lang("Size")}; - private final ZipEntry[] rows; + private final List columnNames = Arrays.asList(Localization.lang("Name"), + Localization.lang("Last modified"), Localization.lang("Size")); + private final List rows; private final ZipFile zipFile; - ZipFileChooserTableModel(ZipFile zipFile, ZipEntry[] rows) { + ZipFileChooserTableModel(ZipFile zipFile, List rows) { super(); this.rows = rows; this.zipFile = zipFile; @@ -206,7 +210,7 @@ private static class ZipFileChooserTableModel extends AbstractTableModel { */ @Override public int getColumnCount() { - return columnNames.length; + return columnNames.size(); } /* @@ -215,7 +219,7 @@ public int getColumnCount() { */ @Override public int getRowCount() { - return this.rows.length; + return this.rows.size(); } /* @@ -224,7 +228,7 @@ public int getRowCount() { */ @Override public String getColumnName(int col) { - return columnNames[col]; + return columnNames.get(col); } /** @@ -234,7 +238,7 @@ public String getColumnName(int col) { * @return Zip file entry */ public ZipEntry getZipEntry(int rowIndex) { - return this.rows[rowIndex]; + return this.rows.get(rowIndex); } /** @@ -257,7 +261,9 @@ public Object getValueAt(int rowIndex, int columnIndex) { if (columnIndex == 0) { value = entry.getName(); } else if (columnIndex == 1) { - value = SimpleDateFormat.getDateTimeInstance().format(new Date(entry.getTime())); + value = ZonedDateTime.ofInstant(new Date(entry.getTime()).toInstant(), + ZoneId.systemDefault()) + .format(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM)); } else if (columnIndex == 2) { value = entry.getSize(); } diff --git a/src/main/java/net/sf/jabref/logic/layout/format/CurrentDate.java b/src/main/java/net/sf/jabref/logic/layout/format/CurrentDate.java index 935f5164642a..8fcdecaf9061 100644 --- a/src/main/java/net/sf/jabref/logic/layout/format/CurrentDate.java +++ b/src/main/java/net/sf/jabref/logic/layout/format/CurrentDate.java @@ -1,5 +1,5 @@ /* - Copyright (C) 2005-2015 Andreas Rudert, Oscar Gustafsson + Copyright (C) 2005-2016 Andreas Rudert, Oscar Gustafsson All programs in this directory and subdirectories are published under the GNU General Public License as @@ -25,15 +25,15 @@ */ package net.sf.jabref.logic.layout.format; -import java.text.SimpleDateFormat; -import java.util.Date; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; import net.sf.jabref.logic.layout.LayoutFormatter; /** * Inserts the current date (the time a database is being exported). * - *

If a fieldText is given, it must be a valid {@link SimpleDateFormat} pattern. + *

If a fieldText is given, it must be a valid {@link DateTimeFormatter} pattern. * If none is given, the format pattern will be yyyy-MM-dd hh:mm:ss z. * This follows ISO-8601. Reason: https://xkcd.com/1179/.

* @@ -55,6 +55,6 @@ public String format(String fieldText) { if ((fieldText != null) && (fieldText.trim() != null) && !fieldText.trim().isEmpty()) { format = fieldText; } - return new SimpleDateFormat(format).format(new Date()); + return ZonedDateTime.now().format(DateTimeFormatter.ofPattern(format)); } } diff --git a/src/main/java/net/sf/jabref/logic/net/Cookie.java b/src/main/java/net/sf/jabref/logic/net/Cookie.java index 12f5aafac99e..0de20c502b5f 100644 --- a/src/main/java/net/sf/jabref/logic/net/Cookie.java +++ b/src/main/java/net/sf/jabref/logic/net/Cookie.java @@ -16,10 +16,9 @@ package net.sf.jabref.logic.net; import java.net.URI; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; import java.util.Locale; import java.util.Optional; @@ -28,15 +27,15 @@ class Cookie { private final String name; private final String value; private String domain; - private Date expires; + private ZonedDateTime expires; private String path; - /** - * DateFormats should not be reused among instances (or rather among threads), because they are not thread-safe. - * If they are shared, their usage should be synchronized. - */ - private final DateFormat whiteSpaceFormat = new SimpleDateFormat("E, dd MMM yyyy k:m:s 'GMT'", Locale.US); - private final DateFormat hyphenFormat = new SimpleDateFormat("E, dd-MMM-yyyy k:m:s 'GMT'", Locale.US); + private final DateTimeFormatter whiteSpaceFormat = DateTimeFormatter.ofPattern("EEE, dd MMM yyyy HH:mm:ss z", + Locale.ROOT); + private final DateTimeFormatter hyphenFormat = DateTimeFormatter.ofPattern("EEE, dd-MMM-yyyy HH:mm:ss z", + Locale.ROOT); + private final DateTimeFormatter hyphenTwoDigitYearFormat = DateTimeFormatter.ofPattern("EEE, dd-MMM-yy HH:mm:ss z", + Locale.ROOT); /** @@ -48,10 +47,8 @@ class Cookie { public Cookie(URI uri, String header) { String[] attributes = header.split(";"); String nameValue = attributes[0].trim(); - this.name = - nameValue.substring(0, nameValue.indexOf('=')); - this.value = - nameValue.substring(nameValue.indexOf('=') + 1); + this.name = nameValue.substring(0, nameValue.indexOf('=')); + this.value = nameValue.substring(nameValue.indexOf('=') + 1); this.path = "/"; this.domain = uri.getHost(); @@ -82,13 +79,16 @@ public Cookie(URI uri, String header) { this.path = value; } else if ("expires".equalsIgnoreCase(name)) { try { - this.expires = whiteSpaceFormat.parse(value); - } catch (ParseException e) { + this.expires = ZonedDateTime.parse(value, whiteSpaceFormat); + } catch (DateTimeParseException e) { try { - this.expires = hyphenFormat.parse(value); - } catch (ParseException e2) { - throw new IllegalArgumentException( - "Bad date format in header: " + value); + this.expires = ZonedDateTime.parse(value, hyphenFormat); + } catch (DateTimeParseException e2) { + try { + this.expires = ZonedDateTime.parse(value, hyphenTwoDigitYearFormat); + } catch (DateTimeParseException e3) { + throw new IllegalArgumentException("Bad date format in header: " + value); + } } } } @@ -99,8 +99,7 @@ public boolean hasExpired() { if (expires == null) { return false; } - Date now = new Date(); - return now.after(expires); + return ZonedDateTime.now().isAfter(expires); } /** diff --git a/src/main/java/net/sf/jabref/logic/util/UpdateField.java b/src/main/java/net/sf/jabref/logic/util/UpdateField.java index 942237de30a1..deea9ed497da 100644 --- a/src/main/java/net/sf/jabref/logic/util/UpdateField.java +++ b/src/main/java/net/sf/jabref/logic/util/UpdateField.java @@ -3,7 +3,6 @@ import java.util.Collection; import java.util.Optional; -import net.sf.jabref.Globals; import net.sf.jabref.logic.util.date.EasyDateFormat; import net.sf.jabref.model.FieldChange; import net.sf.jabref.model.entry.BibEntry; @@ -12,9 +11,6 @@ public class UpdateField { - private static final EasyDateFormat DATE_FORMATTER = new EasyDateFormat(); - - /** * Updating a field will result in the entry being reformatted on save * @@ -88,13 +84,14 @@ public static Optional updateField(BibEntry be, String field, Strin * @param overwriteOwner Indicates whether owner should be set if it is already set. * @param overwriteTimestamp Indicates whether timestamp should be set if it is already set. */ - public static void setAutomaticFields(BibEntry entry, boolean overwriteOwner, boolean overwriteTimestamp) { - String defaultOwner = Globals.prefs.get(JabRefPreferences.DEFAULT_OWNER); - String timestamp = DATE_FORMATTER.getCurrentDate(); - String timeStampField = Globals.prefs.get(JabRefPreferences.TIME_STAMP_FIELD); - boolean setOwner = Globals.prefs.getBoolean(JabRefPreferences.USE_OWNER) + public static void setAutomaticFields(BibEntry entry, boolean overwriteOwner, boolean overwriteTimestamp, + JabRefPreferences prefs) { + String defaultOwner = prefs.get(JabRefPreferences.DEFAULT_OWNER); + String timestamp = EasyDateFormat.fromPreferences(prefs).getCurrentDate(); + String timeStampField = prefs.get(JabRefPreferences.TIME_STAMP_FIELD); + boolean setOwner = prefs.getBoolean(JabRefPreferences.USE_OWNER) && (overwriteOwner || (!entry.hasField(FieldName.OWNER))); - boolean setTimeStamp = Globals.prefs.getBoolean(JabRefPreferences.USE_TIME_STAMP) + boolean setTimeStamp = prefs.getBoolean(JabRefPreferences.USE_TIME_STAMP) && (overwriteTimestamp || (!entry.hasField(timeStampField))); setAutomaticFields(entry, setOwner, defaultOwner, setTimeStamp, timeStampField, timestamp); @@ -121,19 +118,19 @@ private static void setAutomaticFields(BibEntry entry, boolean setOwner, String * @param bibs List of bibtex entries */ public static void setAutomaticFields(Collection bibs, boolean overwriteOwner, - boolean overwriteTimestamp) { + boolean overwriteTimestamp, JabRefPreferences prefs) { - boolean globalSetOwner = Globals.prefs.getBoolean(JabRefPreferences.USE_OWNER); - boolean globalSetTimeStamp = Globals.prefs.getBoolean(JabRefPreferences.USE_TIME_STAMP); + boolean globalSetOwner = prefs.getBoolean(JabRefPreferences.USE_OWNER); + boolean globalSetTimeStamp = prefs.getBoolean(JabRefPreferences.USE_TIME_STAMP); // Do not need to do anything if all options are disabled if (!(globalSetOwner || globalSetTimeStamp)) { return; } - String timeStampField = Globals.prefs.get(JabRefPreferences.TIME_STAMP_FIELD); - String defaultOwner = Globals.prefs.get(JabRefPreferences.DEFAULT_OWNER); - String timestamp = DATE_FORMATTER.getCurrentDate(); + String timeStampField = prefs.get(JabRefPreferences.TIME_STAMP_FIELD); + String defaultOwner = prefs.get(JabRefPreferences.DEFAULT_OWNER); + String timestamp = EasyDateFormat.fromPreferences(prefs).getCurrentDate(); // Iterate through all entries for (BibEntry curEntry : bibs) { diff --git a/src/main/java/net/sf/jabref/logic/util/date/EasyDateFormat.java b/src/main/java/net/sf/jabref/logic/util/date/EasyDateFormat.java index 22e70f8c1792..cbef4f15af0a 100644 --- a/src/main/java/net/sf/jabref/logic/util/date/EasyDateFormat.java +++ b/src/main/java/net/sf/jabref/logic/util/date/EasyDateFormat.java @@ -1,9 +1,10 @@ package net.sf.jabref.logic.util.date; -import java.text.SimpleDateFormat; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; import java.util.Date; -import net.sf.jabref.Globals; import net.sf.jabref.preferences.JabRefPreferences; public class EasyDateFormat { @@ -11,9 +12,17 @@ public class EasyDateFormat { /** * The formatter objects */ - private SimpleDateFormat dateFormatter; + private final DateTimeFormatter dateFormatter; + public EasyDateFormat(String dateFormat) { + this(DateTimeFormatter.ofPattern(dateFormat)); + } + + public EasyDateFormat(DateTimeFormatter dateFormatter) { + this.dateFormatter = dateFormatter; + } + /** * Creates a String containing the current date (and possibly time), * formatted according to the format set in preferences under the key @@ -22,7 +31,7 @@ public class EasyDateFormat { * @return The date string. */ public String getCurrentDate() { - return getDateAt(new Date()); + return getDateAt(ZonedDateTime.now()); } /** @@ -32,11 +41,26 @@ public String getCurrentDate() { * @return The formatted date string. */ public String getDateAt(Date date) { + return getDateAt(date.toInstant().atZone(ZoneId.systemDefault())); + } + + /** + * Creates a readable Date string from the parameter date. The format is set + * in preferences under the key "timeStampFormat". + * + * @return The formatted date string. + */ + public String getDateAt(ZonedDateTime dateTime) { // first use, create an instance - if (dateFormatter == null) { - String format = Globals.prefs.get(JabRefPreferences.TIME_STAMP_FORMAT); - dateFormatter = new SimpleDateFormat(format); - } - return dateFormatter.format(date); + return dateTime.format(dateFormatter); + } + + + public static EasyDateFormat fromPreferences(JabRefPreferences preferences) { + return new EasyDateFormat(preferences.get(JabRefPreferences.TIME_STAMP_FORMAT)); + } + + public static EasyDateFormat isoDateFormat() { + return new EasyDateFormat(DateTimeFormatter.ISO_LOCAL_DATE); } } diff --git a/src/main/java/net/sf/jabref/logic/util/date/TimeStamp.java b/src/main/java/net/sf/jabref/logic/util/date/TimeStamp.java index f1de485b2c50..b2ac885a185b 100644 --- a/src/main/java/net/sf/jabref/logic/util/date/TimeStamp.java +++ b/src/main/java/net/sf/jabref/logic/util/date/TimeStamp.java @@ -2,7 +2,6 @@ import java.util.Optional; -import net.sf.jabref.Globals; import net.sf.jabref.logic.util.UpdateField; import net.sf.jabref.model.FieldChange; import net.sf.jabref.model.entry.BibEntry; @@ -10,20 +9,17 @@ public class TimeStamp { - private static final EasyDateFormat DATE_FORMATTER = new EasyDateFormat(); - - public static boolean updateTimeStampIsSet() { - return Globals.prefs.getBoolean(JabRefPreferences.USE_TIME_STAMP) - && Globals.prefs.getBoolean(JabRefPreferences.UPDATE_TIMESTAMP); + public static boolean updateTimeStampIsSet(JabRefPreferences prefs) { + return prefs.getBoolean(JabRefPreferences.USE_TIME_STAMP) + && prefs.getBoolean(JabRefPreferences.UPDATE_TIMESTAMP); } /** - * Updates the timestamp of the given entry, nests the given undaoableEdit in a named compound, and returns that - * named compound + * Updates the timestamp of the given entry and returns the FieldChange */ - public static Optional doUpdateTimeStamp(BibEntry entry) { - String timeStampField = Globals.prefs.get(JabRefPreferences.TIME_STAMP_FIELD); - String timestamp = DATE_FORMATTER.getCurrentDate(); + public static Optional doUpdateTimeStamp(BibEntry entry, JabRefPreferences prefs) { + String timeStampField = prefs.get(JabRefPreferences.TIME_STAMP_FIELD); + String timestamp = EasyDateFormat.fromPreferences(prefs).getCurrentDate(); return UpdateField.updateField(entry, timeStampField, timestamp); } diff --git a/src/main/java/net/sf/jabref/model/entry/FieldProperties.java b/src/main/java/net/sf/jabref/model/entry/FieldProperties.java index 972c687ae85f..d92a764ecd62 100644 --- a/src/main/java/net/sf/jabref/model/entry/FieldProperties.java +++ b/src/main/java/net/sf/jabref/model/entry/FieldProperties.java @@ -23,7 +23,8 @@ public enum FieldProperties { EDITOR_TYPE, PAGINATION, TYPE, - CROSSREF; + CROSSREF, + ISO_DATE; public static final Set ALL_OPTS = EnumSet.allOf(FieldProperties.class); diff --git a/src/main/java/net/sf/jabref/model/entry/InternalBibtexFields.java b/src/main/java/net/sf/jabref/model/entry/InternalBibtexFields.java index b5e1b076e516..3025e93f9eeb 100644 --- a/src/main/java/net/sf/jabref/model/entry/InternalBibtexFields.java +++ b/src/main/java/net/sf/jabref/model/entry/InternalBibtexFields.java @@ -176,7 +176,8 @@ private InternalBibtexFields(boolean serializeSpecialFields) { add(new BibtexSingleField(FieldName.EID, true, BibtexSingleField.SMALL_W)); dummy = new BibtexSingleField(FieldName.DATE, true); - dummy.setPrivate(); + dummy.setExtras(EnumSet.of(FieldProperties.DATE)); + dummy.setPrivate(); // TODO: Why private? add(dummy); add(new BibtexSingleField("pmid", false, BibtexSingleField.SMALL_W, 60).setNumeric(true)); @@ -293,6 +294,7 @@ private InternalBibtexFields(boolean serializeSpecialFields) { field = new BibtexSingleField(fieldText, true, BibtexSingleField.SMALL_W); } field.getExtras().add(FieldProperties.DATE); + field.getExtras().add(FieldProperties.ISO_DATE); add(field); } diff --git a/src/main/java/net/sf/jabref/pdfimport/PdfImporter.java b/src/main/java/net/sf/jabref/pdfimport/PdfImporter.java index 0b8e1e778676..1aad683d64dd 100644 --- a/src/main/java/net/sf/jabref/pdfimport/PdfImporter.java +++ b/src/main/java/net/sf/jabref/pdfimport/PdfImporter.java @@ -281,7 +281,7 @@ private BibEntry createNewEntry() { // Set owner/timestamp if options are enabled: List list = new ArrayList<>(); list.add(be); - UpdateField.setAutomaticFields(list, true, true); + UpdateField.setAutomaticFields(list, true, true, Globals.prefs); // Create an UndoableInsertEntry object. panel.getUndoManager().addEdit(new UndoableInsertEntry(panel.getDatabase(), be, panel)); diff --git a/src/test/java/net/sf/jabref/logic/net/CookieTest.java b/src/test/java/net/sf/jabref/logic/net/CookieTest.java new file mode 100644 index 000000000000..c1f23cbfb8b5 --- /dev/null +++ b/src/test/java/net/sf/jabref/logic/net/CookieTest.java @@ -0,0 +1,40 @@ +package net.sf.jabref.logic.net; + +import java.net.URI; +import java.net.URISyntaxException; + +import org.junit.Test; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + + +public class CookieTest { + + @Test + public void testCookieHyphenFormat() throws URISyntaxException { + Cookie cookie = new Cookie(new URI("hhh"), "name=TestCookie; expires=Tue, 25-Jul-2017 16:43:15 GMT"); + } + + @Test + public void testCookieHyphenTwoDigitYearFormat() throws URISyntaxException { + Cookie cookie = new Cookie(new URI("hhh"), "name=TestCookie; expires=Tue, 25-Jul-17 16:43:15 GMT"); + } + + @Test + public void testCookieSpaceFormat() throws URISyntaxException { + Cookie cookie = new Cookie(new URI("hhh"), "name=TestCookie; expires=Tue, 25 Jul 2017 16:43:15 GMT"); + } + + @Test + public void testHasExpiredFalse() throws URISyntaxException { + Cookie cookie = new Cookie(new URI("hhh"), "name=TestCookie; expires=Tue, 25-Jul-45 16:43:15 GMT"); + assertFalse(cookie.hasExpired()); + } + + @Test + public void testHasExpiredTrue() throws URISyntaxException { + Cookie cookie = new Cookie(new URI("hhh"), "name=Nicholas; expires=Sat, 02 May 2009 23:38:25 GMT"); + assertTrue(cookie.hasExpired()); + } +} From 0075cc510038d079c64956d51448e00c572597d1 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 26 Jul 2016 10:32:01 +0200 Subject: [PATCH 10/12] Builds are now stored via build-upload.jabref.org --- scripts/upload-to-builds.jabref.org.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upload-to-builds.jabref.org.sh b/scripts/upload-to-builds.jabref.org.sh index 6712e2059a0d..de74122845e7 100755 --- a/scripts/upload-to-builds.jabref.org.sh +++ b/scripts/upload-to-builds.jabref.org.sh @@ -33,4 +33,4 @@ command="${command}exit\n" # now $command is complete -echo -e "$command" | sftp -P 9922 builds_jabref_org@builds.jabref.org +echo -e "$command" | sftp -P 9922 builds_jabref_org@build-upload.jabref.org From 0853734385c1fd498be385efb759ed7534780b84 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Tue, 26 Jul 2016 17:06:39 +0200 Subject: [PATCH 11/12] Consistent file name casing (and other localization improvements) (#1629) * AUX files * ZIP files * BIB files * JAR files * didn't * Couldn't what's * Consistent casing * AUX apparently is commonly used in French words... * Fixed the flawed quick-and-dirty find-and-replace failures --- .../net/sf/jabref/BibDatabaseContext.java | 8 +-- .../net/sf/jabref/cli/ArgumentProcessor.java | 10 +-- .../java/net/sf/jabref/cli/JabRefCLI.java | 4 +- .../jabref/external/DownloadExternalFile.java | 2 +- .../TransferableFileLinkSelection.java | 2 +- .../push/AbstractPushToApplication.java | 2 +- .../java/net/sf/jabref/gui/JabRefFrame.java | 6 +- .../gui/actions/NewSubDatabaseAction.java | 2 +- .../jabref/gui/auximport/FromAuxDialog.java | 2 +- .../sf/jabref/gui/desktop/JabRefDesktop.java | 2 +- .../gui/groups/EntryTableTransferHandler.java | 4 +- .../sf/jabref/gui/help/NewVersionDialog.java | 2 +- .../maintable/MainTableSelectionListener.java | 2 +- .../gui/openoffice/AutoDetectPaths.java | 2 +- .../sf/jabref/gui/openoffice/OOBibBase.java | 4 +- .../gui/openoffice/OpenOfficePanel.java | 2 +- .../net/sf/jabref/gui/preftabs/FileTab.java | 10 +-- .../sf/jabref/gui/preftabs/GeneralTab.java | 2 +- .../jabref/gui/preftabs/NameFormatterTab.java | 6 +- .../sf/jabref/gui/worker/VersionWorker.java | 4 +- .../importer/AutosaveStartupPrompter.java | 2 +- .../importer/CheckForNewEntryTypesAction.java | 2 +- .../importer/ImportCustomizationDialog.java | 12 ++-- .../jabref/importer/ImportFormatReader.java | 2 +- .../jabref/importer/OpenDatabaseAction.java | 8 +-- .../sf/jabref/importer/PostOpenAction.java | 6 +- .../sf/jabref/importer/ZipFileChooser.java | 12 ++-- .../jabref/importer/fetcher/ADSFetcher.java | 10 +-- .../importer/fetcher/CiteSeerXFetcher.java | 2 +- .../jabref/importer/fetcher/DBLPFetcher.java | 4 +- .../importer/fetcher/INSPIREFetcher.java | 2 +- .../jabref/importer/fetcher/OAI2Fetcher.java | 4 +- .../importer/fileformat/BibtexImporter.java | 6 +- .../importer/fileformat/BibtexParser.java | 4 +- .../sf/jabref/logic/auxparser/AuxParser.java | 22 +++---- .../logic/auxparser/AuxParserResult.java | 4 +- .../jabref/logic/bst/BibtexCaseChanger.java | 2 +- .../jabref/logic/bst/BibtexNameFormatter.java | 6 +- src/main/java/net/sf/jabref/logic/bst/VM.java | 2 +- .../jabref/logic/exporter/ExportFormat.java | 6 +- .../sf/jabref/logic/layout/LayoutHelper.java | 4 +- .../jabref/logic/openoffice/OOBibStyle.java | 4 +- .../net/sf/jabref/logic/util/TestEntry.java | 2 +- .../net/sf/jabref/logic/util/io/FileUtil.java | 6 +- .../java/net/sf/jabref/logic/xmp/XMPUtil.java | 2 +- .../migrations/FileLinksUpgradeWarning.java | 2 +- .../sf/jabref/model/database/BibDatabase.java | 2 +- .../jabref/model/entry/CustomEntryType.java | 2 +- .../java/net/sf/jabref/sql/DatabaseUtil.java | 2 +- .../jabref/sql/importer/DatabaseImporter.java | 2 +- src/main/resources/l10n/JabRef_da.properties | 58 ++++++++--------- src/main/resources/l10n/JabRef_de.properties | 58 ++++++++--------- src/main/resources/l10n/JabRef_en.properties | 60 +++++++++--------- src/main/resources/l10n/JabRef_es.properties | 58 ++++++++--------- src/main/resources/l10n/JabRef_fa.properties | 60 +++++++++--------- src/main/resources/l10n/JabRef_fr.properties | 58 ++++++++--------- src/main/resources/l10n/JabRef_in.properties | 60 +++++++++--------- src/main/resources/l10n/JabRef_it.properties | 60 +++++++++--------- src/main/resources/l10n/JabRef_ja.properties | 60 +++++++++--------- src/main/resources/l10n/JabRef_nl.properties | 58 ++++++++--------- src/main/resources/l10n/JabRef_no.properties | 58 ++++++++--------- .../resources/l10n/JabRef_pt_BR.properties | 58 ++++++++--------- src/main/resources/l10n/JabRef_ru.properties | 58 ++++++++--------- src/main/resources/l10n/JabRef_sv.properties | 60 +++++++++--------- src/main/resources/l10n/JabRef_tr.properties | 58 ++++++++--------- src/main/resources/l10n/JabRef_vi.properties | 62 +++++++++---------- src/main/resources/l10n/JabRef_zh.properties | 58 ++++++++--------- src/main/resources/l10n/Menu_fr.properties | 10 +-- .../fileformat/BibtexImporterTest.java | 2 +- .../logic/l10n/LocalizationParserTest.java | 4 +- 70 files changed, 621 insertions(+), 621 deletions(-) diff --git a/src/main/java/net/sf/jabref/BibDatabaseContext.java b/src/main/java/net/sf/jabref/BibDatabaseContext.java index 4b0ea8294427..3d590d2e8861 100644 --- a/src/main/java/net/sf/jabref/BibDatabaseContext.java +++ b/src/main/java/net/sf/jabref/BibDatabaseContext.java @@ -14,7 +14,7 @@ import net.sf.jabref.preferences.JabRefPreferences; /** - * Represents everything related to a .bib file. + * Represents everything related to a BIB file. *

* The entries are stored in BibDatabase, the other data in MetaData and the options relevant for this file in Defaults. */ @@ -117,7 +117,7 @@ public boolean isBiblatexMode() { * 1. metadata user-specific directory * 2. metadata general directory * 3. preferences directory - * 4. bib file directory + * 4. BIB file directory * * @param fieldName The field type * @return The default directory for this field type. @@ -143,7 +143,7 @@ public List getFileDirectory(String fieldName) { fileDirs.add(dir); } - // 4. bib file directory + // 4. BIB file directory if (getDatabaseFile() != null) { String parentDir = getDatabaseFile().getParent(); // Check if we should add it as primary file dir (first in the list) or not: @@ -160,7 +160,7 @@ public List getFileDirectory(String fieldName) { private String getFileDirectoryPath(String directoryName) { String dir = directoryName; // If this directory is relative, we try to interpret it as relative to - // the file path of this bib file: + // the file path of this BIB file: if (!new File(dir).isAbsolute() && (getDatabaseFile() != null)) { String relDir; if (".".equals(dir)) { diff --git a/src/main/java/net/sf/jabref/cli/ArgumentProcessor.java b/src/main/java/net/sf/jabref/cli/ArgumentProcessor.java index 4f61e9976a13..5ca302f770e9 100644 --- a/src/main/java/net/sf/jabref/cli/ArgumentProcessor.java +++ b/src/main/java/net/sf/jabref/cli/ArgumentProcessor.java @@ -232,7 +232,7 @@ private List importAndOpenFiles() { if (!cli.isBlank() && (cli.getLeftOver().length > 0)) { for (String aLeftOver : cli.getLeftOver()) { // Leftover arguments that have a "bib" extension are interpreted as - // bib files to open. Other files, and files that could not be opened + // BIB files to open. Other files, and files that could not be opened // as bib, we try to import instead. boolean bibExtension = aLeftOver.toLowerCase(Locale.ENGLISH).endsWith("bib"); ParserResult pr = null; @@ -294,7 +294,7 @@ private boolean generateAux(List loaded, String[] data) { SaveSession session = databaseWriter.saveDatabase(new BibDatabaseContext(newBase, defaults), prefs); - // Show just a warning message if encoding didn't work for all characters: + // Show just a warning message if encoding did not work for all characters: if (!session.getWriter().couldEncodeAll()) { System.err.println(Localization.lang("Warning") + ": " + Localization.lang( @@ -336,7 +336,7 @@ private void exportFile(List loaded, String[] data) { SaveSession session = databaseWriter.saveDatabase( new BibDatabaseContext(pr.getDatabase(), pr.getMetaData(), defaults), prefs); - // Show just a warning message if encoding didn't work for all characters: + // Show just a warning message if encoding did not work for all characters: if (!session.getWriter().couldEncodeAll()) { System.err.println(Localization.lang("Warning") + ": " + Localization.lang( @@ -438,7 +438,7 @@ private void regenerateBibtexKeys(List loaded) { LabelPatternUtil.makeLabel(metaData, database, entry, Globals.prefs); } } else { - LOGGER.info(Localization.lang("No meta data present in bibfile. Cannot regenerate BibTeX keys")); + LOGGER.info(Localization.lang("No meta data present in BIB_file. Cannot regenerate BibTeX keys")); } } } @@ -483,7 +483,7 @@ private Optional fetch(String fetchCommand) { } String query = split[1]; - System.out.println(Localization.lang("Running Query '%0' with fetcher '%1'.", query, engine) + " " + System.out.println(Localization.lang("Running query '%0' with fetcher '%1'.", query, engine) + " " + Localization.lang("Please wait...")); Collection result = new ImportInspectionCommandLine().query(query, fetcher); diff --git a/src/main/java/net/sf/jabref/cli/JabRefCLI.java b/src/main/java/net/sf/jabref/cli/JabRefCLI.java index b7487365962d..ab5a8561d11c 100644 --- a/src/main/java/net/sf/jabref/cli/JabRefCLI.java +++ b/src/main/java/net/sf/jabref/cli/JabRefCLI.java @@ -198,7 +198,7 @@ private Options getOptions() { options.addOption(Option.builder("a"). longOpt("aux"). - desc(String.format("%s: %s[.aux],%s[.bib]", Localization.lang("Subdatabase from aux"), + desc(String.format("%s: %s[.aux],%s[.bib]", Localization.lang("Subdatabase from AUX"), Localization.lang("file"), Localization.lang("new"))). hasArg(). @@ -214,7 +214,7 @@ private Options getOptions() { options.addOption(Option.builder("f"). longOpt("fetch"). - desc(Localization.lang("Run Fetcher, e.g. \"--fetch=Medline:cancer\"")). + desc(Localization.lang("Run fetcher, e.g. \"--fetch=Medline:cancer\"")). hasArg(). argName("FILE"). build()); diff --git a/src/main/java/net/sf/jabref/external/DownloadExternalFile.java b/src/main/java/net/sf/jabref/external/DownloadExternalFile.java index 6481255bf78c..519c75273b20 100644 --- a/src/main/java/net/sf/jabref/external/DownloadExternalFile.java +++ b/src/main/java/net/sf/jabref/external/DownloadExternalFile.java @@ -151,7 +151,7 @@ public void download(URL url, final DownloadCallback callback) throws IOExceptio if (suggestedType.isPresent()) { suffix = suggestedType.get().getExtension(); } else { - // If we didn't find a file type from the MIME type, try based on extension: + // If we did not find a file type from the MIME type, try based on extension: suffix = getSuffix(res); if (suffix == null) { suffix = ""; diff --git a/src/main/java/net/sf/jabref/external/TransferableFileLinkSelection.java b/src/main/java/net/sf/jabref/external/TransferableFileLinkSelection.java index b78d327c9d63..7793338d7505 100644 --- a/src/main/java/net/sf/jabref/external/TransferableFileLinkSelection.java +++ b/src/main/java/net/sf/jabref/external/TransferableFileLinkSelection.java @@ -87,7 +87,7 @@ public TransferableFileLinkSelection(BasePanel panel, BibEntry[] selection) { String dir = panel.metaData().getFileDirectory(GUIGlobals.FILE_FIELD); // Include the standard "file" directory: String fileDir = panel.metaData().getFileDirectory(GUIGlobals.FILE_FIELD); - // Include the directory of the bib file: + // Include the directory of the BIB file: String[] dirs; if (panel.metaData().getDatabaseFile() != null) { String databaseDir = panel.metaData().getDatabaseFile().getParent(); diff --git a/src/main/java/net/sf/jabref/external/push/AbstractPushToApplication.java b/src/main/java/net/sf/jabref/external/push/AbstractPushToApplication.java index 0899848b8dcb..5691e69d5016 100644 --- a/src/main/java/net/sf/jabref/external/push/AbstractPushToApplication.java +++ b/src/main/java/net/sf/jabref/external/push/AbstractPushToApplication.java @@ -85,7 +85,7 @@ public void pushEntries(BibDatabase database, List entries, String key Runtime.getRuntime().exec(getCommandLine(keyString)); } - // In case it didn't work + // In case it did not work catch (IOException excep) { couldNotCall = true; diff --git a/src/main/java/net/sf/jabref/gui/JabRefFrame.java b/src/main/java/net/sf/jabref/gui/JabRefFrame.java index 2de64c99ae20..1d29619b425f 100644 --- a/src/main/java/net/sf/jabref/gui/JabRefFrame.java +++ b/src/main/java/net/sf/jabref/gui/JabRefFrame.java @@ -552,8 +552,8 @@ private JPopupMenu tabPopupMenu() { // Close actions JMenuItem close = new JMenuItem(Localization.lang("Close")); - JMenuItem closeOthers = new JMenuItem(Localization.lang("Close Others")); - JMenuItem closeAll = new JMenuItem(Localization.lang("Close All")); + JMenuItem closeOthers = new JMenuItem(Localization.lang("Close others")); + JMenuItem closeAll = new JMenuItem(Localization.lang("Close all")); close.addActionListener(closeDatabaseAction); closeOthers.addActionListener(closeOtherDatabasesAction); closeAll.addActionListener(closeAllDatabasesAction); @@ -701,7 +701,7 @@ private void initSidePane() { } /** - * The MacAdapter calls this method when a ".bib" file has been double-clicked from the Finder. + * The MacAdapter calls this method when a "BIB" file has been double-clicked from the Finder. */ public void openAction(String filePath) { File file = new File(filePath); diff --git a/src/main/java/net/sf/jabref/gui/actions/NewSubDatabaseAction.java b/src/main/java/net/sf/jabref/gui/actions/NewSubDatabaseAction.java index c22d70b7a410..b455a3587a65 100644 --- a/src/main/java/net/sf/jabref/gui/actions/NewSubDatabaseAction.java +++ b/src/main/java/net/sf/jabref/gui/actions/NewSubDatabaseAction.java @@ -16,7 +16,7 @@ import net.sf.jabref.preferences.JabRefPreferences; /** - * The action concerned with generate a new (sub-)database from latex aux file. + * The action concerned with generate a new (sub-)database from latex AUX file. */ public class NewSubDatabaseAction extends MnemonicAwareAction { diff --git a/src/main/java/net/sf/jabref/gui/auximport/FromAuxDialog.java b/src/main/java/net/sf/jabref/gui/auximport/FromAuxDialog.java index 27f2731d5bb3..809fbbf4c3ba 100644 --- a/src/main/java/net/sf/jabref/gui/auximport/FromAuxDialog.java +++ b/src/main/java/net/sf/jabref/gui/auximport/FromAuxDialog.java @@ -27,7 +27,7 @@ */ -// A wizard dialog for generating a new sub database from existing TeX aux file +// A wizard dialog for generating a new sub database from existing TeX AUX file // // created by : r.nagel 23.08.2004 // diff --git a/src/main/java/net/sf/jabref/gui/desktop/JabRefDesktop.java b/src/main/java/net/sf/jabref/gui/desktop/JabRefDesktop.java index f1fbd1eb11f3..cc776e7daaa4 100644 --- a/src/main/java/net/sf/jabref/gui/desktop/JabRefDesktop.java +++ b/src/main/java/net/sf/jabref/gui/desktop/JabRefDesktop.java @@ -172,7 +172,7 @@ public static boolean openExternalFileAnyFormat(final BibDatabaseContext databas openExternalFilePlatformIndependent(type, filePath); return true; } else { - // No file matched the name, or we didn't know the file type. + // No file matched the name, or we did not know the file type. return false; } } diff --git a/src/main/java/net/sf/jabref/gui/groups/EntryTableTransferHandler.java b/src/main/java/net/sf/jabref/gui/groups/EntryTableTransferHandler.java index 3ee673e33834..2cb38bfd2606 100644 --- a/src/main/java/net/sf/jabref/gui/groups/EntryTableTransferHandler.java +++ b/src/main/java/net/sf/jabref/gui/groups/EntryTableTransferHandler.java @@ -321,7 +321,7 @@ private boolean handleDraggedFiles(List files, final int dropRow) { fileNames[i] = file.getAbsolutePath(); i++; } - // Try to load bib files normally, and import the rest into the current + // Try to load BIB files normally, and import the rest into the current // database. // This process must be spun off into a background thread: JabRefExecutorService.INSTANCE.execute(() -> { @@ -336,7 +336,7 @@ private boolean handleDraggedFiles(List files, final int dropRow) { } /** - * Take a set of filenames. Those with names indicating bib files are opened as such if possible. All other files we + * Take a set of filenames. Those with names indicating BIB files are opened as such if possible. All other files we * will attempt to import into the current database. * * @param fileNames The names of the files to open. diff --git a/src/main/java/net/sf/jabref/gui/help/NewVersionDialog.java b/src/main/java/net/sf/jabref/gui/help/NewVersionDialog.java index 61ee0511a1e4..aaf99973f683 100644 --- a/src/main/java/net/sf/jabref/gui/help/NewVersionDialog.java +++ b/src/main/java/net/sf/jabref/gui/help/NewVersionDialog.java @@ -44,7 +44,7 @@ public NewVersionDialog(JFrame frame, Version currentVersion, Version latestVers JLabel lblCurrentVersion = new JLabel(Localization.lang("Installed version") + ": " + currentVersion.getFullVersion()); JLabel lblLatestVersion = new JLabel(Localization.lang("Latest version") + ": " + latestVersion.getFullVersion()); - String localization = Localization.lang("To see what's new view the changelog."); + String localization = Localization.lang("To see what is new view the changelog."); JLabel lblMoreInformation = new JLabel("" + localization + ""); lblMoreInformation.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); lblMoreInformation.addMouseListener(new MouseInputAdapter() { diff --git a/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java b/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java index 04554ee7eff3..b19f4efc6705 100644 --- a/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java +++ b/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java @@ -64,7 +64,7 @@ /** * List event, mouse, key and focus listener for the main table that makes up the - * most part of the BasePanel for a single bib database. + * most part of the BasePanel for a single BIB database. */ public class MainTableSelectionListener implements ListEventListener, MouseListener, KeyListener, FocusListener { diff --git a/src/main/java/net/sf/jabref/gui/openoffice/AutoDetectPaths.java b/src/main/java/net/sf/jabref/gui/openoffice/AutoDetectPaths.java index ffe0c4e51441..b03b2d69eff0 100644 --- a/src/main/java/net/sf/jabref/gui/openoffice/AutoDetectPaths.java +++ b/src/main/java/net/sf/jabref/gui/openoffice/AutoDetectPaths.java @@ -45,7 +45,7 @@ import com.jgoodies.forms.layout.FormLayout; /** - * Tools for automatically detecting jar and executable paths to OpenOffice and/or LibreOffice. + * Tools for automatically detecting JAR and executable paths to OpenOffice and/or LibreOffice. */ public class AutoDetectPaths extends AbstractWorker { diff --git a/src/main/java/net/sf/jabref/gui/openoffice/OOBibBase.java b/src/main/java/net/sf/jabref/gui/openoffice/OOBibBase.java index 3ec5e3d9cc66..78d62f70d09a 100644 --- a/src/main/java/net/sf/jabref/gui/openoffice/OOBibBase.java +++ b/src/main/java/net/sf/jabref/gui/openoffice/OOBibBase.java @@ -385,7 +385,7 @@ public void insertEntry(List entries, BibDatabase database, } catch (DisposedException ex) { // We need to catch this one here because the OpenOfficePanel class is // loaded before connection, and therefore cannot directly reference - // or catch a DisposedException (which is in a OO jar file). + // or catch a DisposedException (which is in a OO JAR file). throw new ConnectionLostException(ex.getMessage()); } } @@ -403,7 +403,7 @@ public List refreshCiteMarkers(List databases, OOBibStyle s } catch (DisposedException ex) { // We need to catch this one here because the OpenOfficePanel class is // loaded before connection, and therefore cannot directly reference - // or catch a DisposedException (which is in a OO jar file). + // or catch a DisposedException (which is in a OO JAR file). throw new ConnectionLostException(ex.getMessage()); } } diff --git a/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java b/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java index 7b6a1cfd44e8..0e04bc2183ba 100644 --- a/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java +++ b/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java @@ -379,7 +379,7 @@ private void connect(boolean auto) { } } - // Add OO jars to the classpath: + // Add OO JARs to the classpath: try { List jarFiles = Arrays.asList(new File(ooJarsDirectory, "unoil.jar"), new File(ooJarsDirectory, "jurt.jar"), new File(ooJarsDirectory, "juh.jar"), diff --git a/src/main/java/net/sf/jabref/gui/preftabs/FileTab.java b/src/main/java/net/sf/jabref/gui/preftabs/FileTab.java index a88f4bea5cda..59d30047ba53 100644 --- a/src/main/java/net/sf/jabref/gui/preftabs/FileTab.java +++ b/src/main/java/net/sf/jabref/gui/preftabs/FileTab.java @@ -83,9 +83,9 @@ public FileTab(JabRefFrame frame, JabRefPreferences prefs) { this.frame = frame; fileDir = new JTextField(25); - bibLocAsPrimaryDir = new JCheckBox(Localization.lang("Use the bib file location as primary file directory")); + bibLocAsPrimaryDir = new JCheckBox(Localization.lang("Use the BIB file location as primary file directory")); bibLocAsPrimaryDir.setToolTipText(Localization.lang("When downloading files, or moving linked files to the " - + "file directory, prefer the bib file location rather than the file directory set above")); + + "file directory, prefer the BIB file location rather than the file directory set above")); runAutoFileSearch = new JCheckBox(Localization.lang("When opening file link, search for matching file if no link is defined")); allowFileAutoOpenBrowse = new JCheckBox(Localization.lang("Automatically open browse dialog when creating new file link")); regExpTextField = new JTextField(25); @@ -104,7 +104,7 @@ public FileTab(JabRefFrame frame, JabRefPreferences prefs) { autoSaveInterval = new JSpinner(new SpinnerNumberModel(1, 1, 60, 1)); valueDelimiter = new JComboBox<>(new String[] { Localization.lang("Quotes") + ": \", \"", - Localization.lang("Curly Brackets") + ": {, }"}); + Localization.lang("Curly brackets") + ": {, }"}); resolveStringsAll = new JRadioButton(Localization.lang("Resolve strings for all fields except") + ":"); resolveStringsStandard = new JRadioButton(Localization.lang("Resolve strings for standard BibTeX fields only")); ButtonGroup bg = new ButtonGroup(); @@ -114,7 +114,7 @@ public FileTab(JabRefFrame frame, JabRefPreferences prefs) { // This is sort of a quick hack newlineSeparator = new JComboBox<>(new String[] {"CR", "CR/LF", "LF"}); - reformatFileOnSaveAndExport = new JCheckBox(Localization.lang("Always reformat .bib file on save and export")); + reformatFileOnSaveAndExport = new JCheckBox(Localization.lang("Always reformat BIB file on save and export")); nonWrappableFields = new JTextField(25); doNotResolveStringsFor = new JTextField(30); @@ -169,7 +169,7 @@ public FileTab(JabRefFrame frame, JabRefPreferences prefs) { builder.append(useRegExpComboBox); builder.append(regExpTextField); - builder.append(new HelpAction(Localization.lang("Help on Regular Expression Search"), + builder.append(new HelpAction(Localization.lang("Help on regular expression search"), HelpFile.REGEX_SEARCH) .getHelpButton()); builder.nextLine(); diff --git a/src/main/java/net/sf/jabref/gui/preftabs/GeneralTab.java b/src/main/java/net/sf/jabref/gui/preftabs/GeneralTab.java index 8418c326d047..887f390d84b3 100644 --- a/src/main/java/net/sf/jabref/gui/preftabs/GeneralTab.java +++ b/src/main/java/net/sf/jabref/gui/preftabs/GeneralTab.java @@ -242,7 +242,7 @@ public void storeSettings() { if (prefs.getBoolean(JabRefPreferences.MEMORY_STICK_MODE) && !memoryStick.isSelected()) { JOptionPane.showMessageDialog(null, Localization.lang("To disable the memory stick mode" + " rename or remove the jabref.xml file in the same folder as JabRef."), - Localization.lang("Memory Stick Mode"), + Localization.lang("Memory stick mode"), JOptionPane.INFORMATION_MESSAGE); } prefs.putBoolean(JabRefPreferences.MEMORY_STICK_MODE, memoryStick.isSelected()); diff --git a/src/main/java/net/sf/jabref/gui/preftabs/NameFormatterTab.java b/src/main/java/net/sf/jabref/gui/preftabs/NameFormatterTab.java index 065a5c2745b5..fd384c3bcc57 100644 --- a/src/main/java/net/sf/jabref/gui/preftabs/NameFormatterTab.java +++ b/src/main/java/net/sf/jabref/gui/preftabs/NameFormatterTab.java @@ -135,8 +135,8 @@ public Object getValueAt(int row, int column) { @Override public String getColumnName(int col) { - return col == 0 ? Localization.lang("Formatter Name") : - Localization.lang("Format String"); + return col == 0 ? Localization.lang("Formatter name") : + Localization.lang("Format string"); } @Override @@ -198,7 +198,7 @@ public void setValueAt(Object value, int row, int col) { tabPanel.add(toolBar, BorderLayout.EAST); - builder.appendSeparator(Localization.lang("Special Name Formatters")); + builder.appendSeparator(Localization.lang("Special name formatters")); builder.nextLine(); builder.append(pan); builder.append(tabPanel); diff --git a/src/main/java/net/sf/jabref/gui/worker/VersionWorker.java b/src/main/java/net/sf/jabref/gui/worker/VersionWorker.java index 5b0c101084a3..0929bdfed2d3 100644 --- a/src/main/java/net/sf/jabref/gui/worker/VersionWorker.java +++ b/src/main/java/net/sf/jabref/gui/worker/VersionWorker.java @@ -51,7 +51,7 @@ protected Version doInBackground() throws Exception { try { return Version.getLatestVersion(); } catch (IOException ioException) { - LOGGER.warn("Couldn't connect to the updateserver.", ioException); + LOGGER.warn("Could not connect to the updateserver.", ioException); return null; } } @@ -66,7 +66,7 @@ public void done(){ Version latestVersion = this.get(); if (latestVersion == null){ - String couldNotConnect = Localization.lang("Couldn't connect to the update server."); + String couldNotConnect = Localization.lang("Could not connect to the update server."); String tryLater = Localization.lang("Please try again later and/or check your network connection."); if (manualExecution) { JOptionPane.showMessageDialog(this.mainFrame, couldNotConnect + "\n" + tryLater, diff --git a/src/main/java/net/sf/jabref/importer/AutosaveStartupPrompter.java b/src/main/java/net/sf/jabref/importer/AutosaveStartupPrompter.java index 9a47693b0bcd..3317aa232a6f 100644 --- a/src/main/java/net/sf/jabref/importer/AutosaveStartupPrompter.java +++ b/src/main/java/net/sf/jabref/importer/AutosaveStartupPrompter.java @@ -59,7 +59,7 @@ public void run() { if (Globals.prefs.getBoolean(JabRefPreferences.PROMPT_BEFORE_USING_AUTOSAVE)) { int answer = JOptionPane.showConfirmDialog(null, "" + Localization.lang("An autosave file was found for this database. This could indicate " - + "that JabRef didn't shut down cleanly last time the file was used.") + "
" + + "that JabRef did not shut down cleanly last time the file was used.") + "
" + Localization.lang("Do you want to recover the database from the autosave file?") + "", Localization.lang("Autosave of file '%0'", file.getName()), JOptionPane.YES_NO_OPTION); tryingAutosave = answer == JOptionPane.YES_OPTION; diff --git a/src/main/java/net/sf/jabref/importer/CheckForNewEntryTypesAction.java b/src/main/java/net/sf/jabref/importer/CheckForNewEntryTypesAction.java index c01a3dc06387..929a521db158 100644 --- a/src/main/java/net/sf/jabref/importer/CheckForNewEntryTypesAction.java +++ b/src/main/java/net/sf/jabref/importer/CheckForNewEntryTypesAction.java @@ -33,7 +33,7 @@ /** * This action checks whether any new custom entry types were loaded from this - * bib file. If so, an offer to remember these entry types is given. + * BIB file. If so, an offer to remember these entry types is given. */ public class CheckForNewEntryTypesAction implements PostOpenAction { diff --git a/src/main/java/net/sf/jabref/importer/ImportCustomizationDialog.java b/src/main/java/net/sf/jabref/importer/ImportCustomizationDialog.java index b7f9d99af892..c4e120fa6699 100644 --- a/src/main/java/net/sf/jabref/importer/ImportCustomizationDialog.java +++ b/src/main/java/net/sf/jabref/importer/ImportCustomizationDialog.java @@ -127,11 +127,11 @@ public ImportCustomizationDialog(final JabRefFrame frame) { }); addFromFolderButton.setToolTipText(Localization.lang("Add a (compiled) custom ImportFormat class from a class path.") + "\n" + Localization.lang("The path need not be on the classpath of JabRef.")); - JButton addFromJarButton = new JButton(Localization.lang("Add from jar")); + JButton addFromJarButton = new JButton(Localization.lang("Add from JAR")); addFromJarButton.addActionListener(e -> { String basePath = FileDialogs.getNewFile(frame, new File(Globals.prefs.get(JabRefPreferences.WORKING_DIRECTORY)), Arrays.asList(".zip", ".jar"), - Localization.lang("Select a Zip-archive"), JFileChooser.CUSTOM_DIALOG, false); + Localization.lang("Select a ZIP-archive"), JFileChooser.CUSTOM_DIALOG, false); if (basePath != null) { try (ZipFile zipFile = new ZipFile(new File(basePath), ZipFile.OPEN_READ)) { @@ -140,18 +140,18 @@ public ImportCustomizationDialog(final JabRefFrame frame) { customImporterTable.revalidate(); customImporterTable.repaint(10); } catch (IOException exc) { - LOGGER.info("Could not open Zip-archive.", exc); + LOGGER.info("Could not open ZIP-archive.", exc); JOptionPane.showMessageDialog(frame, Localization.lang("Could not open %0", basePath) + "\n" + Localization.lang("Have you chosen the correct package path?")); } catch (NoClassDefFoundError exc) { - LOGGER.info("Could not instantiate Zip-archive reader.", exc); + LOGGER.info("Could not instantiate ZIP-archive reader.", exc); JOptionPane.showMessageDialog(frame, Localization.lang("Could not instantiate %0", basePath) + "\n" + Localization.lang("Have you chosen the correct package path?")); } } }); - addFromJarButton.setToolTipText(Localization.lang("Add a (compiled) custom ImportFormat class from a Zip-archive.") + "\n" + - Localization.lang("The Zip-archive need not be on the classpath of JabRef.")); + addFromJarButton.setToolTipText(Localization.lang("Add a (compiled) custom ImportFormat class from a ZIP-archive.") + "\n" + + Localization.lang("The ZIP-archive need not be on the classpath of JabRef.")); JButton showDescButton = new JButton(Localization.lang("Show description")); showDescButton.addActionListener(e -> { diff --git a/src/main/java/net/sf/jabref/importer/ImportFormatReader.java b/src/main/java/net/sf/jabref/importer/ImportFormatReader.java index a5d099234b40..8d5db17221e4 100644 --- a/src/main/java/net/sf/jabref/importer/ImportFormatReader.java +++ b/src/main/java/net/sf/jabref/importer/ImportFormatReader.java @@ -228,7 +228,7 @@ public UnknownFormatImport importUnknownFormat(Path file) { bestFormatName = imFo.getFormatName(); } } catch (IOException ex) { - // The import didn't succeed. Go on. + // The import did not succeed. Go on. } } diff --git a/src/main/java/net/sf/jabref/importer/OpenDatabaseAction.java b/src/main/java/net/sf/jabref/importer/OpenDatabaseAction.java index 3662238e6fc4..1a2fe2148f48 100644 --- a/src/main/java/net/sf/jabref/importer/OpenDatabaseAction.java +++ b/src/main/java/net/sf/jabref/importer/OpenDatabaseAction.java @@ -72,7 +72,7 @@ public class OpenDatabaseAction extends MnemonicAwareAction { private static final List POST_OPEN_ACTIONS = new ArrayList<>(); static { - // Add the action for checking for new custom entry types loaded from the bib file: + // Add the action for checking for new custom entry types loaded from the BIB file: POST_OPEN_ACTIONS.add(new CheckForNewEntryTypesAction()); // Add the action for converting legacy entries in ExplicitGroup POST_OPEN_ACTIONS.add(new ConvertLegacyExplicitGroups()); @@ -203,7 +203,7 @@ private void openTheFile(File file, boolean raisePanel) { int answer = JOptionPane.showConfirmDialog(null, "" + Localization .lang("An autosave file was found for this database. This could indicate " - + "that JabRef didn't shut down cleanly last time the file was used.") + + "that JabRef did not shut down cleanly last time the file was used.") + "
" + Localization.lang("Do you want to recover the database from the autosave file?") + "", Localization.lang("Recover from autosave"), JOptionPane.YES_NO_OPTION); if (answer == JOptionPane.YES_OPTION) { @@ -298,7 +298,7 @@ private void openTheFile(File file, boolean raisePanel) { * Go through the list of post open actions, and perform those that need to be performed. * * @param panel The BasePanel where the database is shown. - * @param result The result of the bib file parse operation. + * @param result The result of the BIB file parse operation. */ public static void performPostOpenActions(BasePanel panel, ParserResult result, boolean mustRaisePanel) { for (PostOpenAction action : OpenDatabaseAction.POST_OPEN_ACTIONS) { @@ -354,7 +354,7 @@ public static ParserResult loadDatabase(File fileToOpen, Charset defaultEncoding /** * Load database (bib-file) or, if there exists, a newer autosave version, unless the flag is set to ignore the autosave * - * @param name Name of the bib-file to open + * @param name Name of the BIB-file to open * @param ignoreAutosave true if autosave version of the file should be ignored * @return ParserResult which never is null */ diff --git a/src/main/java/net/sf/jabref/importer/PostOpenAction.java b/src/main/java/net/sf/jabref/importer/PostOpenAction.java index 1a37c773d8fe..a21eed11a47d 100644 --- a/src/main/java/net/sf/jabref/importer/PostOpenAction.java +++ b/src/main/java/net/sf/jabref/importer/PostOpenAction.java @@ -19,7 +19,7 @@ /** * This interface defines potential actions that may need to be taken after - * opening a bib file into JabRef. This can for instance be file upgrade actions + * opening a BIB file into JabRef. This can for instance be file upgrade actions * that should be offered due to new features in JabRef, and may depend on e.g. * which JabRef version the file was last written by. * @@ -31,7 +31,7 @@ public interface PostOpenAction { /** * This method is queried in order to find out whether the action needs to be * performed or not. - * @param pr The result of the bib parse operation. + * @param pr The result of the BIB parse operation. * @return true if the action should be called, false otherwise. */ boolean isActionNecessary(ParserResult pr); @@ -46,7 +46,7 @@ public interface PostOpenAction { * into a worker thread, use Spin to do this synchronously. * * @param panel The BasePanel where the database is shown. - * @param pr The result of the bib parse operation. + * @param pr The result of the BIB parse operation. */ void performAction(BasePanel panel, ParserResult pr); } diff --git a/src/main/java/net/sf/jabref/importer/ZipFileChooser.java b/src/main/java/net/sf/jabref/importer/ZipFileChooser.java index fdede05c7ae2..d429f69e0b16 100644 --- a/src/main/java/net/sf/jabref/importer/ZipFileChooser.java +++ b/src/main/java/net/sf/jabref/importer/ZipFileChooser.java @@ -71,10 +71,10 @@ class ZipFileChooser extends JDialog { /** - * New Zip file chooser. + * New ZIP file chooser. * * @param owner Owner of the file chooser - * @param zipFile Zip-Fle to choose from, must be readable + * @param zipFile ZIP-Fle to choose from, must be readable */ public ZipFileChooser(ImportCustomizationDialog importCustomizationDialog, ZipFile zipFile) { super(importCustomizationDialog, Localization.lang("Select file from ZIP-archive"), false); @@ -151,7 +151,7 @@ public ZipFileChooser(ImportCustomizationDialog importCustomizationDialog, ZipFi /** * Entries that can be selected with this dialog. * - * @param zipFile Zip-File + * @param zipFile ZIP-File * @return entries that can be selected */ private static List getSelectableZipEntries(ZipFile zipFile) { @@ -232,17 +232,17 @@ public String getColumnName(int col) { } /** - * Zip-File entry at the given row index. + * ZIP-File entry at the given row index. * * @param rowIndex row index - * @return Zip file entry + * @return ZIP file entry */ public ZipEntry getZipEntry(int rowIndex) { return this.rows.get(rowIndex); } /** - * Zip file which contains all entries of this model. + * ZIP file which contains all entries of this model. * * @return zip file */ diff --git a/src/main/java/net/sf/jabref/importer/fetcher/ADSFetcher.java b/src/main/java/net/sf/jabref/importer/fetcher/ADSFetcher.java index b6b93b339b34..27eea104de54 100644 --- a/src/main/java/net/sf/jabref/importer/fetcher/ADSFetcher.java +++ b/src/main/java/net/sf/jabref/importer/fetcher/ADSFetcher.java @@ -128,12 +128,12 @@ private BibDatabase importADSEntries(String key, OutputPrinter status) { getTitle(), JOptionPane.ERROR_MESSAGE); LOGGER.debug("File not found", e); } catch (IOException e) { - status.showMessage(Localization.lang("An Exception occurred while accessing '%0'", url) + "\n\n" + e, + status.showMessage(Localization.lang("An exception occurred while accessing '%0'", url) + "\n\n" + e, getTitle(), JOptionPane.ERROR_MESSAGE); LOGGER.debug("Problem accessing URL", e); } catch (RuntimeException e) { status.showMessage( - Localization.lang("An Error occurred while fetching from ADS (%0):", url) + "\n\n" + e.getMessage(), + Localization.lang("An error occurred while fetching from ADS (%0):", url) + "\n\n" + e.getMessage(), getTitle(), JOptionPane.ERROR_MESSAGE); LOGGER.warn("Problem fetching from ADS", e); } @@ -174,14 +174,14 @@ private void importADSAbstract(String key, BibEntry entry, OutputPrinter status) abstractText = abstractText.replace("\n", " "); entry.setField(FieldName.ABSTRACT, abstractText); } catch (XMLStreamException e) { - status.showMessage(Localization.lang("An Error occurred while parsing abstract"), getTitle(), + status.showMessage(Localization.lang("An error occurred while parsing abstract"), getTitle(), JOptionPane.ERROR_MESSAGE); } catch (IOException e) { - status.showMessage(Localization.lang("An Exception occurred while accessing '%0'", url) + "\n\n" + e, + status.showMessage(Localization.lang("An exception occurred while accessing '%0'", url) + "\n\n" + e, getTitle(), JOptionPane.ERROR_MESSAGE); } catch (RuntimeException e) { status.showMessage( - Localization.lang("An Error occurred while fetching from ADS (%0):", url) + "\n\n" + e.getMessage(), + Localization.lang("An error occurred while fetching from ADS (%0):", url) + "\n\n" + e.getMessage(), getTitle(), JOptionPane.ERROR_MESSAGE); } } diff --git a/src/main/java/net/sf/jabref/importer/fetcher/CiteSeerXFetcher.java b/src/main/java/net/sf/jabref/importer/fetcher/CiteSeerXFetcher.java index 2a462fc789d7..9a0970be8c36 100644 --- a/src/main/java/net/sf/jabref/importer/fetcher/CiteSeerXFetcher.java +++ b/src/main/java/net/sf/jabref/importer/fetcher/CiteSeerXFetcher.java @@ -143,7 +143,7 @@ private static String getCitationsFromUrl(String urlQuery, List ids) thr private static BibEntry getSingleCitation(String urlString) throws IOException { String cont = new URLDownload(urlString).downloadToString(StandardCharsets.UTF_8); - // Find title, and create entry if we do. Otherwise assume we didn't get an entry: + // Find title, and create entry if we do. Otherwise assume we did not get an entry: Matcher m = CiteSeerXFetcher.TITLE_PATTERN.matcher(cont); if (m.find()) { BibEntry entry = new BibEntry(IdGenerator.next()); diff --git a/src/main/java/net/sf/jabref/importer/fetcher/DBLPFetcher.java b/src/main/java/net/sf/jabref/importer/fetcher/DBLPFetcher.java index d45b978f4c9c..da9b9a171863 100644 --- a/src/main/java/net/sf/jabref/importer/fetcher/DBLPFetcher.java +++ b/src/main/java/net/sf/jabref/importer/fetcher/DBLPFetcher.java @@ -91,9 +91,9 @@ public boolean processQuery(String newQuery, ImportInspector inspector, // 2014-11-08 // DBLP now shows the BibTeX entry using ugly HTML entities - // but they also offer the download of a bib file + // but they also offer the download of a BIB file // we find this in the page which we get from "url" - // and this bib file is then in "biburl" + // and this BIB file is then in "biburl" int count = 1; for (String urlStr : bibtexUrlList) { diff --git a/src/main/java/net/sf/jabref/importer/fetcher/INSPIREFetcher.java b/src/main/java/net/sf/jabref/importer/fetcher/INSPIREFetcher.java index 0c86a7828e7a..cb78b6194fbc 100644 --- a/src/main/java/net/sf/jabref/importer/fetcher/INSPIREFetcher.java +++ b/src/main/java/net/sf/jabref/importer/fetcher/INSPIREFetcher.java @@ -128,7 +128,7 @@ private BibDatabase importInspireEntries(String key, OutputPrinter frame) { return pr.getDatabase(); } } catch (RuntimeException | IOException e) { - frame.showMessage(Localization.lang("An Exception occurred while accessing '%0'", url) + "\n\n" + e, + frame.showMessage(Localization.lang("An exception occurred while accessing '%0'", url) + "\n\n" + e, getTitle(), JOptionPane.ERROR_MESSAGE); } return null; diff --git a/src/main/java/net/sf/jabref/importer/fetcher/OAI2Fetcher.java b/src/main/java/net/sf/jabref/importer/fetcher/OAI2Fetcher.java index 2f4e289fb33f..56f161603b43 100644 --- a/src/main/java/net/sf/jabref/importer/fetcher/OAI2Fetcher.java +++ b/src/main/java/net/sf/jabref/importer/fetcher/OAI2Fetcher.java @@ -220,11 +220,11 @@ public BibEntry importOai2Entry(String key) { } return be; } catch (IOException e) { - status.showMessage(Localization.lang("An Exception occurred while accessing '%0'", url) + "\n\n" + e, + status.showMessage(Localization.lang("An exception occurred while accessing '%0'", url) + "\n\n" + e, getTitle(), JOptionPane.ERROR_MESSAGE); } catch (SAXException e) { status.showMessage( - Localization.lang("An SAXException occurred while parsing '%0':", url) + "\n\n" + e.getMessage(), + Localization.lang("A SAX exception occurred while parsing '%0':", url) + "\n\n" + e.getMessage(), getTitle(), JOptionPane.ERROR_MESSAGE); } catch (RuntimeException e) { status.showMessage( diff --git a/src/main/java/net/sf/jabref/importer/fileformat/BibtexImporter.java b/src/main/java/net/sf/jabref/importer/fileformat/BibtexImporter.java index 590246cf4849..de97dc08534b 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/BibtexImporter.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/BibtexImporter.java @@ -30,7 +30,7 @@ /** * This importer exists only to enable `--importToOpen someEntry.bib` * - * It is NOT intended to import a bib file. This is done via the option action, which treats the metadata fields + * It is NOT intended to import a BIB file. This is done via the option action, which treats the metadata fields * The metadata is not required to be read here, as this class is NOT called at --import */ public class BibtexImporter extends ImportFormat { @@ -59,7 +59,7 @@ public ParserResult importDatabase(Path filePath, Charset defaultEncoding) throw try (BufferedReader utf8Reader = getUTF8Reader(filePath)) { suppliedEncoding = getSuppliedEncoding(utf8Reader); } - // Now if that didn't get us anywhere, we check with the 16 bit encoding: + // Now if that did not get us anywhere, we check with the 16 bit encoding: if (!suppliedEncoding.isPresent()) { try (BufferedReader utf16Reader = getUTF16Reader(filePath)) { suppliedEncoding = getSuppliedEncoding(utf16Reader); @@ -91,7 +91,7 @@ public List getExtensions() { @Override public String getDescription() { return "This importer exists only to enable `--importToOpen someEntry.bib`\n" + - "It is NOT intended to import a bib file. This is done via the option action, which treats the metadata fields.\n" + + "It is NOT intended to import a BIB file. This is done via the option action, which treats the metadata fields.\n" + "The metadata is not required to be read here, as this class is NOT called at --import."; } diff --git a/src/main/java/net/sf/jabref/importer/fileformat/BibtexParser.java b/src/main/java/net/sf/jabref/importer/fileformat/BibtexParser.java index 1546dfcc7dea..89df2b6d03d0 100644 --- a/src/main/java/net/sf/jabref/importer/fileformat/BibtexParser.java +++ b/src/main/java/net/sf/jabref/importer/fileformat/BibtexParser.java @@ -291,7 +291,7 @@ private void parseJabRefComment(Map meta) throws IOException { if (typ.isPresent()) { entryTypes.put(typ.get().getName(), typ.get()); } else { - parserResult.addWarning(Localization.lang("Ill-formed entrytype comment in bib file") + ": " + + parserResult.addWarning(Localization.lang("Ill-formed entrytype comment in BIB file") + ": " + comment); } @@ -562,7 +562,7 @@ private void parseField(BibEntry entry) throws IOException { // format, but // at least one online database exports bibtex like that, making // it inconvenient - // for users if JabRef didn't accept it. + // for users if JabRef did not accept it. if (InternalBibtexFields.getFieldExtras(key).contains(FieldProperties.PERSON_NAMES)) { entry.setField(key, entry.getFieldOptional(key).get() + " and " + content); } else if (FieldName.KEYWORDS.equals(key)) { diff --git a/src/main/java/net/sf/jabref/logic/auxparser/AuxParser.java b/src/main/java/net/sf/jabref/logic/auxparser/AuxParser.java index f59a8774734d..7844b4d98752 100644 --- a/src/main/java/net/sf/jabref/logic/auxparser/AuxParser.java +++ b/src/main/java/net/sf/jabref/logic/auxparser/AuxParser.java @@ -23,7 +23,7 @@ /** * LaTeX Aux to BibTeX Parser *

- * Extracts a subset of BibTeX entries from a BibDatabase that are included in an aux file. + * Extracts a subset of BibTeX entries from a BibDatabase that are included in an AUX file. */ public class AuxParser { private static final Log LOGGER = LogFactory.getLog(AuxParser.class); @@ -35,9 +35,9 @@ public class AuxParser { private final BibDatabase masterDatabase; /** - * Generates a database based on the given aux file and BibTeX database + * Generates a database based on the given AUX file and BibTeX database * - * @param auxFile Path to the LaTeX aux file + * @param auxFile Path to the LaTeX AUX file * @param database BibTeX database */ public AuxParser(String auxFile, BibDatabase database) { @@ -55,21 +55,21 @@ public AuxParserResult parse() { } /* - * Parses the aux file and extracts all bib keys. - * Also supports nested aux files (latex \\include). + * Parses the AUX file and extracts all BIB keys. + * Also supports nested AUX files (latex \\include). * - * There exists no specification of the aux file. - * Every package, class or document can write to the aux file. - * The aux file consists of LaTeX macros and is read at the \begin{document} and again at the \end{document}. + * There exists no specification of the AUX file. + * Every package, class or document can write to the AUX file. + * The AUX file consists of LaTeX macros and is read at the \begin{document} and again at the \end{document}. * * BibTeX citation: \citation{x,y,z} * Biblatex citation: \abx@aux@cite{x,y,z} - * Nested aux files: \@input{x} + * Nested AUX files: \@input{x} */ private AuxParserResult parseAuxFile() { AuxParserResult result = new AuxParserResult(masterDatabase); - // nested aux files + // nested AUX files List fileList = new ArrayList<>(1); fileList.add(auxFile); @@ -124,7 +124,7 @@ private AuxParserResult parseAuxFile() { } /* - * Try to find an equivalent BibTeX entry inside the reference database for all keys inside the aux file. + * Try to find an equivalent BibTeX entry inside the reference database for all keys inside the AUX file. */ private void resolveTags(AuxParserResult result) { for (String key : result.getUniqueKeys()) { diff --git a/src/main/java/net/sf/jabref/logic/auxparser/AuxParserResult.java b/src/main/java/net/sf/jabref/logic/auxparser/AuxParserResult.java index 4de187e6d443..6e9047099d24 100644 --- a/src/main/java/net/sf/jabref/logic/auxparser/AuxParserResult.java +++ b/src/main/java/net/sf/jabref/logic/auxparser/AuxParserResult.java @@ -69,7 +69,7 @@ public String getInformation(boolean includeMissingEntries) { StringBuilder result = new StringBuilder(); result.append(Localization.lang("keys_in_database")).append(' ').append(masterDatabase.getEntryCount()).append('\n') - .append(Localization.lang("found_in_aux_file")).append(' ').append(getFoundKeysInAux()).append('\n') + .append(Localization.lang("found_in_AUX_file")).append(' ').append(getFoundKeysInAux()).append('\n') .append(Localization.lang("resolved")).append(' ').append(getResolvedKeysCount()).append('\n') .append(Localization.lang("not_found")).append(' ').append(getUnresolvedKeysCount()).append('\n') .append(Localization.lang("crossreferenced entries included")).append(' ') @@ -81,7 +81,7 @@ public String getInformation(boolean includeMissingEntries) { } } if (nestedAuxCount > 0) { - result.append(Localization.lang("nested_aux_files")).append(' ').append(nestedAuxCount); + result.append(Localization.lang("nested_AUX_files")).append(' ').append(nestedAuxCount); } return result.toString(); } diff --git a/src/main/java/net/sf/jabref/logic/bst/BibtexCaseChanger.java b/src/main/java/net/sf/jabref/logic/bst/BibtexCaseChanger.java index 5f4deaaae67f..b508c77b694a 100644 --- a/src/main/java/net/sf/jabref/logic/bst/BibtexCaseChanger.java +++ b/src/main/java/net/sf/jabref/logic/bst/BibtexCaseChanger.java @@ -147,7 +147,7 @@ private String doChangeCase(String s, FORMAT_MODE format) { * or `\j', or an accent like one in Table~3.1 of the \LaTeX\ manual, or a * foreign character like one in Table~3.2) if the first character after the * |left_brace| is a |backslash|; the special character ends with the - * matching |right_brace|. How we handle what's in between depends on the + * matching |right_brace|. How we handle what is in between depends on the * special character. In general, this code will do reasonably well if there * is other stuff, too, between braces, but it doesn't try to do anything * special with |colon|s. diff --git a/src/main/java/net/sf/jabref/logic/bst/BibtexNameFormatter.java b/src/main/java/net/sf/jabref/logic/bst/BibtexNameFormatter.java index 33408aed066f..aa919c5e5ed4 100644 --- a/src/main/java/net/sf/jabref/logic/bst/BibtexNameFormatter.java +++ b/src/main/java/net/sf/jabref/logic/bst/BibtexNameFormatter.java @@ -89,7 +89,7 @@ public static String formatName(Author author, String format, Warn warn) { if ("fvlj".indexOf(c[i]) == -1) { if (warn != null) { warn.warn( - "Format String in format.name$ may only contain fvlj on brace level 1 in group " + "Format string in format.name$ may only contain fvlj on brace level 1 in group " + group + ": " + format); } } else { @@ -106,7 +106,7 @@ public static String formatName(Author author, String format, Warn warn) { } if ((control.length() > 2) && (warn != null)) { - warn.warn("Format String in format.name$ may only be one or two character long on brace level 1 in group " + group + ": " + format); + warn.warn("Format string in format.name$ may only be one or two character long on brace level 1 in group " + group + ": " + format); } char type = control.charAt(0); @@ -142,7 +142,7 @@ public static String formatName(Author author, String format, Warn warn) { abbreviateThatIsSingleLetter = false; } else { if (warn != null) { - warn.warn("Format String in format.name$ may only contain one type of vlfj on brace level 1 in group " + group + ": " + format); + warn.warn("Format string in format.name$ may only contain one type of vlfj on brace level 1 in group " + group + ": " + format); } } } diff --git a/src/main/java/net/sf/jabref/logic/bst/VM.java b/src/main/java/net/sf/jabref/logic/bst/VM.java index ee4ad7303b21..dead1983ad95 100644 --- a/src/main/java/net/sf/jabref/logic/bst/VM.java +++ b/src/main/java/net/sf/jabref/logic/bst/VM.java @@ -444,7 +444,7 @@ private VM(CommonTree tree) { }); /** - * Writes onto the bbl file what's accumulated in the output buffer. + * Writes onto the bbl file what is accumulated in the output buffer. * It writes a blank line if and only if the output buffer is empty. * Since write$ does reasonable line breaking, you should use this * function only when you want a blank line or an explicit line diff --git a/src/main/java/net/sf/jabref/logic/exporter/ExportFormat.java b/src/main/java/net/sf/jabref/logic/exporter/ExportFormat.java index 64ca345e8f39..013d66205a5a 100644 --- a/src/main/java/net/sf/jabref/logic/exporter/ExportFormat.java +++ b/src/main/java/net/sf/jabref/logic/exporter/ExportFormat.java @@ -151,14 +151,14 @@ private Reader getReader(String filename) throws IOException { } // Attempt to get a Reader for the file path given, either by - // loading it as a resource (from within jar), or as a normal file. If + // loading it as a resource (from within JAR), or as a normal file. If // unsuccessful (e.g. file not found), an IOException is thrown. String name = dir + filename; Reader reader; - // Try loading as a resource first. This works for files inside the jar: + // Try loading as a resource first. This works for files inside the JAR: URL reso = Globals.class.getResource(name); - // If that didn't work, try loading as a normal file URL: + // If that did not work, try loading as a normal file URL: try { if (reso == null) { File f = new File(name); diff --git a/src/main/java/net/sf/jabref/logic/layout/LayoutHelper.java b/src/main/java/net/sf/jabref/logic/layout/LayoutHelper.java index cb49be1c42ef..dd6f66b82a4d 100644 --- a/src/main/java/net/sf/jabref/logic/layout/LayoutHelper.java +++ b/src/main/java/net/sf/jabref/logic/layout/LayoutHelper.java @@ -310,13 +310,13 @@ private void parseField() throws IOException { return; } } else if ("filename".equalsIgnoreCase(name)) { - // Print the name of the database bib file. + // Print the name of the database BIB file. // This is only supported in begin/end layouts, not in // entry layouts. parsedEntries.add(new StringInt(name, LayoutHelper.IS_FILENAME)); return; } else if ("filepath".equalsIgnoreCase(name)) { - // Print the full path of the database bib file. + // Print the full path of the database BIB file. // This is only supported in begin/end layouts, not in // entry layouts. parsedEntries.add(new StringInt(name, LayoutHelper.IS_FILEPATH)); diff --git a/src/main/java/net/sf/jabref/logic/openoffice/OOBibStyle.java b/src/main/java/net/sf/jabref/logic/openoffice/OOBibStyle.java index bbafc74bfad9..7d1396c3a5f3 100644 --- a/src/main/java/net/sf/jabref/logic/openoffice/OOBibStyle.java +++ b/src/main/java/net/sf/jabref/logic/openoffice/OOBibStyle.java @@ -54,7 +54,7 @@ * This class embodies a bibliography formatting for OpenOffice, which is composed * of the following elements: *

- * 1) Each OO bib entry type must have a formatting. A formatting is an array of elements, each + * 1) Each OO BIB entry type must have a formatting. A formatting is an array of elements, each * of which is either a piece of constant text, an entry field value, or a tab. Each element has * a character format associated with it. *

@@ -509,7 +509,7 @@ public String getNumCitationMarker(List number, int minGroupingCount, b } /** - * Format the marker for the in-text citation according to this bib style. Uniquefier letters are added as + * Format the marker for the in-text citation according to this BIB style. Uniquefier letters are added as * provided by the uniquefiers argument. If successive entries within the citation are uniquefied from each other, * this method will perform a grouping of these entries. * diff --git a/src/main/java/net/sf/jabref/logic/util/TestEntry.java b/src/main/java/net/sf/jabref/logic/util/TestEntry.java index 3bf8e0cc679e..3184e465d11d 100644 --- a/src/main/java/net/sf/jabref/logic/util/TestEntry.java +++ b/src/main/java/net/sf/jabref/logic/util/TestEntry.java @@ -24,7 +24,7 @@ public static BibEntry getTestEntry() { entry.setField(FieldName.ADDRESS, "Trondheim"); entry.setField(FieldName.URL, "https://github.com/JabRef"); entry.setField(FieldName.ABSTRACT, - "This entry describes a test scenario which may be useful in JabRef. By providing a test entry it is possible to see how certain things will look in this graphical bib-file mananger."); + "This entry describes a test scenario which may be useful in JabRef. By providing a test entry it is possible to see how certain things will look in this graphical BIB-file mananger."); return entry; } } diff --git a/src/main/java/net/sf/jabref/logic/util/io/FileUtil.java b/src/main/java/net/sf/jabref/logic/util/io/FileUtil.java index 7640d087f72a..94bf846aea92 100644 --- a/src/main/java/net/sf/jabref/logic/util/io/FileUtil.java +++ b/src/main/java/net/sf/jabref/logic/util/io/FileUtil.java @@ -176,7 +176,7 @@ public static boolean renameFile(String fileName, String destFilename) { * Uses

    *
  • the default directory associated with the extension of the file
  • *
  • the standard file directory
  • - *
  • the directory of the bib file
  • + *
  • the directory of the BIB file
  • *
* * @param databaseContext The database this file belongs to. @@ -188,7 +188,7 @@ public static Optional expandFilename(final BibDatabaseContext databaseCon List directories = databaseContext.getFileDirectory(extension.orElse(null)); // Include the standard "file" directory: List fileDir = databaseContext.getFileDirectory(); - // Include the directory of the bib file: + // Include the directory of the BIB file: List al = new ArrayList<>(); for (String dir : directories) { if (!al.contains(dir)) { @@ -341,7 +341,7 @@ public static Map> findAssociatedFiles(List entri continue nextFile; } } - // If we get here, we didn't find any exact matches. If non-exact + // If we get here, we did not find any exact matches. If non-exact // matches are allowed, try to find one: if (!autolinkExactKeyOnly) { for (BibEntry entry : entries) { diff --git a/src/main/java/net/sf/jabref/logic/xmp/XMPUtil.java b/src/main/java/net/sf/jabref/logic/xmp/XMPUtil.java index 565491fcc530..166bb2bead4e 100644 --- a/src/main/java/net/sf/jabref/logic/xmp/XMPUtil.java +++ b/src/main/java/net/sf/jabref/logic/xmp/XMPUtil.java @@ -1202,7 +1202,7 @@ public static void main(String[] args) throws IOException, TransformerException } } else if (args[0].endsWith(".bib")) { - // Read from bib and write as XMP + // Read from BIB and write as XMP try (FileReader fr = new FileReader(args[0])) { ParserResult result = BibtexParser.parse(fr); Collection entries = result.getDatabase().getEntries(); diff --git a/src/main/java/net/sf/jabref/migrations/FileLinksUpgradeWarning.java b/src/main/java/net/sf/jabref/migrations/FileLinksUpgradeWarning.java index 8307753d6976..30c1b2afd7e8 100644 --- a/src/main/java/net/sf/jabref/migrations/FileLinksUpgradeWarning.java +++ b/src/main/java/net/sf/jabref/migrations/FileLinksUpgradeWarning.java @@ -168,7 +168,7 @@ private boolean isThereSomethingToBeDone() { /** * Check the database to find out whether any of a set of fields are used * for any of the entries. - * @param database The bib database. + * @param database The BIB database. * @param fields The set of fields to look for. * @return true if at least one of the given fields is set in at least one entry, * false otherwise. diff --git a/src/main/java/net/sf/jabref/model/database/BibDatabase.java b/src/main/java/net/sf/jabref/model/database/BibDatabase.java index 5ea3c93cd242..0577627e11e6 100644 --- a/src/main/java/net/sf/jabref/model/database/BibDatabase.java +++ b/src/main/java/net/sf/jabref/model/database/BibDatabase.java @@ -470,7 +470,7 @@ private String resolveContent(String result, Set usedIds) { } piv = stringEnd + 1; } else { - // We didn't find the boundaries of the string ref. This + // We did not find the boundaries of the string ref. This // makes it impossible to interpret it as a string label. // So we should just append the rest of the text and finish. newRes.append(res.substring(next)); diff --git a/src/main/java/net/sf/jabref/model/entry/CustomEntryType.java b/src/main/java/net/sf/jabref/model/entry/CustomEntryType.java index d7cb88c118a3..4cce33a174da 100644 --- a/src/main/java/net/sf/jabref/model/entry/CustomEntryType.java +++ b/src/main/java/net/sf/jabref/model/entry/CustomEntryType.java @@ -115,7 +115,7 @@ public List getSecondaryOptionalFields() { /** * Get a String describing the required field set for this entry type. * - * @return Description of required field set for storage in preferences or bib file. + * @return Description of required field set for storage in preferences or BIB file. */ public String getRequiredFieldsString() { return String.join(";", required); diff --git a/src/main/java/net/sf/jabref/sql/DatabaseUtil.java b/src/main/java/net/sf/jabref/sql/DatabaseUtil.java index ea7622e4642f..14b766553d63 100644 --- a/src/main/java/net/sf/jabref/sql/DatabaseUtil.java +++ b/src/main/java/net/sf/jabref/sql/DatabaseUtil.java @@ -44,7 +44,7 @@ public static void removeDB(String dbName, Connection conn, BibDatabaseContext d } /** - * Returns a Jabref Database ID from the database in case the DB is already exported. In case the bib was already + * Returns a Jabref Database ID from the database in case the DB is already exported. In case the BIB was already * exported before, the method returns the id, otherwise it calls the method that inserts a new row and returns the * ID for this new database * diff --git a/src/main/java/net/sf/jabref/sql/importer/DatabaseImporter.java b/src/main/java/net/sf/jabref/sql/importer/DatabaseImporter.java index 036d6778eb61..c1fa312dfdd6 100644 --- a/src/main/java/net/sf/jabref/sql/importer/DatabaseImporter.java +++ b/src/main/java/net/sf/jabref/sql/importer/DatabaseImporter.java @@ -107,7 +107,7 @@ private List readColumnNames(Connection conn) throws SQLException { * @param dbs The necessary database connection information * @param mode * @return An ArrayList containing pairs of Objects. Each position of the ArrayList stores three Objects: a - * BibDatabase, a MetaData and a String with the bib database name stored in the DBMS + * BibDatabase, a MetaData and a String with the BIB database name stored in the DBMS * @throws SQLException * @throws ClassNotFoundException * @throws InstantiationException diff --git a/src/main/resources/l10n/JabRef_da.properties b/src/main/resources/l10n/JabRef_da.properties index d70e4edfe93d..155757991526 100644 --- a/src/main/resources/l10n/JabRef_da.properties +++ b/src/main/resources/l10n/JabRef_da.properties @@ -26,11 +26,11 @@ Add=Tilføj Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Tilføj_en_(kompileret)_egendefineret_ImportFormat-klasse_fra_en_classpath. The_path_need_not_be_on_the_classpath_of_JabRef.=Stien_behøver_ikke_at_være_på_JabRefs_classpath. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Tilføj_en_kompileret_ImportFormat-klasse_fra_en_ZIP-fil. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=ZIP-filen_behøver_ikke_at_være_i_din_classpath. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Tilføj_en_kompileret_ImportFormat-klasse_fra_en_ZIP-fil. +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=ZIP-filen_behøver_ikke_at_være_i_din_classpath. Add_entry_selection_to_this_group=Føj_valgte_poster_til_denne_gruppe Add_from_folder=Tilføj_fra_mappe -Add_from_jar=Tilføj_fra_jar-fil +Add_from_JAR=Tilføj_fra_JAR-fil add_group=tilføj_gruppe Add_group=Tilføj_gruppe Add_new=Tilføj_ny @@ -45,8 +45,8 @@ All_entries=Alle_poster All_entries_of_this_type_will_be_declared_typeless._Continue?=Alle_posterne_af_denne_type_vil_blive_klassificeret_som_typeløse._Fortsæt? All_fields=Alle_felter All_subgroups_(recursively)=Alle_undergrupper_(rekursivt) -An_Exception_occurred_while_accessing_'%0'=En_fejl_opstod_ved_læsning_af_'%0' -An_SAXException_occurred_while_parsing_'%0'\:=En_SAXException_forekom_ved_læsning_af_'%0'\: +An_exception_occurred_while_accessing_'%0'=En_fejl_opstod_ved_læsning_af_'%0' +A_SAX_exception_occurred_while_parsing_'%0'\:=En_SAXException_forekom_ved_læsning_af_'%0'\: and=og and_the_class_must_be_available_in_your_classpath_next_time_you_start_JabRef.=og_klassen_skal_være_tilgængelig_i_CLASSPATH_næste_gang,_du_starter_JabRef. any_field_that_matches_the_regular_expression_%0=ethvert_felt_som_matcher_regulærudtrykket_%0 @@ -126,8 +126,8 @@ Class_name=Klassenavn Clear=Ryd Clear_fields=Ryd_felter Close=Luk -Close_Others= -Close_All= +Close_others= +Close_all= Close_dialog=Luk_dialog Close_the_current_database=Luk_denne_database Close_window=Luk_vindue @@ -344,10 +344,10 @@ Font_style=Skrifttype-stil Font_selection=Skrifttypevælger for=for Format_of_author_and_editor_names=Formattering_af_forfatter-_og_redaktørnavn -Format_String=Formatstreng +Format_string=Formatstreng Format_used=Format_brugt -Formatter_Name=Navn_på_formatering -found_in_aux_file=fundet_i_aux-fil +Formatter_name=Navn_på_formatering +found_in_AUX_file=fundet_i_AUX-fil Full_name=Fuldt_navn General=Generelt General_fields=Generelle_felter @@ -369,7 +369,7 @@ Help=Hjælp Help_on_groups=Hjælp_om_grupper Help_on_key_patterns=Hjælp_om_nøglegenerering -Help_on_Regular_Expression_Search=Hjælp_om_søgning_med_regulære_udtryk +Help_on_regular_expression_search=Hjælp_om_søgning_med_regulære_udtryk Hide_non-hits=Skjul_ikke-træffere Hierarchical_context=Gruppehierarki @@ -462,7 +462,7 @@ Mark_entries=Mærk_poster Mark_entry=Mærk_post Mark_new_entries_with_addition_date=Mærk_nye_poster_med_dato Mark_new_entries_with_owner_name=Mærk_nye_poster_med_navn_på_ejer -Memory_Stick_Mode=Memory_Stick-tilstand +Memory_stick_mode=Memory_Stick-tilstand Menu_and_label_font_size=Størrelse_på_menuskrifttyper Merged_external_changes=Inkorporerede_eksterne_ændringer Messages=Meddelelser @@ -483,7 +483,7 @@ Name=Navn Name_formatter=Navneformatering Natbib_style=Natbib-stil -nested_aux_files='nestede'_aux-filer +nested_AUX_files='nestede'_AUX-filer New=Ny new=ny New_BibTeX_entry=Ny_BibTeX-post @@ -661,7 +661,7 @@ Searching_for_duplicates...=Søger_efter_dubletter... Searching_for_files=Søger_efter_filer Secondary_sort_criterion=Sekundært_sorteringskriterium Select=Vælg -Select_a_Zip-archive=Vælg_ZIP-fil +Select_a_ZIP-archive=Vælg_ZIP-fil Select_action=Vælg_handling Select_all=Vælg_alle Select_Classpath_of_New_Importer=Vælg_classpath_for_nyt_importformat @@ -713,7 +713,7 @@ sort_subgroups=sorter_undergrupper Sorted_all_subgroups_recursively.=Sorterede_alle_undergrupper_rekursivt. Sorted_immediate_subgroups.=Sorterede_nærmeste_undergrupper. source_edit=redigering_af_kilde -Special_Name_Formatters=Specielle_navneformateringer +Special_name_formatters=Specielle_navneformateringer Special_table_columns=Specielle_kolonner SQL_connection_established.=SQL-forbindelse_oprettet. Starting_import=Starter_import @@ -724,7 +724,7 @@ Store_journal_abbreviations=Gem_tidsskriftsforkortelser Stored_entry=Post_gemt Strings=Strenge Strings_for_database=Strenge_for_database -Subdatabase_from_aux=Deldatabase_fra_aux-fil +Subdatabase_from_AUX=Deldatabase_fra_AUX-fil Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=Skifter_mellem_fuldt_og_forkortet_tidsskriftsnavn_hvis_navnet_er_kendt. Synchronize_file_links=Synkroniser_eksterne_links Synchronizing_file_links...=Synkroniserer_eksterne_links... @@ -837,7 +837,7 @@ You_must_restart_JabRef_for_the_new_key_bindings_to_work_properly.=Du_skal_genst Your_new_key_bindings_have_been_stored.=Dine_nye_genvejstaster_er_blevet_gemt. The_following_fetchers_are_available\:=Følgende_henteværktøjer_er_tilgængelige\: Could_not_find_fetcher_'%0'=Kunne_ikke_finde_henteværktøjet_'%0' -Running_Query_'%0'_with_fetcher_'%1'.=Kører_forespørgsel_'%0'_med_henteværktøjet_'%1'. +Running_query_'%0'_with_fetcher_'%1'.=Kører_forespørgsel_'%0'_med_henteværktøjet_'%1'. Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=Forespørgsel_'%0'_med_henteværktøjet_'%1'_returnerede_ingen_resultater. Move/Rename_file=Flyt/omdøb_fil File_moved=Fil_flyttet @@ -875,7 +875,7 @@ MIME_type=MIME-type 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.=Denne_funktion_tillader,_at_flere_filer_kan_åbnes_eller_importeres_i_en_allerede_kørende_JabRef
i_stedet_for_at_åbne_programmet_påny._For_eksempel_er_dette_praktisk,_når_du_åbner_filer_i
JabRef_fra_din_web_browser.
Bemærk_at_dette_vil_forhindre_dig_i_at_køre_mere_end_en_instans_af_JabRef_ad_gangen. -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=Kør_henteværktøj,_f.eks._"--fetch\=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=Kør_henteværktøj,_f.eks._"--fetch\=Medline\:cancer" The_ACM_Digital_Library=ACM_Digital_Library Reset=Nulstil @@ -1075,7 +1075,7 @@ Style_selection=Valg_af_stil No_valid_style_file_defined=Ingen_gyldig_stilfil_defineret Choose_pattern=Vælg_mønster -Use_the_bib_file_location_as_primary_file_directory=Brug_placeringen_af_bib-filen_som_standard_filbibliotek +Use_the_BIB_file_location_as_primary_file_directory=Brug_placeringen_af_BIB-filen_som_standard_filbibliotek Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=Kunne_ikke_køre_gnuclient/emacsclient._Tjek_at_du_har_programmet_installeret_og_tilgængeligt_i_PATH. Built-in_journal_list=Indbygget_tidsskriftsliste OpenOffice/LibreOffice_connection=Forbindelse_til_OpenOffice/LibreOffice @@ -1218,7 +1218,7 @@ Removed_all_subgroups_of_group_"%0".= To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.= Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.= Use_the_following_delimiter_character(s)\:= -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above= +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above= Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.= Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.= @@ -1230,8 +1230,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case= Import_conversions= Please_enter_a_search_string= Please_open_or_start_a_new_database_before_searching= -An_Error_occurred_while_fetching_from_ADS_(%0)\:= -An_Error_occurred_while_parsing_abstract= +An_error_occurred_while_fetching_from_ADS_(%0)\:= +An_error_occurred_while_parsing_abstract= Unknown_DiVA_entry\:_'%0'.= Get_BibTeX_entry_from_DiVA= Log= @@ -1258,7 +1258,7 @@ Automatically_set_file_links= Continue?= Resetting_all_key_bindings= Quotes= -Curly_Brackets= +Curly_brackets= Hostname= Invalid_setting= @@ -1421,7 +1421,7 @@ Attention\:_Password_is_stored_in_plain_text\!= Please_specify_both_username_and_password= Proxy_requires_authentication= -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.= +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.= Note\:_A_full_text_search_is_currently_not_supported_for_%0= Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.= @@ -1474,7 +1474,7 @@ Copy_preview= Automatically_setting_file_links= Regenerating_BibTeX_keys_according_to_metadata= -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys= +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys= Regenerate_all_keys_for_the_entries_in_a_BibTeX_file= @@ -1491,7 +1491,7 @@ No_entry_found_for_ISBN_%0_at_www.ebook.de= Save_actions= Enable_save_actions= -Always_reformat_.bib_file_on_save_and_export= +Always_reformat_BIB_file_on_save_and_export= Default_bibliography_mode= Show_only_preferences_deviating_from_their_default_value= @@ -1524,7 +1524,7 @@ Usage= Are_you_sure_you_want_to_reset_all_settings_to_default_values?= Reset_preferences= -Ill-formed_entrytype_comment_in_bib_file= +Ill-formed_entrytype_comment_in_BIB_file= Clipboard= Could_not_paste_entry_as_text\:= Do_you_still_want_to_continue?= @@ -1689,9 +1689,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/JabRef_de.properties b/src/main/resources/l10n/JabRef_de.properties index 2ac911b35b38..1adc6446a56e 100644 --- a/src/main/resources/l10n/JabRef_de.properties +++ b/src/main/resources/l10n/JabRef_de.properties @@ -47,15 +47,15 @@ Add=Hinzufügen Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Füge_eine_(kompilierte)_externe_ImportFormat_Klasse_aus_einem_Verzeichnis_hinzu. The_path_need_not_be_on_the_classpath_of_JabRef.=Das_Verzeichnis_muss_nicht_im_Klassenpfad_von_JabRef_enthalten_sein. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Füge_eine_(kompilierte)_externe_ImportFormat_Klasse_aus_Verzeichnis_hinzu. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=Das_Verzeichnis_muss_nicht_im_Klassenpfad_von_JabRef_enthalten_sein. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Füge_eine_(kompilierte)_externe_ImportFormat_Klasse_aus_Verzeichnis_hinzu. +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=Das_Verzeichnis_muss_nicht_im_Klassenpfad_von_JabRef_enthalten_sein. Add_entry_selection_to_this_group=Ausgewählte_Einträge_zu_dieser_Gruppe_hinzufügen Add_from_folder=Aus_Klassenpfad_hinzufügen -Add_from_jar=Aus_Archiv-Datei_hinzufügen +Add_from_JAR=Aus_Archiv-Datei_hinzufügen add_group=Gruppe_hinzufügen @@ -85,8 +85,8 @@ All_fields=Alle_Felder All_subgroups_(recursively)=Alle_Untergruppen_(rekursiv) -An_Exception_occurred_while_accessing_'%0'=Fehler_beim_Zugriff_auf_'%0' -An_SAXException_occurred_while_parsing_'%0'\:=Beim_Parsen_von_'%0'_ist_eine_SAX-Exception_aufgetreten\: +An_exception_occurred_while_accessing_'%0'=Fehler_beim_Zugriff_auf_'%0' +A_SAX_exception_occurred_while_parsing_'%0'\:=Beim_Parsen_von_'%0'_ist_eine_SAX-Exception_aufgetreten\: and=und @@ -246,8 +246,8 @@ Clear_fields=Felder_löschen Close=Schließen -Close_Others=Andere_schließen -Close_All=Alle_schließen +Close_others=Andere_schließen +Close_all=Alle_schließen Close_dialog=Dialog_schließen Close_the_current_database=Aktuelle_Datei_schließen @@ -621,12 +621,12 @@ Font_selection=Schriften_wählen for=für Format_of_author_and_editor_names=Format_der_Autoren-_und_Hrsg.-Namen -Format_String=Formatier-Ausdruck +Format_string=Formatier-Ausdruck Format_used=benutztes_Format -Formatter_Name=Name_des_Formatierers +Formatter_name=Name_des_Formatierers -found_in_aux_file=gefundene_Schlüssel_in_AUX_Datei +found_in_AUX_file=gefundene_Schlüssel_in_AUX_Datei Full_name=Kompletter_Name @@ -669,7 +669,7 @@ Help=Hilfe Help_on_groups=Hilfe_zu_Gruppen Help_on_key_patterns=Hilfe_zu_BibTeX-Key-Mustern -Help_on_Regular_Expression_Search=Hilfe_zur_Suche_mit_regulärem_Ausdruck +Help_on_regular_expression_search=Hilfe_zur_Suche_mit_regulärem_Ausdruck Hide_non-hits=Nicht-Treffer_ausblenden @@ -844,7 +844,7 @@ Mark_new_entries_with_addition_date=Neue_Einträge_mit_Datum_versehen Mark_new_entries_with_owner_name=Neue_Einträge_mit_Namen_des_Besitzers_versehen # These are status line messages when marking/unmarking entries\: -Memory_Stick_Mode=Memory_Stick-Modus +Memory_stick_mode=Memory_Stick-Modus Menu_and_label_font_size=Schriftgröße_in_Menüs @@ -883,7 +883,7 @@ Name_formatter=Namens-Formatierer Natbib_style=Natbib-Stil -nested_aux_files=referenzierte_AUX_Dateien +nested_AUX_files=referenzierte_AUX_Dateien New=Neu @@ -1226,7 +1226,7 @@ Secondary_sort_criterion=Zweites_Sortierkriterium Select=Auswählen -Select_a_Zip-archive=ZIP-Archiv_auswählen +Select_a_ZIP-archive=ZIP-Archiv_auswählen Select_action=Aktion_wählen @@ -1323,7 +1323,7 @@ Sorted_all_subgroups_recursively.=Alle_Untergruppen_rekursiv_sortiert. Sorted_immediate_subgroups.=Alle_direkten_Untergruppen_sortiert. source_edit=Quelltextbearbeitung -Special_Name_Formatters=Spezielle_Namens-Formatierer +Special_name_formatters=Spezielle_Namens-Formatierer Special_table_columns=Spezielle_Spalten SQL_connection_established.=SQL-Verbindung_hergestellt. @@ -1347,7 +1347,7 @@ Strings=Ersetzen Strings_for_database=Strings_für_die_Datei -Subdatabase_from_aux=Teildatenbank_aus_aux-Datei +Subdatabase_from_AUX=Teildatenbank_aus_AUX-Datei ##\## These lines were changed\: @@ -1543,7 +1543,7 @@ Your_new_key_bindings_have_been_stored.=Ihre_neuen_Tastenkürzel_wurden_gespeich The_following_fetchers_are_available\:=Folgende_Recherchetools_stehen_zur_Verfügung\: Could_not_find_fetcher_'%0'=Recherchetool_'%0'_konnte_nicht_gefunden_werden -Running_Query_'%0'_with_fetcher_'%1'.=Abfrage_'%0'_wird_mit_dem_Recherchetool_'%1'_durchgeführt. +Running_query_'%0'_with_fetcher_'%1'.=Abfrage_'%0'_wird_mit_dem_Recherchetool_'%1'_durchgeführt. Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=Die_Abfrage_'%0'_mit_dem_Recherchetool_'%1'_lieferte_keine_Ergebnisse. Move/Rename_file=Datei_verschieben/umbenennen File_moved=Datei_verschoben @@ -1584,7 +1584,7 @@ MIME_type=MIME-Typ 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.=Diese_Funktion_öffnet_neue_oder_importierte_Dateien_in_einer_bereits_laufenden_Instanz_von_JabRef
und_nicht_in_einem_neuen_Fenster._Das_ist_beispielsweise_nützlich,
wenn_Sie_JabRef_von_einem_Webbrowser_aus_starten.
Beachten_Sie,_dass_damit_nicht_mehr_als_eine_Instanz_von_JabRef_gestartet_werden_kann. -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=Recherche_starten,_z.B._"--fetch=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=Recherche_starten,_z.B._"--fetch=Medline\:cancer" The_ACM_Digital_Library=ACM_Digital_Library Reset=Zurücksetzen @@ -1782,7 +1782,7 @@ Style_selection=Stil-Auswahl No_valid_style_file_defined=Keine_gültige_Stildatei_angegeben Choose_pattern=Muster_wählen -Use_the_bib_file_location_as_primary_file_directory=Pfad_der_bib-Datei_als_primäres_Dateiverzeichnis_verwenden +Use_the_BIB_file_location_as_primary_file_directory=Pfad_der_BIB-Datei_als_primäres_Dateiverzeichnis_verwenden Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=Das_gnuclient/emacsclient-Programm_konnte_nicht_gestartet_werden._Vergewissern_Sie_sich,_dass_das_emacsclient/gnuclient-Programm_installiert_und_im_PATH_enthalten_ist. Built-in_journal_list=Integrierte_Zeitschriften-Liste OpenOffice/LibreOffice_connection=OpenOffice/LibreOffice-Verbindung @@ -1926,7 +1926,7 @@ Removed_all_subgroups_of_group_"%0".=Alle_Untergruppen_der_Gruppe_"%0"_wurden_en To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.=Um_den_USB-Stick-Modus_zu_deaktivieren,_benennen_Sie_die_Datei_jabref.xml_in_demselben_Ordner_als_JabRef_oder_löschen_Sie_sie. Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.=Verbindung_fehlgeschlagen._Ein_möglicher_Grund_ist,_dass_JabRef_und_OpenOffice/LibreOffice_nicht_beide_im_32-bit_oder_64-bit_Modus_laufen. Use_the_following_delimiter_character(s)\:=Benutzen_Sie_die_folgenden_Trennzeichen\: -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above=Beim_Herunterladen_von_Dateien_oder_beim_Verschieben_von_verlinkten_Dateien_in_das_Dateiverzeichnis_soll_der_Pfad_der_bib-Datei_benutzt_werden,_nicht_das_oben_definierte_Dateiverzeichnis +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above=Beim_Herunterladen_von_Dateien_oder_beim_Verschieben_von_verlinkten_Dateien_in_das_Dateiverzeichnis_soll_der_Pfad_der_BIB-Datei_benutzt_werden,_nicht_das_oben_definierte_Dateiverzeichnis Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Ihre_Stildatei_legt_das_Zeichenformat_'%0'_fest,_das_in_Ihrem_aktuellen_OpenOffice/LibreOffice-Dokument_nicht_definiert_ist. Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Ihre_Stildatei_legt_das_Abschnittsformat_'%0'_fest,_das_in_Ihrem_aktuellen_OpenOffice/LibreOffice-Dokument_nicht_definiert_ist. @@ -1938,8 +1938,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case=Nach_der_Such Import_conversions=Konvertierungen_importieren Please_enter_a_search_string=Bitte_geben_Sie_eine_Suchphrase_ein Please_open_or_start_a_new_database_before_searching=Bitte_öffnen_Sie_eine_Datei_oder_legen_Sie_eine_neue_an,_bevor_Sie_suchen -An_Error_occurred_while_fetching_from_ADS_(%0)\:=Beim_Abrufen_von_ADS_ist_ein_Fehler_aufgetreten_(%0)\: -An_Error_occurred_while_parsing_abstract=Beim_Parsen_der_Zusammenfassung_ist_ein_Fehler_aufgetreten +An_error_occurred_while_fetching_from_ADS_(%0)\:=Beim_Abrufen_von_ADS_ist_ein_Fehler_aufgetreten_(%0)\: +An_error_occurred_while_parsing_abstract=Beim_Parsen_der_Zusammenfassung_ist_ein_Fehler_aufgetreten Unknown_DiVA_entry\:_'%0'.=Unbekannter_DiVA-Eintrag\:_'0%'. Get_BibTeX_entry_from_DiVA=BibTeX-Eintrag_aus_DiVA_erstellen Log=Protokoll @@ -1966,7 +1966,7 @@ Automatically_set_file_links=Dateilinks_automatisch_setzen Continue?=Fortfahren? Resetting_all_key_bindings=Alle_Tastaturkürzel_werden_zurückgesetzt Quotes=Anführungszeichen -Curly_Brackets=Geschweifte_Klammern +Curly_brackets=Geschweifte_Klammern Hostname=Host Invalid_setting=Ungültige_Einstellung @@ -2134,7 +2134,7 @@ Please_specify_both_username_and_password=Bitte_geben_Sie_Benutzernamen_und_Pass Proxy_requires_authentication=Proxy_erfordert_Authentifizierung -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.=Es_wurde_eine_Sicherungsdatei_für_diese_Datenbank_gefunden._Dies_deutet_darauf_hin,_dass_JabRef_das_letzte_mal_nicht_korrekt_beende_wurde,_als_diese_Datei_benutzt_wurde. +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.=Es_wurde_eine_Sicherungsdatei_für_diese_Datenbank_gefunden._Dies_deutet_darauf_hin,_dass_JabRef_das_letzte_mal_nicht_korrekt_beende_wurde,_als_diese_Datei_benutzt_wurde. Note\:_A_full_text_search_is_currently_not_supported_for_%0=Beachten_Sie\:_Eine_Volltextsuche_für_%0_wird_zurzeit_nicht_unterstützt Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.=Konnte_Openoffice/LibreOffice_Installationspfad_nicht_atuomatisch_bestimmen._Bitte_wählen_Sie_das_Installationsverzeichnis_manuell_aus. @@ -2186,7 +2186,7 @@ Copy_preview=Kopiere_Vorschau Automatically_setting_file_links=Dateilinks_werden_automatisch_gesetzt Regenerating_BibTeX_keys_according_to_metadata=Regeneriere_BibTeX-Keys_anhand_ihrer_Metadaten -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys=Keine_Metadaten_in_Bibdatei_vorhanden. Kann_keine_BibTeX-Keys_regenerieren +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys=Keine_Metadaten_in_Bibdatei_vorhanden. Kann_keine_BibTeX-Keys_regenerieren Regenerate_all_keys_for_the_entries_in_a_BibTeX_file=Regeneriere_alle_BibTeX-Keys_für_Einträge_in_einer_BibTeX_Datei @@ -2203,7 +2203,7 @@ No_entry_found_for_ISBN_%0_at_www.ebook.de=Kein_Eintrag_für_ISBN_%0_bei_www.ebo Save_actions=Speicheraktionen Enable_save_actions=Speicheraktionen_aktivieren -Always_reformat_.bib_file_on_save_and_export=Formatiere_.bib_Datei_immer_neu_beim_Exportieren +Always_reformat_BIB_file_on_save_and_export=Formatiere_BIB_Datei_immer_neu_beim_Exportieren Default_bibliography_mode=Standard_Bibliographiemodus Show_only_preferences_deviating_from_their_default_value=Zeige_nur_Einstellungen,_die_vom_Standardwert_abweichen @@ -2237,7 +2237,7 @@ Usage=Bedienung Are_you_sure_you_want_to_reset_all_settings_to_default_values?=Wollen_sie_wirklich_alle_Einstellungen_auf_Standardwerte_zurücksetzen? Reset_preferences=Einstellungen_zurücksetzen -Ill-formed_entrytype_comment_in_bib_file=Fehlerhafter_Eintragstypkommentar_in_bib_Datei +Ill-formed_entrytype_comment_in_BIB_file=Fehlerhafter_Eintragstypkommentar_in_BIB_Datei Clipboard=Zwischenablage Could_not_paste_entry_as_text\:=Konnte_Einträge_nicht_als_Text_parsen\: Do_you_still_want_to_continue?=Wollen_Sie_wirklich_fortfahren? @@ -2407,9 +2407,9 @@ New_version_available=Neue_Version_vefügbar Installed_version=Installierte_Version Remind_me_later=Später_erinnern Ignore_this_update=Diese_Aktualisierung_ignorieren -Couldn't_connect_to_the_update_server.=Konnte_nicht_zum_Aktualisierungsserver_verbinden. +Could_not_connect_to_the_update_server.=Konnte_nicht_zum_Aktualisierungsserver_verbinden. Please_try_again_later_and/or_check_your_network_connection.=Bitte_versuchen_Sie_es_später_erneut_und/oder_prüfen_Sie_ihre_Netzwerkverbindung. -To_see_what's_new_view_the_changelog.=Für_Neuerungen/Änderungen_Changelog_ansehen. +To_see_what_is_new_view_the_changelog.=Für_Neuerungen/Änderungen_Changelog_ansehen. A_new_version_of_JabRef_has_been_released.=Eine_neue_JabRef_Version_wurde_veröffentlicht. JabRef_is_up-to-date.=JabRef_ist_auf_dem_aktuellsten_Stand. Latest_version=Neueste_Version diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index b5138fe4b533..168b4de911d6 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -45,14 +45,14 @@ Add=Add Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path. The_path_need_not_be_on_the_classpath_of_JabRef.=The_path_need_not_be_on_the_classpath_of_JabRef. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=The_Zip-archive_need_not_be_on_the_classpath_of_JabRef. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive. +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef. Add_entry_selection_to_this_group=Add_entry_selection_to_this_group Add_from_folder=Add_from_folder -Add_from_jar=Add_from_jar +Add_from_JAR=Add_from_JAR add_group=add_group @@ -80,10 +80,10 @@ All_fields=All_fields All_subgroups_(recursively)=All_subgroups_(recursively) -Always_reformat_.bib_file_on_save_and_export=Always_reformat_.bib_file_on_save_and_export +Always_reformat_BIB_file_on_save_and_export=Always_reformat_BIB_file_on_save_and_export -An_Exception_occurred_while_accessing_'%0'=An_Exception_occurred_while_accessing_'%0' -An_SAXException_occurred_while_parsing_'%0'\:=An_SAXException_occurred_while_parsing_'%0'\: +An_exception_occurred_while_accessing_'%0'=An_exception_occurred_while_accessing_'%0' +A_SAX_exception_occurred_while_parsing_'%0'\:=A_SAX_exception_occurred_while_parsing_'%0'\: and=and and_the_class_must_be_available_in_your_classpath_next_time_you_start_JabRef.=and_the_class_must_be_available_in_your_classpath_next_time_you_start_JabRef. @@ -231,8 +231,8 @@ Clear=Clear Clear_fields=Clear_fields Close=Close -Close_Others=Close_Others -Close_All=Close_All +Close_others=Close_others +Close_all=Close_all Close_dialog=Close_dialog @@ -595,12 +595,12 @@ Font_selection=Font_selection for=for Format_of_author_and_editor_names=Format_of_author_and_editor_names -Format_String=Format_String +Format_string=Format_string Format_used=Format_used -Formatter_Name=Formatter_Name +Formatter_name=Formatter_name -found_in_aux_file=found_in_aux_file +found_in_AUX_file=found_in_AUX_file Full_name=Full_name @@ -638,7 +638,7 @@ Help=Help Help_on_groups=Help_on_groups Help_on_key_patterns=Help_on_key_patterns -Help_on_Regular_Expression_Search=Help_on_Regular_Expression_Search +Help_on_regular_expression_search=Help_on_regular_expression_search Hide_non-hits=Hide_non-hits @@ -755,7 +755,7 @@ Key_pattern=Key_pattern keys_in_database=keys_in_database -#nottranslated.Toviewit,usemenu"Tools|NewBibTeXfilefromAUxfile",andlaunchtheactiononanon-existantauxfile. +#nottranslated.Toviewit,usemenu"Tools|NewBibTeXfilefromAUxfile",andlaunchtheactiononanon-existantAUXfile. Keyword=Keyword Label=Label @@ -803,7 +803,7 @@ Mark_new_entries_with_addition_date=Mark_new_entries_with_addition_date Mark_new_entries_with_owner_name=Mark_new_entries_with_owner_name -Memory_Stick_Mode=Memory_Stick_Mode +Memory_stick_mode=Memory_stick_mode Menu_and_label_font_size=Menu_and_label_font_size @@ -841,7 +841,7 @@ Name_formatter=Name_formatter Natbib_style=Natbib_style -nested_aux_files=nested_aux_files +nested_AUX_files=nested_AUX_files New=New @@ -1158,7 +1158,7 @@ Secondary_sort_criterion=Secondary_sort_criterion Select=Select -Select_a_Zip-archive=Select_a_Zip-archive +Select_a_ZIP-archive=Select_a_ZIP-archive Select_action=Select_action @@ -1244,7 +1244,7 @@ Sorted_all_subgroups_recursively.=Sorted_all_subgroups_recursively. Sorted_immediate_subgroups.=Sorted_immediate_subgroups. source_edit=source_edit -Special_Name_Formatters=Special_Name_Formatters +Special_name_formatters=Special_name_formatters Special_table_columns=Special_table_columns SQL_connection_established.=SQL_connection_established. @@ -1265,7 +1265,7 @@ Strings=Strings Strings_for_database=Strings_for_database -Subdatabase_from_aux=Subdatabase_from_aux +Subdatabase_from_AUX=Subdatabase_from_AUX Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known. @@ -1447,7 +1447,7 @@ Your_new_key_bindings_have_been_stored.=Your_new_key_bindings_have_been_stored. The_following_fetchers_are_available\:=The_following_fetchers_are_available\: Could_not_find_fetcher_'%0'=Could_not_find_fetcher_'%0' -Running_Query_'%0'_with_fetcher_'%1'.=Running_Query_'%0'_with_fetcher_'%1'. +Running_query_'%0'_with_fetcher_'%1'.=Running_query_'%0'_with_fetcher_'%1'. Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=Query_'%0'_with_fetcher_'%1'_did_not_return_any_results. Move/Rename_file=Move/Rename_file File_moved=File_moved @@ -1484,7 +1484,7 @@ Move_the_keyboard_focus_to_the_entry_table=Move_the_keyboard_focus_to_the_entry_ MIME_type=MIME_type 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.=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. -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=Run_Fetcher,_e.g._"--fetch=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=Run_fetcher,_e.g._"--fetch=Medline\:cancer" The_ACM_Digital_Library=The_ACM_Digital_Library Reset=Reset @@ -1679,7 +1679,7 @@ Web_search=Web_search Style_selection=Style_selection No_valid_style_file_defined=No_valid_style_file_defined Choose_pattern=Choose_pattern -Use_the_bib_file_location_as_primary_file_directory=Use_the_bib_file_location_as_primary_file_directory +Use_the_BIB_file_location_as_primary_file_directory=Use_the_BIB_file_location_as_primary_file_directory Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH. Built-in_journal_list=Built-in_journal_list OpenOffice/LibreOffice_connection=OpenOffice/LibreOffice_connection @@ -1824,7 +1824,7 @@ Removed_all_subgroups_of_group_"%0".=Removed_all_subgroups_of_group_"%0". To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.=To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef. Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.=Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode. Use_the_following_delimiter_character(s)\:=Use_the_following_delimiter_character(s)\: -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above=When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above=When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document. Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document. @@ -1836,8 +1836,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case=Add_{}_to_spe Import_conversions=Import_conversions Please_enter_a_search_string=Please_enter_a_search_string Please_open_or_start_a_new_database_before_searching=Please_open_or_start_a_new_database_before_searching -An_Error_occurred_while_fetching_from_ADS_(%0)\:=An_Error_occurred_while_fetching_from_ADS_(%0)\: -An_Error_occurred_while_parsing_abstract=An_Error_occurred_while_parsing_abstract +An_error_occurred_while_fetching_from_ADS_(%0)\:=An_error_occurred_while_fetching_from_ADS_(%0)\: +An_error_occurred_while_parsing_abstract=An_error_occurred_while_parsing_abstract Unknown_DiVA_entry\:_'%0'.=Unknown_DiVA_entry\:_'%0'. Get_BibTeX_entry_from_DiVA=Get_BibTeX_entry_from_DiVA Log=Log @@ -1864,7 +1864,7 @@ Automatically_set_file_links=Automatically_set_file_links Continue?=Continue? Resetting_all_key_bindings=Resetting_all_key_bindings Quotes=Quotes -Curly_Brackets=Curly_Brackets +Curly_brackets=Curly_brackets Hostname=Hostname Invalid_setting=Invalid_setting Network=Network @@ -2030,7 +2030,7 @@ This_search_contains_entries_in_which_any_field_contains_the_regular_expression_ This_search_contains_entries_in_which_any_field_contains_the_term_%0=This_search_contains_entries_in_which_any_field_contains_the_term_%0 This_search_contains_entries_in_which=This_search_contains_entries_in_which -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.=An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used. +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.=An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used. Note\:_A_full_text_search_is_currently_not_supported_for_%0=Note\:_A_full_text_search_is_currently_not_supported_for_%0 Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.=Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually. JabRef_no_longer_supports_'ps'_or_'pdf'_fields.
File_links_are_now_stored_in_the_'file'_field_and_files_are_stored_in_an_external_file_directory.
To_make_use_of_this_feature,_JabRef_needs_to_upgrade_file_links.

=JabRef_no_longer_supports_'ps'_or_'pdf'_fields.
File_links_are_now_stored_in_the_'file'_field_and_files_are_stored_in_an_external_file_directory.
To_make_use_of_this_feature,_JabRef_needs_to_upgrade_file_links.

@@ -2078,7 +2078,7 @@ should_contain_a_protocol=should_contain_a_protocol Copy_preview=Copy_preview Automatically_setting_file_links=Automatically_setting_file_links Regenerating_BibTeX_keys_according_to_metadata=Regenerating_BibTeX_keys_according_to_metadata -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys=No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys=No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys Regenerate_all_keys_for_the_entries_in_a_BibTeX_file=Regenerate_all_keys_for_the_entries_in_a_BibTeX_file Show_debug_level_messages=Show_debug_level_messages Default_bibliography_mode=Default_bibliography_mode @@ -2114,7 +2114,7 @@ Usage=Usage Adds_{}_brackets_around_acronyms,_month_names_and_countries_to_preserve_their_case.=Adds_{}_brackets_around_acronyms,_month_names_and_countries_to_preserve_their_case. Are_you_sure_you_want_to_reset_all_settings_to_default_values?=Are_you_sure_you_want_to_reset_all_settings_to_default_values? Reset_preferences=Reset_preferences -Ill-formed_entrytype_comment_in_bib_file=Ill-formed_entrytype_comment_in_bib_file +Ill-formed_entrytype_comment_in_BIB_file=Ill-formed_entrytype_comment_in_BIB_file Move_linked_files_to_default_file_directory_%0=Move_linked_files_to_default_file_directory_%0 @@ -2264,9 +2264,9 @@ New_version_available=New_version_available Installed_version=Installed_version Remind_me_later=Remind_me_later Ignore_this_update=Ignore_this_update -Couldn't_connect_to_the_update_server.=Couldn't_connect_to_the_update_server. +Could_not_connect_to_the_update_server.=Could_not_connect_to_the_update_server. Please_try_again_later_and/or_check_your_network_connection.=Please_try_again_later_and/or_check_your_network_connection. -To_see_what's_new_view_the_changelog.=To_see_what's_new_view_the_changelog. +To_see_what_is_new_view_the_changelog.=To_see_what_is_new_view_the_changelog. A_new_version_of_JabRef_has_been_released.=A_new_version_of_JabRef_has_been_released. JabRef_is_up-to-date.=JabRef_is_up-to-date. Latest_version=Latest_version diff --git a/src/main/resources/l10n/JabRef_es.properties b/src/main/resources/l10n/JabRef_es.properties index 92ae1e93eb9c..0a7015f3d166 100644 --- a/src/main/resources/l10n/JabRef_es.properties +++ b/src/main/resources/l10n/JabRef_es.properties @@ -25,11 +25,11 @@ Action=Acción Add=Añadir Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Añadir_una_clase_personalizada_(compilada)_ImportFormat_desde_una_classpath. The_path_need_not_be_on_the_classpath_of_JabRef.=La_ruta_no_debe_estar_en_la_classpath_de_JabRef. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Añadir_una_clase_personalizada_(compilada)_ImportFormat_desde_un_archivo_Zip. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=El_archivo_Zip_no_tiene_por_qué_estar_en_la_classpath_de_JabRef. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Añadir_una_clase_personalizada_(compilada)_ImportFormat_desde_un_archivo_ZIP. +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=El_archivo_ZIP_no_tiene_por_qué_estar_en_la_classpath_de_JabRef. Add_entry_selection_to_this_group=Añadir_selección_de_entrada_al_grupo Add_from_folder=Añadir_desde_carpeta -Add_from_jar=Añadir_desde_jar +Add_from_JAR=Añadir_desde_JAR add_group=añadir_grupo Add_group=Añadir_grupo Add_new=Añadir_nuevo @@ -44,8 +44,8 @@ All_entries=Todas_las_entradas All_entries_of_this_type_will_be_declared_typeless._Continue?=Todas_las_entradas_de_este_tipo_serán_declaradas_Sin_Tipo._¿Continuar? All_fields=Todos_los_campos All_subgroups_(recursively)=Todos_los_subgrupos(Recursivamente) -An_Exception_occurred_while_accessing_'%0'=Ocurrió_una_Excepción_mientras_se_accedía_a_'%0' -An_SAXException_occurred_while_parsing_'%0'\:=Ocurrió_una_Excepción_SAX_mientras_se_analizaba_la_sintaxis_de_'%0'\: +An_exception_occurred_while_accessing_'%0'=Ocurrió_una_Excepción_mientras_se_accedía_a_'%0' +A_SAX_exception_occurred_while_parsing_'%0'\:=Ocurrió_una_Excepción_SAX_mientras_se_analizaba_la_sintaxis_de_'%0'\: and=y and_the_class_must_be_available_in_your_classpath_next_time_you_start_JabRef.=y_la_clase_debe_estar_disponible_en_su_classpath_la_próxima_vez_que_inicie_JabRef. any_field_that_matches_the_regular_expression_%0=cualquier_campo_que_satisfaga_la_Expresión_Regular_%0 @@ -123,8 +123,8 @@ Class_name=Nombre_de_clase Clear=Limpiar Clear_fields=Limpiar_campos Close=Cerrar -Close_Others=Cerrar_otros -Close_All=Cerrar_todos +Close_others=Cerrar_otros +Close_all=Cerrar_todos Close_dialog=Cerrar_diálogo Close_the_current_database=Cerrar_la_base_de_datos_actual Close_window=Cerrar_ventana @@ -320,10 +320,10 @@ Font_style=Estilo_de_tipo_de_letra Font_selection=Selector_tipo_de_letra for=para Format_of_author_and_editor_names=Formato_de_los_nombres_de_autor_y_editor -Format_String=Formatear_cadena +Format_string=Formatear_cadena Format_used=Formato_usado -Formatter_Name=Nombre_del_formateador -found_in_aux_file=encontrado_en_archivo_aux +Formatter_name=Nombre_del_formateador +found_in_AUX_file=encontrado_en_archivo_AUX Full_name=Nombre_completo General=General General_fields=Generar_campos @@ -343,7 +343,7 @@ Have_you_chosen_the_correct_package_path?=¿Ha_escogido_la_ruta_de_paquetes_corr Help=Ayuda Help_on_groups=Ayuda_sobre_grupos Help_on_key_patterns=Ayuda_sobre_patrones_de_teclas -Help_on_Regular_Expression_Search=Ayuda_sobre_búsqueda_mediante_expresión_regular +Help_on_regular_expression_search=Ayuda_sobre_búsqueda_mediante_expresión_regular Hide_non-hits=Esconder_los_no-aciertos Hierarchical_context=Contexto_jerárquico Highlight=Resaltar @@ -430,7 +430,7 @@ Mark_entries=Marcar_entradas Mark_entry=Marcar_entrada Mark_new_entries_with_addition_date=Marcar_nuevas_entradas_con_fecha_de_incorporación Mark_new_entries_with_owner_name=Marcar_nuevas_entradas_con_nombre_de_propietario -Memory_Stick_Mode=Modo_lápiz_de_memoria +Memory_stick_mode=Modo_lápiz_de_memoria Menu_and_label_font_size=Tamaño_de_tipo_de_letra_para_menú_y_etiquetas Merged_external_changes=Cambios_externos_incorporados Messages=Mensajes @@ -450,7 +450,7 @@ Moved_group_"%0".=Se_ha_movido_el_grupo_"%0". Name=Nombre Name_formatter=Formateador_de_nombre Natbib_style=Estilo_Natbib -nested_aux_files=Archivos_aux_anidados +nested_AUX_files=Archivos_AUX_anidados New=Nuevo new=new New_BibTeX_entry=Nueva_entrada_BibTeX @@ -617,7 +617,7 @@ Searching_for_duplicates...=Buscando_duplicados... Searching_for_files=Buscando_archivos Secondary_sort_criterion=Criterio_secundario_de_ordenación Select=Seleccionar -Select_a_Zip-archive=Seleccione_un_archivo_ZIP +Select_a_ZIP-archive=Seleccione_un_archivo_ZIP Select_action=Seleccionar_acción Select_all=Seleccionar_todo Select_Classpath_of_New_Importer=Seleccionar_classpath_del_nuevo_importador @@ -665,7 +665,7 @@ sort_subgroups=ordenar_subgrupos Sorted_all_subgroups_recursively.=Ordenar_todos_los_subgrupos_recursivamente. Sorted_immediate_subgroups.=Subgrupos_inmediatos_ordenados. source_edit=editar_fuente -Special_Name_Formatters=Formateadores_con_nombre_especial +Special_name_formatters=Formateadores_con_nombre_especial Special_table_columns=Columna_de_tabla_especiales SQL_connection_established.=Conexión_SQL_establecida Starting_import=Comenzando_a_importar @@ -676,7 +676,7 @@ Store_journal_abbreviations=Almacenar_abreviaturas_de_revista Stored_entry=Entrada_almacenada Strings=Cadenas Strings_for_database=Cadenas_para_base_de_datos -Subdatabase_from_aux=Base_de_datos_secundaria_desde_aux +Subdatabase_from_AUX=Base_de_datos_secundaria_desde_AUX Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=Cambia_entre_nombre_completo_y_abreviatura_de_la_revista_si_se_conoce_en_nombe_de_la_revista. Synchronize_file_links=Sincronizar_enlaces_de_archivo Synchronizing_file_links...=Sincronizando_archivo_enlaces... @@ -781,7 +781,7 @@ You_must_restart_JabRef_for_the_new_key_bindings_to_work_properly.=Debe_reinicia Your_new_key_bindings_have_been_stored.=Sus_nuevas_combinaciones_de_teclas_han_sido_almacenadas. The_following_fetchers_are_available\:=Están_disponibles_los_siguientes_recuperadores_de_datos\: Could_not_find_fetcher_'%0'=No_se_puede_encontrar_el_recuperador_de_datos_'%0' -Running_Query_'%0'_with_fetcher_'%1'.=Ejecutando_consulta_'%0'_con_recuperador_'%1' +Running_query_'%0'_with_fetcher_'%1'.=Ejecutando_consulta_'%0'_con_recuperador_'%1' Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=La_consulta_'%0'_con_el_recuperador_¡%1'_no_devolvió_ningún_resultado. Move/Rename_file=Mover/renombrar_archivo File_moved=Archivo_movido @@ -814,7 +814,7 @@ Attempting_SQL_import...=Intentando_importación_SQL Move_the_keyboard_focus_to_the_entry_table=Mover_el_foco_del_teclado_a_la_tabla_de_entradas MIME_type=Tipo_MIME 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.=Esta_función_permite_que_nuevos_archivos_seasn_abiertos_o_importados_en_una_instancia_de_JabRef_que_ya_se_esté_ejecutando,
en_lugar_de_abrir_una_nueva_instancia._Esto_es_útil,_por_ejemplo,_cuando_se_abre_un_archivo_en_JabRef_desde_
_el_navegador_de_internet.
_Tenga_en_cuenta_que_esto_le_impedirá_ejecutar_más_de_una_instancia_de_JabRef_a_la_vez. -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=Ejecutar_recuperador,_por_ejemplo_"--fetch=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=Ejecutar_recuperador,_por_ejemplo_"--fetch=Medline\:cancer" The_ACM_Digital_Library=La_Biblioteca_Digital_ACM Reset=Restablecer Use_IEEE_LaTeX_abbreviations=Usar_abreviaturas_LaTeX_IEEE @@ -991,7 +991,7 @@ Web_search=Búsqueda_web Style_selection=Selección_de_estilo No_valid_style_file_defined=No_se_ha_definido_un_archivo_de_estilo_válido Choose_pattern=Escoger_patrón -Use_the_bib_file_location_as_primary_file_directory=Usar_la_ubicación_del_archivo_bib_como_carpeta_de_archivos_primaria +Use_the_BIB_file_location_as_primary_file_directory=Usar_la_ubicación_del_archivo_BIB_como_carpeta_de_archivos_primaria Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=No_se_puede_ejecutar_el_programa_gnuclient/emacsclient._Asegúrese_de_que_están_instalados_y_disponibles_en_el_PATH. Built-in_journal_list=Lista_de_revistas_preincluida OpenOffice/LibreOffice_connection=Conexión_OpenOffice/LibreOffice @@ -1127,7 +1127,7 @@ Removed_all_subgroups_of_group_"%0".=Eliminados_todos_los_subgrupos_del_grupo_"% To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.=Para_deshabilitar_el_modo_lápiz_de_memoria,_renombre_o_elimine_el_archivo_jabrf.xml_en_la_misma_carpeta_que_JabRef. Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.=No_es_posible_conectar._Una_posible_razón_es_que_JabRef_y_OpenOffice/LibreOffice_no_están_funcionado_en_modo_32_bit_o_64_bit. Use_the_following_delimiter_character(s)\:=Usar_como_caracter(es)_delimitador(es)\: -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above=Al_descargar_archivos_o_mover_archivos_enlazados_a_la_carpeta_de_archivos,_preferir_la_ubicación_del_archivo_bib_antes_que_el_directorio_de_archivos_establecido_arriba. +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above=Al_descargar_archivos_o_mover_archivos_enlazados_a_la_carpeta_de_archivos,_preferir_la_ubicación_del_archivo_BIB_antes_que_el_directorio_de_archivos_establecido_arriba. Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Su_archivo_de_estilo_especifica_el_formato_de_carácter_'%0',_que_no_está_definido_en_su_documento_OpenOffice/LibreOffice_actual. Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Su_archivo_de_estilo_especifica_el_formato_de_párrafo_'%0',_que_no_está_definido_en_su_documento_OpenOffice/LibreOffice. Searching...=Buscando... @@ -1138,8 +1138,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case=Añadir_{}_pa Import_conversions=Importar_conversiones Please_enter_a_search_string=Introduzca_una_cadena_de_búsqueda,_por_favor Please_open_or_start_a_new_database_before_searching=Abra_o_cree_una_nueva_base_de_datos_antes_de_buscar,_por_favor -An_Error_occurred_while_fetching_from_ADS_(%0)\:=Ocurrió_un_error_al_recuperar_desde_ADS_(%0)\: -An_Error_occurred_while_parsing_abstract=Ocurrió_un_error_mientras_se_analizaba_el_resumen +An_error_occurred_while_fetching_from_ADS_(%0)\:=Ocurrió_un_error_al_recuperar_desde_ADS_(%0)\: +An_error_occurred_while_parsing_abstract=Ocurrió_un_error_mientras_se_analizaba_el_resumen Unknown_DiVA_entry\:_'%0'.=Entrada_DiVA_desconocida\:_'%0'. Get_BibTeX_entry_from_DiVA=Obtener_entrada_BibTeX_desde_DiVA Log=Registro @@ -1162,7 +1162,7 @@ Automatically_set_file_links=Establecer_enlaces_de_archivo_automáticamente Continue?=¿Continuar? Resetting_all_key_bindings=Reestableciendo_todas_las_combinaciones_de_teclas Quotes=Citas -Curly_Brackets=Llaves +Curly_brackets=Llaves Hostname=Host Invalid_setting=Ajuste_inválido Network=Red @@ -1322,7 +1322,7 @@ Attention\:_Password_is_stored_in_plain_text\!=Atención\:_¡La_contraseña_est Please_specify_both_username_and_password=Por_favor,_especifique_nombre_de_usuario_y_contraseña Proxy_requires_authentication=El_proxi_requiere_autenticación -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.=_Se_ha_encontrado_un_fichero_de_autoguardado_de_esta_base_de_datos._Esto_podría_indicar_que_JabRef_no_se_cerró_correctamente_la_última_vez_que_se_usó_el_archivo. +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.=_Se_ha_encontrado_un_fichero_de_autoguardado_de_esta_base_de_datos._Esto_podría_indicar_que_JabRef_no_se_cerró_correctamente_la_última_vez_que_se_usó_el_archivo. Note\:_A_full_text_search_is_currently_not_supported_for_%0=Nota\:_Por_el_momento_no_se_soporta_la_búsqueda_de_texto_completo_para_%0 Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.=No_se_puede_autodetectar_OpenOffice/LibreOffice._Por_favor,_escoja_el_directorio_de_instalación_manualmente. JabRef_no_longer_supports_'ps'_or_'pdf'_fields.
File_links_are_now_stored_in_the_'file'_field_and_files_are_stored_in_an_external_file_directory.
To_make_use_of_this_feature,_JabRef_needs_to_upgrade_file_links.

=Jabref_ya_no_soporta_los_campos_'ps'_o_'pdf'.
Ahora_los_enlaces_a_archivo_se_guardan_en_el_campo_'archivo'_y_los_archivos_se_guardan_en_un_directorio_externo.
Para_hacer_uso_de_esta_característica,_JabRef_necesita_actualizar_los_enlaces.

@@ -1372,7 +1372,7 @@ Copy_preview=Copiar_vista_previa Automatically_setting_file_links=Estableciendo_automáticamente_enlaces_de_archivo Regenerating_BibTeX_keys_according_to_metadata=Regenerando_claves_BibTeX_de_acuerdo_a_los_metadatos -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys=No_hay_metadatos_en_el_bibfile._No_se_pueden_regenerar_las_claves_BibTex +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys=No_hay_metadatos_en_el_BIB_file._No_se_pueden_regenerar_las_claves_BibTex Regenerate_all_keys_for_the_entries_in_a_BibTeX_file=Regenerar_todas_las_claves_para_las_entradas_de_un_archivo_BibTeX @@ -1388,7 +1388,7 @@ No_entry_found_for_ISBN_%0_at_www.ebook.de=No_se_encontró_entrada_para_el_ISBN_ Save_actions=Guardar_acciones Enable_save_actions=Habilitar_guardado_de_acciones -Always_reformat_.bib_file_on_save_and_export=Siempre_reformatear_el_fichero_.bib_al_guardar_y_exportar +Always_reformat_BIB_file_on_save_and_export=Siempre_reformatear_el_fichero_BIB_al_guardar_y_exportar Default_bibliography_mode=Modo_de_bibliografía_por_defecto @@ -1425,7 +1425,7 @@ Usage=Uso Are_you_sure_you_want_to_reset_all_settings_to_default_values?=¿Está_seguro_de_querer_reiniciar_todos_los_ajustes_a_sus_valores_por_defecto? Reset_preferences=Preferencias -Ill-formed_entrytype_comment_in_bib_file=Comentario_de_tipo_de_entrada_mal_formado_en_fichero_bib +Ill-formed_entrytype_comment_in_BIB_file=Comentario_de_tipo_de_entrada_mal_formado_en_fichero_bib Clipboard=Portapapeles Could_not_paste_entry_as_text\:=No_se_puede_pegar_la_entrada_como_texto\: Do_you_still_want_to_continue?=¿Aún_desea_continuar? @@ -1591,9 +1591,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/JabRef_fa.properties b/src/main/resources/l10n/JabRef_fa.properties index ad4dab3ea1ed..874e3d39d791 100644 --- a/src/main/resources/l10n/JabRef_fa.properties +++ b/src/main/resources/l10n/JabRef_fa.properties @@ -47,15 +47,15 @@ Add= Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.= The_path_need_not_be_on_the_classpath_of_JabRef.= -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.= -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.= +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.= +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.= Add_entry_selection_to_this_group= Add_from_folder= -Add_from_jar= +Add_from_JAR= add_group= @@ -85,8 +85,8 @@ All_fields= All_subgroups_(recursively)= -An_Exception_occurred_while_accessing_'%0'= -An_SAXException_occurred_while_parsing_'%0'\:= +An_exception_occurred_while_accessing_'%0'= +A_SAX_exception_occurred_while_parsing_'%0'\:= and= @@ -237,8 +237,8 @@ Clear_fields= Close= -Close_Others= -Close_All= +Close_others= +Close_all= Close_dialog= @@ -606,12 +606,12 @@ Font_selection= for= Format_of_author_and_editor_names= -Format_String= +Format_string= Format_used= -Formatter_Name= +Formatter_name= -found_in_aux_file= +found_in_AUX_file= Full_name= @@ -652,7 +652,7 @@ Help= Help_on_groups= Help_on_key_patterns= -Help_on_Regular_Expression_Search= +Help_on_regular_expression_search= Hide_non-hits= @@ -764,7 +764,7 @@ Key_pattern= keys_in_database= -#nottranslated.Toviewit,usemenu"Tools|NewBibTeXfilefromAUxfile",andlaunchtheactiononanon-existantauxfile. +#nottranslated.Toviewit,usemenu"Tools|NewBibTeXfilefromAUxfile",andlaunchtheactiononanon-existantAUXfile. Keyword= Label= @@ -811,7 +811,7 @@ Mark_new_entries_with_addition_date= Mark_new_entries_with_owner_name= -Memory_Stick_Mode= +Memory_stick_mode= Menu_and_label_font_size= @@ -850,7 +850,7 @@ Name_formatter= Natbib_style= -nested_aux_files= +nested_AUX_files= New= @@ -1189,7 +1189,7 @@ Secondary_sort_criterion= Select= -Select_a_Zip-archive= +Select_a_ZIP-archive= Select_action= @@ -1285,7 +1285,7 @@ Sorted_all_subgroups_recursively.= Sorted_immediate_subgroups.= source_edit= -Special_Name_Formatters= +Special_name_formatters= Special_table_columns= SQL_connection_established.= @@ -1308,7 +1308,7 @@ Strings= Strings_for_database= -Subdatabase_from_aux= +Subdatabase_from_AUX= Synchronize_file_links= @@ -1500,7 +1500,7 @@ Your_new_key_bindings_have_been_stored.= The_following_fetchers_are_available\:= Could_not_find_fetcher_'%0'= -Running_Query_'%0'_with_fetcher_'%1'.= +Running_query_'%0'_with_fetcher_'%1'.= Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.= Move/Rename_file= File_moved= @@ -1539,7 +1539,7 @@ Move_the_keyboard_focus_to_the_entry_table= MIME_type= 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.= -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=Run_Fetcher,_e.g._"--fetch=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=Run_fetcher,_e.g._"--fetch=Medline\:cancer" The_ACM_Digital_Library= Reset= @@ -1735,7 +1735,7 @@ Web_search= Style_selection= No_valid_style_file_defined= Choose_pattern= -Use_the_bib_file_location_as_primary_file_directory= +Use_the_BIB_file_location_as_primary_file_directory= Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.= Built-in_journal_list= OpenOffice/LibreOffice_connection= @@ -1880,7 +1880,7 @@ Removed_all_subgroups_of_group_"%0".= To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.= Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.= Use_the_following_delimiter_character(s)\:= -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above= +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above= Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.= Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.= @@ -1892,8 +1892,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case= Import_conversions= Please_enter_a_search_string= Please_open_or_start_a_new_database_before_searching= -An_Error_occurred_while_fetching_from_ADS_(%0)\:= -An_Error_occurred_while_parsing_abstract= +An_error_occurred_while_fetching_from_ADS_(%0)\:= +An_error_occurred_while_parsing_abstract= Unknown_DiVA_entry\:_'%0'.= Get_BibTeX_entry_from_DiVA= Log= @@ -1920,7 +1920,7 @@ Automatically_set_file_links= Continue?= Resetting_all_key_bindings= Quotes= -Curly_Brackets= +Curly_brackets= Hostname= Invalid_setting= Network= @@ -2101,7 +2101,7 @@ Attention\:_Password_is_stored_in_plain_text\!= Please_specify_both_username_and_password= Proxy_requires_authentication= -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.= +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.= Note\:_A_full_text_search_is_currently_not_supported_for_%0= Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.= @@ -2152,7 +2152,7 @@ Copy_preview= Automatically_setting_file_links= Regenerating_BibTeX_keys_according_to_metadata= -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys= +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys= Regenerate_all_keys_for_the_entries_in_a_BibTeX_file= @@ -2168,7 +2168,7 @@ No_entry_found_for_ISBN_%0_at_www.ebook.de= Save_actions= Enable_save_actions= -Always_reformat_.bib_file_on_save_and_export= +Always_reformat_BIB_file_on_save_and_export= Default_bibliography_mode= @@ -2205,7 +2205,7 @@ Usage= Are_you_sure_you_want_to_reset_all_settings_to_default_values?= Reset_preferences= -Ill-formed_entrytype_comment_in_bib_file= +Ill-formed_entrytype_comment_in_BIB_file= Clipboard= Could_not_paste_entry_as_text\:= Do_you_still_want_to_continue?= @@ -2377,9 +2377,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/JabRef_fr.properties b/src/main/resources/l10n/JabRef_fr.properties index 6ba80289a3e3..475520b3681d 100644 --- a/src/main/resources/l10n/JabRef_fr.properties +++ b/src/main/resources/l10n/JabRef_fr.properties @@ -25,11 +25,11 @@ Action=Action Add=Ajouter Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Ajouter_une_classe_ImportFormat_personnalisée_(compilée)_à_partir_d'un_chemin_de_classe. The_path_need_not_be_on_the_classpath_of_JabRef.=Le_chemin_n'a_pas_besoin_d'être_dans_le_chemin_de_classe_de_JabRef. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Ajouter_une_classe_ImportFormat_personnalisée_(compilée)_à_partir_d'une_archive_ZIP. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=L'archive_ZIP_n'a_pas_besoin_d'être_dans_le_chemin_de_classe_de_JabRef. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Ajouter_une_classe_ImportFormat_personnalisée_(compilée)_à_partir_d'une_archive_ZIP. +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=L'archive_ZIP_n'a_pas_besoin_d'être_dans_le_chemin_de_classe_de_JabRef. Add_entry_selection_to_this_group=Ajouter_les_entrées_sélectionnées_à_ce_groupe Add_from_folder=Ajouter_à_partir_du_répertoire -Add_from_jar=Ajouter_à_partir_de_jar +Add_from_JAR=Ajouter_à_partir_de_JAR add_group=ajouter_un_groupe Add_group=Ajouter_un_groupe Add_new=Ajouter_nouvelle @@ -44,8 +44,8 @@ All_entries=Toutes_les_entrées All_entries_of_this_type_will_be_declared_typeless._Continue?=Toutes_les_entrées_de_ce_type_seront_déclarées_'sans_type'._Continuer_? All_fields=Tous_les_champs All_subgroups_(recursively)=Tous_les_sous-groupes_(récursivement) -An_Exception_occurred_while_accessing_'%0'=Une_Exception_est_survenue_lors_de_l'accès_à_'%0' -An_SAXException_occurred_while_parsing_'%0'\:=Une_Exception_SAX_est_survenue_pendant_le_traitement_de_'%0'_\: +An_exception_occurred_while_accessing_'%0'=Une_Exception_est_survenue_lors_de_l'accès_à_'%0' +A_SAX_exception_occurred_while_parsing_'%0'\:=Une_Exception_SAX_est_survenue_pendant_le_traitement_de_'%0'_\: and=et and_the_class_must_be_available_in_your_classpath_next_time_you_start_JabRef.=et_la_classe_doit_être_disponible_dans_votre_chemin_de_classe_la_prochaine_fois_que_vous_démarrez_JabRef. any_field_that_matches_the_regular_expression_%0=tout_champ_qui_correspond_à_l'expression_régulière_%0 @@ -123,8 +123,8 @@ Class_name=Nom_de_classe Clear=Vider Clear_fields=Vider_les_champs Close=Fermer -Close_Others=Fermer_les_autres -Close_All=Fermer_toutes +Close_others=Fermer_les_autres +Close_all=Fermer_toutes Close_dialog=Fermer_la_fenêtre Close_the_current_database=Fermer_la_base_courante Close_window=Fermer_la_fenêtre @@ -320,10 +320,10 @@ Font_style=Style_de_police Font_selection=Sélecteur_de_police for=pour Format_of_author_and_editor_names=Format_des_noms_d'auteurs_et_d'éditeurs -Format_String=Chaîne_de_format +Format_string=Chaîne_de_format Format_used=Format_utilisé -Formatter_Name=Nom_de_formateur -found_in_aux_file=trouvées_dans_le_fichier_aux +Formatter_name=Nom_de_formateur +found_in_AUX_file=trouvées_dans_le_fichier_AUX Full_name=Nom_complet General=Général General_fields=Champs_généraux @@ -343,7 +343,7 @@ Have_you_chosen_the_correct_package_path?=Avez-vous_choisi_le_bon_chemin_pour_le Help=Aide Help_on_groups=Aide_sur_les_groupes Help_on_key_patterns=Aide_sur_le_paramétrage_des_clefs -Help_on_Regular_Expression_Search=Aide_sur_la_recherche_d'une_expression_régulière +Help_on_regular_expression_search=Aide_sur_la_recherche_d'une_expression_régulière Hide_non-hits=Masquer_les_entrées_non_correspondantes Hierarchical_context=Type_de_hiérarchie Highlight=Surlignée @@ -430,7 +430,7 @@ Mark_entries=Etiqueter_ces_entrées Mark_entry=Etiqueter_l'entrée Mark_new_entries_with_addition_date=Enregistrer_la_date_d'ajout_pour_les_nouvelles_entrées Mark_new_entries_with_owner_name=Nouvelles_entrées_attribuées_au_propriétaire -Memory_Stick_Mode=Mode_Clef_Mémoire +Memory_stick_mode=Mode_Clef_Mémoire Menu_and_label_font_size=Taille_de_police_pour_les_menus_et_les_champs Merged_external_changes=Fusionner_les_modifications_externes Messages=Messages @@ -450,7 +450,7 @@ Moved_group_"%0".=Groupe_"%0"_déplacé. Name=Nom Name_formatter=Formateur_de_nom Natbib_style=Style_Natbib -nested_aux_files=fichiers_AUX_imbriqués +nested_AUX_files=fichiers_AUX_imbriqués New=Nouveau new=nouveau New_BibTeX_entry=Nouvelle_entrée_BibTeX @@ -617,7 +617,7 @@ Searching_for_duplicates...=Recherche_des_doublons_en_cours... Searching_for_files=Recherche_de_fichiers... Secondary_sort_criterion=Critère_secondaire_de_tri Select=Sélectionner -Select_a_Zip-archive=Sélectionner_une_archive_ZIP +Select_a_ZIP-archive=Sélectionner_une_archive_ZIP Select_action=Sélectionner_l'opération Select_all=Tout_sélectionner Select_Classpath_of_New_Importer=Sélectionner_le_chemin_de_classe_du_nouveau_fil7tre_d'importation @@ -665,7 +665,7 @@ sort_subgroups=trier_les_sous-groupes Sorted_all_subgroups_recursively.=Tous_les_sous-groupes_récursivement_triés. Sorted_immediate_subgroups.=Sous-groupes_directs_triés. source_edit=édition_du_source -Special_Name_Formatters=Formateurs_de_nom_spéciaux +Special_name_formatters=Formateurs_de_nom_spéciaux Special_table_columns=Colonnes_de_tableau_particulières SQL_connection_established.=Connexion_SQL_établie. Starting_import=Début_d'importation @@ -676,7 +676,7 @@ Store_journal_abbreviations=Stocker_les_abréviations_de_journaux Stored_entry=Entrée_enregistrée Strings=Chaîne Strings_for_database=Chaînes_pour_la_base -Subdatabase_from_aux=BibTeX_à_partir_de_LaTex_aux +Subdatabase_from_AUX=BibTeX_à_partir_de_LaTex_AUX Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=Basculer_entre_les_noms_de_journaux_développés_et_abrégés_si_le_nom_de_journal_est_connu. Synchronize_file_links=Synchroniser_les_liens_vers_les_fichiers Synchronizing_file_links...=Synchronisation_des_liens_fichier... @@ -781,7 +781,7 @@ You_must_restart_JabRef_for_the_new_key_bindings_to_work_properly.=Vous_devez_re Your_new_key_bindings_have_been_stored.=Votre_nouvelle_affectation_de_touche_a_été_enregistrée The_following_fetchers_are_available\:=Les_outils_de_recherche_suivants_sont_disponible_\: Could_not_find_fetcher_'%0'=L'outil_de_recherche_'%0'_n'a_pas_pu_être_trouvé -Running_Query_'%0'_with_fetcher_'%1'.=Execution_de_la_requête_'%0'_avec_l'outil_de_recherche_'%1'. +Running_query_'%0'_with_fetcher_'%1'.=Execution_de_la_requête_'%0'_avec_l'outil_de_recherche_'%1'. Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=Le_requête_'%0'_pour_l'outil_de_recherche_'%1'_n'a_retourné_aucun_résultats. Move/Rename_file=Déplacer/Renommer_le_fichier File_moved=Fichier_déplacé @@ -814,7 +814,7 @@ Attempting_SQL_import...=Tentative_d'importation_SQL... Move_the_keyboard_focus_to_the_entry_table=Déplacer_le_curseur_vers_la_table_des_entrées MIME_type=Type_MIME 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.=Cette_fonction_permet_aux_nouveaux_fichiers_d'être_ouverts_ou_importés_dans_une_fenêtre_JabRef_déjà_active
au_lieu_d'ouvrir_une_nouvelle_fenêtre._Par_exemple,_c'est_utile_quand_vous_ouvrez_un_fichier_dans_JabRef
à_partir_de_notre_navigateur_internet._
Notez_que_cela_vous_empêchera_de_lancer_plus_d'une_fenêtre_JabRef_à_la_fois. -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=Lance_une_recherche,_par._ex._"--fetch=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=Lance_une_recherche,_par._ex._"--fetch=Medline\:cancer" The_ACM_Digital_Library=La_Bibliothèque_Numérique_ACM Reset=Réinitialiser Use_IEEE_LaTeX_abbreviations=Utiliser_les_abbréviations_LaTeX_IEEE @@ -1012,7 +1012,7 @@ Style_selection=Sélection_du_style No_valid_style_file_defined=Aucun_style_de_fichier_valide_n'est_défini Choose_pattern=Choisissez_un_modèle -Use_the_bib_file_location_as_primary_file_directory=Utiliser_le_répertoire_du_fichier_bib_comme_répertoire_principal_de_fichiers +Use_the_BIB_file_location_as_primary_file_directory=Utiliser_le_répertoire_du_fichier_BIB_comme_répertoire_principal_de_fichiers Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=Le_programme_gnuclient/emacsclient_n'a_pas_pu_être_lancé._Assurez-vous_que_les_programmes_gnuclient/emacsclient_sont_installés_et_disponible_dans_le_PATH. Built-in_journal_list=Liste_de_journaux_interne OpenOffice/LibreOffice_connection=Connexion_OpenOffice/LibreOffice @@ -1158,7 +1158,7 @@ Removed_all_subgroups_of_group_"%0".=Tous_les_sous-groupes_du_groupe_"%0"_ont_é To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.=Pour_désactiver_le_mode_Memory-stick,_renommer_ou_supprimer_le_fichier_jabref.xml_dans_le_même_répertoire_que_JabRef Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.=Connexion_impossible._Une_raison_potentielle_est_que_JabRef_et_OpenOffice/LibreOffice_ne_fonctionnent_pas_tous_les_deux_soit_en_mode_32_bits,_soit_en_mode_64_bits. Use_the_following_delimiter_character(s)\:=Utiliser_le(s)_caractère(s)_de_délimitation_suivant\: -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above=Lors_du_téléchargement_de_fichiers_ou_du_déplacement_de_fichiers_liées_vers_le_répertoire_de_fichiers,_préférez_l'emplacement_du_fichier_bib_au_répertoire_ci-dessus +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above=Lors_du_téléchargement_de_fichiers_ou_du_déplacement_de_fichiers_liées_vers_le_répertoire_de_fichiers,_préférez_l'emplacement_du_fichier_BIB_au_répertoire_ci-dessus Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Votre_fichier_de_style_spécifie_le_format_de_caractère_'%0',_qui_n'est_pas_défini_dans_votre_document_OpenOffice/LibreOffice_actuel. Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Votre_fichier_de_style_spécifie_le_format_de_paragraphe_'%0',_qui_n'est_pas_défini_dans_votre_document_OpenOffice/LibreOffice_actuel. @@ -1170,8 +1170,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case=Ajouter_{}_au Import_conversions=Importer_les_conversions Please_enter_a_search_string=Entrez_s'il_vous_plait_une_chaine_de_recherche Please_open_or_start_a_new_database_before_searching=S'il_vous_plait,_ouvrez_ou_créer_une_nouvelle_base_avant_la_recherche -An_Error_occurred_while_fetching_from_ADS_(%0)\:=Une_erreur_est_survenue_lors_de_la_recherche_ADS_(%0)_\: -An_Error_occurred_while_parsing_abstract=Une_erreur_est_survenue_pendant_le_traitement_du_résumé +An_error_occurred_while_fetching_from_ADS_(%0)\:=Une_erreur_est_survenue_lors_de_la_recherche_ADS_(%0)_\: +An_error_occurred_while_parsing_abstract=Une_erreur_est_survenue_pendant_le_traitement_du_résumé Unknown_DiVA_entry\:_'%0'.=Entrée_DiVA_inconnue\:_'%0'. Get_BibTeX_entry_from_DiVA=Obtenir_l'entrée_BibTeX_à_partir_de_DiVA Log=Message @@ -1198,7 +1198,7 @@ Automatically_set_file_links=Configurer_automatiquement_les_liens_de_fichier Continue?=Continuer_? Resetting_all_key_bindings=Réinitialisation_de_tous_les_raccourcis_clavier Quotes=Guillemets -Curly_Brackets=Parenthèses +Curly_brackets=Parenthèses Hostname=Ordinateur_hôte Invalid_setting=Paramétrage_invalide @@ -1362,7 +1362,7 @@ Attention\:_Password_is_stored_in_plain_text\!=Attention\:_Le_mot_de_passe_est_s Please_specify_both_username_and_password=Préciser_à_la_fois_le_nom_d'utilisateur_et_le_mot_de_passe,_SVP Proxy_requires_authentication=Le_proxy_demande_une_authentification -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.=Un_fichier_de_sauvegarde_automatique_a_été_trouvé_pour_cette_base_de_données._Cela_pourrait_indiquer_que_JabRef_ne_s'est_pas_fermé_proprement_la_dernière_fois_que_ce_fichier_a_été_utilisé. +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.=Un_fichier_de_sauvegarde_automatique_a_été_trouvé_pour_cette_base_de_données._Cela_pourrait_indiquer_que_JabRef_ne_s'est_pas_fermé_proprement_la_dernière_fois_que_ce_fichier_a_été_utilisé. Note\:_A_full_text_search_is_currently_not_supported_for_%0=Note_\:_La_recherche_sur_le_texte_complet_n'est_actuellement_pas_disponible_pour_%0 Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.=La_détection_automatique_de_OpenOffice/LibreOffice_a_échouée._S'il_voul_plait,_sélectionnez_manuellement_le_répertoire_d'installation. @@ -1414,7 +1414,7 @@ Copy_preview=Copier_la_prévisualisation Automatically_setting_file_links=Définition_automatique_des_liens_de_fichier Regenerating_BibTeX_keys_according_to_metadata=Régénération_des_clefs_BibTeX_à_partir_des_métadonnées -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys=Aucune_métadonnée_dans_le_fichier_BibTeX._Les_clefs_n'ont_pas_pu_être_régénérées +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys=Aucune_métadonnée_dans_le_fichier_BibTeX._Les_clefs_n'ont_pas_pu_être_régénérées Regenerate_all_keys_for_the_entries_in_a_BibTeX_file=Régénére_toutes_les_clefs_pour_les_entrées_d'un_fichier_BibTeX @@ -1440,7 +1440,7 @@ Table_font_size_is_%0=La_taille_de_police_de_la_table_est_%0 Move_linked_files_to_default_file_directory_%0=Déplacer_les_fichiers_liés_vers_le_répertoire_par_défaut_%0 Save_actions=Enregistrer_les_actions Enable_save_actions=Autoriser_l'enregistrement_des_actions -Always_reformat_.bib_file_on_save_and_export=Toujours_remettre_en_forme_les_fichiers_.bib_lors_de_l'enregistrement_et_de_l'exportation +Always_reformat_BIB_file_on_save_and_export=Toujours_remettre_en_forme_les_fichiers_BIB_lors_de_l'enregistrement_et_de_l'exportation Default_bibliography_mode=Mode_bibliographique_par_défaut @@ -1477,7 +1477,7 @@ Usage=Usage Are_you_sure_you_want_to_reset_all_settings_to_default_values?=Etes-vous_sûr_de_vouloir_rétablir_toutes_les_valeurs_par_défaut_du_paramétrage_? Reset_preferences=Rétablir_les_préférences -Ill-formed_entrytype_comment_in_bib_file=Commentaire_de_type_d'entrées_mal_construit_dans_un_fichier_bib +Ill-formed_entrytype_comment_in_BIB_file=Commentaire_de_type_d'entrées_mal_construit_dans_un_fichier_bib Clipboard=Presse-papiers Could_not_paste_entry_as_text\:=L'entrée_n'a_pas_pu_être_collée_comme_du_texte_: Do_you_still_want_to_continue?=Voulez-vous_continuer_? @@ -1635,9 +1635,9 @@ New_version_available=Nouvelle_version_disponible Installed_version=Version_installée Remind_me_later=Me_le_rappeler_plus_tard Ignore_this_update=Ignorer_cette_mise_à_jour -Couldn't_connect_to_the_update_server.=La_connexion_au_serveur_de_mise_à_jour_a_échoué. +Could_not_connect_to_the_update_server.=La_connexion_au_serveur_de_mise_à_jour_a_échoué. Please_try_again_later_and/or_check_your_network_connection.=Essayez_plus_tard_ou_vérifier_votre_connection_réseau. -To_see_what's_new_view_the_changelog.=Pour_voir_les_nouveautés,_affichez_le_journal_des_modifications. +To_see_what_is_new_view_the_changelog.=Pour_voir_les_nouveautés,_affichez_le_journal_des_modifications. A_new_version_of_JabRef_has_been_released.=Une_nouvelle_version_de_JabRef_a_été_publiée. JabRef_is_up-to-date.=JabRef_est_à_jour. Latest_version=Version_la_plus_récente diff --git a/src/main/resources/l10n/JabRef_in.properties b/src/main/resources/l10n/JabRef_in.properties index d2fe693ef80b..559f6ff7cc09 100644 --- a/src/main/resources/l10n/JabRef_in.properties +++ b/src/main/resources/l10n/JabRef_in.properties @@ -25,11 +25,11 @@ Action=Aksi Add=Tambah Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Tambah_kelas_ImportFormat_dari_lokasi_class. The_path_need_not_be_on_the_classpath_of_JabRef.=Lokasi_tidak_harus_pada_lokasi_kelas_JabRef. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Tambah_suaian_kelas_ImportFormat_dari_arsip_Zip. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=Lokasi_arsip_Zip_tidak_harus_dalam_lokasi_kelas_JabRef. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Tambah_suaian_kelas_ImportFormat_dari_arsip_ZIP. +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=Lokasi_arsip_ZIP_tidak_harus_dalam_lokasi_kelas_JabRef. Add_entry_selection_to_this_group=Tambah_entri_pilihan_ke_grup_ini Add_from_folder=Tambah_dari_folder -Add_from_jar=Tambah_dari_jar +Add_from_JAR=Tambah_dari_JAR add_group=tambah_grup Add_group=Tambah_Grup Add_new=Tambah_baru @@ -44,8 +44,8 @@ All_entries=Semua_entri All_entries_of_this_type_will_be_declared_typeless._Continue?=Semua_entri_tipe_ini_akan_dinyatakan_sebagai_tanpa_tipe._Teruskan? All_fields=Semua_bidang All_subgroups_(recursively)=Semua_anak_grup_(rekursif) -An_Exception_occurred_while_accessing_'%0'=Kesalahan_terjadi_ketika_mengakses_'%0' -An_SAXException_occurred_while_parsing_'%0'\:=SAXException_terjadi_ketika_mengurai_'%0'\: +An_exception_occurred_while_accessing_'%0'=Kesalahan_terjadi_ketika_mengakses_'%0' +A_SAX_exception_occurred_while_parsing_'%0'\:=SAXException_terjadi_ketika_mengurai_'%0'\: and=dan and_the_class_must_be_available_in_your_classpath_next_time_you_start_JabRef.=dan_kelas_tersebut_harus_dinyatakan_di_lokasi_kelas_waktu_menjalankan_JabRef. any_field_that_matches_the_regular_expression_%0=bidang_yang_sesuai_dengan_ekspresi_reguler_%0 @@ -123,8 +123,8 @@ Class_name=Nama_kelas Clear=Bersihkan Clear_fields=Bersihkan_beberapa_bidang Close=Tutup -Close_Others=Tutup_lainnya -Close_All=Tutup_semua +Close_others=Tutup_lainnya +Close_all=Tutup_semua Close_dialog=Tutup_dialog Close_the_current_database=Tutup_basisdata_yang_sekarang Close_window=Tutup_jendela @@ -320,10 +320,10 @@ Font_style=Corak_huruf Font_selection=PemilihHuruf for=untuk Format_of_author_and_editor_names=Format_nama_penulis_dan_penyunting -Format_String=Format_String +Format_string=Format_string Format_used=Format_digunakan -Formatter_Name=Nama_Pemformat -found_in_aux_file=ditemukan_dalam_berkas_aux +Formatter_name=Nama_Pemformat +found_in_AUX_file=ditemukan_dalam_berkas_AUX Full_name=Nama_lengkap General=Umum General_fields=Bidang_umum @@ -343,7 +343,7 @@ Have_you_chosen_the_correct_package_path?=Apakah_anda_sudah_memilih_lokasi_paket Help=Bantuan Help_on_groups=Bantuan_untuk_grup Help_on_key_patterns=Bantuan_untuk_pola_kunci -Help_on_Regular_Expression_Search=Bantuan_untuk_Pencarian_Ekspresi_Reguler +Help_on_regular_expression_search=Bantuan_untuk_Pencarian_Ekspresi_Reguler Hide_non-hits=Sembunyikan_non-hits Hierarchical_context=Konteks_berhirarki Highlight=Warnakan @@ -429,7 +429,7 @@ Mark_entries=Tandai_entri Mark_entry=Tandai_entri Mark_new_entries_with_addition_date=Tandai_entri_baru_dengan_tambahan_tanggal Mark_new_entries_with_owner_name=Tandai_entri_baru_dengan_nama_pemilik -Memory_Stick_Mode=Mode_Pena_Simpan +Memory_stick_mode=Mode_Pena_Simpan Menu_and_label_font_size=Ukuran_huruf_menu_dan_label Merged_external_changes=Menggabung_perubahan_eksternal Messages=Pesan @@ -449,7 +449,7 @@ Moved_group_"%0".=Grup_dipindah_"%0". Name=Nama Name_formatter=Pemformat_nama Natbib_style=Gaya_Natbib -nested_aux_files=berkas_aux_bertingkat +nested_AUX_files=berkas_AUX_bertingkat New=Baru new=baru New_BibTeX_entry=Entri_BibTeX_baru @@ -616,7 +616,7 @@ Searching_for_duplicates...=pencarian_hal_yang_sama... Searching_for_files=Mencari_berkas Secondary_sort_criterion=Kriteria_kedua Select=Pilih -Select_a_Zip-archive=Pilih_arsip_Zip +Select_a_ZIP-archive=Pilih_arsip_ZIP Select_action=Pilih_aksi Select_all=Pilih_semua Select_Classpath_of_New_Importer=Pilih_Classpath_dari_Pengimpor_Baru @@ -664,7 +664,7 @@ sort_subgroups=urut_sub-grup Sorted_all_subgroups_recursively.=Diurutkan_semua_sub-grup_secara_rekursif Sorted_immediate_subgroups.=Diurutkan_sub-grup_seketika. source_edit=sunting_sumber -Special_Name_Formatters=Pemformat_Nama_Spesial +Special_name_formatters=Pemformat_Nama_Spesial Special_table_columns=Kolom_tabe_khusus SQL_connection_established.=Koneksi_SQL_diadakan. Starting_import=Memulai_impor @@ -675,7 +675,7 @@ Store_journal_abbreviations=Simpan_singkatan_jurnal Stored_entry=Entri_yang_disimpan Strings=String Strings_for_database=String_untuk_basisdata -Subdatabase_from_aux=Sub-basisdata_dari_aux +Subdatabase_from_AUX=Sub-basisdata_dari_AUX Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=Menukar_antara_nama_jurnal_penuh_dan_singkatan_jika_nama_jurnal_diketahui. Synchronize_file_links=Sinkronkan_tautan_berkas Synchronizing_file_links...=Sinkronisasi_berkas_tautan... @@ -780,7 +780,7 @@ You_must_restart_JabRef_for_the_new_key_bindings_to_work_properly.=Anda_harus_me Your_new_key_bindings_have_been_stored.=Gabungan_kunci_anda_sudah_disimpan. The_following_fetchers_are_available\:=Pengambil_berikut_tersedia\: Could_not_find_fetcher_'%0'=Tidak_bisa_menemukan_pengambil_'%0' -Running_Query_'%0'_with_fetcher_'%1'.=Jalankan_Kueri_'%0'_dengan_pengambil_'%1'. +Running_query_'%0'_with_fetcher_'%1'.=Jalankan_Kueri_'%0'_dengan_pengambil_'%1'. Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=Kueri_'%0'_dengan_pengambil_'%1'_tidak_ada_hasilnya. Move/Rename_file=Memindah/Menamai_berkas File_moved=Berkas_dipindah @@ -813,7 +813,7 @@ Attempting_SQL_import...=Mencoba_impor_SQL... Move_the_keyboard_focus_to_the_entry_table=Pindah_fokus_papanketik_ke_tabel_entri MIME_type=Tipe_MIME 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.=Fitur_ini_memungkinkan_berkas_baru_atau_impor_ke_jendela_JabRef_yang_aktif
bukan_membuat_baru._Hal_ini_berguna_ketika_anda_membuka_berkas_di_JabRef
dari_halaman_web.
Hal_ini_akan_menghindari_anda_membuka_beberapa_JabRef_pada_saat_yang_sama. -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=Jalankan_Pengambil,_misal._"--fetch=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=Jalankan_Pengambil,_misal._"--fetch=Medline\:cancer" The_ACM_Digital_Library=Pustaka_ACM_Dijital Reset=Atur_ulang Use_IEEE_LaTeX_abbreviations=Gunakan_singkatan_IEEE_LaTeX @@ -993,7 +993,7 @@ Style_selection=Pilihan_gaya No_valid_style_file_defined=(gaya_yang_sah_tidak_ditemukan) Choose_pattern=Pilih_pola -Use_the_bib_file_location_as_primary_file_directory=Gunakan_lokasi_berkas_bib_sebagai_direktori_berkas_utama +Use_the_BIB_file_location_as_primary_file_directory=Gunakan_lokasi_berkas_BIB_sebagai_direktori_berkas_utama Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=Program_gnuclient/emacsclient_tidak_bisa_dijalankan._Pastikan_program_emacsclient/gnuclient_sudah_diinstalasi_dan_dinyatakan_di_lokasi_ini. Built-in_journal_list=Daftar_jurnal_terpasang_tetap OpenOffice/LibreOffice_connection=Koneksi_OpenOffice/LibreOffice @@ -1135,7 +1135,7 @@ Removed_all_subgroups_of_group_"%0".=Semua_anak_grup_dari_grup_"%0"_dihapus. To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.=Untuk_mengtidakaktifkan_mode_pena_simpan_ubah_atau_hapus_berkas_jabref.xml_dalam_direktori_yang_sama_dengan_JabRef. Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.= Use_the_following_delimiter_character(s)\:=Gunakan_karakter_pembatas_berikut\: -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above= +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above= Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Berkas_gaya_anda_menspesifikasi_format_karakter_'%0',_yang_tidak_terdefinisi_dalam_dokumen_OpenOffice/LibreOffice_terkini_anda. Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Berkas_gaya_anda_menspesifikasi_format_paragraf_'%0',_yang_tidak_terdefinisi_dalam_dokumen_OpenOffice/LibreOffice_terkini_anda. @@ -1147,8 +1147,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case= Import_conversions=Impor_konversi Please_enter_a_search_string=Tuliskan_string_pencarian Please_open_or_start_a_new_database_before_searching=Buka_atau_jalankan_basisdata_yang_baru_sebelum_mencari -An_Error_occurred_while_fetching_from_ADS_(%0)\:=Kesalahan_ketika_mengambil_dari_ADS_(%0)\: -An_Error_occurred_while_parsing_abstract=Kesalahan_ketika_mengurai_abstrak +An_error_occurred_while_fetching_from_ADS_(%0)\:=Kesalahan_ketika_mengambil_dari_ADS_(%0)\: +An_error_occurred_while_parsing_abstract=Kesalahan_ketika_mengurai_abstrak Unknown_DiVA_entry\:_'%0'.=Entri_DiVA_tidak_dikenal\:_'%0'. Get_BibTeX_entry_from_DiVA=Dapatkan_entri_BibTeX_dari_DiVA Log=Log @@ -1176,7 +1176,7 @@ Automatically_set_file_links=Buat_tautan_berkas_secara_otomatis. Continue?=Teruskan? Resetting_all_key_bindings= Quotes= -Curly_Brackets=Tanda_Kurung_Kurawal +Curly_brackets=Tanda_Kurung_Kurawal Hostname=Nama_host Invalid_setting=Pengaturan_tidak_sah @@ -1276,7 +1276,7 @@ Path_to_%0=Lokasi_%0 %0_image= %0_problem(s)_found=%0_kesalahan_ditemukan -'%0'_is_not_a_valid_ADS_bibcode.='%0'_bukan_kode_bib_ADS_yang_sah. +'%0'_is_not_a_valid_ADS_bibcode.='%0'_bukan_kode_BIB_ADS_yang_sah. Accepting_the_change_replaces_the_complete_groups_tree_with_the_externally_modified_groups_tree.= Added_entry=Entri_ditambahkan Added_new_'%0'_entry.=Entri_yang_baru_'%0'_ditambahkan. @@ -1341,7 +1341,7 @@ Attention\:_Password_is_stored_in_plain_text\!=Perhatian\:_Kata_sandi_disimpan_s Please_specify_both_username_and_password=Silahkan_menulis_nama_pengguna_dan_kata_sandi Proxy_requires_authentication=Proxy_memerlukan_otentikasi -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.= +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.= Note\:_A_full_text_search_is_currently_not_supported_for_%0= Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.= @@ -1394,7 +1394,7 @@ Copy_preview= Automatically_setting_file_links= Regenerating_BibTeX_keys_according_to_metadata= -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys= +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys= Regenerate_all_keys_for_the_entries_in_a_BibTeX_file= @@ -1410,7 +1410,7 @@ No_entry_found_for_ISBN_%0_at_www.ebook.de= Save_actions= Enable_save_actions= -Always_reformat_.bib_file_on_save_and_export= +Always_reformat_BIB_file_on_save_and_export= Default_bibliography_mode=Mode_bibliografi_bawaan @@ -1448,7 +1448,7 @@ Usage=Penggunaan Are_you_sure_you_want_to_reset_all_settings_to_default_values?= Reset_preferences= -Ill-formed_entrytype_comment_in_bib_file= +Ill-formed_entrytype_comment_in_BIB_file= Clipboard= Could_not_paste_entry_as_text\:=Entri_tidak_bisa_dimuat_sebagai_teks\: Do_you_still_want_to_continue?=Apa_masih_mau_meneruskan? @@ -1610,9 +1610,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/JabRef_it.properties b/src/main/resources/l10n/JabRef_it.properties index 09e11ff9ab6e..813f82741ad3 100644 --- a/src/main/resources/l10n/JabRef_it.properties +++ b/src/main/resources/l10n/JabRef_it.properties @@ -25,11 +25,11 @@ Action=Azione Add=Aggiungi Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Aggiungi_una_classe_ImportFormat_personalizzata_(compilata)_da_un_percorso. The_path_need_not_be_on_the_classpath_of_JabRef.=Il_percorso_non_deve_necessariamente_essere_nel_classpath_di_JabRef. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Aggiungi_una_classe_ImportFormat_personalizzata_(compilata)_da_un_archivio_ZIP. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=L'archivio_ZIP_non_deve_necessariamente_essere_nel_classpath_di_JabRef. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Aggiungi_una_classe_ImportFormat_personalizzata_(compilata)_da_un_archivio_ZIP. +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=L'archivio_ZIP_non_deve_necessariamente_essere_nel_classpath_di_JabRef. Add_entry_selection_to_this_group=Aggiungi_le_voci_selezionate_a_questo_gruppo Add_from_folder=Aggiungi_da_una_cartella -Add_from_jar=Aggiungi_da_un_file_jar +Add_from_JAR=Aggiungi_da_un_file_JAR add_group=aggiungi_un_gruppo Add_group=Aggiungi_un_gruppo Add_new=Aggiungi_nuovo @@ -44,8 +44,8 @@ All_entries=Tutte_le_voci All_entries_of_this_type_will_be_declared_typeless._Continue?=Tutte_le_voci_di_questo_tipo_saranno_definite_'senza_tipo'._Continuare? All_fields=Tutti_i_campi All_subgroups_(recursively)=Tutti_i_sottogruppi_(ricorsivamente) -An_Exception_occurred_while_accessing_'%0'=Eccezione_durante_l'accesso_a_'%0' -An_SAXException_occurred_while_parsing_'%0'\:=Eccezione_SAX_durante_l'elaborazione_di_'%0'\: +An_exception_occurred_while_accessing_'%0'=Eccezione_durante_l'accesso_a_'%0' +A_SAX_exception_occurred_while_parsing_'%0'\:=Eccezione_SAX_durante_l'elaborazione_di_'%0'\: and=e and_the_class_must_be_available_in_your_classpath_next_time_you_start_JabRef.=e_la_classe_deve_essere_nel_tuo_"classpath"_al_successivo_avvio_di_JabRef. any_field_that_matches_the_regular_expression_%0=qualsiasi_campo_che_corrisponda_all'espressione_regolare_%0 @@ -130,8 +130,8 @@ Clear=Svuota Clear_fields=Annulla_i_campi # Unsure the translation below Close=Chiudi -Close_Others= -Close_All= +Close_others= +Close_all= Close_dialog=Chiudi_la_finestra_di_dialogo Close_the_current_database=Chiudi_il_database_corrente Close_window=Chiudi_la_finestra @@ -345,10 +345,10 @@ Font_style=Stile_font Font_selection=Selettore_dei_font for=per Format_of_author_and_editor_names=Formato_dei_nomi_di_autori_e_curatori -Format_String=Stringa_di_formattazione +Format_string=Stringa_di_formattazione Format_used=Formato_utilizzato -Formatter_Name=Nome_della_formattazione -found_in_aux_file=trovate_nel_file_AUX +Formatter_name=Nome_della_formattazione +found_in_AUX_file=trovate_nel_file_AUX Full_name=Nome_completo General=Generale General_fields=Campi_generali @@ -372,7 +372,7 @@ Help=Aiuto Help_on_groups=Aiuto_sui_gruppi Help_on_key_patterns=Aiuto_sulla_composizione_delle_chiavi -Help_on_Regular_Expression_Search=Aiuto_sulla_ricerca_di_un'espressione_regolare +Help_on_regular_expression_search=Aiuto_sulla_ricerca_di_un'espressione_regolare Hide_non-hits=Nascondi_le_voci_non_corrispondenti Hierarchical_context=Contesto_gerarchico @@ -466,7 +466,7 @@ Mark_entries=Contrassegna_voci Mark_entry=Contrassegna_voce Mark_new_entries_with_addition_date=Contrassegna_le_nuove_voci_con_la_data_di_aggiunta Mark_new_entries_with_owner_name=Contrassegna_le_nuove_voci_con_il_nome_del_proprietario -Memory_Stick_Mode=Modalit\u00e0_chiavetta_di_memoria +Memory_stick_mode=Modalit\u00e0_chiavetta_di_memoria Menu_and_label_font_size=Dimensione_del_font_di_menu_ed_etichette Merged_external_changes=Incorpora_modifiche_esterne Messages=Messaggi @@ -487,7 +487,7 @@ Name=Nome Name_formatter=Formattazione_dei_nomi Natbib_style=Stile_Natbib -nested_aux_files=File_AUX_nidificati +nested_AUX_files=File_AUX_nidificati New=Nuovo new=nuovo New_BibTeX_entry=Nuova_voce_BibTeX @@ -673,14 +673,14 @@ Searching_for_duplicates...=Ricerca_di_duplicati_in_corso... Searching_for_files=Ricerca_dei_file Secondary_sort_criterion=Criterio_di_ordinamento_secondario Select=Seleziona -Select_a_Zip-archive=Seleziona_un_archivio_Zip +Select_a_ZIP-archive=Seleziona_un_archivio_ZIP Select_action=Seleziona_l'operazione Select_all=Seleziona_tutto Select_Classpath_of_New_Importer=Seleziona_il_classpath_del_nuovo_filtro_di_importazione Select_encoding=Seleziona_la_codifica Select_entry_type=Seleziona_un_tipo_di_voce Select_external_application=Seleziona_un'applicazione_esterna -Select_file_from_ZIP-archive=Seleziona_un_file_da_un_archivio_Zip +Select_file_from_ZIP-archive=Seleziona_un_file_da_un_archivio_ZIP Select_new_ImportFormat_subclass=Seleziona_una_nuova_sottoclasse_ImportFormat Select_the_tree_nodes_to_view_and_accept_or_reject_changes=Selezionare_i_nodi_dell'albero_per_vedere_ed_accettare_o_rifiutare_le_modifiche Selected_entries=Voci_selezionate @@ -726,7 +726,7 @@ sort_subgroups=ordina_i_sottogruppi Sorted_all_subgroups_recursively.=Ordina_tutti_i_sottogruppi_ricorsivamente. Sorted_immediate_subgroups.=Ordinati_i_sottogruppi_immediati. source_edit=modifica_sorgente -Special_Name_Formatters=Formattazioni_speciali_dei_nomi +Special_name_formatters=Formattazioni_speciali_dei_nomi Special_table_columns=Colonne_di_tabella_speciali SQL_connection_established.=Connessione_SQL_stabilita. Starting_import=Inizio_importazione @@ -737,7 +737,7 @@ Store_journal_abbreviations=Registra_le_abbreviazioni_delle_riviste Stored_entry=Voce_registrata Strings=Stringa Strings_for_database=Stringhe_per_il_database -Subdatabase_from_aux=Subdatabase_da_file_LaTeX_AUX +Subdatabase_from_AUX=Subdatabase_da_file_LaTeX_AUX Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=Alterna_nomi_completi_e_nomi_abbreviati_per_le_riviste_delle_quali_\u00e8_noto_il_nome. Synchronize_file_links=Sincronizza_il_collegamento_ai_file @@ -854,7 +854,7 @@ You_must_restart_JabRef_for_the_new_key_bindings_to_work_properly.=Riavviare_Jab Your_new_key_bindings_have_been_stored.=La_nuova_assegnazione_di_tasti_\u00e8_stata_salvata. The_following_fetchers_are_available\:=Le_utilit\u00e0_di_ricerca_seguenti_sono_disponibili\: Could_not_find_fetcher_'%0'=Impossibile_trovare_l'utilit\u00e0_di_ricerca_'%0' -Running_Query_'%0'_with_fetcher_'%1'.=Esecuzione_della_query_'%0'_con_l'utilit\u00e0_di_ricerca_'%1'. +Running_query_'%0'_with_fetcher_'%1'.=Esecuzione_della_query_'%0'_con_l'utilit\u00e0_di_ricerca_'%1'. Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=La_query_'%0'_con_l'utilit\u00e0_di_ricerca_'%1'_non_ha_prodotto_alcun_risultato. Move/Rename_file=Sposta/Rinomina_il_file File_moved=File_spostato @@ -892,7 +892,7 @@ MIME_type=Tipo_MIME 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.=Questa_funzione_permette_l'apertura_o_l'importazione_di_nuovi_file_in_una_istanza_di_JabRef_gi\u00e0_aperta
invece_di_aprirne_una_nuova._Per_esempio,_ci\u00f2_\u00e8_utile_quando_un_file_viene_aperto_in_JabRef
da_un_browser_web.
Questo_tuttavia_impedisce_di_aprire_pi\u00f9_sessioni_di_JabRef_contemporaneamente. -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=Lanciare_una_ricerca,_es._"--fetch=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=Lanciare_una_ricerca,_es._"--fetch=Medline\:cancer" The_ACM_Digital_Library=ACM_Digital_Library Reset=Reinizializza @@ -1090,7 +1090,7 @@ Style_selection=Selezione_dello_stile No_valid_style_file_defined=Nessun_file_di_stile_valido_definito Choose_pattern=Sceglire_un_modello -Use_the_bib_file_location_as_primary_file_directory=Utilizza_la_posizione_del_file_BibTeX_come_cartella_dei_file_principale +Use_the_BIB_file_location_as_primary_file_directory=Utilizza_la_posizione_del_file_BibTeX_come_cartella_dei_file_principale Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=Impossibile_eseguire_il_programma_gnuclient/emacsclient._Assicurarsi_che_il_programma_gnuclient/emacsclient_sia_installato_e_disponibile_nel_PATH. Built-in_journal_list=Lista_di_riviste_interna OpenOffice/LibreOffice_connection=Connessione_a_OpenOffice/LibreOffice @@ -1236,7 +1236,7 @@ Removed_all_subgroups_of_group_"%0".=Eliminati_tutti_i_sottogruppi_del_gruppo_"% To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.=Per_disabilitare_la_modalit\u00e0_chiavetta_di_memoria_rinominare_o_cancellare_il_file_"jabref.xml"_che_si_trova_nella_cartella_di_installazione_di_JabRef. Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.=Impossibile_connettersi._Una_possibile_ragione_\u00e8_il_fatto_che_JabRef_e_OpenOffice/LibreOffice_non_vengono_eseguiti_nella_stessa_modalit\u00e0_a_32_o_64_bit. Use_the_following_delimiter_character(s)\:=Usa_i_seguenti_caratteri_di_delimitazione\: -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above=Quando_si_scaricano_i_file_o_si_spostano_i_file_collegati,_preferire_la_posizione_del_file_BibTeX_alla_cartella_impostata_sopra. +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above=Quando_si_scaricano_i_file_o_si_spostano_i_file_collegati,_preferire_la_posizione_del_file_BibTeX_alla_cartella_impostata_sopra. Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Il_file_di_stile_specifica_il_formato_di_carattere_"%0"_che_non_\u00e8_tuttavia_definito_nel_documento_OpenOffice/LibreOffice_corrente. Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Il_file_di_stile_specifica_il_formato_di_paragrafo_"%0"_che_non_\u00e8_tuttavia_definito_nel_documento_OpenOffice/LibreOffice_corrente. @@ -1248,8 +1248,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case=Aggiungere_{} Import_conversions=Importare_le_conversioni Please_enter_a_search_string=Inserire_una_stringa_di_ricerca Please_open_or_start_a_new_database_before_searching=Aprire_o_creare_un_nuovo_database_prima_di_effettuare_la_ricerca -An_Error_occurred_while_fetching_from_ADS_(%0)\:=Si_\u00e8_verificato_un_errore_durante_il_recupero_da_ADS_(%0)\: -An_Error_occurred_while_parsing_abstract=Si_\u00e8_verificato_un_errore_durante_l'elaborazione_del_riassunto +An_error_occurred_while_fetching_from_ADS_(%0)\:=Si_\u00e8_verificato_un_errore_durante_il_recupero_da_ADS_(%0)\: +An_error_occurred_while_parsing_abstract=Si_\u00e8_verificato_un_errore_durante_l'elaborazione_del_riassunto Unknown_DiVA_entry\:_'%0'.=Voce_DiVA_sconosciuta\:_'%0' Get_BibTeX_entry_from_DiVA=Recupera_la_voce_BibTeX_da_DiVA Log=Registro @@ -1276,7 +1276,7 @@ Automatically_set_file_links=Impostazione_automatica_dei_collegamenti_ai_file Continue?=Continuare? Resetting_all_key_bindings=Reimpostazione_di_tutte_le_scorciatoie_di_tastiera Quotes=Virgolette -Curly_Brackets=Parentesi_graffe +Curly_brackets=Parentesi_graffe Hostname=Host Invalid_setting=Impostazione_non_valida @@ -1439,7 +1439,7 @@ Attention\:_Password_is_stored_in_plain_text\!= Please_specify_both_username_and_password= Proxy_requires_authentication= -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.= +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.= Note\:_A_full_text_search_is_currently_not_supported_for_%0= Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.= @@ -1491,7 +1491,7 @@ Copy_preview= Automatically_setting_file_links= Regenerating_BibTeX_keys_according_to_metadata= -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys= +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys= Regenerate_all_keys_for_the_entries_in_a_BibTeX_file= @@ -1507,7 +1507,7 @@ No_entry_found_for_ISBN_%0_at_www.ebook.de= Save_actions= Enable_save_actions= -Always_reformat_.bib_file_on_save_and_export= +Always_reformat_BIB_file_on_save_and_export= Default_bibliography_mode= @@ -1544,7 +1544,7 @@ Usage= Are_you_sure_you_want_to_reset_all_settings_to_default_values?= Reset_preferences= -Ill-formed_entrytype_comment_in_bib_file= +Ill-formed_entrytype_comment_in_BIB_file= Clipboard= Could_not_paste_entry_as_text\:= Do_you_still_want_to_continue?= @@ -1710,9 +1710,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/JabRef_ja.properties b/src/main/resources/l10n/JabRef_ja.properties index 9a04234b8005..4e0902e9f95c 100644 --- a/src/main/resources/l10n/JabRef_ja.properties +++ b/src/main/resources/l10n/JabRef_ja.properties @@ -47,15 +47,15 @@ Add=追加 Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=(コンパイルした)ユーザー定義ImportFormatクラスをクラスパスから追加します。 The_path_need_not_be_on_the_classpath_of_JabRef.=このパスは、JabRefのクラスパスにあるとは限りません。 -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=(コンパイルした)ユーザー定義ImportFormatクラスをZip書庫から追加します。 -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=このZip書庫は、JabRefのクラスパスにあるとは限りません。 +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=(コンパイルした)ユーザー定義ImportFormatクラスをZIP書庫から追加します。 +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=このZIP書庫は、JabRefのクラスパスにあるとは限りません。 Add_entry_selection_to_this_group=選択項目をこのグループに追加 Add_from_folder=フォルダから追加 -Add_from_jar=jarから追加 +Add_from_JAR=jarから追加 add_group=グループを追加 @@ -85,8 +85,8 @@ All_fields=全フィールド All_subgroups_(recursively)=全下層グループ(再帰的に) -An_Exception_occurred_while_accessing_'%0'=「%0」にアクセス中に例外エラーが発生しました\: -An_SAXException_occurred_while_parsing_'%0'\:=「%0」を解析中にSAX例外エラーが発生しました\: +An_exception_occurred_while_accessing_'%0'=「%0」にアクセス中に例外エラーが発生しました\: +A_SAX_exception_occurred_while_parsing_'%0'\:=「%0」を解析中にSAX例外エラーが発生しました\: and=および @@ -238,8 +238,8 @@ Clear_fields=フィールドを消去 Close=閉じる -Close_Others=他を閉じる -Close_All=すべて閉じる +Close_others=他を閉じる +Close_all=すべて閉じる Close_dialog=ダイアログを閉じる Close_the_current_database=現在のデータベースを閉じる @@ -607,12 +607,12 @@ Font_selection=フォントの選択 for=;_対象\: Format_of_author_and_editor_names=著者名と編集者名の書式 -Format_String=整形文字列 +Format_string=整形文字列 Format_used=使用されている書式 -Formatter_Name=整形定義の名称 +Formatter_name=整形定義の名称 -found_in_aux_file=auxファイルを検出 +found_in_AUX_file=AUXファイルを検出 Full_name=完全な名称 @@ -653,7 +653,7 @@ Help=ヘルプ Help_on_groups=グループに関するヘルプ Help_on_key_patterns=キーパターンに関するヘルプ -Help_on_Regular_Expression_Search=正規表現検索に関するヘルプ +Help_on_regular_expression_search=正規表現検索に関するヘルプ Hide_non-hits=合致しないものを非表示 @@ -775,7 +775,7 @@ Key_pattern=キーパターン keys_in_database=データベース中の鍵 -#nottranslated.Toviewit,usemenu"Tools|NewBibTeXfilefromAUxfile",andlaunchtheactiononanon-existantauxfile. +#nottranslated.Toviewit,usemenu"Tools|NewBibTeXfilefromAUxfile",andlaunchtheactiononanon-existantAUXfile. Keyword=キーワード Label=ラベル @@ -826,7 +826,7 @@ Mark_new_entries_with_addition_date=新規項目に追加の日付を記載 Mark_new_entries_with_owner_name=新規項目にオーナー名を記載 -Memory_Stick_Mode=メモリースティックモード +Memory_stick_mode=メモリースティックモード Menu_and_label_font_size=メニューとラベルのフォント寸法 @@ -865,7 +865,7 @@ Name_formatter=名前の整形 Natbib_style=Natbib様式 -nested_aux_files=入れ子になっているauxファイル +nested_AUX_files=入れ子になっているAUXファイル New=新規 @@ -1207,7 +1207,7 @@ Secondary_sort_criterion=第二整序基準 Select=選択 -Select_a_Zip-archive=Zip書庫を選択 +Select_a_ZIP-archive=ZIP書庫を選択 Select_action=アクションを選択 @@ -1303,7 +1303,7 @@ Sorted_all_subgroups_recursively.=下層グループをすべて再帰的に整 Sorted_immediate_subgroups.=直下の下層グループを整序しました。 source_edit=ソースの編集 -Special_Name_Formatters=名前の整形の定義 +Special_name_formatters=名前の整形の定義 Special_table_columns=特殊な表列 SQL_connection_established.=SQL接続が確立しました。 @@ -1326,7 +1326,7 @@ Strings=文字列 Strings_for_database=右のデータベースで用いる文字列 -Subdatabase_from_aux=auxから副データベース +Subdatabase_from_AUX=AUXから副データベース Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=学術誌名が既知の場合は、完全な学術誌名と短縮形を切り替える。 @@ -1522,7 +1522,7 @@ Your_new_key_bindings_have_been_stored.=新しいキー割当が保管されま The_following_fetchers_are_available\:=以下の取得子が使用できます\: Could_not_find_fetcher_'%0'=取得子「%0」を見つけられませんでした -Running_Query_'%0'_with_fetcher_'%1'.=取得子「%1」を使用して、クエリ「%0」を実行しています。 +Running_query_'%0'_with_fetcher_'%1'.=取得子「%1」を使用して、クエリ「%0」を実行しています。 Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=取得子「%1」を使用したクエリ「%0」は、結果を何も返しませんでした。 Move/Rename_file=ファイルの移動・改名 File_moved=ファイルを移動しました @@ -1562,7 +1562,7 @@ MIME_type=MIME型 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.=この機能は、新規ファイルを、新しいJabRefインスタンスを開かないで、すでに実行されているインスタンスに開いたり
読み込んだりするものです。たとえば、これは、ウェブブラウザからJabRefにファイルを開かせたい時に便利です。
これによって、一度にJabRefのインスタンスを一つしか開けなくなることに注意してください。 -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=取得子を実行する。例:「--fetch\=Medline\:cancer」 +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=取得子を実行する。例:「--fetch\=Medline\:cancer」 The_ACM_Digital_Library=ACMデジタルライブラリ Reset=リセット @@ -1765,7 +1765,7 @@ Style_selection=様式の選択 No_valid_style_file_defined=有効な様式ファイルが定義されていません Choose_pattern=パターンを選択してください -Use_the_bib_file_location_as_primary_file_directory=bibファイルの場所を主要ファイルディレクトリとして使用 +Use_the_BIB_file_location_as_primary_file_directory=bibファイルの場所を主要ファイルディレクトリとして使用 Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=gnuclient/emacsclientプログラムを実行することができませんでした。emacsclient/gnuclientプログラムが導入済みでPATH中にあることを確認してください。 Built-in_journal_list=組み込み学術誌一覧 OpenOffice/LibreOffice_connection=OpenOffice/LibreOffice接続 @@ -1907,7 +1907,7 @@ Removed_all_subgroups_of_group_"%0".=グループ「%0」の全下層グルー To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.=メモリースティックモードを無効にするには、JabRefと同じフォルダにあるjabref.xmlファイルを改名するか削除してください Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.=接続ができません。一つの可能性としては、JabRefとOpenOffice/LibreOfficeが、ともに32ビットモードか64ビットモードで実行されていないせいかもしれません。 Use_the_following_delimiter_character(s)\:=右記の区切り文字を使用\: -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above=ファイルをダウンロードする時やリンクしたファイルをファイルディレクトリに移動する際に、上記で設定したファイルディレクトリではなくbibファイルの場所を優先する +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above=ファイルをダウンロードする時やリンクしたファイルをファイルディレクトリに移動する際に、上記で設定したファイルディレクトリではなくbibファイルの場所を優先する Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=お使いの様式ファイルは、文字様式「%0」を指定していますが、これは、現在のOpenOffice/LibreOffice文書には定義されていません。 Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=お使いの様式ファイルは、段落様式「%0」を指定していますが、これは、現在のOpenOffice/LibreOffice文書には定義されていません。 @@ -1919,8 +1919,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case=大小文字 Import_conversions=読み込み時変換 Please_enter_a_search_string=検索文字列を入力してください Please_open_or_start_a_new_database_before_searching=検索前にデータベースを開くか新規データベースを開始してください -An_Error_occurred_while_fetching_from_ADS_(%0)\:=ADSからの取得中にエラーが発生しました(%0)\: -An_Error_occurred_while_parsing_abstract=abstractの解析時にエラー発生 +An_error_occurred_while_fetching_from_ADS_(%0)\:=ADSからの取得中にエラーが発生しました(%0)\: +An_error_occurred_while_parsing_abstract=abstractの解析時にエラー発生 Unknown_DiVA_entry\:_'%0'.=未知のDiVA項目\:「%0」 Get_BibTeX_entry_from_DiVA=DiVAからBibTeX項目を取得 Log=ログ @@ -1946,7 +1946,7 @@ Automatically_set_file_links=ファイルリンクを自動設定 Continue?=続けますか? Resetting_all_key_bindings=キー割当をすべて復帰 Quotes=引用符 -Curly_Brackets=波括弧 +Curly_brackets=波括弧 Hostname=ホスト Invalid_setting=無効な設定です @@ -2111,14 +2111,14 @@ Attention\:_Password_is_stored_in_plain_text\!=警告:パスワードは平文 Please_specify_both_username_and_password=ユーザー名とパスワードをともに指定してください Proxy_requires_authentication=プロキシには認証が必要 -Always_reformat_.bib_file_on_save_and_export=保存・書出の際、つねに.bibファイルを再整形する +Always_reformat_BIB_file_on_save_and_export=保存・書出の際、つねにBIBファイルを再整形する Allow_overwriting_existing_links.=既存リンクの上書きを許可する。 Do_not_overwrite_existing_links.=既存リンクは上書きしない。 Disable_highlight_groups_matching_entries=項目に一致するグループの着色を無効化 New_%0_database=新規%0データベース Export_sorting=整序法を書き出す No_entry_found_for_ISBN_%0_at_www.ebook.de=www.ebook.deにISBN_%0に一致する項目は見つかりませんでした -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.=このデータベースの自動保存ファイルが見つかりました。このファイルを最後に使用した際、JabRefが正常に終了しなかった可能性があります。 +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.=このデータベースの自動保存ファイルが見つかりました。このファイルを最後に使用した際、JabRefが正常に終了しなかった可能性があります。 Note\:_A_full_text_search_is_currently_not_supported_for_%0=註:%0ではフルテキスト検索はまだサポートされていません Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.=OpenOffice/LibreOfficeが導入済みであることを自動検出できませんでした。導入先ディレクトリを手動で選択してください。 JabRef_no_longer_supports_'ps'_or_'pdf'_fields.
File_links_are_now_stored_in_the_'file'_field_and_files_are_stored_in_an_external_file_directory.
To_make_use_of_this_feature,_JabRef_needs_to_upgrade_file_links.

=JabRefは「ps」「pdf」フィールドのサポートを停止しました。
現在、ファイルリンクは「file」フィールドに保管され、ファイルは外部のファイルディレクトリに保管されます。
この機能を利用するには、JabRefにファイルリンクを更新させる必要があります。

@@ -2165,7 +2165,7 @@ should_contain_a_protocol=プロトコルを含む必要あり Copy_preview=プレビューをコピー Automatically_setting_file_links=ファイルリンクを自動的に設定 Regenerating_BibTeX_keys_according_to_metadata=メタデータにしたがってBibTeX鍵を再生成 -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys=bibファイルにメタデータがありません。BibTeX鍵を再生成することができません +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys=bibファイルにメタデータがありません。BibTeX鍵を再生成することができません Regenerate_all_keys_for_the_entries_in_a_BibTeX_file=BibTeXファイル中全項目の鍵を再生成 Show_debug_level_messages=デバッグレベルメッセージを表示 Default_bibliography_mode=既定の書誌情報モード @@ -2199,7 +2199,7 @@ Converts_units_to_LaTeX_formatting.=単位をLaTeX形式に変換します。 Does_nothing.=何もしません。 Are_you_sure_you_want_to_reset_all_settings_to_default_values?=本当に全ての設定を既定値に戻しますか? Reset_preferences=設定をリセット -Ill-formed_entrytype_comment_in_bib_file=bibファイル中に誤った書式の項目型コメントがあります +Ill-formed_entrytype_comment_in_BIB_file=bibファイル中に誤った書式の項目型コメントがあります Clipboard=クリップボード Could_not_paste_entry_as_text\:=項目をテキストとして貼り付けることができませんでした\: Do_you_still_want_to_continue?=それでも続けますか? @@ -2355,9 +2355,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/JabRef_nl.properties b/src/main/resources/l10n/JabRef_nl.properties index 29a7ebc15fd7..4c1846656738 100644 --- a/src/main/resources/l10n/JabRef_nl.properties +++ b/src/main/resources/l10n/JabRef_nl.properties @@ -47,15 +47,15 @@ Add=Toevoegen Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Voeg_een_(gecompileerde)_externe_ImportFormat_klasse_van_een_class_path_toe. The_path_need_not_be_on_the_classpath_of_JabRef.=Het_pad_moet_niet_in_het_classpath_van_JabRef_staan. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Voeg_een_(gecompileerde)_externe_ImportFormat_klasse_van_een_Zip-archief_toe. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=Het_pad_moet_niet_in_het_classpath_van_JabRef_staan. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Voeg_een_(gecompileerde)_externe_ImportFormat_klasse_van_een_ZIP-archief_toe. +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=Het_pad_moet_niet_in_het_classpath_van_JabRef_staan. Add_entry_selection_to_this_group=Voeg_entry_selectie_toe_aan_deze_groep Add_from_folder=Voeg_toe_uit_map -Add_from_jar=_Voeg_toe_uit_jar +Add_from_JAR=_Voeg_toe_uit_JAR add_group=groep_toevoegen @@ -85,8 +85,8 @@ All_fields=Alle_velden All_subgroups_(recursively)=Alle_subgroepen_(recursief) -An_Exception_occurred_while_accessing_'%0'= -An_SAXException_occurred_while_parsing_'%0'\:= +An_exception_occurred_while_accessing_'%0'= +A_SAX_exception_occurred_while_parsing_'%0'\:= and=en @@ -246,8 +246,8 @@ Clear_fields=Velden_wissen Close=Sluiten -Close_Others= -Close_All= +Close_others= +Close_all= Close_dialog=Sluit_dialoog Close_the_current_database=Sluit_de_huidige_database @@ -624,12 +624,12 @@ Font_selection=Lettertype_selecteren for=voor Format_of_author_and_editor_names=Formaat_van_de_auteur-_en_editornamen -Format_String= +Format_string= Format_used=Formaat_gebruikt -Formatter_Name= +Formatter_name= -found_in_aux_file=gevonden_in_aux_bestand +found_in_AUX_file=gevonden_in_AUX_bestand Full_name=Volledige_naam @@ -671,7 +671,7 @@ Help=Help Help_on_groups=Help_over_groepen Help_on_key_patterns=Help_over_sleutelpatronen -Help_on_Regular_Expression_Search=Help_over_Regular_Expression_Zoekopdracht +Help_on_regular_expression_search=Help_over_Regular_Expression_Zoekopdracht Hide_non-hits=Verberg_niet_gevonden_objecten @@ -844,7 +844,7 @@ Mark_new_entries_with_addition_date=Markeer_nieuwe_entries_met_datum_van_toevoeg Mark_new_entries_with_owner_name=Markeer_nieuwe_entries_met_naam_van_eigenaar # These are status line messages when marking/unmarking entries\: -Memory_Stick_Mode= +Memory_stick_mode= Menu_and_label_font_size=Menu_en_label_lettertypegrootte @@ -883,7 +883,7 @@ Name_formatter= Natbib_style=Natbib_stijl -nested_aux_files=geneste_aux_bestanden +nested_AUX_files=geneste_AUX_bestanden New=Nieuw @@ -1224,7 +1224,7 @@ Secondary_sort_criterion=Secundair_sorteercriterium Select=Selecteer -Select_a_Zip-archive=Selecteer_een_ZIP-archief +Select_a_ZIP-archive=Selecteer_een_ZIP-archief Select_action=Selecteer_actie @@ -1320,7 +1320,7 @@ Sorted_all_subgroups_recursively.=Alle_subgroepen_recursief_gesorteerd. Sorted_immediate_subgroups.=Onmiddellijke_subgroepen_sorteren. source_edit=broncode_aanpassen -Special_Name_Formatters= +Special_name_formatters= Special_table_columns=Speciale_tabelkolommen SQL_connection_established.= @@ -1344,7 +1344,7 @@ Strings=Constanten Strings_for_database=Constanten_voor_database -Subdatabase_from_aux=Subdatabase_van_aux +Subdatabase_from_AUX=Subdatabase_van_AUX ##\## These lines were changed\: @@ -1538,7 +1538,7 @@ You_must_restart_JabRef_for_the_new_key_bindings_to_work_properly.=U_moet_JabRef Your_new_key_bindings_have_been_stored.=Uw_nieuwe_sneltoetsen_zijn_opgeslagen. The_following_fetchers_are_available\:= Could_not_find_fetcher_'%0'= -Running_Query_'%0'_with_fetcher_'%1'.= +Running_query_'%0'_with_fetcher_'%1'.= Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.= Move/Rename_file= File_moved= @@ -1574,7 +1574,7 @@ Attempting_SQL_import...= Move_the_keyboard_focus_to_the_entry_table= MIME_type= 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.= -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"= +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"= The_ACM_Digital_Library= Reset= Use_IEEE_LaTeX_abbreviations= @@ -1766,7 +1766,7 @@ Style_selection= No_valid_style_file_defined= Choose_pattern= -Use_the_bib_file_location_as_primary_file_directory= +Use_the_BIB_file_location_as_primary_file_directory= Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.= Built-in_journal_list= OpenOffice/LibreOffice_connection= @@ -1909,7 +1909,7 @@ Removed_all_subgroups_of_group_"%0".= To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.= Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.= Use_the_following_delimiter_character(s)\:= -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above= +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above= Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.= Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.= @@ -1921,8 +1921,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case= Import_conversions= Please_enter_a_search_string= Please_open_or_start_a_new_database_before_searching= -An_Error_occurred_while_fetching_from_ADS_(%0)\:= -An_Error_occurred_while_parsing_abstract= +An_error_occurred_while_fetching_from_ADS_(%0)\:= +An_error_occurred_while_parsing_abstract= Unknown_DiVA_entry\:_'%0'.= Get_BibTeX_entry_from_DiVA= Log= @@ -1949,7 +1949,7 @@ Automatically_set_file_links= Continue?= Resetting_all_key_bindings= Quotes= -Curly_Brackets= +Curly_brackets= Hostname= Invalid_setting= @@ -2114,7 +2114,7 @@ Attention\:_Password_is_stored_in_plain_text\!= Please_specify_both_username_and_password= Proxy_requires_authentication= -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.= +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.= Note\:_A_full_text_search_is_currently_not_supported_for_%0= Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.= @@ -2165,7 +2165,7 @@ Copy_preview= Automatically_setting_file_links= Regenerating_BibTeX_keys_according_to_metadata= -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys= +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys= Regenerate_all_keys_for_the_entries_in_a_BibTeX_file= @@ -2181,7 +2181,7 @@ No_entry_found_for_ISBN_%0_at_www.ebook.de= Save_actions= Enable_save_actions= -Always_reformat_.bib_file_on_save_and_export= +Always_reformat_BIB_file_on_save_and_export= Default_bibliography_mode= @@ -2224,7 +2224,7 @@ Does_nothing.= Are_you_sure_you_want_to_reset_all_settings_to_default_values?= Reset_preferences= -Ill-formed_entrytype_comment_in_bib_file= +Ill-formed_entrytype_comment_in_BIB_file= Clipboard= Could_not_paste_entry_as_text\:= Do_you_still_want_to_continue?= @@ -2386,9 +2386,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/JabRef_no.properties b/src/main/resources/l10n/JabRef_no.properties index 6bb2693fbfd2..74de4b189aa9 100644 --- a/src/main/resources/l10n/JabRef_no.properties +++ b/src/main/resources/l10n/JabRef_no.properties @@ -50,15 +50,15 @@ Add=Legg_til Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Legg_til_en_(kompilert)_egendefinert_ImportFormat-klasse_fra_en_classpath. The_path_need_not_be_on_the_classpath_of_JabRef.=Stien_trenger_ikke_\u00e5_v\u00e6re_p\u00e5_JabRefs_classpath. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Legg_til_en_(kompilert)_egendefinert_ImportFormat-klasse_fra_en_zip-fil. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=Zip-filen_trenger_ikke_\u00e5_v\u00e6re_p\u00e5_JabRefs_classpath. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Legg_til_en_(kompilert)_egendefinert_ImportFormat-klasse_fra_en_zip-fil. +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=ZIP-filen_trenger_ikke_\u00e5_v\u00e6re_p\u00e5_JabRefs_classpath. Add_entry_selection_to_this_group=Legg_valgte_enheter_til_denne_gruppen Add_from_folder=Legg_til_fra_mappe -Add_from_jar=Legg_til_fra_jar-fil +Add_from_JAR=Legg_til_fra_JAR-fil add_group=legg_til_gruppe @@ -91,9 +91,9 @@ All_fields=Alle_felter All_subgroups_(recursively)=Alle_undergrupper_(rekursivt) -An_Exception_occurred_while_accessing_'%0'=En_feil_oppsto_ved_lesing_av_'%0' +An_exception_occurred_while_accessing_'%0'=En_feil_oppsto_ved_lesing_av_'%0' -An_SAXException_occurred_while_parsing_'%0'\:=En_SAXException_forekom_ved_lesing_av_'%0'\: +A_SAX_exception_occurred_while_parsing_'%0'\:=En_SAXException_forekom_ved_lesing_av_'%0'\: and=og @@ -261,8 +261,8 @@ Clear_fields=Slett_felter Close=Lukk -Close_Others= -Close_All= +Close_others= +Close_all= Close_dialog=Lukk_dialog Close_the_current_database=Lukk_denne_databasen @@ -671,14 +671,14 @@ for=for Format_of_author_and_editor_names=Formatering_av_forfatter-_og_redakt\u00f8rnavn -Format_String=Formatstreng +Format_string=Formatstreng Format_used=Format_brukt -Formatter_Name=Navn_p\u00e5_formaterer +Formatter_name=Navn_p\u00e5_formaterer -found_in_aux_file=funnet_i_aux-fil +found_in_AUX_file=funnet_i_AUX-fil Full_name=Fullt_navn @@ -722,7 +722,7 @@ Help_on_groups=Hjelp_om_grupper Help_on_key_patterns=Hjelp_om_n\u00f8kkelgenerering -Help_on_Regular_Expression_Search=Hjelp_for_s\u00f8k_med_regul\u00e6ruttrykk +Help_on_regular_expression_search=Hjelp_for_s\u00f8k_med_regul\u00e6ruttrykk Hide_non-hits=Skjul_ikke-treff @@ -904,7 +904,7 @@ Mark_new_entries_with_addition_date=Merk_nye_enheter_med_dato Mark_new_entries_with_owner_name=Merk_nye_enheter_med_navn_p\u00e5_eier -Memory_Stick_Mode=Minnepinne-modus +Memory_stick_mode=Minnepinne-modus Menu_and_label_font_size=St\u00f8rrelse_av_menyfonter @@ -948,7 +948,7 @@ Name_formatter=Navneformaterer Natbib_style=Natbib-stil -nested_aux_files=n\u00f8stede_aux-filer +nested_AUX_files=n\u00f8stede_AUX-filer New=Ny @@ -1312,7 +1312,7 @@ Secondary_sort_criterion=Andre_sorteringskriterium Select=Velg -Select_a_Zip-archive=Velg_ZIP-fil +Select_a_ZIP-archive=Velg_ZIP-fil Select_action=Select_action @@ -1420,7 +1420,7 @@ Sorted_immediate_subgroups.=Sorterte_n\u00e6rmeste_undergrupper. source_edit=redigering_av_kilde -Special_Name_Formatters=Spesielle_navneformaterere +Special_name_formatters=Spesielle_navneformaterere Special_table_columns=Spesielle_kolonner @@ -1445,7 +1445,7 @@ Strings=Strenger Strings_for_database=Strenger_for_database -Subdatabase_from_aux=Deldatabase_fra_aux-fil +Subdatabase_from_AUX=Deldatabase_fra_AUX-fil Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=Bytter_mellom_fullt_og_forkortet_journalnavn_dersom_navnet_er_kjent. @@ -1681,7 +1681,7 @@ The_following_fetchers_are_available\:=De_f\u00f8lgende_nedlasterne_er_tilgjenge Could_not_find_fetcher_'%0'=Kunne_ikke_finne_nedlasteren_'%0' -Running_Query_'%0'_with_fetcher_'%1'.=Utf\u00f8rer_s\u00f8k_'%0'_med_nedlaster_'%1'. +Running_query_'%0'_with_fetcher_'%1'.=Utf\u00f8rer_s\u00f8k_'%0'_med_nedlaster_'%1'. Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=S\u00f8ket_'%0'_med_nedlaster_'%1'_ga_ingen_resultater. @@ -1757,7 +1757,7 @@ MIME_type=MIME-type 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.=Denne_funksjonen_lar_deg_\u00e5pne_eller_importere_nye_filer_til_en_allerede_kj\u00f8rende_instans_av_JabRef
fra_nettleseren_din.
Merk_at_dette_vil_hindre_deg_i_\u00e5_kj\u00f8re_mer_enn_en_instans_av_JabRef_av_gangen. -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"= +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"= The_ACM_Digital_Library=ACM_Digital_Library @@ -2148,7 +2148,7 @@ No_valid_style_file_defined=Ingen_gyldig_stilfil_definert Choose_pattern=Velg_m\u00f8nster -Use_the_bib_file_location_as_primary_file_directory=Bruk_plasseringen_av_bib-filen_som_standard_filkatalog +Use_the_BIB_file_location_as_primary_file_directory=Bruk_plasseringen_av_BIB-filen_som_standard_filkatalog Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=Kunne_ikke_kalle_gnuclient/emacsclient._Sjekk_at_du_har_programmet_installert_og_tilgjengelig_i_PATH. @@ -2304,7 +2304,7 @@ Removed_all_subgroups_of_group_"%0".= To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.= Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.= Use_the_following_delimiter_character(s)\:= -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above= +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above= Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.= Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.= @@ -2316,8 +2316,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case= Import_conversions= Please_enter_a_search_string= Please_open_or_start_a_new_database_before_searching= -An_Error_occurred_while_fetching_from_ADS_(%0)\:= -An_Error_occurred_while_parsing_abstract= +An_error_occurred_while_fetching_from_ADS_(%0)\:= +An_error_occurred_while_parsing_abstract= Unknown_DiVA_entry\:_'%0'.= Get_BibTeX_entry_from_DiVA= Log= @@ -2344,7 +2344,7 @@ Automatically_set_file_links= Continue?= Resetting_all_key_bindings= Quotes= -Curly_Brackets= +Curly_brackets= Hostname= Invalid_setting= @@ -2510,7 +2510,7 @@ Attention\:_Password_is_stored_in_plain_text\!= Please_specify_both_username_and_password= Proxy_requires_authentication= -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.= +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.= Note\:_A_full_text_search_is_currently_not_supported_for_%0= Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.= @@ -2562,7 +2562,7 @@ Copy_preview= Automatically_setting_file_links= Regenerating_BibTeX_keys_according_to_metadata= -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys= +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys= Regenerate_all_keys_for_the_entries_in_a_BibTeX_file= @@ -2578,7 +2578,7 @@ No_entry_found_for_ISBN_%0_at_www.ebook.de= Save_actions= Enable_save_actions= -Always_reformat_.bib_file_on_save_and_export= +Always_reformat_BIB_file_on_save_and_export= Default_bibliography_mode= @@ -2621,7 +2621,7 @@ Does_nothing.= Are_you_sure_you_want_to_reset_all_settings_to_default_values?= Reset_preferences= -Ill-formed_entrytype_comment_in_bib_file= +Ill-formed_entrytype_comment_in_BIB_file= Clipboard= Could_not_paste_entry_as_text\:= Do_you_still_want_to_continue?= @@ -2782,9 +2782,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/JabRef_pt_BR.properties b/src/main/resources/l10n/JabRef_pt_BR.properties index 8e2d9de052e5..223f78581a9f 100644 --- a/src/main/resources/l10n/JabRef_pt_BR.properties +++ b/src/main/resources/l10n/JabRef_pt_BR.properties @@ -25,11 +25,11 @@ Action=Ação Add=Adicionar Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Adicionar_uma_classe_ImportFormat_customizada_(compilada)_a_partir_de_um_classpath. The_path_need_not_be_on_the_classpath_of_JabRef.=O_caminho_não_precisa_estar_no_classpath_do_JabRef. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Adicionar_uma_classe_ImportFormat_customizada_(compilada)_a_partir_de_um_arquivo_zip. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=O_arquivo_zip_não_precisa_estar_no_classpath_do_JabRef. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Adicionar_uma_classe_ImportFormat_customizada_(compilada)_a_partir_de_um_arquivo_zip. +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=O_arquivo_zip_não_precisa_estar_no_classpath_do_JabRef. Add_entry_selection_to_this_group=Adicionar_referências_selecionadas_a_um_grupo Add_from_folder=Adicionar_a_partir_de_uma_pasta -Add_from_jar=Adicionar_a_partir_de_um_jar +Add_from_JAR=Adicionar_a_partir_de_um_JAR add_group=adicionar_grupo Add_group=Adicionar_grupo Add_new=Adicionar_novo @@ -44,8 +44,8 @@ All_entries=Todas_as_referências All_entries_of_this_type_will_be_declared_typeless._Continue?=Todas_as_referências_serão_consideradas_sem_tipo._Continuar? All_fields=Todos_os_campos All_subgroups_(recursively)=Todos_os_subgrupos_(recursivamente) -An_Exception_occurred_while_accessing_'%0'=Uma_exceção_ocorreu_durante_ao_acesso_a_'%0' -An_SAXException_occurred_while_parsing_'%0'\:=Uma_exceção_ocorreu_durante_a_análise_de_'%0' +An_exception_occurred_while_accessing_'%0'=Uma_exceção_ocorreu_durante_ao_acesso_a_'%0' +A_SAX_exception_occurred_while_parsing_'%0'\:=Uma_exceção_ocorreu_durante_a_análise_de_'%0' and=e and_the_class_must_be_available_in_your_classpath_next_time_you_start_JabRef.=e_a_classe_deve_estar_disponível_em_seu_classpath_na_próxima_vez_que_você_iniciar_o_JabRef. any_field_that_matches_the_regular_expression_%0=qualquer_campo_que_corresponde_a_expressão_regular_%0 @@ -123,8 +123,8 @@ Class_name=Nome_da_classe Clear=Limpar Clear_fields=Limpar_campos Close=Fechar -Close_Others=Fechar_os_outros -Close_All=Fechar_todos +Close_others=Fechar_os_outros +Close_all=Fechar_todos Close_dialog=Fechar_janela_de_diálogo Close_the_current_database=Fechar_a_base_de_dados_atual Close_window=Fechar_Janela @@ -320,10 +320,10 @@ Font_style=Estilo_de_fonte Font_selection=Font_selection for=para Format_of_author_and_editor_names=Formato_dos_nomes_do_autor_e_editor -Format_String=Formato_de_string +Format_string=Formato_de_string Format_used=Formato_utilizado -Formatter_Name=Nome_do_formatador -found_in_aux_file=encontrado_em_arquivo_aux +Formatter_name=Nome_do_formatador +found_in_AUX_file=encontrado_em_arquivo_AUX Full_name=Nome_completo General=Geral General_fields=Campos_gerais @@ -343,7 +343,7 @@ Have_you_chosen_the_correct_package_path?=Você_escolheu_o_caminho_de_pacote_cor Help=Ajuda Help_on_groups=Ajuda_sobre_grupos Help_on_key_patterns=Ajuda_sobre_modelos_de_chave -Help_on_Regular_Expression_Search=Ajuda_sobre_busca_por_expressão_regular +Help_on_regular_expression_search=Ajuda_sobre_busca_por_expressão_regular Hide_non-hits=Ocultar_referências_não_encontradas Hierarchical_context=Contexo_hierárquico Highlight=Destacar @@ -430,7 +430,7 @@ Mark_entries=Marcar_referências Mark_entry=Marcar_referências Mark_new_entries_with_addition_date=Marcar_novas_referências_com_a_data_de_criação Mark_new_entries_with_owner_name=Marcar_novas_referências_com_o_nome_do_usuário -Memory_Stick_Mode=Modo_cartão_de_memória +Memory_stick_mode=Modo_cartão_de_memória Menu_and_label_font_size=Tamanho_da_fonte_do_menu_e_dos_rótulo Merged_external_changes=Mudanças_externas_mescladas Messages=Mensagens @@ -450,7 +450,7 @@ Moved_group_"%0".=Grupo_"%0"_movido Name=Nome Name_formatter=Formatador_de_nomes Natbib_style=Estilo_Natbib -nested_aux_files=arquivos_auxiliares_aninhados +nested_AUX_files=arquivos_AUXiliares_aninhados New=Novo new=novo New_BibTeX_entry=Nova_referência_BibTeX @@ -617,7 +617,7 @@ Searching_for_duplicates...=Procurando_por_duplicatas... Searching_for_files=Procurando_por_arquivos... Secondary_sort_criterion=Critério_de_ordenação_secundário Select=Selecionar -Select_a_Zip-archive=Selecionar_um_arquivo_ZIP +Select_a_ZIP-archive=Selecionar_um_arquivo_ZIP Select_action=Selecionar_operação Select_all=Selecionar_tudo Select_Classpath_of_New_Importer=Selecionar_classpath_para_o_novo_filtro_de_importação @@ -665,7 +665,7 @@ sort_subgroups=ordenar_subgrupos Sorted_all_subgroups_recursively.=Todos_os_grupos_foram_recursivamente_ordenados. Sorted_immediate_subgroups.=Grupos_imediatos_ordenados. source_edit=edição_de_fonte -Special_Name_Formatters=Formatadores_de_nome_espepciais +Special_name_formatters=Formatadores_de_nome_espepciais Special_table_columns=Colunas_de_tabela_especiais SQL_connection_established.=Conexão_SQL_estabelecida. Starting_import=Iniciando_importação @@ -676,7 +676,7 @@ Store_journal_abbreviations=Armazenar_abreviações_de_periódicos Stored_entry=Referência_armazenada Strings=Strings Strings_for_database=Strings_para_a_base_de_dados -Subdatabase_from_aux=Sub-base_de_dados_a_partir_do_LaTeX_AUX +Subdatabase_from_AUX=Sub-base_de_dados_a_partir_do_LaTeX_AUX Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=Alterna_entre_nomes_de_periódicos_abreviados_e_completos_se_o_nome_do_periódico_é_conhecido. Synchronize_file_links=Sincronizar_links_de_arquivos Synchronizing_file_links...=Sincronizando_links_de_arquivos. @@ -781,7 +781,7 @@ You_must_restart_JabRef_for_the_new_key_bindings_to_work_properly.=_O_JabRef_pre Your_new_key_bindings_have_been_stored.=Suas_novas_atribuições_de_chave_foram_armazenadas. The_following_fetchers_are_available\:=As_seguintes_ferramentas_de_pesquisa_estão_disponíveis\: Could_not_find_fetcher_'%0'=Não_foi_possível_encontrar_a_ferramenta_de_pesquisa_'%0' -Running_Query_'%0'_with_fetcher_'%1'.=Executando_consulta_'%0'_com_ferramenta_de_pesquisa_'%1'. +Running_query_'%0'_with_fetcher_'%1'.=Executando_consulta_'%0'_com_ferramenta_de_pesquisa_'%1'. Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=Consulta_'%0'_com_ferramenta_de_pesquisa_'%1'_não_retornou_resultados. Move/Rename_file=Mover/Renomear_arquivo File_moved=Arquivo_movido @@ -814,7 +814,7 @@ Attempting_SQL_import...=Tentativa_de_importação_SQL... Move_the_keyboard_focus_to_the_entry_table=Mover_o_foco_do_teclado_para_a_tabela_de_referências MIME_type=MIME_type 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.=Esta_funcionalidade_permite_que_novos_arquivos_sejam_abertos_ou_importados_para_uma_instância_do_JabRef_já_aberta
_ao_invés_de_abrir_uma_nova_instância._Por_exemplo,_isto_é_útil_quando_você_abre_um_arquivo_no_JabRef
_a_partir_de_ser_navegador_web.
_Note_que_isto_irá_previnir_que_você_execute_uma_ou_mais_instâncias_do_JabRef_ao_mesmo_tempo. -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=Executar_Pesquisar_,_e.g.,_"--fetch\=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=Executar_Pesquisar_,_e.g.,_"--fetch\=Medline\:cancer" The_ACM_Digital_Library=A_Biblioteca_Digital_ACM Reset=Redefinir Use_IEEE_LaTeX_abbreviations=Utilizar_abreviações_LaTeX_IEEE @@ -990,7 +990,7 @@ Web_search=Pesquisa_na_Web Style_selection=Seleção_de_estilo No_valid_style_file_defined=Nenhum_estilo_válido_definido Choose_pattern=Escolher_modelo -Use_the_bib_file_location_as_primary_file_directory=Utilizar_o_local_do_arquivo_bib_como_diretório_de_arquivo_principal +Use_the_BIB_file_location_as_primary_file_directory=Utilizar_o_local_do_arquivo_BIB_como_diretório_de_arquivo_principal Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=Não_foi_possível_executar_o_programa_gnuclient/emacsclient._Certifique-se_que_você_tem_o_programa_gnucliente/emacscliente_instalado_e_descrito_na_variável_de_ambiente_PATH. Built-in_journal_list=Lista_de_periódicos_embutida OpenOffice/LibreOffice_connection=Conexão_OpenOffice/LibreOffice @@ -1133,7 +1133,7 @@ Removed_all_subgroups_of_group_"%0".=Todos_os_subgrupos_do_grupo_"%0"_foram_remo To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.=Para_desabilitar_o_modo_memory_stick_renomeie_ou_remova_o_arquivo_jabref.xml_no_mesmo_diretório_que_o_JabRef Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.=Não_possível_conectar._Uma_possível_razão_é_que_o_JabRef_e_o_OpenOffice/LibreOffice_não_estão_rodando_no_mesmo_modo\:_32_bits_ou_64_bits. Use_the_following_delimiter_character(s)\:=Use_o(s)_seguinte(s)_caracter(es)_delimitador(es)\: -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above=Quand_estiver_baixando_arquivos,_ou_mesmo_movendo_arquivos_ao_diretório,_dê_preferência_ao_local_onde_está_o_seu_arquivo_bib. +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above=Quand_estiver_baixando_arquivos,_ou_mesmo_movendo_arquivos_ao_diretório,_dê_preferência_ao_local_onde_está_o_seu_arquivo_bib. Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Seu_arquivo_de_estilo_especifica_o_formato_de_caracter_'%0',_que_não_está_definido_no_seu_documento_OpenOffice/LibreOffice_atual Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Seu_arquivo_de_estilo_especifica_o_formato_de_parágrafo_'%0',_que_não_está_definido_no_seu_documento_OpenOffice/LibreOffice_atual @@ -1145,8 +1145,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case=Adicione_{}_ Import_conversions=Importar_conversões Please_enter_a_search_string=Favor_digitar_uma_string_de_busca Please_open_or_start_a_new_database_before_searching=Por_favor,_abra_ou_inicie_uma_base_de_dados_antes_de_realizar_a_busca -An_Error_occurred_while_fetching_from_ADS_(%0)\:=Um_Erro_ocorreu_enquanto_pensquisando_a_partir_do_ADS_(%0)\: -An_Error_occurred_while_parsing_abstract=Um_erro_ocorreu_durante_a_interpretação_do_abstract_(resumo) +An_error_occurred_while_fetching_from_ADS_(%0)\:=Um_Erro_ocorreu_enquanto_pensquisando_a_partir_do_ADS_(%0)\: +An_error_occurred_while_parsing_abstract=Um_erro_ocorreu_durante_a_interpretação_do_abstract_(resumo) Unknown_DiVA_entry\:_'%0'.=Referência_DiVA_desconhecida\:_'%0' Get_BibTeX_entry_from_DiVA=Obter_referência_BibTeX_a_partir_do_DiVA Log=Log @@ -1173,7 +1173,7 @@ Automatically_set_file_links=Definir_links_para_os_arquivos_automaticamente Continue?=Continuar? Resetting_all_key_bindings=Redefinindo_todas_as_teclas_de_atalho Quotes=Citações -Curly_Brackets=Chaves +Curly_brackets=Chaves Hostname=Host Invalid_setting=Configuração_Inválida @@ -1335,7 +1335,7 @@ Attention\:_Password_is_stored_in_plain_text\!= Please_specify_both_username_and_password= Proxy_requires_authentication= -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.= +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.= Note\:_A_full_text_search_is_currently_not_supported_for_%0= Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.= @@ -1386,7 +1386,7 @@ Copy_preview= Automatically_setting_file_links= Regenerating_BibTeX_keys_according_to_metadata= -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys= +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys= Regenerate_all_keys_for_the_entries_in_a_BibTeX_file= @@ -1402,7 +1402,7 @@ No_entry_found_for_ISBN_%0_at_www.ebook.de= Save_actions=Salvar_ações Enable_save_actions=Habilitar_salvar_ações -Always_reformat_.bib_file_on_save_and_export= +Always_reformat_BIB_file_on_save_and_export= Default_bibliography_mode= @@ -1439,7 +1439,7 @@ Usage=Utilização Are_you_sure_you_want_to_reset_all_settings_to_default_values?=Você_tem_certeza_que_deseja_redefinir_todas_as_configurações_para_valores_padrão? Reset_preferences=Redefinir_preferências -Ill-formed_entrytype_comment_in_bib_file= +Ill-formed_entrytype_comment_in_BIB_file= Clipboard=Área_de_transferência Could_not_paste_entry_as_text\:= Do_you_still_want_to_continue?= @@ -1604,9 +1604,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/JabRef_ru.properties b/src/main/resources/l10n/JabRef_ru.properties index edfdc07b6d9e..e46083fd339d 100644 --- a/src/main/resources/l10n/JabRef_ru.properties +++ b/src/main/resources/l10n/JabRef_ru.properties @@ -33,15 +33,15 @@ Add=Добавить Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Добавить_(скомпил.)_пользовательский_класс_ImportFormat_из_пути_класса. The_path_need_not_be_on_the_classpath_of_JabRef.=Путь_может_не_совпадать_с_путем_классов_JabRef. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Добавить_(скомпил.)_пользовательский_класс_ImportFormat_из_ZIP-архива. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=ZIP-архив_может_не_совпадать_с_путем_классов_JabRef. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Добавить_(скомпил.)_пользовательский_класс_ImportFormat_из_ZIP-архива. +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=ZIP-архив_может_не_совпадать_с_путем_классов_JabRef. Add_entry_selection_to_this_group=Добавить_выбранные_записи_в_эту_группу Add_from_folder=Добавить_из_папки -Add_from_jar=Добавить_из_jar +Add_from_JAR=Добавить_из_JAR add_group=добавить_группу @@ -71,8 +71,8 @@ All_fields=Все_поля All_subgroups_(recursively)=Все_подгруппы_(рекурсивно) -An_Exception_occurred_while_accessing_'%0'=Исключение_при_доступе_к_'%0' -An_SAXException_occurred_while_parsing_'%0'\:=Исключение_SAX_при_анализе_'%0'\: +An_exception_occurred_while_accessing_'%0'=Исключение_при_доступе_к_'%0' +A_SAX_exception_occurred_while_parsing_'%0'\:=Исключение_SAX_при_анализе_'%0'\: and=и @@ -228,8 +228,8 @@ Clear_fields=Очистить_поля Close=Закрыть -Close_Others= -Close_All= +Close_others= +Close_all= Close_dialog=Закрыть_диалоговое_окно Close_the_current_database=Закрыть_текущую_БД @@ -594,12 +594,12 @@ Font_selection=Выбор_шрифта for=для Format_of_author_and_editor_names=Формат_имени_автора/редактора -Format_String=Форматировать_строку +Format_string=Форматировать_строку Format_used=Используемый_формат -Formatter_Name=Имя_программы_форматирования +Formatter_name=Имя_программы_форматирования -found_in_aux_file=найдено_в_файле_AUX +found_in_AUX_file=найдено_в_файле_AUX Full_name=Полное_имя @@ -640,7 +640,7 @@ Help=Справка Help_on_groups=Справка_по_группам Help_on_key_patterns=Справка_по_шаблонам_ключей -Help_on_Regular_Expression_Search=Справка_по_поиску_с_помощью_регулярных_выражений +Help_on_regular_expression_search=Справка_по_поиску_с_помощью_регулярных_выражений Hide_non-hits=Скрыть_неподходящие @@ -811,7 +811,7 @@ Mark_new_entries_with_addition_date=Метка_даты_добавления_д Mark_new_entries_with_owner_name=Метка_имени_владельца_для_новых_записей -Memory_Stick_Mode=Режим_флеш-памяти +Memory_stick_mode=Режим_флеш-памяти Menu_and_label_font_size=Кегль_меню_и_подписи @@ -850,7 +850,7 @@ Name_formatter=Программа_форматирования_имени Natbib_style=Стиль_Natbib -nested_aux_files=родственный_файл_AUX +nested_AUX_files=родственный_файл_AUX New=Создать @@ -1181,7 +1181,7 @@ Secondary_sort_criterion=Вторичный_критерий_сортировк Select=Выбрать -Select_a_Zip-archive=Выбрать_ZIP-архив +Select_a_ZIP-archive=Выбрать_ZIP-архив Select_action=Выбрать_действие @@ -1277,7 +1277,7 @@ Sorted_all_subgroups_recursively.=Все_подгруппы_с_рекурсив Sorted_immediate_subgroups.=Непосредственные_подгруппы_с_сортировкой. source_edit=изменение_источника -Special_Name_Formatters=Особые_программы_форматирования_имени +Special_name_formatters=Особые_программы_форматирования_имени Special_table_columns=Особые_столбцы_таблицы SQL_connection_established.=Выполнено_подключение_SQL. @@ -1300,7 +1300,7 @@ Strings=Строки Strings_for_database=Строки_БД -Subdatabase_from_aux=Подчиненная_БД_из_AUX +Subdatabase_from_AUX=Подчиненная_БД_из_AUX Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=Переключение_полного/сокращенного_имени_журнала_для_известных_имен_журналов. @@ -1495,7 +1495,7 @@ Your_new_key_bindings_have_been_stored.=Новые_назначения_функ The_following_fetchers_are_available\:=Доступны_следующие_инструменты_выборки\: Could_not_find_fetcher_'%0'=Не_удалось_найти_инструмент_выборки_'%0' -Running_Query_'%0'_with_fetcher_'%1'.=Выполняется_запрос_'%0'_для_инструмента_выборки_'%1'. +Running_query_'%0'_with_fetcher_'%1'.=Выполняется_запрос_'%0'_для_инструмента_выборки_'%1'. Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=Не_найдено_результатов_запроса_'%0'_для_инструмента_выборки_'%1'. Move/Rename_file=Переместить/Ппереименовать_файл File_moved=Файл_перемещен @@ -1533,7 +1533,7 @@ Move_the_keyboard_focus_to_the_entry_table=Переместить_курсор_ MIME_type=MIME-тип 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.=Эта_функция_позволяет_открывать_или_импортировать_файлы_в_работающий_экземпляр_JabRef
без_запуска_нового_экземпляра_приложения._Например,_при_передаче_файла_в_JabRef
из_веб-браузера.
Обратите_внимание,_что_эта_функция_позволяет_не_запускать_несколько_экземпляров_JabRef_одновременно. -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=Запуск_инструмента_выборки,_напр.\:_"--fetch\=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=Запуск_инструмента_выборки,_напр.\:_"--fetch\=Medline\:cancer" The_ACM_Digital_Library=Цифровая_библиотека_ACM Reset=Инициализировать @@ -1732,7 +1732,7 @@ Web_search=Веб-поиск Style_selection=Выбор_стиля No_valid_style_file_defined=Не_определен_допустимый_файл_стиля Choose_pattern=Выбор_шаблона -Use_the_bib_file_location_as_primary_file_directory=Использовать_расположение_файла_bib_как_основной_каталог_файлов +Use_the_BIB_file_location_as_primary_file_directory=Использовать_расположение_файла_BIB_как_основной_каталог_файлов Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=Не_удалось_запустить_приложение_gnuclient/emacsclient._Убедитесь,_что_приложение_gnuclient/emacsclient_установлено_и_доступно_по_указанному_пути_PATH. Built-in_journal_list=Встроенный_список_журналов OpenOffice/LibreOffice_connection=Подключение_к_OpenOffice/LibreOffice @@ -1877,7 +1877,7 @@ Removed_all_subgroups_of_group_"%0".=Все_подгруппы_группы_"%0" To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.=Для_отключения_режима_флеш-памяти_переименуйте_или_удалите_файл_jabref.xml_в_каталоге_JabRef. Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.=Не_удалось_выполнить_подключение._Возможная_причина\:_JabRef_и_OpenOffice/LibreOffice_не_запущены_в_режиме_32-х_или_64-х_битного_приложения. Use_the_following_delimiter_character(s)\:=Используйте_следующие_символы-разделители\: -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above=При_загрузке_файлов_или_перемещении_связанных_файлов_в_каталог_файлов_желательно_использовать_каталог_расположения_файла_bib,_а_не_вышеуказанный_каталог +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above=При_загрузке_файлов_или_перемещении_связанных_файлов_в_каталог_файлов_желательно_использовать_каталог_расположения_файла_bib,_а_не_вышеуказанный_каталог Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=В_пользовательском_файле_стиля_указан_формат_знака_'%0',_не_определенный_в_текущем_документе_OpenOffice/LibreOffice. Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=В_пользовательском_файле_стиля_указан_формат_абзаца_'%0',_не_определенный_в_текущем_документе_OpenOffice/LibreOffice. @@ -1889,8 +1889,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case=Добавл Import_conversions=Импорт_преобразований Please_enter_a_search_string=Введите_строку_для_поиска Please_open_or_start_a_new_database_before_searching=Для_начала_поиска_откройте_существующую_БД_или_создайте_новую_БД -An_Error_occurred_while_fetching_from_ADS_(%0)\:=Ошибка_выборки_из_ADS_(%0)\: -An_Error_occurred_while_parsing_abstract=Ошибка_анализа_конспекта +An_error_occurred_while_fetching_from_ADS_(%0)\:=Ошибка_выборки_из_ADS_(%0)\: +An_error_occurred_while_parsing_abstract=Ошибка_анализа_конспекта Unknown_DiVA_entry\:_'%0'.=Неизвестная_запись_DiVA\:_'%0'. Get_BibTeX_entry_from_DiVA=Получить_запись_BibTeX_из_DiVA Log=Отчет @@ -1917,7 +1917,7 @@ Automatically_set_file_links=Автоуказание_ссылок_на_файл Continue?=Продолжить? Resetting_all_key_bindings=Сброс_назначений_функциональных_клавиш Quotes=Кавычки -Curly_Brackets=Фигурные_скобки +Curly_brackets=Фигурные_скобки Hostname=Хост Invalid_setting=Недопустимые_параметры Network=Сеть @@ -2082,7 +2082,7 @@ Attention\:_Password_is_stored_in_plain_text\!= Please_specify_both_username_and_password= Proxy_requires_authentication= -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.= +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.= Note\:_A_full_text_search_is_currently_not_supported_for_%0= Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.= @@ -2133,7 +2133,7 @@ Copy_preview= Automatically_setting_file_links= Regenerating_BibTeX_keys_according_to_metadata= -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys= +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys= Regenerate_all_keys_for_the_entries_in_a_BibTeX_file= @@ -2150,7 +2150,7 @@ No_entry_found_for_ISBN_%0_at_www.ebook.de= Save_actions= Enable_save_actions= -Always_reformat_.bib_file_on_save_and_export= +Always_reformat_BIB_file_on_save_and_export= Default_bibliography_mode= @@ -2187,7 +2187,7 @@ Usage= Are_you_sure_you_want_to_reset_all_settings_to_default_values?= Reset_preferences= -Ill-formed_entrytype_comment_in_bib_file= +Ill-formed_entrytype_comment_in_BIB_file= Clipboard= Could_not_paste_entry_as_text\:= Do_you_still_want_to_continue?= @@ -2354,9 +2354,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/JabRef_sv.properties b/src/main/resources/l10n/JabRef_sv.properties index 6f02c2e93138..2d52023a0d8a 100644 --- a/src/main/resources/l10n/JabRef_sv.properties +++ b/src/main/resources/l10n/JabRef_sv.properties @@ -37,11 +37,11 @@ Accept_change=Acceptera_ändring Accepting_the_change_replaces_the_complete_groups_tree_with_the_externally_modified_groups_tree.=Om_ändringarna_accepteras_så_kommer_hela_gruppträdet_att_ersättas_av_det_externt_ändrade_gruppträdet. Action=Händelse Add=Lägg_till -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Lägg_till_en_(kompilerad)_ImportFormat-klass_från_en_zip-fil. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Lägg_till_en_(kompilerad)_ImportFormat-klass_från_en_zip-fil. Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Lägg_till_en_(kompilerad)_ImportFormat-klass_från_en_sökväg_till_en_klass. Add_entry_selection_to_this_group=Lägg_till_valda_poster_till_denna_grupp Add_from_folder=Lägg_till_från_mapp -Add_from_jar=Lägg_till_från_jar-fil +Add_from_JAR=Lägg_till_från_JAR-fil Add_group=Lägg_till_grupp Add_new=Lägg_till_ny Add_new_file_type=Lägg_till_ny_filtyp @@ -66,13 +66,13 @@ All_key_bindings_will_be_reset_to_their_defaults.=Alla_tangentbordsbindingar_kom All_subgroups_(recursively)=Alla_undergrupper_(rekursivt) Allow_overwriting_existing_links.=Tillåt_att_befintliga_länkar_skrivs_över. Always_add_letter_(a,_b,_...)_to_generated_keys=Lägg_alltid_till_en_bokstav_(a,_b_...)_på_genererade_nycklar -Always_reformat_.bib_file_on_save_and_export=Formattera_allid_om_.bib-filen_vid_när_den_sparas_eller_exporteras +Always_reformat_BIB_file_on_save_and_export=Formattera_allid_om_BIB-filen_vid_när_den_sparas_eller_exporteras Always_use_this_PDF_import_style_(and_do_not_ask_for_each_import)= -An_Error_occurred_while_fetching_from_ADS_(%0)\:= -An_Error_occurred_while_parsing_abstract=Ett_fel_inträffade_när_sammanfattningen_tolkades -An_Exception_occurred_while_accessing_'%0'= -An_SAXException_occurred_while_parsing_'%0'\:= -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.=En_automatiskt_sparad_fil_hittades_för_databasen._Det_kan_betyda_att_JabRef_inte_avslutades_korrekt_senaste_gången_databasen_användes. +An_error_occurred_while_fetching_from_ADS_(%0)\:= +An_error_occurred_while_parsing_abstract=Ett_fel_inträffade_när_sammanfattningen_tolkades +An_exception_occurred_while_accessing_'%0'= +A_SAX_exception_occurred_while_parsing_'%0'\:= +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.=En_automatiskt_sparad_fil_hittades_för_databasen._Det_kan_betyda_att_JabRef_inte_avslutades_korrekt_senaste_gången_databasen_användes. Appearance=Utseende Append=Lägg_till Append_contents_from_a_BibTeX_database_into_the_currently_viewed_database=Lägg_till_innehåll_från_en_BibTeX-databas_till_den_nu_aktiva_databasen @@ -195,8 +195,8 @@ Cleared_connection_settings.=Rensade_anslutningsinställningar. Click_group_to_toggle_membership_of_selected_entries= Clipboard=Urklipp Close=Stäng -Close_All=Stäng_alla -Close_Others=Stäng_andra +Close_all=Stäng_alla +Close_others=Stäng_andra Close_database=Stäng_databas Close_dialog=Stäng_dialog Close_entry_editor=Stäng_posteditor @@ -274,7 +274,7 @@ Create_entry_based_on_content=Skapa_post_baserat_på_innehåll Created_group_"%0".=Skapade_grupp_"%0". Created_groups.=Skapade_grupper. Creates_keywords_in_created_entrys_with_directory_pathnames=Skapar_nyckelord_med_sökvägen_till_mappen_i_de_skapade_posterna -Curly_Brackets=Måsvingar +Curly_brackets=Måsvingar Current_content=Nuvarande_innehåll Current_tmp_value=Nuvarande_temporära_värde Current_value=Nuvarande_värde @@ -505,11 +505,11 @@ Font_family=Typsnittsfamilj Font_preview=Typsnittsexempel Font_size=Typsnittsstorlek Font_style=Typsnittsstil -Format_String=Formatsträng +Format_string=Formatsträng Format_of_author_and_editor_names=Format_för_författar-_och_redaktörsnamn Format_units_by_adding_non-breaking_separators_and_keeping_the_correct_case_on_search= Format_used=Använt_format -Formatter_Name=Formatnamn +Formatter_name=Formatnamn Formatter_not_found\:_%0=Hittade_ej_formatterare\:_%0 Forward=Framåt Found_%0_results.=Hittade_%0_resultat. @@ -546,7 +546,7 @@ HTML_table_(with_Abstract_&_BibTeX)= Have_you_chosen_the_correct_package_path?=Har_du_valt_rätt_sökväg_till_paketet? Help=Hjälp Help_on_Name_Formatting=Hjälp_för_namnformattering -Help_on_Regular_Expression_Search=Hjälp_för_sökning_med_reguljära_uttryck +Help_on_regular_expression_search=Hjälp_för_sökning_med_reguljära_uttryck Help_on_groups=Hjälp_för_grupper Help_on_key_patterns=Hjälp_för_nyckelmönster Help_on_special_fields=Hjälp_för_specialfält @@ -567,7 +567,7 @@ If_a_pasted_or_imported_entry_already_has_the_field_set,_overwrite.= If_connecting_manually,_please_verify_program_and_library_paths.= If_possible,_normalize_this_list_of_names_to_conform_to_standard_BibTeX_name_formatting= Ignore=Ignorera -Ill-formed_entrytype_comment_in_bib_file= +Ill-formed_entrytype_comment_in_BIB_file= Immediate_subgroups= Import=Importera ImportFormat_class= @@ -682,7 +682,7 @@ Mark_new_entries_with_owner_name=Märk_nya_poster_med_ägarnamn Marked_all_%0_selected_entries=Markerade_alla_%0_valda_poster Marked_selected_entry=Markerade_vald_post Marking_color_%0=Markeringsfärg_%0 -Memory_Stick_Mode= +Memory_stick_mode= Menu_and_label_font_size= Merge_citations=Slå_ihop_citeringar Merge_entries=Kombinera_poster @@ -758,7 +758,7 @@ No_files_found.=Inga_filer_hittades. No_information_added=Ingen_information_tillagd No_journal_names_could_be_abbreviated.=Inga_tidskriftsnamn_kunde_förkortas. No_journal_names_could_be_unabbreviated.=Inga_tidskriftsnamn_kunde_expanderas. -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys= +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys= No_priority_information=Ingen_prioritetsinformation No_problems_found.=Inga_problem_hittades. No_rank_information=Ingen_rankinginformation @@ -972,9 +972,9 @@ Review= Review_changes=Inspektera_ändringar Right=Höger Right_entry=Höger_post -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"= +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"= Run_field_formatter\:= -Running_Query_'%0'_with_fetcher_'%1'.= +Running_query_'%0'_with_fetcher_'%1'.= SQL_Database_Exporter= SQL_Database_Importer= SQL_Export= @@ -1023,7 +1023,7 @@ Secondary_sort_criterion=Andra_sorteringskriteriet Select=Välj Select_Classpath_of_New_Importer= Select_Writer_document=Välj_Writer-dokument -Select_a_Zip-archive=Välj_ett_Zip-arkiv +Select_a_ZIP-archive=Välj_ett_ZIP-arkiv Select_a_directory_where_the_search_shall_start.=Välj_en_mapp_där_sökningen_ska_börja. Select_action=Välj_händelse Select_all=Välj_alla @@ -1034,7 +1034,7 @@ Select_encoding=Välj_teckenkodning Select_entry_type=Välj_posttyp Select_export_format= Select_external_application=Välj_program -Select_file_from_ZIP-archive=Välj_fil_från_Zip-arkiv +Select_file_from_ZIP-archive=Välj_fil_från_ZIP-arkiv Select_file_type\:=Välj_filtyp\: Select_files=Välj_filer Select_new_ImportFormat_subclass= @@ -1108,7 +1108,7 @@ Sort_automatically=Sortera_automatiskt Sort_the_following_fields_as_numeric_fields=Sortera_följande_fält_som_tal Sorted_all_subgroups_recursively.=Sorterade_alla_undergrupper_rekursivt. Sorted_immediate_subgroups.= -Special_Name_Formatters=Speciella_format_för_namn +Special_name_formatters=Speciella_format_för_namn Special_table_columns=Speciella_kolumner Starting_import=Börjar_importera Starts_the_import_of_BibTeX_entries.=Börjar_importen_av_BibTeX-poster. @@ -1122,7 +1122,7 @@ String_dialog,_remove_string=Strängdialog,_ta_bort_sträng Strings=Strängar Strings_for_database=Strängar_för_databasen Style_selection=Stilval -Subdatabase_from_aux=Databas_baserad_på_AUX-fil +Subdatabase_from_AUX=Databas_baserad_på_AUX-fil Subject_for_sending_an_email_with_references=Ämne_för_epost_med_referenser Switch_preview_layout=Byt_postvisningsstil Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.= @@ -1146,7 +1146,7 @@ Test=Testa The_ACM_Digital_Library=ACMs_digitala_bibliotek The_Guide_to_Computing_Literature= The_PDF_contains_one_or_several_BibTeX-records.=PDFen_innehåller_en_eller_flera_BibTeX-poster. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.= +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.= The_character_format_is_controlled_by_the_citation_property_'CitationCharacterFormat'_in_the_style_file.= The_chosen_date_format_for_new_entries_is_not_valid=Det_valda_datumformatet_för_nya_poster_är_inte_giltigt The_chosen_encoding_'%0'_could_not_encode_the_following_characters\:=Den_valde_teckenkodningen_'%0'_kan_inte_representera_följande_tecken @@ -1260,7 +1260,7 @@ Use_autocompletion_for_the_following_fields=Använd_automatisk_komplettering_fö Use_custom_proxy_configuration=Använd_egen_proxykonfiguration Use_full_firstname_whenever_possible=Använd_hela_förnamnet_om_möjligt Use_other_look_and_feel=Använd_annan_'look-and-feel' -Use_the_bib_file_location_as_primary_file_directory=Använd_bib-filens_plats_som_primär_filmapp +Use_the_BIB_file_location_as_primary_file_directory=Använd_BIB-filens_plats_som_primär_filmapp Use_the_following_delimiter_character(s)\:=Använd_följande_bokstäver_som_avgränsare\: Use_the_selected_directory_to_start_with_the_search.=Börja_sökningen_i_följande_mapp. User-specific_file_directory=Användarspecifik_filmapp @@ -1280,7 +1280,7 @@ Web_search=Websökning What_do_you_want_to_do?=Vad_vill_du_göra? What_would_you_like_to_clean_up?=Vad_vill_du_städa_upp? When_adding/removing_keywords,_separate_them_by=När_nyckelord_läggs_till/tas_bort,_separera_dem_med -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above= +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above= When_opening_file_link,_search_for_matching_file_if_no_link_is_defined= Will_write_XMP-metadata_to_the_PDFs_linked_from_selected_entries.= Work_options= @@ -1348,7 +1348,7 @@ field=fält file=fil filename=filnamn for= -found_in_aux_file=hittades_i_aux-fil +found_in_AUX_file=hittades_i_AUX-fil illegal_backslash_expression= includes_subgroups=inkluderar_undergrupper insert_string=infoga_sträng @@ -1358,7 +1358,7 @@ large_capitals_are_not_masked_using_curly_brackets_{}=stora_bokstäver_är_inte_ link_should_refer_to_a_correct_file_path=länken_ska_ange_en_korrekt_sökväg modify_group=ändra_grupp move_group=flytta_grupp -nested_aux_files=nästlade_aux-filer +nested_AUX_files=nästlade_AUX-filer new=ny no_base-BibTeX-file_specified= no_database_generated=ingen_databas_genererades @@ -1548,9 +1548,9 @@ New_version_available=Ny_version_tillgänglig Installed_version=Installerad_version Remind_me_later=Påminn_mig_senare Ignore_this_update=Ignorerar_den_här_uppdateringen. -Couldn't_connect_to_the_update_server.=Kunde_inte_ansluta_till_uppdateringsservern. +Could_not_connect_to_the_update_server.=Kunde_inte_ansluta_till_uppdateringsservern. Please_try_again_later_and/or_check_your_network_connection.=Försök_igen_senare_och/eller_kontrollera_din_internetuppkoppling. -To_see_what's_new_view_the_changelog.=För_att_få_reda_på_vad_som_är_nytt_se_ändringsloggen. +To_see_what_is_new_view_the_changelog.=För_att_få_reda_på_vad_som_är_nytt_se_ändringsloggen. A_new_version_of_JabRef_has_been_released.=En_ny_version_av_JabRef_har_släppts- JabRef_is_up-to-date.=JabRef_är_uppdaterad. Latest_version=Senaste_version diff --git a/src/main/resources/l10n/JabRef_tr.properties b/src/main/resources/l10n/JabRef_tr.properties index 4d7fb068b00d..eb61e17cd31a 100644 --- a/src/main/resources/l10n/JabRef_tr.properties +++ b/src/main/resources/l10n/JabRef_tr.properties @@ -25,11 +25,11 @@ Action=Eylem Add=Ekle Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Bir_sınıf_yolundan_(derlenmiş)_özel_İçeAlmaBiçemi_sınıfı_ekle. The_path_need_not_be_on_the_classpath_of_JabRef.=Yolun_JabRef'in_sınıf_yolunda_olması_gerekmez. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Bir_Zip_arşivinden_(derlenmiş)_özel_İçeAlmaBiçemi_sınıfı_ekle. -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=Yolun_JabRef'in_sınıf_yolunda_olması_gerekmez. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Bir_ZIP_arşivinden_(derlenmiş)_özel_İçeAlmaBiçemi_sınıfı_ekle. +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=Yolun_JabRef'in_sınıf_yolunda_olması_gerekmez. Add_entry_selection_to_this_group=Bu_gruba_girdi_seçimini_ekle Add_from_folder=Klasörden_ekle -Add_from_jar=Jar'dan_ekle +Add_from_JAR=Jar'dan_ekle add_group=grup_ekle Add_group=Grup_Ekle Add_new=Yeni_ekle @@ -44,8 +44,8 @@ All_entries=Tüm_girdiler All_entries_of_this_type_will_be_declared_typeless._Continue?=Bu_türeden_tüm_girdiler_türsüz_olarak_bildirilecek._Devam_edilsin_mi? All_fields=Tüm_alanlar All_subgroups_(recursively)=Tüm_alt-gruplar_(özyinelemeli) -An_Exception_occurred_while_accessing_'%0'='%0''e_erişilirken_bir_istisna_oluştu -An_SAXException_occurred_while_parsing_'%0'\:='%0'_ayrıştırılırken_bir_SAXİstisnası_oluştu\: +An_exception_occurred_while_accessing_'%0'='%0''e_erişilirken_bir_istisna_oluştu +A_SAX_exception_occurred_while_parsing_'%0'\:='%0'_ayrıştırılırken_bir_SAXİstisnası_oluştu\: and=ve and_the_class_must_be_available_in_your_classpath_next_time_you_start_JabRef.=ve_bir_dahaki_sefer_JabRef'i_başlattığınızda_sınıf_sınıf_yolunuzda_bulunmalıdır. any_field_that_matches_the_regular_expression_%0=%0_düzenli_ifadesine_uyan_herhangi_bir_alan @@ -123,8 +123,8 @@ Class_name=Sınıf_adı Clear=Sil Clear_fields=Alanları_sil Close=Kapat -Close_Others=Diğerlerini_Kapat -Close_All=Tümünü_Kapat +Close_others=Diğerlerini_Kapat +Close_all=Tümünü_Kapat Close_dialog=Dialoğu_kapat Close_the_current_database=Güncel_veritabanını_kapat Close_window=Pencereyi_kapat @@ -320,10 +320,10 @@ Font_style=Yazıtipi_Stili Font_selection=YazıtipiSeçici for=için Format_of_author_and_editor_names=Yazar_ve_düzenleyici_adları_biçemi -Format_String=Dizgeyi_Biçimle +Format_string=Dizgeyi_Biçimle Format_used=Kullanılan_biçem -Formatter_Name=Biçimleyici_Adı -found_in_aux_file=yardımcı_dosyada_bulundu +Formatter_name=Biçimleyici_Adı +found_in_AUX_file=yardımcı_dosyada_bulundu Full_name=Tam_ad General=Genel General_fields=Genel_alanlar @@ -343,7 +343,7 @@ Have_you_chosen_the_correct_package_path?=Doğru_paket_yolunu_seçtiniz_mi? Help=Yardım Help_on_groups=Gruplar_hakkında_yardım Help_on_key_patterns=Tuş_desenleri_hakkında_yardım -Help_on_Regular_Expression_Search=Düzenli_İfade_Arama_hakkında_yardım +Help_on_regular_expression_search=Düzenli_İfade_Arama_hakkında_yardım Hide_non-hits=İsabet_almayanları_sakla Hierarchical_context=Hiyerarşik_içerik Highlight=Vurgula @@ -430,7 +430,7 @@ Mark_entries=Girdileri_işaretle Mark_entry=Girdiyi_işaretle Mark_new_entries_with_addition_date=Yeni_girdileri_ekleme_tarihiyle_işaretle Mark_new_entries_with_owner_name=Yeni_girdileri_sahip_adıyla_işaretle -Memory_Stick_Mode=Bellek_Çubuğu_Kipi +Memory_stick_mode=Bellek_Çubuğu_Kipi Menu_and_label_font_size=Menü_ve_etiket_yazı_tipi_boyutu Merged_external_changes=Harici_değişiklikler_birleştirildi Messages=Mesajlar @@ -450,7 +450,7 @@ Moved_group_"%0".="%0"_grubu_taşındı. Name=Ad Name_formatter=Ad_biçemleyici Natbib_style=Natbib_stili -nested_aux_files=içiçe_aux_dosyaları +nested_AUX_files=içiçe_AUX_dosyaları New=Yeni new=yeni New_BibTeX_entry=Yeni_BibTeX_girdisi @@ -617,7 +617,7 @@ Searching_for_duplicates...=Çift_nüshalar_aranıyor... Searching_for_files=Dosyalar_aranıyor Secondary_sort_criterion=İkincil_sıralama_kriteri Select=Seç -Select_a_Zip-archive=Bir_Zip-arşivi_seç +Select_a_ZIP-archive=Bir_ZIP-arşivi_seç Select_action=Eylem_seç Select_all=Tümünü_seç Select_Classpath_of_New_Importer=Yeni_İçe_Aktarıcının_Sınıfyolunu_seç @@ -665,7 +665,7 @@ sort_subgroups=altgrupları_sırala Sorted_all_subgroups_recursively.=Tüm_altgruplar_özyineli_sıralandı. Sorted_immediate_subgroups.=En_yakın_altgruplar_sıralandı. source_edit=kaynak_düzenle -Special_Name_Formatters=Özel_Ad_Biçemleyicileri +Special_name_formatters=Özel_Ad_Biçemleyicileri Special_table_columns=Özel_tablo_sütunları SQL_connection_established.=SQL_bağlantısı_kuruldu. Starting_import=İçe_aktarım_başlatılıyor @@ -676,7 +676,7 @@ Store_journal_abbreviations=Dergi_kısaltmalarını_depola Stored_entry=Depolanmış_girdi Strings=Dizgeler Strings_for_database=Veritabanı_için_dizgeler -Subdatabase_from_aux=Yardımcıdan_(aux)_altveritabanı +Subdatabase_from_AUX=Yardımcıdan_(AUX)_altveritabanı Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=Dergi_adı_biliniyorsa_tam_ve_kısaltılmış_dergi_adı_arasında_geçiş_yapar. Synchronize_file_links=Dosya_linklerini_eşzamanla Synchronizing_file_links...=Dosya_link_eşzamanlanıyor... @@ -782,7 +782,7 @@ You_must_restart_JabRef_for_the_new_key_bindings_to_work_properly.=Yeni_anahtar_ Your_new_key_bindings_have_been_stored.=Yeni_anahtar_demetleriniz_kaydedildi. The_following_fetchers_are_available\:=Aşağıdaki_getiriciler_kullanıma_hazırdır: Could_not_find_fetcher_'%0'='%0'_getiricisi_bulunamadı -Running_Query_'%0'_with_fetcher_'%1'.='%0'_sorgusu_'%1'_getiricisiyle_çalıştırılıyor. +Running_query_'%0'_with_fetcher_'%1'.='%0'_sorgusu_'%1'_getiricisiyle_çalıştırılıyor. Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.='%1'_getiricisiyle_'%0'_sorgusu_hiçbir_sonuç_döndürmedi. Move/Rename_file=Dosya_Taşı/Yeniden_adlandır File_moved=Dosya_taşındı @@ -816,7 +816,7 @@ Move_the_keyboard_focus_to_the_entry_table=Klavye_odağını_girdi_tablosuna_ta MIME_type=MIME_türü 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.=Bu_özellik_yeni_dosyaların_yeni_bir_oturum_açmaktansa_halen_çalışmakta_olan_bir
JabRef_oturumu_içine_açılması_ya_da_aktrılmasını_sağlar._Örneğin_bu,_tarayıcınızdan_bir_dosyayı
JabRef_içine_açtığnızda_kullanışlıdır.
Bunun,_birden_fazla_JabRef_oturumunu_aynı_anda_çalıştırmanızı_önleyeceğini_not_ediniz. -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=Getiriciyi_Çalıştır,_Örnek_"--fetch=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=Getiriciyi_Çalıştır,_Örnek_"--fetch=Medline\:cancer" The_ACM_Digital_Library=ACM_Sayısal_Kütüphane Reset=Sıfırla @@ -1011,7 +1011,7 @@ Style_selection=Stil_seçimi No_valid_style_file_defined=Geçerli_stil_dosyası_tanımlanmadı Choose_pattern=Desen_seçin -Use_the_bib_file_location_as_primary_file_directory=bib_dosyası_konumunu_birincil_dosya_dizini_olarak_kullan +Use_the_BIB_file_location_as_primary_file_directory=bib_dosyası_konumunu_birincil_dosya_dizini_olarak_kullan Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=gnuclient/emacsclient_programı_çalıştırılamıyor._Emacsclient/gnuclient_programının_kurulu_olduğuna_ve_YOL'da_mevcut_olduğuna_emin_olun. Built-in_journal_list=Yerleşik_dergi_listesi OpenOffice/LibreOffice_connection=OpenOffice/LibreOffice_bağlantısı @@ -1154,7 +1154,7 @@ Removed_all_subgroups_of_group_"%0".=Grup_"%0"'ın_bütün_alt_grupları_silindi To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.=Taşınabilir_hafıza_kartı_kipini_etkisizleştirmek_için_JabRef'le_aynı_klasördeki_jabref.xml_dosyasını_silin_ya_da_adını_değiştirin. Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.=Bağlanılamadı._Bir_olası_neden_JabRef_ve_OpenOffice/LibreOffice'in_birlikte_32_bit_ya_da_64_bit_kipinde_çalışmamasıdır. Use_the_following_delimiter_character(s)\:=Aşağıdaki_sınırlatıcı_karakter(ler)i_kullanın\: -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above=Dosya_indirirken_ya_da_bağlantılı_dosyaları_dosya_dizinine_taşırken,_yukarıda_atanan_dosya_dizini_yerine_bib_dosyası_konumunu_tercih_edin +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above=Dosya_indirirken_ya_da_bağlantılı_dosyaları_dosya_dizinine_taşırken,_yukarıda_atanan_dosya_dizini_yerine_BIB_dosyası_konumunu_tercih_edin Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Stil_dosyanız,_mevcut_OpenOffice/LibreOffice_belgenizde_tanımlanmamış_olan_'%0'_karakter_formatını_belirtiyor. Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.=Stil_dosyanız,_mevcut_OpenOffice/LibreOffice_belgenizde_tanımlanmamış_olan_'%0'_paragraf_formatını_belirtiyor. @@ -1167,8 +1167,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case=Aramada_doğr Import_conversions=Dönüşümleri_içe_aktar Please_enter_a_search_string=Lütfen_bir_arama_dizgesi_girin Please_open_or_start_a_new_database_before_searching=Lütfen_aramadan_önce_bir_veri_tabanı_açın_ya_da_başlatın -An_Error_occurred_while_fetching_from_ADS_(%0)\:=ADS'den_getirirken_bir_hata_oluştu_(%0)\: -An_Error_occurred_while_parsing_abstract=Özet_ayrıştırılırken_bir_hata_oluştu +An_error_occurred_while_fetching_from_ADS_(%0)\:=ADS'den_getirirken_bir_hata_oluştu_(%0)\: +An_error_occurred_while_parsing_abstract=Özet_ayrıştırılırken_bir_hata_oluştu Unknown_DiVA_entry\:_'%0'.=_'%0'.=Bilinmeyen_DiVA_girdisi\:_'%0'. Get_BibTeX_entry_from_DiVA=BibTeX_girdisini_DIVA'dan_al Log=Kayıt @@ -1192,7 +1192,7 @@ Automatically_set_file_links=Dosya_bağlantılarını_otomatik_olarak_kur Continue?=Devam? Resetting_all_key_bindings=Tüm_tuş_bağlantıları_başa_döndürülüyor Quotes=Tırnak_işareti -Curly_Brackets=Küme_parantezi +Curly_brackets=Küme_parantezi Hostname=Makine Invalid_setting=Geçersiz_ayar Network=Ağ @@ -1359,7 +1359,7 @@ Attention\:_Password_is_stored_in_plain_text\!=Dikkat\:_Parola_salt_metin_olarak Please_specify_both_username_and_password=Lütfen_hem_kullanıcı_adı_hem_de_parolayı_belirtiniz Proxy_requires_authentication=Vekil_sunucu_kimlik_denetleme_gerektiriyor -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.=Bu_veri_tabanı_için_bir_otomatik_kaydetme_dosyası_bulundu._Bu,_dosya_son_kullanıldığında_JabRef'in_temiz_şekilde_kapanmadığını_belitebilir. +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.=Bu_veri_tabanı_için_bir_otomatik_kaydetme_dosyası_bulundu._Bu,_dosya_son_kullanıldığında_JabRef'in_temiz_şekilde_kapanmadığını_belitebilir. Note\:_A_full_text_search_is_currently_not_supported_for_%0=Not\:%0_için_tam_metin_arama_henüz_desteklenmiyor Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.=OpenOffice/LibreOffice_kurulumu_otomatik_olarak_bulunamadı._Lütfen_kurulum_dizinini_kendiniz_seçiniz. @@ -1411,7 +1411,7 @@ Copy_preview=Kopyalama_önizleme Automatically_setting_file_links=Dosya_bağlantıları_otomatik_olarak_ayarlanıyor Regenerating_BibTeX_keys_according_to_metadata=Üstveri_(metadata)_uyarınca_BibTeX_anahtarları_yeniden_oluşturuluyor -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys=Bibdosyasında_üstveri_yok._Bibtex_anahtarları_yeniden_oluşturulamıyor +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys=Bibdosyasında_üstveri_yok._Bibtex_anahtarları_yeniden_oluşturulamıyor Regenerate_all_keys_for_the_entries_in_a_BibTeX_file=Bir_BibTeX_dosyasındaki_tüm_girdiler_için_tüm_anahtarları_yeniden_oluştur @@ -1427,7 +1427,7 @@ No_entry_found_for_ISBN_%0_at_www.ebook.de=ISBN_%0_için_www.ebook.de'de_girdi_b Save_actions=Eylemleri_kaydet Enable_save_actions=Eylemleri_kaydetmeyi_etkinleştir -Always_reformat_.bib_file_on_save_and_export=Kaydetme_ve_dışa_aktarmada_bib_dosyasını_her_zaman_yeniden_biçemle +Always_reformat_BIB_file_on_save_and_export=Kaydetme_ve_dışa_aktarmada_BIB_dosyasını_her_zaman_yeniden_biçemle Default_bibliography_mode=Öntanımlı_bibliyografya_kipi @@ -1464,7 +1464,7 @@ Usage=Kullanım Are_you_sure_you_want_to_reset_all_settings_to_default_values?=Tüm_ayarları_öntanımlı_değerlere_dönüştürmek_istediğinizden_emin_misiniz? Reset_preferences=Tercihleri_sıfırla -Ill-formed_entrytype_comment_in_bib_file=Bib_dosyasında_kötü_biçimli_girdi_türü_yorumu +Ill-formed_entrytype_comment_in_BIB_file=Bib_dosyasında_kötü_biçimli_girdi_türü_yorumu Clipboard=Pano Could_not_paste_entry_as_text\:=Girdi_metin_olarak_yapıştırılamıyor\: Do_you_still_want_to_continue?=Hala_devam_etmek_istiyor_musunuz? @@ -1623,9 +1623,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/JabRef_vi.properties b/src/main/resources/l10n/JabRef_vi.properties index 56648ee1c6af..a3a1654fa35f 100644 --- a/src/main/resources/l10n/JabRef_vi.properties +++ b/src/main/resources/l10n/JabRef_vi.properties @@ -47,15 +47,15 @@ Add=Thêm Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=Thêm_một_lớp_ĐịnhdạngNhập_tùy_biến_(được_biên_dịch)_từ_đường_dẫn_lớp. The_path_need_not_be_on_the_classpath_of_JabRef.=Đường_dẫn_không_được_trùng_với_đường_dẫn_lớp_của_JabRef. -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=Thêm_một_lớp_ĐịnhdạngNhập_tùy_biến_(được_biên_dịch)_từ_một_tập_tin-zip._ -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=Tập_tin-zip_không_được_trùng_với_đường_dẫn_lớp_của_JabRef. +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=Thêm_một_lớp_ĐịnhdạngNhập_tùy_biến_(được_biên_dịch)_từ_một_tập_tin-zip._ +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=Tập_tin-zip_không_được_trùng_với_đường_dẫn_lớp_của_JabRef. Add_entry_selection_to_this_group=Thêm_phép_chọn_mục_vào_nhóm_này Add_from_folder=Thêm_từ_thư_mục -Add_from_jar=Thêm_từ_tập_tin_jar +Add_from_JAR=Thêm_từ_tập_tin_JAR add_group=thêm_nhóm @@ -85,8 +85,8 @@ All_fields=Tất_cả_các_trường All_subgroups_(recursively)=Tất_cả_các_nhóm_con_(đệ_quy) -An_Exception_occurred_while_accessing_'%0'=Một_lỗi_xảy_ra_khi_đang_truy_cập_'%0' -An_SAXException_occurred_while_parsing_'%0'\:=Một_lỗi_SAXException_xảy_ra_khi_đang_phân_tách_'%0'\: +An_exception_occurred_while_accessing_'%0'=Một_lỗi_xảy_ra_khi_đang_truy_cập_'%0' +A_SAX_exception_occurred_while_parsing_'%0'\:=Một_lỗi_SAXException_xảy_ra_khi_đang_phân_tách_'%0'\: and=và @@ -241,8 +241,8 @@ Clear_fields=Xóa_các_trường Close=Đóng -Close_Others= -Close_All= +Close_others= +Close_all= Close_dialog=Đóng_hộp_thoại Close_the_current_database=Đóng_CSDL_hiện_tại @@ -609,12 +609,12 @@ Font_selection=Trình_chọn_phông_chữ for=dùng_cho Format_of_author_and_editor_names=Định_dạng_tên_tác_giả_và_người_biên_tập -Format_String=Định_dạng_chuỗi +Format_string=Định_dạng_chuỗi Format_used=Định_dạng_được_dùng -Formatter_Name=Tên_trình_định_dạng +Formatter_name=Tên_trình_định_dạng -found_in_aux_file=tìm_thấy_trong_tập_tin_aux +found_in_AUX_file=tìm_thấy_trong_tập_tin_AUX Full_name=Tên_đầy_đủ @@ -655,7 +655,7 @@ Help=Trợ_giúp Help_on_groups=Trợ_giúp_về_nhóm Help_on_key_patterns=Trợ_giúp_về_các_kiểu_khóa -Help_on_Regular_Expression_Search=Trợ_giúp_về_tìm_kiếm_bằng_biểu_thức_chính_tắc +Help_on_regular_expression_search=Trợ_giúp_về_tìm_kiếm_bằng_biểu_thức_chính_tắc Hide_non-hits=Ẩn_các_mục_không_gặp @@ -777,7 +777,7 @@ Key_pattern=Kiểu_mẫu_khóa keys_in_database=các_khóa_trong_CSDL -#nottranslated.Toviewit,usemenu"Tools|NewBibTeXfilefromAUxfile",andlaunchtheactiononanon-existantauxfile. +#nottranslated.Toviewit,usemenu"Tools|NewBibTeXfilefromAUxfile",andlaunchtheactiononanon-existantAUXfile. Keyword=Từ_khóa Label=Nhãn @@ -828,7 +828,7 @@ Mark_new_entries_with_addition_date=Đánh_dấu_các_mục_mới_với_ngày_đ Mark_new_entries_with_owner_name=Đánh_dấu_các_mục_mới_cùng_với_tên_người_sở_hữu -Memory_Stick_Mode=Chế_độ_thẻ_nhớ +Memory_stick_mode=Chế_độ_thẻ_nhớ Menu_and_label_font_size=Cỡ_phông_chữ_trình_đơn_và_nhãn @@ -867,7 +867,7 @@ Name_formatter=Trình_định_dạng_tên Natbib_style=Kiểu_Natbib -nested_aux_files=các_tập_tin_aux_lồng_nhau +nested_AUX_files=các_tập_tin_AUX_lồng_nhau New=Mới @@ -1209,7 +1209,7 @@ Secondary_sort_criterion=Tiêu_chuẩn_phân_loại_thứ_cấp Select=Chọn -Select_a_Zip-archive=Chọn_một_tập_tin_Zip +Select_a_ZIP-archive=Chọn_một_tập_tin_ZIP Select_action=Chọn_hành_động @@ -1223,7 +1223,7 @@ Select_encoding=Chọn_bộ_mã_hóa Select_entry_type=Chọn_kiểu_mục Select_external_application=Chọn_ứng_dụng_ngoài -Select_file_from_ZIP-archive=Chọn_tập_tin_từ_tập_tin_Zip +Select_file_from_ZIP-archive=Chọn_tập_tin_từ_tập_tin_ZIP @@ -1305,7 +1305,7 @@ Sorted_all_subgroups_recursively.=Xếp_thứ_tự_tất_cả_các_nhóm_con_the Sorted_immediate_subgroups.=Các_nhóm_con_cạnh_nhau_được_xếp_thứ_tự. source_edit=chỉnh_sửa_nguồn -Special_Name_Formatters=Các_trình_định_dạng_tên_đặc_biệt +Special_name_formatters=Các_trình_định_dạng_tên_đặc_biệt Special_table_columns=Các_cột_bảng_đặc_biệt SQL_connection_established.=Kết_nối_SQL_được_thiết_lập @@ -1328,7 +1328,7 @@ Strings=Các_chuỗi Strings_for_database=Các_chuỗi_dùng_cho_CSDL -Subdatabase_from_aux=CSDL_con_từ_aux +Subdatabase_from_AUX=CSDL_con_từ_AUX Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=Chuyển_đổi_giữa_tên_đầy_đủ_và_tên_viết_tắt_tạp_chí_nếu_biết_tên_tạp_chí_đó. @@ -1524,7 +1524,7 @@ Your_new_key_bindings_have_been_stored.=Tổ_hợp_phím_tắt_mới_của_bạn The_following_fetchers_are_available\:=Các_trình_lấy_về_sau_có_thể_dùng_được\: Could_not_find_fetcher_'%0'=Không_thể_tìm_thấy_trình_lầy_về_'%0' -Running_Query_'%0'_with_fetcher_'%1'.=Đang_chạy_truy_vấn_'%0'_với_trình_lấy_về_'%1'. +Running_query_'%0'_with_fetcher_'%1'.=Đang_chạy_truy_vấn_'%0'_với_trình_lấy_về_'%1'. Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=Phép_truy_vấn_'%0'_bằng_trình_lấy_về_'%1'_không_trả_lại_kết_quả_nào. Move/Rename_file=Chuyển/Đặt_lại_tên_tập_tin File_moved=Tập_tin_bị_di_chuyển @@ -1563,7 +1563,7 @@ Move_the_keyboard_focus_to_the_entry_table=Chuyển_trọng_tâm_bàn_phím_sang MIME_type=Kiểu_MIME 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.=Tính_chất_này_cho_phép_các_tập_tin_mới_có_thể_được_mở_hoặc_nhập_vào_một_phiên_JabRef_đang_chạy
thay_vì_phải_mở_một_phiên_làm_việc_mới._Điều_này_có_ích,_ví_dụ_như_khi_bạn_mở_một_tập_tin_trong_JabRef
từ_trình_duyệt_web_của_mình.
Lưu_ý_rằng_điều_này_sẽ_không_cho_phép_bạn_chạy_nhiều_hơn_một_phiên_làm_việc_của_JabRef_cùng_lúc. -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=Run_Fetcher,_e.g._"--fetch=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=Run_fetcher,_e.g._"--fetch=Medline\:cancer" The_ACM_Digital_Library=Thư_viện_số_ACM Reset=Thiết_lập_lại @@ -1763,7 +1763,7 @@ Style_selection= No_valid_style_file_defined= Choose_pattern= -Use_the_bib_file_location_as_primary_file_directory= +Use_the_BIB_file_location_as_primary_file_directory= Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.= Built-in_journal_list= OpenOffice/LibreOffice_connection= @@ -1903,7 +1903,7 @@ Import_metadata_from_PDF= Not_connected_to_any_Writer_document._Please_make_sure_a_document_is_open,_and_use_the_'Select_Writer_document'_button_to_connect_to_it.= To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.= Use_the_following_delimiter_character(s)\:= -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above= +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above= Your_style_file_specifies_the_character_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.= Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.= @@ -1915,8 +1915,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case= Import_conversions= Please_enter_a_search_string= Please_open_or_start_a_new_database_before_searching= -An_Error_occurred_while_fetching_from_ADS_(%0)\:= -An_Error_occurred_while_parsing_abstract= +An_error_occurred_while_fetching_from_ADS_(%0)\:= +An_error_occurred_while_parsing_abstract= Unknown_DiVA_entry\:_'%0'.= Get_BibTeX_entry_from_DiVA= Log= @@ -1943,7 +1943,7 @@ Automatically_set_file_links= Continue?= Resetting_all_key_bindings= Quotes= -Curly_Brackets= +Curly_brackets= Hostname= Invalid_setting= @@ -2110,7 +2110,7 @@ Attention\:_Password_is_stored_in_plain_text\!= Please_specify_both_username_and_password= Proxy_requires_authentication= -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.= +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.= Note\:_A_full_text_search_is_currently_not_supported_for_%0= Unable_to_autodetect_OpenOffice/LibreOffice_installation._Please_choose_the_installation_directory_manually.= @@ -2162,7 +2162,7 @@ Copy_preview= Automatically_setting_file_links= Regenerating_BibTeX_keys_according_to_metadata= -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys= +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys= Regenerate_all_keys_for_the_entries_in_a_BibTeX_file= @@ -2178,7 +2178,7 @@ No_entry_found_for_ISBN_%0_at_www.ebook.de= Save_actions= Enable_save_actions= -Always_reformat_.bib_file_on_save_and_export= +Always_reformat_BIB_file_on_save_and_export= Default_bibliography_mode= @@ -2214,7 +2214,7 @@ Usage= Are_you_sure_you_want_to_reset_all_settings_to_default_values?= Reset_preferences= -Ill-formed_entrytype_comment_in_bib_file= +Ill-formed_entrytype_comment_in_BIB_file= Clipboard= Could_not_paste_entry_as_text\:= Do_you_still_want_to_continue?= @@ -2378,9 +2378,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/JabRef_zh.properties b/src/main/resources/l10n/JabRef_zh.properties index d88f6075e35d..cd5563cf7d68 100644 --- a/src/main/resources/l10n/JabRef_zh.properties +++ b/src/main/resources/l10n/JabRef_zh.properties @@ -27,11 +27,11 @@ Accept=接受 Accept_change=接受修改 Action=动作 Add=添加 -Add_a_(compiled)_custom_ImportFormat_class_from_a_Zip-archive.=从一个_Zip_压缩包中添加(编译好的)自定义导入类。 +Add_a_(compiled)_custom_ImportFormat_class_from_a_ZIP-archive.=从一个_ZIP_压缩包中添加(编译好的)自定义导入类。 Add_a_(compiled)_custom_ImportFormat_class_from_a_class_path.=从一个_class_path_添加(编译好的)自定义导入类。 Add_entry_selection_to_this_group=添加选中记录到此分组 Add_from_folder=从文件夹中添加 -Add_from_jar=从_jar_中添加 +Add_from_JAR=从_JAR_中添加 Add_group=添加分组 Add_new=新建 Add_subgroup=添加子分组 @@ -46,10 +46,10 @@ All_entries=所有记录 All_entries_of_this_type_will_be_declared_typeless._Continue?=所有此类型记录将被标记为无类型记录,是否继续? All_fields=所有域 All_subgroups_(recursively)=所有子分组(递归地) -Always_reformat_.bib_file_on_save_and_export=当保存和导出时重新格式化_.bib_文件 -An_Exception_occurred_while_accessing_'%0'=当访问_'%0'_时发生了一个异常 -An_SAXException_occurred_while_parsing_'%0'\:=当解析'%0'时发生了一个_SAXException\: -An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_didn't_shut_down_cleanly_last_time_the_file_was_used.=发现了当前数据库的一个自动保存文件. 这可能意味着上次打开此文件时_JabRef_没有正常退出. +Always_reformat_BIB_file_on_save_and_export=当保存和导出时重新格式化_BIB_文件 +An_exception_occurred_while_accessing_'%0'=当访问_'%0'_时发生了一个异常 +A_SAX_exception_occurred_while_parsing_'%0'\:=当解析'%0'时发生了一个_SAXException\: +An_autosave_file_was_found_for_this_database._This_could_indicate_that_JabRef_did_not_shut_down_cleanly_last_time_the_file_was_used.=发现了当前数据库的一个自动保存文件. 这可能意味着上次打开此文件时_JabRef_没有正常退出. Appearance=外观 Append=追加 Append_contents_from_a_BibTeX_database_into_the_currently_viewed_database=从一个_BibTeX_数据库追加内容到当前查看的数据库 @@ -117,8 +117,8 @@ Clear=清除 Clear_fields=清除域内容 Clear_search=清除搜索 Close=关闭 -Close_All=关闭所有 -Close_Others=关闭其它 +Close_all=关闭所有 +Close_others=关闭其它 Close_database=关闭数据库 Close_dialog=关闭对话框 Close_entry_editor=关闭记录编辑器 @@ -313,10 +313,10 @@ Font_family=字体 Font_preview=预览字体 Font_size=字号 Font_style=字体 -Format_String=格式化简写字串 +Format_string=格式化简写字串 Format_of_author_and_editor_names=作者和编者的姓名格式 Format_used=使用的格式 -Formatter_Name=格式化器名称 +Formatter_name=格式化器名称 Found_%0_results.=找到_%0_条结果. Full_name=全称 General=基本设置 @@ -338,7 +338,7 @@ HTML_table=HTML_表 HTML_table_(with_Abstract_&_BibTeX)=HTML_表(包含摘要和_BibTeX) Have_you_chosen_the_correct_package_path?=您选择了正确的包路径吗? Help=帮助 -Help_on_Regular_Expression_Search=正则表达式搜索帮助 +Help_on_regular_expression_search=正则表达式搜索帮助 Help_on_groups=分组帮助 Help_on_key_patterns=键表达式帮助 Hide_non-hits=隐藏未选中 @@ -426,7 +426,7 @@ Mark_entries=高亮标记多条记录 Mark_entry=高亮标记该记录 Mark_new_entries_with_addition_date=建立新记录时标记时间 Mark_new_entries_with_owner_name=建立新记录时标记所有者为 -Memory_Stick_Mode=记忆棒模式 +Memory_stick_mode=记忆棒模式 Menu_and_label_font_size=菜单和标签字号 Merged_external_changes=合并外部修改 Messages=消息 @@ -478,7 +478,7 @@ No_exceptions_have_occurred.=没有发生异常。 No_files_found.=没有找到文件。 No_journal_names_could_be_abbreviated.=没有可供缩写的期刊全称。 No_journal_names_could_be_unabbreviated.=没有可供展开的期刊名缩写。 -No_meta_data_present_in_bibfile._Cannot_regenerate_BibTeX_keys=在_bibfile_中没有找到_meta_data,无法重建_BibTeX_key +No_meta_data_present_in_BIB_file._Cannot_regenerate_BibTeX_keys=在_BIB_file_中没有找到_meta_data,无法重建_BibTeX_key No_references_found=没有找到引用 No_results_found.=没有找到结果. No_URL_defined=没有定义_url @@ -631,7 +631,7 @@ Searching_for_files=正在查找文件 Secondary_sort_criterion=次要依据 Select=选择 Select_Classpath_of_New_Importer=选择新导入器的_classpath -Select_a_Zip-archive=选择一个_Zip_压缩包 +Select_a_ZIP-archive=选择一个_ZIP_压缩包 Select_action=选择操作 Select_all=全选 Select_encoding=选择编码 @@ -680,7 +680,7 @@ Sort_alphabetically=按字母表排序 Sort_automatically=自动排序 Sorted_all_subgroups_recursively.=递归排序所有子分组。 Sorted_immediate_subgroups.=完成排序直接子分组。 -Special_Name_Formatters=特殊的姓名格式化器 +Special_name_formatters=特殊的姓名格式化器 Special_table_columns=特殊列 Starting_import=开始导入 Statically_group_entries_by_manual_assignment=手动创建静态分组 @@ -692,7 +692,7 @@ String_dialog,_add_string=简写字串对话框,添加简写字串 String_dialog,_remove_string=简写字串对话框,删除简写字串 Strings=简写字串 Strings_for_database=简写字串列表——数据库 -Subdatabase_from_aux=从_AUX_文件生成的子数据库 +Subdatabase_from_AUX=从_AUX_文件生成的子数据库 Switch_preview_layout=切换预览视图 Switches_between_full_and_abbreviated_journal_name_if_the_journal_name_is_known.=在已知的期刊名简写和全称之间切换。 Synchronize_file_links=同步文件链接 @@ -707,7 +707,7 @@ Target_file_cannot_be_a_directory.=目标文件不可为目录。 Tertiary_sort_criterion=次要依据 Test=测试 The_PDF_contains_one_or_several_BibTeX-records.=该_PDF_包含一个或多个_BibTeX_记录, -The_Zip-archive_need_not_be_on_the_classpath_of_JabRef.=该_Zip_压缩包不需要在_JabRef_的_classpath_下。 +The_ZIP-archive_need_not_be_on_the_classpath_of_JabRef.=该_ZIP_压缩包不需要在_JabRef_的_classpath_下。 The_chosen_date_format_for_new_entries_is_not_valid=为新记录选择的日期格式非法 The_chosen_encoding_'%0'_could_not_encode_the_following_characters\:=选择的编码_'%0'_无法支持下列字符\: The_file
'%0'
has_been_modified
externally\!=文件
'%0'
已经被外部程序修改! @@ -824,7 +824,7 @@ field=域 file=文件 filename=文件名 for=为 -found_in_aux_file=在_aux_发现 +found_in_AUX_file=在_AUX_发现 insert_string=插入简写字串 key=键值 keys_in_database=数据库中的键值 @@ -832,7 +832,7 @@ keys_in_database=数据库中的键值 The_following_fetchers_are_available\:=下面列出的是可用的抓取器\: Could_not_find_fetcher_'%0'=无法找到抓取器_'%0' -Running_Query_'%0'_with_fetcher_'%1'.=使用抓取器'%1'执行请求'%0' +Running_query_'%0'_with_fetcher_'%1'.=使用抓取器'%1'执行请求'%0' Query_'%0'_with_fetcher_'%1'_did_not_return_any_results.=使用抓取器'%1'请求'%0'未返回任何结果。 Move/Rename_file=移动/重命名_文件 File_moved=文件移动完成 @@ -870,7 +870,7 @@ Move_the_keyboard_focus_to_the_entry_table=将键盘焦点移动到记录列表 MIME_type=MIME_类型 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.=该选项使得打开或者导入新文件的操作在已经运行的_JabRef_中进行,而不是新建另一个_JabRef_窗口
来进行这些操作。例如,当您从浏览器中调用_JabRef_打开一个文件时,这个选项将比较有用。
注意:它将阻止您同时运行多个_JabRef_实例。 -Run_Fetcher,_e.g._"--fetch\=Medline\:cancer"=运行抓取器,例如_"--fetch\=Medline\:cancer" +Run_fetcher,_e.g._"--fetch\=Medline\:cancer"=运行抓取器,例如_"--fetch\=Medline\:cancer" The_ACM_Digital_Library=ACM_数字图书馆 Reset=重置 @@ -1066,7 +1066,7 @@ Style_selection=引用样式选择 No_valid_style_file_defined=没有找到合法的_style_文件 Choose_pattern=选择表达式 -Use_the_bib_file_location_as_primary_file_directory=将_.bib_文件所在位置作为文件主目录 +Use_the_BIB_file_location_as_primary_file_directory=将_BIB_文件所在位置作为文件主目录 Could_not_run_the_gnuclient/emacsclient_program._Make_sure_you_have_the_emacsclient/gnuclient_program_installed_and_available_in_the_PATH.=无法执行_gnuclient/emacsclient_程序,确认您已经安装_gnuclient/emacsclient_,并且在_PATH_中。 Built-in_journal_list=内建期刊列表 OpenOffice/LibreOffice_connection=OpenOffice/LibreOffice_连接 @@ -1210,7 +1210,7 @@ Removed_all_subgroups_of_group_"%0".= To_disable_the_memory_stick_mode_rename_or_remove_the_jabref.xml_file_in_the_same_folder_as_JabRef.= Unable_to_connect._One_possible_reason_is_that_JabRef_and_OpenOffice/LibreOffice_are_not_both_running_in_either_32_bit_mode_or_64_bit_mode.= Use_the_following_delimiter_character(s)\:= -When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_bib_file_location_rather_than_the_file_directory_set_above= +When_downloading_files,_or_moving_linked_files_to_the_file_directory,_prefer_the_BIB_file_location_rather_than_the_file_directory_set_above= Your_style_file_specifies_the_paragraph_format_'%0',_which_is_undefined_in_your_current_OpenOffice/LibreOffice_document.= Searching...=正在搜索... @@ -1221,8 +1221,8 @@ Add_{}_to_specified_title_words_on_search_to_keep_the_correct_case=搜索时为 Import_conversions=导入约定 Please_enter_a_search_string=请输入一个搜索字符串 Please_open_or_start_a_new_database_before_searching= -An_Error_occurred_while_fetching_from_ADS_(%0)\:= -An_Error_occurred_while_parsing_abstract= +An_error_occurred_while_fetching_from_ADS_(%0)\:= +An_error_occurred_while_parsing_abstract= Unknown_DiVA_entry\:_'%0'.= Get_BibTeX_entry_from_DiVA=从_DiVA_中获取_BibTeX_记录 Log=日志 @@ -1249,7 +1249,7 @@ Automatically_set_file_links=自动设置文件链接 Continue?= Resetting_all_key_bindings= Quotes=引用 -Curly_Brackets= +Curly_brackets= Hostname=主机名 Invalid_setting=非法的设置 @@ -1391,7 +1391,7 @@ large_capitals_are_not_masked_using_curly_brackets_{}= link_should_refer_to_a_correct_file_path=链接应该指向一个正确的文件路径 modify_group=修改分组 move_group=移动分组 -nested_aux_files=nested_aux_文件 +nested_AUX_files=nested_AUX_文件 new=新建 no_base-BibTeX-file_specified=没有指定_base-BibTeX-文件 no_database_generated=没有生成数据库 @@ -1450,7 +1450,7 @@ Usage=用法 Are_you_sure_you_want_to_reset_all_settings_to_default_values?=您确认希望将所有设置重置为默认值吗? Reset_preferences=重置所有首选项 -Ill-formed_entrytype_comment_in_bib_file= +Ill-formed_entrytype_comment_in_BIB_file= Clipboard=剪贴板 Could_not_paste_entry_as_text\:= Do_you_still_want_to_continue?=是否继续? @@ -1617,9 +1617,9 @@ New_version_available= Installed_version= Remind_me_later= Ignore_this_update= -Couldn't_connect_to_the_update_server.= +Could_not_connect_to_the_update_server.= Please_try_again_later_and/or_check_your_network_connection.= -To_see_what's_new_view_the_changelog.= +To_see_what_is_new_view_the_changelog.= A_new_version_of_JabRef_has_been_released.= JabRef_is_up-to-date.= Latest_version= diff --git a/src/main/resources/l10n/Menu_fr.properties b/src/main/resources/l10n/Menu_fr.properties index c96c38c1bf64..a118cafc425d 100644 --- a/src/main/resources/l10n/Menu_fr.properties +++ b/src/main/resources/l10n/Menu_fr.properties @@ -1,8 +1,8 @@ #! #! created/edited by Popeye version 0.54 (popeye.sourceforge.net) #! encoding:ISO-8859-1 -Abbreviate_journal_names_(ISO)=Abr\u00e9ger_les_noms_de_journaux_(IS&O) -Abbreviate_journal_names_(MEDLINE)=Abr\u00e9ger_les_noms_de_journaux_(MEDLI&NE) +Abbreviate_journal_names_(ISO)=Abr\u00e9ger_les_noms_de_journAUX_(IS&O) +Abbreviate_journal_names_(MEDLINE)=Abr\u00e9ger_les_noms_de_journAUX_(MEDLI&NE) About_JabRef=A_&propos_de_JabRef Append_database=&Joindre_\u00e0_la_base Autogenerate_BibTeX_keys=Cr\u00e9ation_&automatique_des_cl\u00e9s_BibTeX @@ -29,7 +29,7 @@ Online_help=Aide_en_ligne Manage_content_selectors=&G\u00e9rer_les_s\u00e9lecteurs_de_contenu Manage_custom_exports=&G\u00e9rer_les_exportations_personnalis\u00e9es Manage_custom_imports=G\u00e9rer_les_&importations_personnalis\u00e9es -Manage_journal_abbreviations=G\u00e9rer_les_abr\u00e9viations_de_&journaux +Manage_journal_abbreviations=G\u00e9rer_les_abr\u00e9viations_de_&journAUX Mark_entries=Etiqueter_des_&entr\u00e9es New_entry=N&ouvelle_entr\u00e9e New_entry_by_type...=&Nouvelle_entr\u00e9e... @@ -52,14 +52,14 @@ Save_database_as...=Enregistrer_la_base_sous_... Save_selected_as...=Enregistrer_la_s\u00e9&lection_sous_... Search=&Recherche Select_all=&Tout_s\u00e9lectionner -Set_up_general_fields=Configurer_les_champs_&g\u00e9n\u00e9raux +Set_up_general_fields=Configurer_les_champs_&g\u00e9n\u00e9rAUX Show_error_console=Afficher_la_console_d'erreur Sort_tabs=Trier_les_onglets Switch_preview_layout=Aper\u00e7u_1/Aper\u00e7u_2 Toggle_entry_preview=&Afficher/masquer_l'aper\u00e7u Toggle_groups_interface=Afficher/masquer_l'interface_des_&groupes Tools=&Outils -Unabbreviate_journal_names=D\u00e9&velopper_les_noms_de_journaux +Unabbreviate_journal_names=D\u00e9&velopper_les_noms_de_journAUX Undo=&Annuler Unmark_all=To&ut_d\u00e9s\u00e9tiqueter Unmark_entries=&D\u00e9s\u00e9tiqueter_des_entr\u00e9es diff --git a/src/test/java/net/sf/jabref/importer/fileformat/BibtexImporterTest.java b/src/test/java/net/sf/jabref/importer/fileformat/BibtexImporterTest.java index 4688c2af291d..b9034167f663 100644 --- a/src/test/java/net/sf/jabref/importer/fileformat/BibtexImporterTest.java +++ b/src/test/java/net/sf/jabref/importer/fileformat/BibtexImporterTest.java @@ -115,7 +115,7 @@ public void testsGetExtensions() { @Test public void testGetDescription() { assertEquals("This importer exists only to enable `--importToOpen someEntry.bib`\n" + - "It is NOT intended to import a bib file. This is done via the option action, which treats the metadata fields.\n" + + "It is NOT intended to import a BIB file. This is done via the option action, which treats the metadata fields.\n" + "The metadata is not required to be read here, as this class is NOT called at --import.", importer.getDescription()); } } diff --git a/src/test/java/net/sf/jabref/logic/l10n/LocalizationParserTest.java b/src/test/java/net/sf/jabref/logic/l10n/LocalizationParserTest.java index e20157f7d4ec..1923c1ca09e1 100644 --- a/src/test/java/net/sf/jabref/logic/l10n/LocalizationParserTest.java +++ b/src/test/java/net/sf/jabref/logic/l10n/LocalizationParserTest.java @@ -21,8 +21,8 @@ public void testParsingCode() { assertLocalizationParsing("Localization.lang(\"Reset preferences (key1,key2,... or 'all')\")", "Reset_preferences_(key1,key2,..._or_'all')"); assertLocalizationParsing("Localization.lang(\"Multiple entries selected. Do you want to change the type of all these to '%0'?\")", "Multiple_entries_selected._Do_you_want_to_change_the_type_of_all_these_to_'%0'?"); - assertLocalizationParsing("Localization.lang(\"Run Fetcher, e.g. \\\"--fetch=Medline:cancer\\\"\");", - "Run_Fetcher,_e.g._\"--fetch\\=Medline\\:cancer\""); + assertLocalizationParsing("Localization.lang(\"Run fetcher, e.g. \\\"--fetch=Medline:cancer\\\"\");", + "Run_fetcher,_e.g._\"--fetch\\=Medline\\:cancer\""); } private void assertLocalizationParsing(String code, String expectedLanguageKeys) { From 653c8a98d4e94ad13942599a1ab7d2e64374a7eb Mon Sep 17 00:00:00 2001 From: bartsch-dev Date: Tue, 26 Jul 2016 17:55:11 +0200 Subject: [PATCH 12/12] define xjc input/ouput dir (subsequent builds will be faster) (#1628) Execute task only when input/output dir changed. --- medline.gradle | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/medline.gradle b/medline.gradle index 6fbce0615c82..919acc0987d2 100644 --- a/medline.gradle +++ b/medline.gradle @@ -1,18 +1,22 @@ - configurations { - xjc -} + xjc +} dependencies { - xjc group: 'com.sun.xml.bind', name: 'jaxb-xjc', version: '2.2.4-1' + xjc 'com.sun.xml.bind:jaxb-xjc:2.2.4-1' } -task xjc () << { - ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask', classpath: configurations.xjc.asPath) - - ant.xjc(destdir: 'src/main/gen/', package: 'net.sf.jabref.importer.fileformat.medline'){ - schema(dir: 'src/main/resources/xjc/medline', includes: 'medline.xsd') - } +task xjc { + inputs.dir "src/main/resources/xjc/medline/" + outputs.dir "src/main/gen/net/sf/jabref/importer/fileformat/medline" + + ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask', classpath: configurations.xjc.asPath) + + doLast { + ant.xjc(destdir: 'src/main/gen/', package: 'net.sf.jabref.importer.fileformat.medline') { + schema(dir: 'src/main/resources/xjc/medline', includes: 'medline.xsd') + } + } } -tasks. compileJava.dependsOn xjc +tasks.compileJava.dependsOn xjc