Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make displayname of HistoryWidget configurable for alternate text #8740

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion core/src/main/java/hudson/widgets/HistoryWidget.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import hudson.model.ModelObject;
import hudson.model.Queue;
import hudson.model.Run;
import hudson.util.AlternativeUiTextProvider;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
Expand Down Expand Up @@ -61,6 +62,12 @@
* @author Kohsuke Kawaguchi
*/
public class HistoryWidget<O extends ModelObject, T> extends Widget {

/**
* Replaceable title for describing the kind of tasks this history shows. Defaults to "Build History".
*/
public static final AlternativeUiTextProvider.Message<HistoryWidget<?, ?>> DISPLAY_NAME = new AlternativeUiTextProvider.Message<>();

/**
* The given data model of records. Newer ones first.
*/
Expand Down Expand Up @@ -115,7 +122,7 @@ protected String getOwnerUrl() {
* Title of the widget.
*/
public String getDisplayName() {
return Messages.BuildHistoryWidget_DisplayName();
return AlternativeUiTextProvider.get(DISPLAY_NAME, this, Messages.BuildHistoryWidget_DisplayName());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find=Filter builds...
find=Filter...
Loading