Merge pull request #2048 from ryanpetrello/how-do-you-say-violet-in-french

fix an i18n-related bug that affects non-English hipchat users
This commit is contained in:
Ryan Petrello 2018-06-04 15:26:15 -04:00 committed by GitHub
commit 5ceeb020cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

View File

@ -75,7 +75,14 @@ export default ['Rest', 'Wait', 'NotificationsFormObject',
multiple: false
});
$scope.hipchatColors = [i18n._('Gray'), i18n._('Green'), i18n._('Purple'), i18n._('Red'), i18n._('Yellow'), i18n._('Random')];
$scope.hipchatColors = [
{'id': 'gray', 'name': i18n._('Gray')},
{'id': 'green', 'name': i18n._('Green')},
{'id': 'purple', 'name': i18n._('Purple')},
{'id': 'red', 'name': i18n._('Red')},
{'id': 'yellow', 'name': i18n._('Yellow')},
{'id': 'random', 'name': i18n._('Random')}
];
CreateSelect2({
element: '#notification_template_color',
multiple: false

View File

@ -122,7 +122,14 @@ export default ['Rest', 'Wait',
multiple: false
});
$scope.hipchatColors = [i18n._('Gray'), i18n._('Green'), i18n._('Purple'), i18n._('Red'), i18n._('Yellow'), i18n._('Random')];
$scope.hipchatColors = [
{'id': 'gray', 'name': i18n._('Gray')},
{'id': 'green', 'name': i18n._('Green')},
{'id': 'purple', 'name': i18n._('Purple')},
{'id': 'red', 'name': i18n._('Red')},
{'id': 'yellow', 'name': i18n._('Yellow')},
{'id': 'random', 'name': i18n._('Random')}
];
CreateSelect2({
element: '#notification_template_color',
multiple: false

View File

@ -288,7 +288,7 @@ export default ['i18n', function(i18n) {
label: i18n._('Notification Color'),
dataTitle: i18n._('Notification Color'),
type: 'select',
ngOptions: 'color for color in hipchatColors track by color',
ngOptions: 'color.id as color.name for color in hipchatColors',
awPopOver: i18n._('Specify a notification color. Acceptable colors are: yellow, green, red purple, gray or random.'),
awRequiredWhen: {
reqExpression: "hipchat_required",