Skip to content

Commit 3b8c170

Browse files
authored
Remove "Match category" from localization (#11626)
* remove "Match category" * JavaDoc
1 parent 1079ca6 commit 3b8c170

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,15 @@ public static void setExactWidth(TableColumn<?, ?> column, double width) {
145145
column.setMaxWidth(width);
146146
}
147147

148+
/**
149+
* Creates a column for the match category.
150+
* <p>This column is always hidden but is used for sorting the table
151+
* in the floating mode. The order of the {@link MatchCategory} enum constants
152+
* determines the sorting order.</p>
153+
*/
148154
private TableColumn<BibEntryTableViewModel, MatchCategory> createMatchCategoryColumn(MainTableColumnModel columnModel) {
149155
TableColumn<BibEntryTableViewModel, MatchCategory> column = new MainTableColumn<>(columnModel);
150-
Node header = new Text(Localization.lang("Match category"));
151-
header.getStyleClass().add("mainTable-header");
152-
Tooltip.install(header, new Tooltip(MainTableColumnModel.Type.MATCH_CATEGORY.getDisplayName()));
153-
column.setGraphic(header);
154156
column.setCellValueFactory(cellData -> cellData.getValue().matchCategory());
155-
new ValueTableCellFactory<BibEntryTableViewModel, MatchCategory>().withText(String::valueOf).install(column);
156157
column.setSortable(true);
157158
column.setSortType(TableColumn.SortType.ASCENDING);
158159
column.setVisible(false);

src/main/java/org/jabref/gui/maintable/MainTableColumnModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class MainTableColumnModel {
3535

3636
private static final Logger LOGGER = LoggerFactory.getLogger(MainTableColumnModel.class);
3737
public enum Type {
38-
MATCH_CATEGORY("match_category", Localization.lang("Match category")),
38+
MATCH_CATEGORY("match_category"), // Not localized, because this column is always hidden
3939
INDEX("index", Localization.lang("Index")),
4040
EXTRAFILE("extrafile", Localization.lang("File type")),
4141
FILES("files", Localization.lang("Linked files")),

src/main/java/org/jabref/gui/search/MatchCategory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package org.jabref.gui.search;
22

3+
/**
4+
* @implNote The order of constants in this enum is important because it is used for sorting the main table.
5+
*/
36
public enum MatchCategory {
47
MATCHING_SEARCH_AND_GROUPS,
58
MATCHING_SEARCH_NOT_GROUPS,

src/main/resources/l10n/JabRef_en.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,6 @@ Character\ encoding\ '%0'\ is\ not\ supported.=Character encoding '%0' is not su
823823
Filter\ search\ results=Filter search results
824824
Filter\ by\ groups=Filter by groups
825825
Invert\ groups=Invert groups
826-
Match\ category=Match category
827826
Scroll\ to\ previous\ match\ category=Scroll to previous match category
828827
Scroll\ to\ next\ match\ category=Scroll to next match category
829828
Search=Search

0 commit comments

Comments
 (0)