Skip to content

Commit

Permalink
Translate more icons
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Jan 17, 2022
1 parent ad4873d commit dae9265
Show file tree
Hide file tree
Showing 19 changed files with 34 additions and 11 deletions.
7 changes: 7 additions & 0 deletions core/src/main/java/org/jenkins/ui/icon/IconSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,13 @@ public static String tryTranslateTangoIconToSymbol(String tangoIcon) {
translations.put("icon-gear", "symbol-settings");
translations.put("icon-gear2", "symbol-settings");
translations.put("icon-plugin", "symbol-plugins");
translations.put("icon-folder", "symbol-folder");
translations.put("icon-user", "symbol-people");
translations.put("icon-search", "symbol-search");
translations.put("icon-terminal", "symbol-terminal");
translations.put("icon-up", "symbol-arrow-up");
translations.put("icon-previous", "symbol-arrow-left");
translations.put("icon-next", "symbol-arrow-right");

return translations.getOrDefault(tangoIcon, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:p="/lib/hudson/project">
<l:task contextMenu="false" href="${it.upUrl}" icon="icon-up icon-md" title="${%Back to Project}"/>
<l:task contextMenu="false" href="${buildUrl.baseUrl}/" icon="icon-search icon-md" title="${%Status}"/>
<l:task href="${buildUrl.baseUrl}/changes" icon="icon-notepad icon-md" title="${%Changes}"/>
<l:task href="${buildUrl.baseUrl}/changes" icon="symbol-list" title="${%Changes}"/>
<p:console-link/>
<l:task href="${buildUrl.baseUrl}/configure" icon="symbol-settings" title="${h.hasPermission(it,it.UPDATE)?'%Edit Build Information':'%View Build Information'}"/>
</j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ THE SOFTWARE.
<l:layout title="${%Rename}">
<st:include page="sidepanel.jelly" />
<l:main-panel>
<h1><l:icon class="icon-notepad icon-xlg"/> ${%DescribeRename(it.pronoun, it.name)}</h1>
<h1>${%DescribeRename(it.pronoun, it.name)}</h1>
<f:form method="post" action="confirmRename" name="config" tableClass="config-table scrollspy">
<f:entry title="${%NewName}">
<f:textbox name="newName" value="${it.name}" autocomplete="on" checkUrl="checkNewName" checkDependsOn="newName"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ THE SOFTWARE.
</j:otherwise>
</j:choose>
<l:task contextMenu="false" href="${url}/" icon="icon-search icon-md" title="${%Status}"/>
<l:task href="${url}/changes" icon="icon-notepad icon-md" title="${%Changes}"/>
<l:task href="${url}/changes" icon="symbol-list" title="${%Changes}"/>
<l:task icon="images/svgs/folder.svg" href="${url}/ws/" title="${%Workspace}" permission="${it.WORKSPACE}">
<l:task confirmationMessage="${%wipe.out.confirm}" href="${url}/doWipeOutWorkspace" icon="icon-folder-delete icon-md" permission="${h.isWipeOutPermissionEnabled() ? it.WIPEOUT : it.BUILD}" post="true" requiresConfirmation="true" title="${%Wipe Out Workspace}"/>
</l:task>
Expand Down
1 change: 0 additions & 1 deletion core/src/main/resources/hudson/model/Computer/builds.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ THE SOFTWARE.
<st:include page="sidepanel.jelly" />
<l:main-panel>
<h1>
<l:icon class="icon-notepad icon-xlg"/>
${%title(it.displayName)}
</h1>
<p>
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/resources/hudson/model/Computer/sidepanel.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ THE SOFTWARE.
<l:task contextMenu="false" href="${rootURL}/computer" icon="icon-up icon-md" title="${%Back to List}"/>
<l:task contextMenu="false" href="${rootURL}/${it.url}" icon="icon-search icon-md" title="${%Status}"/>
<l:task href="${rootURL}/${it.url}delete" icon="icon-edit-delete icon-md" permission="${it.DELETE}" title="${%Delete Agent}"/>
<l:task href="${rootURL}/${it.url}configure" icon="icon-setting icon-md" permission="${it.EXTENDED_READ}"
<l:task href="${rootURL}/${it.url}configure" icon="symbol-edit" permission="${it.EXTENDED_READ}"
title="${it.hasPermission(it.CONFIGURE) ? '%Configure' : '%View Configuration'}"/>
<l:task href="${rootURL}/${it.url}builds" icon="icon-notepad icon-md" title="${%Build History}"/>
<l:task href="${rootURL}/${it.url}load-statistics" icon="icon-monitor icon-md" title="${%Load Statistics}"/>
<l:task href="${rootURL}/${it.url}builds" icon="symbol-build-history" title="${%Build History}"/>
<l:task href="${rootURL}/${it.url}load-statistics" icon="symbol-analytics" title="${%Load Statistics}"/>
<j:if test="${it.channel!=null}">
<l:task href="${rootURL}/${it.url}script" icon="icon-terminal icon-md" permission="${app.ADMINISTER}" title="${%Script Console}"/>
<l:task href="${rootURL}/${it.url}script" icon="symbol-terminal" permission="${app.ADMINISTER}" title="${%Script Console}"/>
</j:if>
<st:include page="sidepanel2.jelly" optional="true" /><!-- hook for derived class to add more items -->
<t:actions />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ THE SOFTWARE.
<l:tasks>
<l:task href="${rootURL}/" icon="icon-up icon-md" title="${%Back to Dashboard}"/>
<l:task href="${rootURL}/manage" icon="symbol-settings" permissions="${app.MANAGE_AND_SYSTEM_READ}" title="${%Manage Jenkins}"/>
<l:task href="new" icon="icon-new-computer icon-md" permission="${createPermission}" title="${%New Node}"/>
<l:task href="new" icon="symbol-new" permission="${createPermission}" title="${%New Node}"/>
<l:task href="${rootURL}/configureClouds" icon="icon-health-40to59 icon-md" permission="${app.SYSTEM_READ}"
title="${app.hasPermission(app.ADMINISTER) ? '%Configure Clouds' : '%View Clouds'}"/>
<l:task href="configure" icon="symbol-settings" permissions="${app.MANAGE_AND_SYSTEM_READ}" title="${%Node Monitoring}"/>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/hudson/model/View/sidepanel.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ THE SOFTWARE.
<l:task href="${rootURL}/${it.viewUrl}asynchPeople/" icon="icon-user icon-md" title="${%People}"/>
</j:otherwise>
</j:choose>
<l:task href="${rootURL}/${it.viewUrl}builds" icon="icon-notepad icon-md" title="${%Build History}"/>
<l:task href="${rootURL}/${it.viewUrl}builds" icon="symbol-build-history" title="${%Build History}"/>
<j:if test="${it.isEditable()}">
<!-- /configure URL on Jenkins object is overloaded with Jenkins's system config, so always use the explicit name. -->
<l:task href="${rootURL}/${it.viewUrl}configure" icon="symbol-settings" permission="${it.CONFIGURE}" title="${%Edit View}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/form">
<!-- TODO: Should use permission attribute after JENKINS-18649 -->
<j:if test="${it.hasPermission(it.CONFIGURE) or (it.parent.hasPermission(it.CREATE) and it.hasPermission(it.DELETE))}">
<l:task href="${h.getActionUrl(it.url, action)}" icon="icon-notepad icon-md" enabled="${it.nameEditable}" title="${%Rename}"/>
<l:task href="${h.getActionUrl(it.url, action)}" icon="symbol-edit" enabled="${it.nameEditable}" title="${%Rename}"/>
</j:if>
</j:jelly>
1 change: 1 addition & 0 deletions war/src/main/resources/images/symbols/analytics.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions war/src/main/resources/images/symbols/arrow-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions war/src/main/resources/images/symbols/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions war/src/main/resources/images/symbols/arrow-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions war/src/main/resources/images/symbols/build-history.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions war/src/main/resources/images/symbols/edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions war/src/main/resources/images/symbols/folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions war/src/main/resources/images/symbols/list.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions war/src/main/resources/images/symbols/new.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions war/src/main/resources/images/symbols/people.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dae9265

Please sign in to comment.