Skip to content

Commit

Permalink
Add keys in JabRef_en.properties
Browse files Browse the repository at this point in the history
  • Loading branch information
priyanshu16095 committed Feb 21, 2025
1 parent 6f235c9 commit 353f1bd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import javafx.scene.control.cell.TextFieldTableCell;

import org.jabref.logic.citationkeypattern.CitationKeyPattern;
import org.jabref.logic.l10n.Localization;

public class CitationKeyPatternSuggestionCell extends TextFieldTableCell<CitationKeyPatternsPanelItemModel, String> {
private final CitationKeyPatternSuggestionTextField searchField;
Expand Down Expand Up @@ -128,18 +129,18 @@ private void populatePopup(List<String> searchResult) {
}

private Menu createPatternsSubMenu() {
Menu patternsSubMenu = new Menu("All patterns");
Menu patternsSubMenu = new Menu(Localization.lang("All patterns"));

Map<CitationKeyPattern.Category, List<CitationKeyPattern>> categorizedPatterns =
CitationKeyPattern.getAllPatterns().stream()
.collect(Collectors.groupingBy(CitationKeyPattern::getCategory));

Map<CitationKeyPattern.Category, String> categoryNames = Map.of(
CitationKeyPattern.Category.AUTHOR_RELATED, "Author related",
CitationKeyPattern.Category.EDITOR_RELATED, "Editor related",
CitationKeyPattern.Category.TITLE_RELATED, "Title related",
CitationKeyPattern.Category.OTHER_FIELDS, "Other fields",
CitationKeyPattern.Category.BIBENTRY_FIELDS, "BibEntry fields"
CitationKeyPattern.Category.AUTHOR_RELATED, Localization.lang("Author related"),
CitationKeyPattern.Category.EDITOR_RELATED, Localization.lang("Editor related"),
CitationKeyPattern.Category.TITLE_RELATED, Localization.lang("Title related"),
CitationKeyPattern.Category.OTHER_FIELDS, Localization.lang("Other fields"),
CitationKeyPattern.Category.BIBENTRY_FIELDS, Localization.lang("BibEntry fields")
);

for (Map.Entry<CitationKeyPattern.Category, String> entry : categoryNames.entrySet()) {
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2856,3 +2856,9 @@ Include\ or\ exclude\ cross-referenced\ entries=Include or exclude cross-referen
Would\ you\ like\ to\ include\ cross-reference\ entries\ in\ the\ current\ operation?=Would you like to include cross-reference entries in the current operation?
Entries\ copied\ successfully,\ including\ cross-references.=Entries copied successfully, including cross-references.
Entries\ copied\ successfully,\ without\ cross-references.=Entries copied successfully, without cross-references.
All\ patterns=All patterns
Author\ related=Author related
Editor\ related=Editor related
Title\ related=Title related
BibEntry\ fields=BibEntry fields

0 comments on commit 353f1bd

Please sign in to comment.