Skip to content
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ for this scenario, simply change the value of API_BASE_URL in static/config.json

This project supports internationalization. Currently, only English language is supported. Pull requests to support additional languages are encouraged.

Note to developers: Textual labels are defined in `src/i18n/messages.json`. Ensure that all labels are defined here and that components use i18n, not textual labels directly.
Note to developers: Textual labels are defined in `src/i18n/locales/{lang}.json`. Ensure that all labels are defined here and that components use i18n, not textual labels directly.

Copyright & License
-------------------
Expand Down
10 changes: 9 additions & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,15 @@
"service_updated": "Service updated",
"object_identifier": "Object Identifier",
"object_identifier_desc": "A unique identifier (UUID) that Dependency-Track automatically assigns to every object",
"dependency_graph": "Dependency Graph"
"dependency_graph": "Dependency Graph",
"component_application": "Application",
"component_framework": "Framework",
"component_library": "Library",
"component_container": "Container",
"component_os": "Operation system",
"component_device": "Device",
"component_firmware": "Firmware",
"component_file": "File"
},
"admin": {
"configuration": "Configuration",
Expand Down
26 changes: 17 additions & 9 deletions src/views/portfolio/projects/ProjectCreateProjectModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
lazy="true" required="false" feedback="false" autofocus="false"
:label="$t('message.version')" :tooltip="this.$t('message.component_version_desc')"/>
<b-input-group-form-select id="v-classifier-input" required="true"
v-model="project.classifier" :options="availableClassifiers"
v-model="project.classifier" :options="sortAvailableClassifiers"
:label="$t('message.classifier')" :tooltip="$t('message.component_classifier_desc')" />
<b-form-group
id="project-description-form-group"
Expand Down Expand Up @@ -100,14 +100,14 @@
readOnlyProjectName: '',
readOnlyProjectVersion: '',
availableClassifiers: [
{ value: 'APPLICATION', text: 'Application' },
{ value: 'FRAMEWORK', text: 'Framework' },
{ value: 'LIBRARY', text: 'Library' },
{ value: 'CONTAINER', text: 'Container' },
{ value: 'OPERATING_SYSTEM', text: 'Operating System' },
{ value: 'DEVICE', text: 'Device' },
{ value: 'FIRMWARE', text: 'Firmware' },
{ value: 'FILE', text: 'File' }
{ value: 'APPLICATION', text: this.$i18n.t('message.component_application') },
{ value: 'FRAMEWORK', text: this.$i18n.t('message.component_framework') },
{ value: 'LIBRARY', text: this.$i18n.t('message.component_library') },
{ value: 'CONTAINER', text: this.$i18n.t('message.component_container') },
{ value: 'OPERATING_SYSTEM', text: this.$i18n.t('message.component_os') },
{ value: 'DEVICE', text: this.$i18n.t('message.component_device') },
{ value: 'FIRMWARE', text: this.$i18n.t('message.component_firmware') },
{ value: 'FILE', text: this.$i18n.t('message.component_file') }
],
selectableLicenses: [],
selectedLicense: '',
Expand All @@ -131,6 +131,14 @@
beforeMount() {
this.retrieveLicenses();
},
computed: {
sortAvailableClassifiers: function() {
this.availableClassifiers.sort(function(a, b) {
return a.text.localeCompare(b.text);
});
return this.availableClassifiers;
}
},
methods: {
syncReadOnlyNameField: function(value) {
this.readOnlyProjectName = value;
Expand Down