Show languages

This commit is contained in:
Bryan Housel
2018-04-08 08:59:49 -04:00
parent 30d94db9a2
commit 8a0a5e309e
4 changed files with 32 additions and 8 deletions
+10 -1
View File
@@ -3604,6 +3604,11 @@ img.tile-debug {
/* Success Modal
------------------------------------------------------- */
.save-success.body {
overflow-y: scroll;
overflow-x: hidden;
}
.save-summary,
.save-communityLinks {
padding: 0px 20px 15px 20px;
@@ -3641,6 +3646,9 @@ img.tile-debug {
font-size: 14px;
font-weight: bold;
}
.community-languages {
font-style: italic;
}
.save-summary .details {
margin: 0px 5px;
white-space: nowrap;
@@ -3655,12 +3663,13 @@ img.tile-debug {
width: 12px;
height: 15px;
}
.community-detail .disclosure-wrap .community-extended-description {
.community-detail .community-more {
background-color: #efefef;
padding: 8px;
border-radius: 4px;
}
/* Splash Modal
------------------------------------------------------- */
.modal-actions .logo-walkthrough,
+1
View File
@@ -537,6 +537,7 @@ en:
changeset_id: "Changeset #: {changeset_id}"
like_osm: "Like OpenStreetMap? Connect with others:"
more: More
languages: "Languages: {languages}"
confirm:
okay: "OK"
cancel: "Cancel"
+2 -1
View File
@@ -653,7 +653,8 @@
"view_on_osm": "View Changes on OSM",
"changeset_id": "Changeset #: {changeset_id}",
"like_osm": "Like OpenStreetMap? Connect with others:",
"more": "More"
"more": "More",
"languages": "Languages: {languages}"
},
"confirm": {
"okay": "OK",
+19 -6
View File
@@ -179,20 +179,33 @@ export function uiSuccess(context) {
.attr('class', 'community-description')
.html(t('community.' + d.id + '.description', replacements));
if (d.extendedDescription) {
if (d.extendedDescription || (d.languageCodes && d.languageCodes.length)) {
selection
.append('div')
.call(uiDisclosure(context, 'community-ext-' + d.id, false)
.title(t('success.more'))
.content(extendedDescription)
.content(showMore)
);
}
function extendedDescription(selection) {
selection
function showMore(selection) {
var more = selection
.append('div')
.attr('class', 'community-extended-description')
.html(t('community.' + d.id + '.extendedDescription', replacements));
.attr('class', 'community-more');
if (d.extendedDescription) {
more
.append('div')
.attr('class', 'community-extended-description')
.html(t('community.' + d.id + '.extendedDescription', replacements));
}
if (d.languageCodes && d.languageCodes.length) {
more
.append('div')
.attr('class', 'community-languages')
.text(t('success.languages', { languages: d.languageCodes.join(', ') }));
}
}
function linkify(url) {