mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 23:46:05 -03:30
Mark img aria-labels for translation
This commit is contained in:
@@ -23,7 +23,9 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="at-Upgrade--panel">
|
<div class="at-Upgrade--panel">
|
||||||
<img
|
<img
|
||||||
ng-attr-aria-label="{{ BRAND_NAME === 'Tower' ? 'Ansible Tower Logo' : 'Ansible AWX Logo' }}"
|
{% verbatim %}
|
||||||
|
ng-attr-aria-label="{{ BRAND_NAME === 'Tower' ? appStrings.get('logos.TOWER_LOGO') : appStrings.get('logos.AWX_LOGO') }}"
|
||||||
|
{% endverbatim %}
|
||||||
src="{% static 'assets/logo-header.svg' %}"
|
src="{% static 'assets/logo-header.svg' %}"
|
||||||
width="200"
|
width="200"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="at-Layout-topNav">
|
<div class="at-Layout-topNav">
|
||||||
<at-top-nav-item is-shown="missingLicense" class="at-Layout-topNavItem--logo">
|
<at-top-nav-item is-shown="missingLicense" class="at-Layout-topNavItem--logo">
|
||||||
<a href="/#/">
|
<a href="/#/">
|
||||||
<img ng-attr-aria-label="{{ BRAND_NAME === 'Tower' ? 'Ansible Tower Logo' : 'Ansible AWX Logo' }}" ng-src="/static/assets/logo-header.svg" />
|
<img ng-attr-aria-label="{{ $root.BRAND_NAME === 'Tower' ? $root.appStrings.get('logos.TOWER_LOGO') : $root.appStrings.get('logos.AWX_LOGO') }}" ng-src="/static/assets/logo-header.svg" />
|
||||||
</a>
|
</a>
|
||||||
</at-top-nav-item>
|
</at-top-nav-item>
|
||||||
<div class="at-Layout-topNavRightAligner"></div>
|
<div class="at-Layout-topNavRightAligner"></div>
|
||||||
|
|||||||
@@ -78,6 +78,12 @@ function BaseStringService (namespace) {
|
|||||||
this.TEST = t.s('TEST');
|
this.TEST = t.s('TEST');
|
||||||
this.SUCCESSFUL_CREATION = resource => t.s('{{ resource }} successfully created', { resource: $filter('sanitize')(resource) });
|
this.SUCCESSFUL_CREATION = resource => t.s('{{ resource }} successfully created', { resource: $filter('sanitize')(resource) });
|
||||||
|
|
||||||
|
this.logos = {
|
||||||
|
AWX_LOGO: t.s('Ansible AWX Logo'),
|
||||||
|
TOWER_LOGO: t.s('Ansible Tower Logo'),
|
||||||
|
CUSTOM_LOGO: t.s('Custom Logo')
|
||||||
|
};
|
||||||
|
|
||||||
this.deleteResource = {
|
this.deleteResource = {
|
||||||
HEADER: t.s('Delete'),
|
HEADER: t.s('Delete'),
|
||||||
USED_BY: resourceType => t.s('The {{ resourceType }} is currently being used by other resources.', { resourceType }),
|
USED_BY: resourceType => t.s('The {{ resourceType }} is currently being used by other resources.', { resourceType }),
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="About-modalFooter">
|
<div class="About-modalFooter">
|
||||||
<img
|
<img
|
||||||
ng-attr-aria-label="{{ BRAND_NAME === 'Tower' ? 'Ansible Tower Logo' : 'Ansible AWX Logo' }}"
|
ng-attr-aria-label="{{ BRAND_NAME === 'Tower' ? appStrings.get('logos.TOWER_LOGO') : appStrings.get('logos.AWX_LOGO') }}"
|
||||||
class="About-brandImg img-responsive"
|
class="About-brandImg img-responsive"
|
||||||
src="/static/assets/logo-login.svg"
|
src="/static/assets/logo-login.svg"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ angular
|
|||||||
$rootScope.breadcrumb = {};
|
$rootScope.breadcrumb = {};
|
||||||
$rootScope.BRAND_NAME = AppStrings.get('BRAND_NAME');
|
$rootScope.BRAND_NAME = AppStrings.get('BRAND_NAME');
|
||||||
$rootScope.tabTitle = `Ansible ${$rootScope.BRAND_NAME}`;
|
$rootScope.tabTitle = `Ansible ${$rootScope.BRAND_NAME}`;
|
||||||
|
$rootScope.appStrings = AppStrings;
|
||||||
$rootScope.$watch('$state.current.ncyBreadcrumbLabel', function(title) {
|
$rootScope.$watch('$state.current.ncyBreadcrumbLabel', function(title) {
|
||||||
title = (title) ? "| " + title : "";
|
title = (title) ? "| " + title : "";
|
||||||
document.title = `Ansible ${$rootScope.BRAND_NAME} ${title}`;
|
document.title = `Ansible ${$rootScope.BRAND_NAME} ${title}`;
|
||||||
|
|||||||
@@ -68,14 +68,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="InsightsRow" ng-repeat="report in reports">
|
<div class="InsightsRow" ng-repeat="report in reports">
|
||||||
<div class="InsightsRow-title">
|
<div class="InsightsRow-title">
|
||||||
<img aria-label="Insights: Critical Risk" class="InsightsIcon" src="/static/assets/i_severity_critical.svg" ng-show="report.rule.severity === 'CRITICAL'"
|
<img ng-attr-aria-label="{{ strings.get('risks.CRITICAL_RISK') }}" class="InsightsIcon" src="/static/assets/i_severity_critical.svg" ng-show="report.rule.severity === 'CRITICAL'"
|
||||||
aw-tool-tip="Critical Risk" data-placement="right" data-original-title="" title="">
|
aw-tool-tip="{{ strings.get('risks.CRITICAL_RISK') }}" data-placement="right" data-original-title="" title="">
|
||||||
<img aria-label="Insights: High Risk" class="InsightsIcon" src="/static/assets/i_severity_high.svg" ng-show="report.rule.severity === 'ERROR'"
|
<img ng-attr-aria-label="{{ strings.get('risks.HIGH_RISK') }}" class="InsightsIcon" src="/static/assets/i_severity_high.svg" ng-show="report.rule.severity === 'ERROR'"
|
||||||
aw-tool-tip="High Risk" data-placement="top" data-original-title="" title="">
|
aw-tool-tip="{{ strings.get('risks.HIGH_RISK') }}" data-placement="top" data-original-title="" title="">
|
||||||
<img aria-label="Insights: Medium Risk" class="InsightsIcon" src="/static/assets/i_severity_med.svg" ng-show="report.rule.severity === 'WARN'"
|
<img ng-attr-aria-label="{{ strings.get('risks.MEDIUM_RISK') }}" class="InsightsIcon" src="/static/assets/i_severity_med.svg" ng-show="report.rule.severity === 'WARN'"
|
||||||
aw-tool-tip="Medium Risk" data-placement="top">
|
aw-tool-tip="{{ strings.get('risks.MEDIUM_RISK') }}" data-placement="top">
|
||||||
<img aria-label="Insights: Low Risk" class="InsightsIcon" src="/static/assets/i_severity_low.svg" ng-show="report.rule.severity === 'INFO'"
|
<img ng-attr-aria-label="{{ strings.get('risks.LOW_RISK') }}" class="InsightsIcon" src="/static/assets/i_severity_low.svg" ng-show="report.rule.severity === 'INFO'"
|
||||||
aw-tool-tip="Low Risk" data-placement="top">
|
aw-tool-tip="{{ strings.get('risks.LOW_RISK') }}" data-placement="top">
|
||||||
<div class="InsightsRow-description"><translate>ISSUE: {{report.rule.description}}</translate></div>
|
<div class="InsightsRow-description"><translate>ISSUE: {{report.rule.description}}</translate></div>
|
||||||
<span class="Form-title--is_superuser">{{report.rule.category}}</span>
|
<span class="Form-title--is_superuser">{{report.rule.category}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,6 +7,13 @@ function InsightsStrings (BaseString) {
|
|||||||
ns.tooltips = {
|
ns.tooltips = {
|
||||||
REFRESH_INSIGHTS: t.s('Refresh Insights'),
|
REFRESH_INSIGHTS: t.s('Refresh Insights'),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ns.risks = {
|
||||||
|
CRITICAL_RISK: t.s('Critical Risk'),
|
||||||
|
HIGH_RISK: t.s('High Risk'),
|
||||||
|
MEDIUM_RISK: t.s('Medium Risk'),
|
||||||
|
LOW_RISK: t.s('Low Risk'),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
InsightsStrings.$inject = ['BaseStringService'];
|
InsightsStrings.$inject = ['BaseStringService'];
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
ng-if="!customLogoPresent"
|
ng-if="!customLogoPresent"
|
||||||
ng-class="{'LoginModal-logoImage--notCustom': !customLogoPresent}"
|
ng-class="{'LoginModal-logoImage--notCustom': !customLogoPresent}"
|
||||||
ng-src="/static/assets/{{ customLogo }}"
|
ng-src="/static/assets/{{ customLogo }}"
|
||||||
ng-attr-aria-label="{{ BRAND_NAME === 'Tower' ? 'Ansible Tower Logo' : 'Ansible AWX Logo' }}"
|
ng-attr-aria-label="{{ BRAND_NAME === 'Tower' ? appStrings.get('logos.TOWER_LOGO') : appStrings.get('logos.AWX_LOGO') }}"
|
||||||
/>
|
/>
|
||||||
<img id="login_modal_image" class="LoginModal-logoImage"
|
<img id="login_modal_image" class="LoginModal-logoImage"
|
||||||
ng-if="customLogoPresent"
|
ng-if="customLogoPresent"
|
||||||
ng-src="{{ customLogo }}"
|
ng-src="{{ customLogo }}"
|
||||||
aria-label="Custom Logo"
|
ng-attr-aria-label="{{ appStrings.get('logos.CUSTOM_LOGO') }}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="LoginModal-body">
|
<div class="LoginModal-body">
|
||||||
|
|||||||
Reference in New Issue
Block a user