Skip to content

Commit fb8e447

Browse files
Aspie96obulat
andauthored
Fix attribution information for CC0 (#237)
* Fix attribution information for CC0 Commit 6d466d2 does not actually fix the issue. Instead, it changes the attribution in the footer, which is of a work under CC BY 4.0 (for which "licensed under" is perfectly ok). Revert commit 6d466d2, but use "licensed under the" instead of "licensed under a". Actually fix generated CC0 attribution using "marked as" instead of "licensed under". * Add license details card heading change for cc0 (Recommended License -> Recommended) Co-authored-by: Olga Bulat <obulat@gmail.com>
1 parent 22461ee commit fb8e447

File tree

7 files changed

+23
-16
lines changed

7 files changed

+23
-16
lines changed

src/components/FooterSection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
target="_blank"
8585
rel="noopener"
8686
>noted</a>,
87-
content on this site is marked with a
87+
content on this site is licensed under the
8888
<a
8989
href="https://creativecommons.org/licenses/by/4.0/"
9090
target="_blank"

src/components/LicenseCode.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<template #by>
2727
{{ $t(byString) }}
2828
</template>
29-
<template #licensed-text>
30-
<span>{{ $t('license-use.richtext.licensed-text') }}</span>
29+
<template #licenseMark>
30+
<span>{{ $t(licensedMarkedString) }}</span>
3131
</template>
3232
<template #license>
3333
<a
@@ -65,8 +65,8 @@ export default {
6565
computed: {
6666
...mapGetters(['shortName', 'licenseUrl', 'iconsList']),
6767
...mapState(['attributionDetails']),
68-
byString() {
69-
return this.creatorName ? 'license-use.richtext.by' : ''
68+
licensedMarkedString() {
69+
return this.shortName === 'CC0 1.0' ? 'license-use.richtext.marked-text' : 'license-use.richtext.licensed-text'
7070
},
7171
creatorProps() {
7272
const creatorAttrs = { property: 'cc:attributionName' }

src/components/LicenseCopy.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,9 @@ export default {
9696
const { work, creator, license, paragraph } = generateHTML(this.attributionDetails, this.shortName)
9797
const licenseCodeSpan = this.$i18n.t('license-use.richtext.full-text', {
9898
workTitle: work || this.$i18n.t('license-use.richtext.workTitle'),
99-
creator,
99+
byCreator: creator ? this.$i18n.t('license-use.richtext.by') + ' ' + creator : '',
100100
license,
101-
by: creator ? this.$i18n.t('license-use.richtext.by') : '',
102-
'licensed-text': this.$i18n.t('license-use.richtext.licensed-text')
101+
licensedMarkedString: this.$i18n.t(this.shortName === 'CC0 1.0' ? 'license-use.richtext.marked-text' : 'license-use.richtext.licensed-text')
103102
})
104103
return `${paragraph}${licenseCodeSpan}</p>`
105104
},

src/components/LicenseDetailsCard.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="selected-license-card">
33
<h3 class="vocab">
4-
{{ $t('license-details-card.heading') }}
4+
{{ headingText }}
55
</h3>
66
<h4 class="vocab b-header">
77
<a
@@ -39,7 +39,7 @@
3939
</div>
4040
</template>
4141
<script>
42-
import { licenseSlug } from '../utils/license-utilities'
42+
import { LICENSES, licenseSlug } from '../utils/license-utilities'
4343
import LicenseIcons from './LicenseIcons'
4444
import { mapGetters } from 'vuex'
4545
@@ -59,6 +59,11 @@ export default {
5959
},
6060
slug() {
6161
return licenseSlug(this.shortName)
62+
},
63+
headingText() {
64+
return this.shortName === LICENSES.CC0.SHORT
65+
? this.$t('license-details-card.cc0-heading')
66+
: this.$t('license-details-card.heading')
6267
}
6368
}
6469
}

src/locales/en.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
},
8989
"license-details-card": {
9090
"heading": "RECOMMENDED LICENSE",
91+
"cc0-heading": "RECOMMENDED",
9192
"full-description": {
9293
"cc0": "By marking your work with a CC0 public domain dedication, you are giving up your copyright and allowing reusers to distribute, remix, adapt, and build upon the material in any medium or format, even for commercial purposes.",
9394
"cc-by": "This license requires that reuses give credit to the creator. It allows reusers to distribute, remix, adapt, and build upon the material in any medium or format, even for commercial purposes.",
@@ -118,10 +119,11 @@
118119
"copy-label": "Copy",
119120
"copied-label": "Copied!",
120121
"richtext": {
121-
"full-text": "{workTitle} {by} {creator}{licensed-text}{license}",
122+
"full-text": "{workTitle} {byCreator} {licenseMark} {license}",
122123
"workTitle": "This work",
123124
"by": "by",
124-
"licensed-text": " is licensed under ",
125+
"licensed-text": "is licensed under",
126+
"marked-text": "is marked with",
125127
"print-instructions": ". To view a copy of this license, visit {linkToLicenseDeed}"
126128
}
127129
},

src/locales/ru.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,12 @@
118118
"copy-label": "Copy",
119119
"copied-label": "Copied!",
120120
"richtext": {
121-
"full-text": "{workTitle} {by} {creator}{licensed-text}{licenseName}",
121+
"full-text": "{workTitle} {byCreator} {licensedMarkedString} {license}",
122122
"workTitle": "This work",
123123
"by": "by",
124-
"licensed-text": " is licensed under ",
125-
"print-instructions": ". To view a copy of this license, visit {linkToLicenseDeed}."
124+
"licensed-text": "is licensed under",
125+
"marked-text": "is marked with",
126+
"print-instructions": ". To view a copy of this license, visit {linkToLicenseDeed}"
126127
}
127128
},
128129
"help": {

tests/e2e/specs/LicenseCode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
.assert.elementPresent('.next-button')
1414
.click('.next-button')
1515
.assert.elementPresent('p[class="license-text"]')
16-
},
16+
}
1717
// 'Check if the links in the license code redirects properly': function(browser) {
1818
// browser
1919
// .setValue('input[placeholder="Jane Doe"]', 'Jane Doe')

0 commit comments

Comments
 (0)